From 460c601be7e4423a11aa3946693918524152e653 Mon Sep 17 00:00:00 2001 From: RetroGameDeveloper <40120498+RetroGameDeveloper@users.noreply.github.com> Date: Sun, 8 Nov 2026 16:58:56 +0000 Subject: [PATCH] fix: use the C# compiler icon option syntax for portable Windows --- packaging/windows/build.ps1 | 2 +- tests/test_windows_portable.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packaging/windows/build.ps1 b/packaging/windows/build.ps1 index 4c7449d0e..475cecd1b 100644 --- a/packaging/windows/build.ps1 +++ b/packaging/windows/build.ps1 @@ -79,7 +79,7 @@ raise SystemExit(main()) $compiler = Join-Path $env:WINDIR 'Microsoft.NET/Framework64/v4.0.30319/csc.exe' if (-not (Test-Path -LiteralPath $compiler)) { throw 'The portable launcher needs the .NET Framework C# compiler.' } & $compiler /nologo /target:winexe /platform:x64 /reference:System.Windows.Forms.dll ` - "/win32icon=$(Join-Path $app 'decompdecomp.ico')" "/out:$(Join-Path $app 'decompdecomp.exe')" ` + "/win32icon:$(Join-Path $app 'decompdecomp.ico')" "/out:$(Join-Path $app 'decompdecomp.exe')" ` (Join-Path $PSScriptRoot 'portable-launcher.cs') if ($LASTEXITCODE -ne 0) { throw 'Could not compile the portable Windows launcher.' } Copy-Item -LiteralPath (Join-Path $PSScriptRoot 'portable-README.txt') -Destination (Join-Path $app 'README.txt') diff --git a/tests/test_windows_portable.py b/tests/test_windows_portable.py index 913e13fb2..52095f9b5 100644 --- a/tests/test_windows_portable.py +++ b/tests/test_windows_portable.py @@ -27,7 +27,8 @@ def test_portable_exe_forwards_arguments_and_exit_status_after_relocation(tmp_pa original = tmp_path / 'original' original.mkdir() subprocess.run([str(compiler), '/nologo', '/target:winexe', '/platform:x64', - '/reference:System.Windows.Forms.dll', '/out:' + str(original / 'decompdecomp.exe'), + '/reference:System.Windows.Forms.dll', + '/win32icon:' + str(ROOT / 'src/decompnet/app/static/favicon.ico'), '/out:' + str(original / 'decompdecomp.exe'), str(ROOT / 'packaging/windows/portable-launcher.cs')], check=True, capture_output=True) helper = tmp_path / 'probe.cs' helper.write_text('''using System;