aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorxxanqw <[email protected]>2025-11-26 15:26:13 +0200
committerxxanqw <[email protected]>2025-11-26 15:26:13 +0200
commit4b27a643d5781df3959e454fb2796d04b9e45767 (patch)
tree621c2d52982fc63826888275e4f9aecda4f069b2 /.github/workflows
parenta045eb784e9b859d60efaac095551237b3d1107f (diff)
downloadmikusays-c-4b27a643d5781df3959e454fb2796d04b9e45767.tar.gz
mikusays-c-4b27a643d5781df3959e454fb2796d04b9e45767.zip
Enhance NSIS script: implement architecture-specific executable handling and add debug steps for asset verification
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/package-win.yml26
1 files changed, 23 insertions, 3 deletions
diff --git a/.github/workflows/package-win.yml b/.github/workflows/package-win.yml
index 3942cb3..ae2397f 100644
--- a/.github/workflows/package-win.yml
+++ b/.github/workflows/package-win.yml
@@ -212,11 +212,11 @@ jobs:
; --- Architecture Detection & Redist Selection ---
; We select both the app binary and the correct VC Redist URL here
ReadEnvStr $0 "PROCESSOR_ARCHITECTURE"
- ${If} $0 == "ARM64"
- File "/oname=mikusays.exe" "mikusays-windows-aarch64.exe"
+ ${If} $0 == "ARM64"
+ File "/oname=mikusays.exe" "__ARMEXE__"
StrCpy $1 "https://aka.ms/vs/17/release/vc_redist.arm64.exe"
${Else}
- File "/oname=mikusays.exe" "mikusays-windows-x86_64.exe"
+ File "/oname=mikusays.exe" "__X64EXE__"
StrCpy $1 "https://aka.ms/vs/17/release/vc_redist.x64.exe"
${EndIf}
@@ -267,12 +267,32 @@ jobs:
SectionEnd
'@
+ $exe_x64 = "mikusays-windows-x86_64-$Version.exe"
+ $exe_arm = "mikusays-windows-aarch64-$Version.exe"
+
$nsisContent = $nsisContent.Replace("__OUTFILE__", $InstallerName)
$nsisContent = $nsisContent.Replace("__NSISVERSION__", $NsisVersion)
$nsisContent = $nsisContent.Replace("__VERSION__", $Version)
+ $nsisContent = $nsisContent.Replace("__X64EXE__", $exe_x64)
+ $nsisContent = $nsisContent.Replace("__ARMEXE__", $exe_arm)
Set-Content -Path installer.nsi -Value $nsisContent
+ - name: List workspace contents for debug
+ shell: pwsh
+ run: |
+ Write-Host "-- Workspace Contents --"
+ Get-ChildItem -File | ForEach-Object { Write-Host $_.Name }
+
+ - name: Verify downloaded assets
+ shell: pwsh
+ run: |
+ $Version = "${{ steps.get_version.outputs.version }}"
+ $exe_x64 = "mikusays-windows-x86_64-$Version.exe"
+ $exe_arm = "mikusays-windows-aarch64-$Version.exe"
+ if (-not (Test-Path $exe_x64)) { Write-Error "Missing expected asset $exe_x64"; exit 1 }
+ if (-not (Test-Path $exe_arm)) { Write-Error "Missing expected asset $exe_arm"; exit 1 }
+
- name: Compile Installer
shell: cmd
run: '"C:\Program Files (x86)\NSIS\makensis.exe" installer.nsi'