mirror of
https://github.com/Neo-Desktop/WindowsXPKg
synced 2025-12-08 11:15:14 +02:00
Update windows-x86-x64.yml
This commit is contained in:
35
.github/workflows/windows-x86-x64.yml
vendored
35
.github/workflows/windows-x86-x64.yml
vendored
@@ -208,22 +208,43 @@ jobs:
|
|||||||
- name: Compress binaries
|
- name: Compress binaries
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
run: |
|
run: |
|
||||||
|
# Strip symbols
|
||||||
strip .\umskt.exe
|
strip .\umskt.exe
|
||||||
|
|
||||||
|
# Generate the Resource Hacker script
|
||||||
$resourceHackerScript = @"
|
$resourceHackerScript = @"
|
||||||
[FILENAMES]
|
[FILENAMES]
|
||||||
Exe=D:\a\UMSKT\UMSKT\umskt.exe
|
Exe=.\umskt.exe
|
||||||
SaveAs=D:\a\UMSKT\UMSKT\umskt_comp.exe
|
SaveAs=.\umskt_comp.exe
|
||||||
|
|
||||||
[DELETE]
|
[DELETE]
|
||||||
Icon=*
|
Icon=*
|
||||||
IconGroup=*
|
IconGroup=*
|
||||||
"@
|
"@
|
||||||
$resourceHackerScript | Set-Content -Encoding ASCII "$env:TEMP\remove_icons.ini"
|
|
||||||
C:\ResourceHacker\ResourceHacker.exe -script $("$env:TEMP\remove_icons.ini")
|
$iniPath = "$env:TEMP\remove_icons.ini"
|
||||||
C:\UPX\upx-5.0.2-win64\upx.exe --best --ultra-brute .\umskt_comp.exe
|
$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
|
Remove-Item .\umskt.exe
|
||||||
Rename-Item -Path .\umskt_comp.exe -NewName umskt.exe
|
Rename-Item -Path .\umskt_comp.exe -NewName umskt.exe
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Reference in New Issue
Block a user