Skip to content

Commit 586c67e

Browse files
committed
fix(windows installer): Update to the latest Inno Setup and cache it
1. Cached Inno Setup Installer Added cache restoration step with key innosetup-6.5.4-exe Download only occurs if cache miss (cache-hit != 'true') 2. Cached ChineseSimplified.isl Added cache restoration step with key chinese-simplified-isl-6.5 Download to local file instead of directly to Program Files directory Copy from cached location to Inno Setup directory during build 3. Fixed Build Issues Directory Creation: Used PowerShell New-Item to ensure the Languages directory exists File Copy: Used Copy-Item to move the cached language file to the correct location ISCC Path: Used the full path with & operator to properly invoke ISCC.exe 4. Benefits Faster Builds: Cached files avoid repeated downloads More Reliable: Proper directory creation and file handling Version Control: Cache keys include version numbers for proper invalidation
1 parent fe3889f commit 586c67e

File tree

1 file changed

+25
-4
lines changed

1 file changed

+25
-4
lines changed

.github/workflows/windows_build.yml

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,16 @@ jobs:
4646
run: |
4747
uv pip install .[win_dist]
4848
49+
- name: Restore Inno Setup installer from cache
50+
id: cache-innosetup
51+
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
52+
with:
53+
path: installer.exe
54+
key: innosetup-6.5.4-exe
55+
4956
- name: Download Inno Setup installer
50-
run: curl -L -o installer.exe http://files.jrsoftware.org/is/6/innosetup-6.4.3.exe
57+
if: steps.cache-innosetup.outputs.cache-hit != 'true'
58+
run: curl -L -o installer.exe http://files.jrsoftware.org/is/6/innosetup-6.5.4.exe
5159

5260
- name: Install Inno Setup
5361
run: ./installer.exe /verysilent /allusers /dir=inst
@@ -96,13 +104,26 @@ jobs:
96104
Write-Host "::warning::Running in a fork which may have limited permissions"
97105
}
98106
107+
- name: Restore ChineseSimplified.isl from cache
108+
id: cache-chinese-isl
109+
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
110+
with:
111+
path: ChineseSimplified.isl
112+
key: chinese-simplified-isl-6.5
113+
114+
- name: Download ChineseSimplified.isl
115+
if: steps.cache-chinese-isl.outputs.cache-hit != 'true'
116+
run: |
117+
curl -L -o ChineseSimplified.isl https://raw.githubusercontent.com/jrsoftware/issrc/refs/heads/main/Files/Languages/Unofficial/ChineseSimplified.isl
118+
99119
- name: Build installer
100120
run: |
121+
New-Item -ItemType Directory -Force -Path "inst\Languages"
122+
Copy-Item "ChineseSimplified.isl" -Destination "inst\Languages\ChineseSimplified.isl"
101123
cd windows
102124
$env:VERSION=$(python return_version.py)
103-
curl -L -o "c:\program files (x86)\inno setup 6\Languages\ChineseSimplified.isl" https://raw.githubusercontent.com/jrsoftware/issrc/refs/heads/main/Files/Languages/Unofficial/ChineseSimplified.isl
104-
ISCC.exe /dMyAppVersion=$env:VERSION ardupilot_methodic_configurator.iss
105-
ls Output
125+
Start-Process -FilePath "..\inst\ISCC.exe" -ArgumentList "/dMyAppVersion=$env:VERSION", "ardupilot_methodic_configurator.iss" -Wait -NoNewWindow
126+
Get-ChildItem Output
106127
107128
# https://github.com/slsa-framework/slsa-github-generator/blob/main/internal/builders/generic/README.md
108129
- name: Generate hashes

0 commit comments

Comments
 (0)