Skip to content

Commit d1145c6

Browse files
committed
Replacing installer
1 parent 004b1a7 commit d1145c6

File tree

14 files changed

+98
-205
lines changed

14 files changed

+98
-205
lines changed

.github/workflows/build.yml

Lines changed: 44 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -90,39 +90,61 @@ jobs:
9090
permissions: write-all
9191
steps:
9292
- uses: actions/checkout@v3
93-
- name: Install Qt
94-
uses: jurplel/install-qt-action@v3
95-
with:
96-
version: '6.7.0'
97-
target: 'desktop'
98-
arch: 'win64_msvc2019_64'
99-
modules: 'qtserialport'
100-
tools: 'tools_ifw tools_opensslv3_x64'
101-
cache: true
102-
- name: Download artifact
93+
94+
- name: Download built executable
10395
uses: actions/download-artifact@v4
10496
with:
10597
name: ${{env.EXEC}}
106-
path: gui/packaging/packages/com.vendor.product/data/
107-
- name: Download installer metadata
98+
path: data/
99+
100+
- name: Download packaging metadata
108101
uses: actions/download-artifact@v4
109102
with:
110103
name: package-metadata
111-
path: ${{github.workspace}}/gui/packaging
112-
- name: Get dependencies
113-
run: windeployqt.exe gui\packaging\packages\com.vendor.product\data\${{env.EXEC}} --release --force
114-
- name: Copy assets
115-
run: copy gui\assets\icon\eeprom_icon.ico gui\packaging\packages\com.vendor.product\data\eeprom_icon.ico
116-
- name: Create installer
104+
path: ./gui/packaging
105+
106+
- name: Set up Python
107+
uses: actions/setup-python@v5
108+
with:
109+
python-version: "3.11"
110+
111+
- name: Install dependencies
112+
run: pip install jinja2
113+
114+
- name: Install Qt (windeployqt)
115+
uses: jurplel/install-qt-action@v3
116+
with:
117+
version: 6.9.1
118+
host: windows
119+
target: desktop
120+
arch: win64_mingw
121+
modules: qtserialport
122+
tools: tools_mingw
123+
124+
- name: Run windeployqt
117125
run: |
118-
dir ${{github.workspace}}\..\Qt\Tools\QtInstallerFramework
119-
${{github.workspace}}\..\Qt\Tools\QtInstallerFramework\4.7\bin\binarycreator.exe -c config\config.xml -p packages ${{env.PROGNAME}}-installer-win64.exe
120-
working-directory: gui/packaging
126+
& "${{ env.Qt6_DIR }}\bin\windeployqt.exe" data\${{ env.EXEC }} --release --force
127+
128+
- name: Copy icon
129+
run: copy gui\assets\icon\eeprom_icon.ico data\
130+
131+
- name: Generate Inno Setup script
132+
run: python gui/packaging/package.py
133+
134+
- name: Install Inno Setup
135+
run: |
136+
Invoke-WebRequest -Uri "https://jrsoftware.org/download.php/ispack.exe" -OutFile "ispack.exe"
137+
Start-Process -Wait -FilePath ".\ispack.exe" -ArgumentList "/verysilent", "/norestart"
138+
shell: powershell
139+
140+
- name: Build installer
141+
run: '"C:\Program Files (x86)\Inno Setup 6\ISCC.exe" gui\packaging\installer\setup.iss'
142+
121143
- name: Upload installer
122144
uses: actions/upload-artifact@v4
123145
with:
124146
name: ${{env.PROGNAME}}-installer-win64.exe
125-
path: gui/packaging/${{env.PROGNAME}}-installer-win64.exe
147+
path: gui/packaging/installer/*.exe
126148

127149
# deploy Windows installer
128150
deploy-installer-windows:

gui/packaging/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
data
2+
installer
3+
setup.iss

gui/packaging/config/config.xml

Lines changed: 0 additions & 11 deletions
This file was deleted.

gui/packaging/config/config.xml.template

Lines changed: 0 additions & 20 deletions
This file was deleted.

gui/packaging/config/installscript.qs

Lines changed: 0 additions & 38 deletions
This file was deleted.

gui/packaging/package-local.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/sh
2+
3+
# clean any previous data
4+
rm -rvf data
5+
6+
# create folder
7+
mkdir -v data
8+
9+
# copy executable
10+
cp -v ../build/release/pico-sst39sf0x0-programmer.exe data/
11+
12+
# run windeploy
13+
/c/Qt/6.9.1/mingw_64/bin/windeployqt.exe data/pico-sst39sf0x0-programmer.exe --release --force
14+
15+
# copy icon
16+
cp -v ../../gui/assets/icon/eeprom_icon.ico data/
17+
18+
# build installer script
19+
/C/Users/iawfi/anaconda3/python.exe package.py
20+
21+
# create installer
22+
/c/Program\ Files\ \(x86\)/Inno\ Setup\ 6/ISCC.exe setup.iss

gui/packaging/package.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,7 @@ def render(templates, filenames, variables):
3434

3535
def read_templates():
3636
templates = [
37-
os.path.join(ROOT, 'config', 'config.xml'),
38-
os.path.join(ROOT, 'packages', 'com.vendor.product', 'meta', 'installscript.qs'),
39-
os.path.join(ROOT, 'packages', 'com.vendor.product', 'meta', 'package.xml'),
37+
os.path.join(ROOT, 'setup.iss'),
4038
]
4139

4240
jinja_templates = []

gui/packaging/package.sh

Lines changed: 0 additions & 23 deletions
This file was deleted.

gui/packaging/packages/.gitignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

gui/packaging/packages/com.vendor.product/meta/installscript.qs

Lines changed: 0 additions & 39 deletions
This file was deleted.

0 commit comments

Comments
 (0)