From b2f072cbe6570bd9f08d27d8d6ed169c896d145d Mon Sep 17 00:00:00 2001 From: TheTank20 <57580668+thepwrtank18@users.noreply.github.com> Date: Wed, 23 Jul 2025 10:21:35 -0500 Subject: [PATCH] Update windows-x86-x64.yml --- .github/workflows/windows-x86-x64.yml | 35 +++++++++++++++++++++------ 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/.github/workflows/windows-x86-x64.yml b/.github/workflows/windows-x86-x64.yml index 84c2ef4..75c85dc 100644 --- a/.github/workflows/windows-x86-x64.yml +++ b/.github/workflows/windows-x86-x64.yml @@ -208,22 +208,43 @@ jobs: - name: Compress binaries shell: pwsh run: | + # Strip symbols strip .\umskt.exe + + # Generate the Resource Hacker script $resourceHackerScript = @" [FILENAMES] - Exe=D:\a\UMSKT\UMSKT\umskt.exe - SaveAs=D:\a\UMSKT\UMSKT\umskt_comp.exe + Exe=.\umskt.exe + SaveAs=.\umskt_comp.exe [DELETE] Icon=* IconGroup=* - "@ - $resourceHackerScript | Set-Content -Encoding ASCII "$env:TEMP\remove_icons.ini" - C:\ResourceHacker\ResourceHacker.exe -script $("$env:TEMP\remove_icons.ini") - C:\UPX\upx-5.0.2-win64\upx.exe --best --ultra-brute .\umskt_comp.exe + "@ + + $iniPath = "$env:TEMP\remove_icons.ini" + $resourceHackerScript | Set-Content -Encoding ASCII $iniPath + + # Run Resource Hacker and wait for result + $resHacker = "C:\ResourceHacker\ResourceHacker.exe" + if (!(Test-Path $resHacker)) { + throw "Resource Hacker not found at $resHacker" + } + + & "$resHacker" -script "$iniPath" + + # Verify output file was created + if (!(Test-Path .\umskt_comp.exe)) { + throw "Resource Hacker failed to create umskt_comp.exe" + } + + # Compress with UPX + & "C:\UPX\upx-5.0.2-win64\upx.exe" --best --ultra-brute .\umskt_comp.exe + + # Replace original EXE Remove-Item .\umskt.exe Rename-Item -Path .\umskt_comp.exe -NewName umskt.exe - + - name: Run tests shell: pwsh run: |