8686 echo "ninja-dir=${{ github.workspace }}/tools/ninja" >> "$GITHUB_OUTPUT"
8787 echo "cmake-dir=${{ github.workspace }}/tools/cmake_64" >> "$GITHUB_OUTPUT"
8888 echo "mingw-dir=${{ github.workspace }}/tools/mingw1310_64" >> "$GITHUB_OUTPUT"
89- echo "installer-dir=${{ github.workspace }}/tools/QtInstallerFramework/4.7" >> "$GITHUB_OUTPUT"
9089 echo "package-dir=${{ github.workspace }}/build/installer/package" >> "$GITHUB_OUTPUT"
91- echo "package -data-dir=${{ github.workspace }}/build/installer/package/org.josevcm.nfc-lab /data" >> "$GITHUB_OUTPUT"
92- echo "package -meta-dir=${{ github.workspace }}/build/installer/package/org.josevcm.nfc-lab /meta" >> "$GITHUB_OUTPUT"
90+ echo "installer -data-dir=${{ github.workspace }}/build/installer/data" >> "$GITHUB_OUTPUT"
91+ echo "installer -meta-dir=${{ github.workspace }}/build/installer/meta" >> "$GITHUB_OUTPUT"
9392 echo "cpu-count=4" >> "$GITHUB_OUTPUT"
9493
9594 - name : ' Cache dependencies'
@@ -104,12 +103,16 @@ jobs:
104103 - name : ' Install dependencies'
105104 if : steps.cache-dependencies.outputs.cache-hit != 'true'
106105 run : |
106+ # install Qt and build tools
107107 choco install aqt -y --no-progress -r
108108 aqt install-qt windows desktop 6.7.2 win64_mingw --outputdir ${{ github.workspace }}/qt
109109 aqt install-tool windows desktop tools_mingw1310 qt.tools.win64_mingw1310 --outputdir ${{ github.workspace }}
110110 aqt install-tool windows desktop tools_cmake qt.tools.cmake --outputdir ${{ github.workspace }}
111111 aqt install-tool windows desktop tools_ninja qt.tools.ninja --outputdir ${{ github.workspace }}
112- aqt install-tool windows desktop tools_ifw qt.tools.ifw.47 --outputdir ${{ github.workspace }}
112+
113+ - name : ' Install NSIS'
114+ run : |
115+ choco install nsis.portable -y --no-progress -r
113116
114117 - name : ' Build project'
115118 run : |
@@ -130,25 +133,23 @@ jobs:
130133 - name : ' Create installer'
131134 run : |
132135 # create installer folders
133- New-Item -Force -ItemType "directory" -Path ${{ steps.strings-windows.outputs.package -data-dir }}
134- New-Item -Force -ItemType "directory" -Path ${{ steps.strings-windows.outputs.package -meta-dir }}
136+ New-Item -Force -ItemType "directory" -Path ${{ steps.strings-windows.outputs.installer -data-dir }}
137+ New-Item -Force -ItemType "directory" -Path ${{ steps.strings-windows.outputs.installer -meta-dir }}
135138
136139 # copy executable and libraries
137- Copy-Item -Force ${{ steps.strings-windows.outputs.build-dir }}/src/nfc-app/app-qt/nfc-lab.exe ${{ steps.strings-windows.outputs.package-data-dir }}
138- Copy-Item -Force ${{ steps.strings-windows.outputs.mingw-dir }}/bin/*.dll ${{ steps.strings-windows.outputs.package-data-dir }}
139- Copy-Item -Force ${{ github.workspace }}/dll/airspy/x86_64/bin/*.dll ${{ steps.strings-windows.outputs.package-data-dir }}
140- Copy-Item -Force ${{ github.workspace }}/dll/hydrasdr/x86_64/bin/*.dll ${{ steps.strings-windows.outputs.package-data-dir }}
141- Copy-Item -Force ${{ github.workspace }}/dll/openssl/x86_64/bin/*.dll ${{ steps.strings-windows.outputs.package-data-dir }}
142- Copy-Item -Force ${{ github.workspace }}/dll/rtlsdr/x86_64/bin/*.dll ${{ steps.strings-windows.outputs.package-data-dir }}
143- Copy-Item -Force ${{ github.workspace }}/dll/usb/x86_64/bin/*.dll ${{ steps.strings-windows.outputs.package-data-dir }}
144-
145- # copy drivers and firmware
146- Copy-Item -Force -Recurse ${{ github.workspace }}/dat/config ${{ steps.strings-windows.outputs.package-data-dir }}
147- Copy-Item -Force -Recurse ${{ github.workspace }}/dat/drivers ${{ steps.strings-windows.outputs.package-data-dir }}
148- Copy-Item -Force -Recurse ${{ github.workspace }}/dat/firmware ${{ steps.strings-windows.outputs.package-data-dir }}
140+ Copy-Item -Force ${{ steps.strings-windows.outputs.build-dir }}/src/nfc-app/app-qt/nfc-lab.exe ${{ steps.strings-windows.outputs.installer-data-dir }}
141+ Copy-Item -Force ${{ steps.strings-windows.outputs.mingw-dir }}/bin/*.dll ${{ steps.strings-windows.outputs.installer-data-dir }}
142+ Copy-Item -Force ${{ github.workspace }}/dll/airspy/x86_64/bin/*.dll ${{ steps.strings-windows.outputs.installer-data-dir }}
143+ Copy-Item -Force ${{ github.workspace }}/dll/hydrasdr/x86_64/bin/*.dll ${{ steps.strings-windows.outputs.installer-data-dir }}
144+ Copy-Item -Force ${{ github.workspace }}/dll/openssl/x86_64/bin/*.dll ${{ steps.strings-windows.outputs.installer-data-dir }}
145+ Copy-Item -Force ${{ github.workspace }}/dll/rtlsdr/x86_64/bin/*.dll ${{ steps.strings-windows.outputs.installer-data-dir }}
146+ Copy-Item -Force ${{ github.workspace }}/dll/usb/x86_64/bin/*.dll ${{ steps.strings-windows.outputs.installer-data-dir }}
149147
150- # copy installer resources
151- Copy-Item -Force ${{ steps.strings-windows.outputs.build-dir }}/installer/config/*.* ${{ steps.strings-windows.outputs.package-meta-dir }}
148+ # copy drivers, firmware and installer resources
149+ Copy-Item -Force -Recurse ${{ github.workspace }}/dat/config ${{ steps.strings-windows.outputs.installer-data-dir }}
150+ Copy-Item -Force -Recurse ${{ github.workspace }}/dat/drivers ${{ steps.strings-windows.outputs.installer-data-dir }}
151+ Copy-Item -Force -Recurse ${{ github.workspace }}/dat/firmware ${{ steps.strings-windows.outputs.installer-data-dir }}
152+ Copy-Item -Force -Recurse ${{ github.workspace }}/dat/resources ${{ steps.strings-windows.outputs.installer-meta-dir }}
152153
153154 # create deployment
154155 ${{ steps.strings-windows.outputs.qt-dir }}/bin/windeployqt `
@@ -157,20 +158,23 @@ jobs:
157158 --no-translations `
158159 --no-system-d3d-compiler `
159160 --no-opengl-sw `
160- ${{ steps.strings-windows.outputs.package-data-dir }}/nfc-lab.exe
161-
161+ ${{ steps.strings-windows.outputs.installer-data-dir }}/nfc-lab.exe
162+
163+ # create portable package
164+ Compress-Archive `
165+ -Path ${{ steps.strings-windows.outputs.installer-data-dir }}/* `
166+ -DestinationPath ${{ github.workspace }}/nfc-lab-${{ steps.strings-windows.outputs.build-version }}-x86_64-portable.zip
167+
162168 # create installer
163- ${{ steps.strings-windows.outputs.installer-dir }}/bin/binarycreator `
164- --verbose `
165- -c ${{ steps.strings-windows.outputs.build-dir }}/installer/config/config.xml `
166- -p ${{ steps.strings-windows.outputs.package-dir }} `
167- nfc-lab-${{ steps.strings-windows.outputs.build-version }}-x86_64.exe
169+ makensis ${{ steps.strings-windows.outputs.installer-meta-dir }}/script.nsi
168170
169171 - name : ' Upload artifact'
170172 uses : actions/upload-artifact@v4
171173 with :
172174 name : windows-artifact
173- path : ${{ github.workspace }}/*.exe
175+ path : |
176+ ${{ github.workspace }}/*.exe
177+ ${{ github.workspace }}/*.zip
174178
175179 #
176180 # Create release job
@@ -230,17 +234,15 @@ jobs:
230234 # WinGet release job
231235 #
232236 winget-release :
233-
234237 runs-on : windows-latest
235238 needs : create-release
236- if : github.ref_type == 'tag'
237-
239+ # if: github.ref_type == 'tag'
240+ if : false
238241 steps :
239-
240242 - name : ' WinGet Releaser'
241243 uses : vedantmgoyal9/winget-releaser@v2
242244 with :
243245 identifier : josevcm.nfc-lab
244- installers-regex : ' nfc-lab-.*-x86_64\.exe $'
246+ installers-regex : ' nfc-lab-.*-x86_64-portable\.zip $'
245247 token : ${{ secrets.WINGET_TOKEN }}
246248 fork-user : josevcm
0 commit comments