@@ -62,67 +62,66 @@ jobs:
62
62
with :
63
63
name : ${{env.EXEC}}
64
64
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
85
65
86
66
# create Windows installer
87
67
create-installer-windows :
88
68
runs-on : windows-latest
89
- needs : prepare-installer -windows
69
+ needs : build-gui -windows
90
70
permissions : write-all
91
71
steps :
92
72
- 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)
94
89
uses : jurplel/install-qt-action@v3
95
90
with :
96
91
version : ' 6.7.0'
92
+ host : windows
97
93
target : ' desktop'
98
94
arch : ' win64_msvc2019_64'
95
+ tools : ' tools_opensslv3_x64'
99
96
modules : ' qtserialport'
100
- tools : ' tools_ifw tools_opensslv3_x64'
101
97
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
117
117
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
+
121
120
- name : Upload installer
122
121
uses : actions/upload-artifact@v4
123
122
with :
124
123
name : ${{env.PROGNAME}}-installer-win64.exe
125
- path : gui/packaging/${{env.PROGNAME}}- installer-win64 .exe
124
+ path : gui/packaging/installer/* .exe
126
125
127
126
# deploy Windows installer
128
127
deploy-installer-windows :
0 commit comments