From 3ccc7e22087a980dfb318c797d0eeb6189e60910 Mon Sep 17 00:00:00 2001 From: Neyunse Date: Mon, 4 Aug 2025 21:45:40 -0300 Subject: [PATCH 1/4] update build-multiplatform.yml and build.py --- .github/workflows/build-multiplatform.yml | 15 +++++++++-- build.py | 31 +++++++++++++++-------- 2 files changed, 33 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build-multiplatform.yml b/.github/workflows/build-multiplatform.yml index ef13885..9b1cb0d 100644 --- a/.github/workflows/build-multiplatform.yml +++ b/.github/workflows/build-multiplatform.yml @@ -32,11 +32,21 @@ jobs: - name: Build engine and bootstrapper run: | python build.py + - name: Decodificar certificado PFX + run: | + echo "${{ secrets.CODESIGN_PFX }}" | Out-File -Encoding ascii -FilePath cert_base64.txt + certutil -decode cert_base64.txt cert.pfx + shell: pwsh + - name: Firmar engine.exe y bootstrapper.exe + run: | + & "C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64\signtool.exe" sign /f cert.pfx /p "${{ secrets.CODESIGN_PFX_PASSWORD }}" /tr http://timestamp.digicert.com /td sha256 /fd sha256 dist/engine.exe + & "C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64\signtool.exe" sign /f cert.pfx /p "${{ secrets.CODESIGN_PFX_PASSWORD }}" /tr http://timestamp.digicert.com /td sha256 /fd sha256 dist/lib/bootstrapper.exe + shell: pwsh - name: Upload Artifacts uses: actions/upload-artifact@v4 with: name: dist-windows - path: dist/vne-win.zip + path: dist build-linux: runs-on: ubuntu-22.04 @@ -59,11 +69,12 @@ jobs: - name: Build engine and bootstrapper run: | python build.py + # incluye el firmado aqui de engine.exe y /lib/bootstrapper.exe - name: Upload Artifacts uses: actions/upload-artifact@v4 with: name: dist-linux - path: dist/vne-linux.zip + path: dist # Temporarily disabled # build-mac: diff --git a/build.py b/build.py index afa04ef..12be683 100644 --- a/build.py +++ b/build.py @@ -64,6 +64,12 @@ def so_name(): sys.exit(1) def build_engine(): + no_zip = False + for arg in sys.argv[1:]: + if arg == "--no-zip": + no_zip = True + break + # Verify that main.py exists in the current directory. if not os.path.exists("main.py"): print("[build.py] Error: main.py was not found in the current directory.") @@ -87,18 +93,21 @@ def build_engine(): subprocess.check_call(doc) print("[build.py] The documentation was correctly constructed") - if platform.system() == "Windows": - print("[build.py] Zipping the engine and documentation...") - zip_folders_and_files(['./dist/lib', './dist/docs'], ['./dist/engine.exe'], f'./dist/vne-win.zip') - elif platform.system() == "Linux": - print("[build.py] Zipping the engine and documentation for Linux...") - zip_folders_and_files(['./dist/lib', './dist/docs'], ['./dist/engine'], f'./dist/vne-linux.zip') - elif platform.system() == "Darwin": - print("[build.py] Zipping the engine and documentation for macOS...") - zip_folders_and_files(['./dist/lib', './dist/docs'], ['./dist/engine'], f'./dist/vne-darwin.zip') + if not no_zip: + if platform.system() == "Windows": + print("[build.py] Zipping the engine and documentation...") + zip_folders_and_files(['./dist/lib', './dist/docs'], ['./dist/engine.exe'], f'./dist/vne-win.zip') + elif platform.system() == "Linux": + print("[build.py] Zipping the engine and documentation for Linux...") + zip_folders_and_files(['./dist/lib', './dist/docs'], ['./dist/engine'], f'./dist/vne-linux.zip') + elif platform.system() == "Darwin": + print("[build.py] Zipping the engine and documentation for macOS...") + zip_folders_and_files(['./dist/lib', './dist/docs'], ['./dist/engine'], f'./dist/vne-darwin.zip') + else: + print(f"[build.py] Error: Unsupported platform '{platform.system()}'. Cannot zip engine and documentation.") + sys.exit(1) else: - print(f"[build.py] Error: Unsupported platform '{platform.system()}'. Cannot zip engine and documentation.") - sys.exit(1) + print("[build.py] Skipping zipping of engine and documentation as per --no-zip flag.") except subprocess.CalledProcessError as e: print(f"[build.py] Error during compilation: {e}") sys.exit(1) From 45f80eccc3ea3829a8db27325c13c83bfcd50fda Mon Sep 17 00:00:00 2001 From: Neyunse Date: Mon, 4 Aug 2025 21:48:30 -0300 Subject: [PATCH 2/4] ci: update build-multiplatform.yml --- .github/workflows/build-multiplatform.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-multiplatform.yml b/.github/workflows/build-multiplatform.yml index 9b1cb0d..b6a9493 100644 --- a/.github/workflows/build-multiplatform.yml +++ b/.github/workflows/build-multiplatform.yml @@ -32,15 +32,15 @@ jobs: - name: Build engine and bootstrapper run: | python build.py - - name: Decodificar certificado PFX + - name: Decode PFX certificate run: | echo "${{ secrets.CODESIGN_PFX }}" | Out-File -Encoding ascii -FilePath cert_base64.txt certutil -decode cert_base64.txt cert.pfx shell: pwsh - - name: Firmar engine.exe y bootstrapper.exe + - name: Sign engine.exe y bootstrapper.exe run: | - & "C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64\signtool.exe" sign /f cert.pfx /p "${{ secrets.CODESIGN_PFX_PASSWORD }}" /tr http://timestamp.digicert.com /td sha256 /fd sha256 dist/engine.exe - & "C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64\signtool.exe" sign /f cert.pfx /p "${{ secrets.CODESIGN_PFX_PASSWORD }}" /tr http://timestamp.digicert.com /td sha256 /fd sha256 dist/lib/bootstrapper.exe + & "C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64\signtool.exe" sign /f cert.pfx /p "${{ secrets.VNE_KEY }}" /tr http://timestamp.digicert.com /td sha256 /fd sha256 dist/engine.exe + & "C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64\signtool.exe" sign /f cert.pfx /p "${{ secrets.VNE_KEY }}" /tr http://timestamp.digicert.com /td sha256 /fd sha256 dist/lib/bootstrapper.exe shell: pwsh - name: Upload Artifacts uses: actions/upload-artifact@v4 From 0f8a5d87da86d8b82b795893db792c44bc46a5d8 Mon Sep 17 00:00:00 2001 From: Neyunse Date: Mon, 4 Aug 2025 21:48:47 -0300 Subject: [PATCH 3/4] ci: update build-multiplatform.yml --- .github/workflows/build-multiplatform.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-multiplatform.yml b/.github/workflows/build-multiplatform.yml index b6a9493..7ba6a3c 100644 --- a/.github/workflows/build-multiplatform.yml +++ b/.github/workflows/build-multiplatform.yml @@ -31,7 +31,7 @@ jobs: pip install -r requirements.txt - name: Build engine and bootstrapper run: | - python build.py + python build.py --no-zip - name: Decode PFX certificate run: | echo "${{ secrets.CODESIGN_PFX }}" | Out-File -Encoding ascii -FilePath cert_base64.txt From 441af560936e77b1fc91c2149b13fd1bbb93cdf9 Mon Sep 17 00:00:00 2001 From: Neyunse Date: Mon, 4 Aug 2025 21:50:20 -0300 Subject: [PATCH 4/4] ci: update build-multiplatform.yml --- .github/workflows/build-multiplatform.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/build-multiplatform.yml b/.github/workflows/build-multiplatform.yml index 7ba6a3c..1abc453 100644 --- a/.github/workflows/build-multiplatform.yml +++ b/.github/workflows/build-multiplatform.yml @@ -47,6 +47,11 @@ jobs: with: name: dist-windows path: dist + - name: delete cert files + run: | + del cert.pfx + del cert_base64.txt + shell: pwsh build-linux: runs-on: ubuntu-22.04