Skip to content

Commit 72c9850

Browse files
authored
Release 1.8.0 (#20)
* Adding quickwrite functionality * Modifying installer * Adding installer icon * Removing version from folder name * Modifying templates * Further tuning installer * Changing launcher script and always using quickflash * Adding line * Yet another change * Making another change * Replacing installer * Adjusting script * Fixing reference * Fixing link * Fixing script * Showing folder * Doing tree * Changing paths * Ensuring same version * New verison * Back to 6.7.0 * Aligning toolchain
1 parent 4721172 commit 72c9850

18 files changed

+206
-158
lines changed

.github/workflows/build.yml

Lines changed: 41 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -62,67 +62,66 @@ jobs:
6262
with:
6363
name: ${{env.EXEC}}
6464
path: ${{github.workspace}}/build/Release/${{env.EXEC}}
65-
66-
# create packaging metadata
67-
prepare-installer-windows:
68-
runs-on: ubuntu-latest
69-
needs: build-gui-windows
70-
permissions: write-all
71-
steps:
72-
- uses: actions/checkout@v3
73-
- name: install dependencies
74-
run: sudo apt-get update && sudo apt-get install -y python3 python3-jinja2
75-
- name: run packaging script
76-
run: python3 gui/packaging/package.py
77-
- name: Upload packaging scripts
78-
uses: actions/upload-artifact@v4
79-
with:
80-
name: package-metadata
81-
path: |
82-
${{github.workspace}}/gui/packaging/config/config.xml
83-
${{github.workspace}}/gui/packaging/packages/com.vendor.product/meta/installscript.qs
84-
${{github.workspace}}/gui/packaging/packages/com.vendor.product/meta/package.xml
8565

8666
# create Windows installer
8767
create-installer-windows:
8868
runs-on: windows-latest
89-
needs: prepare-installer-windows
69+
needs: build-gui-windows
9070
permissions: write-all
9171
steps:
9272
- uses: actions/checkout@v3
93-
- name: Install Qt
73+
74+
- name: Download built executable
75+
uses: actions/download-artifact@v4
76+
with:
77+
name: ${{env.EXEC}}
78+
path: gui/packaging/data/
79+
80+
- name: Set up Python
81+
uses: actions/setup-python@v5
82+
with:
83+
python-version: "3.11"
84+
85+
- name: Install dependencies
86+
run: pip install jinja2
87+
88+
- name: Install Qt (windeployqt)
9489
uses: jurplel/install-qt-action@v3
9590
with:
9691
version: '6.7.0'
92+
host: windows
9793
target: 'desktop'
9894
arch: 'win64_msvc2019_64'
95+
tools: 'tools_opensslv3_x64'
9996
modules: 'qtserialport'
100-
tools: 'tools_ifw tools_opensslv3_x64'
10197
cache: true
102-
- name: Download artifact
103-
uses: actions/download-artifact@v4
104-
with:
105-
name: ${{env.EXEC}}
106-
path: gui/packaging/packages/com.vendor.product/data/
107-
- name: Download installer metadata
108-
uses: actions/download-artifact@v4
109-
with:
110-
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
98+
99+
- name: Run windeployqt
100+
run: |
101+
& "${{ env.Qt6_DIR }}\bin\windeployqt.exe" gui\packaging\data\${{ env.EXEC }} --release --force
102+
103+
- name: Copy icon
104+
run: copy gui\assets\icon\eeprom_icon.ico gui\packaging\data\
105+
106+
- name: Generate Inno Setup script
107+
run: python gui/packaging/package.py
108+
109+
- name: Install Inno Setup
110+
run: |
111+
Invoke-WebRequest -Uri "https://jrsoftware.org/download.php/ispack.exe" -OutFile "ispack.exe"
112+
Start-Process -Wait -FilePath ".\ispack.exe" -ArgumentList "/verysilent", "/norestart"
113+
shell: powershell
114+
115+
- name: Build installer
116+
shell: cmd
117117
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
118+
"C:\Program Files (x86)\Inno Setup 6\ISCC.exe" gui\packaging\setup.iss
119+
121120
- name: Upload installer
122121
uses: actions/upload-artifact@v4
123122
with:
124123
name: ${{env.PROGNAME}}-installer-win64.exe
125-
path: gui/packaging/${{env.PROGNAME}}-installer-win64.exe
124+
path: gui/packaging/installer/*.exe
126125

127126
# deploy Windows installer
128127
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 & 11 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: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def main():
1414
# set names and folders
1515
variables = {
1616
'publisher': 'retrohacks.nl',
17-
'progfolder': 'pico-sst39sf0x0-programmer-' + version,
17+
'progfolder': 'pico-sst39sf0x0-programmer',
1818
'executable': 'pico-sst39sf0x0-programmer',
1919
'progdescription': 'PICO SST39SF0x0 Programmer',
2020
'progname': 'PICO SST39SF0x0 Programmer',
@@ -29,14 +29,13 @@ def main():
2929
def render(templates, filenames, variables):
3030
for template, filename in zip(templates, filenames):
3131
content = template.render(variables)
32+
print('Writing to: %s' % filename)
3233
with open(filename, 'w', encoding='utf-8') as f:
3334
f.write(content)
3435

3536
def read_templates():
3637
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'),
38+
os.path.join(ROOT, 'setup.iss'),
4039
]
4140

4241
jinja_templates = []

gui/packaging/package.sh

Lines changed: 0 additions & 22 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 & 17 deletions
This file was deleted.

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

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

0 commit comments

Comments
 (0)