mirror of
https://github.com/Neo-Desktop/WindowsXPKg
synced 2025-12-10 04:05:13 +02:00
Update windows-x86-x64.yml
This commit is contained in:
18
.github/workflows/windows-x86-x64.yml
vendored
18
.github/workflows/windows-x86-x64.yml
vendored
@@ -211,7 +211,12 @@ jobs:
|
|||||||
# Strip symbols
|
# Strip symbols
|
||||||
strip .\umskt.exe
|
strip .\umskt.exe
|
||||||
|
|
||||||
# Generate the Resource Hacker script
|
# Validate input EXE exists
|
||||||
|
if (!(Test-Path .\umskt.exe)) {
|
||||||
|
throw "Input file .\umskt.exe does not exist!"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Prepare ResHacker script (no indentation inside block!)
|
||||||
$resourceHackerScript = @"
|
$resourceHackerScript = @"
|
||||||
[FILENAMES]
|
[FILENAMES]
|
||||||
Exe=.\umskt.exe
|
Exe=.\umskt.exe
|
||||||
@@ -223,17 +228,20 @@ jobs:
|
|||||||
"@
|
"@
|
||||||
|
|
||||||
$iniPath = "$env:TEMP\remove_icons.ini"
|
$iniPath = "$env:TEMP\remove_icons.ini"
|
||||||
|
$logPath = "$env:TEMP\reshacker_log.txt"
|
||||||
$resourceHackerScript | Set-Content -Encoding ASCII $iniPath
|
$resourceHackerScript | Set-Content -Encoding ASCII $iniPath
|
||||||
|
|
||||||
# Run Resource Hacker and wait for result
|
# Validate ResHacker path
|
||||||
$resHacker = "C:\ResourceHacker\ResourceHacker.exe"
|
$resHacker = "C:\ResourceHacker\ResourceHacker.exe"
|
||||||
if (!(Test-Path $resHacker)) {
|
if (!(Test-Path $resHacker)) {
|
||||||
throw "Resource Hacker not found at $resHacker"
|
throw "Resource Hacker not found at $resHacker"
|
||||||
}
|
}
|
||||||
|
|
||||||
& "$resHacker" -script "$iniPath"
|
# Run Resource Hacker and capture output
|
||||||
|
& "$resHacker" -script "$iniPath" *> "$logPath"
|
||||||
|
Get-Content "$logPath"
|
||||||
|
|
||||||
# Verify output file was created
|
# Check if output file was created
|
||||||
if (!(Test-Path .\umskt_comp.exe)) {
|
if (!(Test-Path .\umskt_comp.exe)) {
|
||||||
throw "Resource Hacker failed to create umskt_comp.exe"
|
throw "Resource Hacker failed to create umskt_comp.exe"
|
||||||
}
|
}
|
||||||
@@ -245,6 +253,8 @@ jobs:
|
|||||||
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