Skip to content

Commit 9a2f9d6

Browse files
alltheseasclaude
andcommitted
fix: also fix CI-generated installer and deduplicate .iss config
The CI workflow in rust.yml generated its own .iss file inline with the same {pf} bug, so the previous commit only fixed local builds. This removes the inline generation and has CI pass /DBuildArch to the shared scripts/windows-installer.iss via Inno Setup preprocessor defines. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 1259231 commit 9a2f9d6

File tree

2 files changed

+15
-30
lines changed

2 files changed

+15
-30
lines changed

.github/workflows/rust.yml

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -231,37 +231,10 @@ jobs:
231231
Write-Output "Building for target: $target"
232232
cargo build --release --target=$target
233233
234-
# Generate ISS Script
235-
- name: Generate Inno Setup Script
236-
shell: pwsh
237-
run: |
238-
$arch = "${{ matrix.arch }}"
239-
$issContent = @"
240-
[Setup]
241-
AppName=Damus Notedeck
242-
AppVersion=0.1
243-
DefaultDirName={pf}\Notedeck
244-
DefaultGroupName=Damus Notedeck
245-
OutputDir=..\packages\$arch
246-
OutputBaseFilename=DamusNotedeckInstaller
247-
Compression=lzma
248-
SolidCompression=yes
249-
250-
[Files]
251-
Source: "..\target\$arch-pc-windows-msvc\release\notedeck.exe"; DestDir: "{app}"; Flags: ignoreversion
252-
253-
[Icons]
254-
Name: "{group}\Damus Notedeck"; Filename: "{app}\notedeck.exe"
255-
256-
[Run]
257-
Filename: "{app}\notedeck.exe"; Description: "Launch Damus Notedeck"; Flags: nowait postinstall skipifsilent
258-
"@
259-
Set-Content -Path "scripts/windows-installer-$arch.iss" -Value $issContent
260-
261234
# Build Installer
262235
- name: Run Inno Setup Script
263236
run: |
264-
& "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" "scripts\windows-installer-${{ matrix.arch }}.iss"
237+
& "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" /DBuildArch=${{ matrix.arch }} "scripts\windows-installer.iss"
265238
266239
# Move output
267240
- name: Move Inno Script outputs to architecture-specific folder

scripts/windows-installer.iss

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,29 @@
1+
#ifndef BuildArch
2+
#define BuildArch ""
3+
#endif
4+
5+
#if BuildArch != ""
6+
#define ExeSource "..\target\" + BuildArch + "-pc-windows-msvc\release\notedeck.exe"
7+
#define PkgOutputDir "..\packages\" + BuildArch
8+
#else
9+
#define ExeSource "..\target\release\notedeck.exe"
10+
#define PkgOutputDir "..\packages"
11+
#endif
12+
113
[Setup]
214
AppName=Damus Notedeck
315
AppVersion=0.1
416
DefaultDirName={autopf}\Notedeck
517
DefaultGroupName=Damus Notedeck
6-
OutputDir=..\packages
18+
OutputDir={#PkgOutputDir}
719
OutputBaseFilename=DamusNotedeckInstaller
820
Compression=lzma
921
SolidCompression=yes
1022
ArchitecturesAllowed=x64compatible
1123
ArchitecturesInstallIn64BitMode=x64compatible
1224

1325
[Files]
14-
Source: "..\target\release\notedeck.exe"; DestDir: "{app}"; Flags: ignoreversion
26+
Source: "{#ExeSource}"; DestDir: "{app}"; Flags: ignoreversion
1527

1628
[Icons]
1729
Name: "{group}\Damus Notedeck"; Filename: "{app}\notedeck.exe"

0 commit comments

Comments
 (0)