@@ -118,10 +118,26 @@ jobs:
118118 run : |
119119 ldd "$APPDIR/usr/bin/${APP_NAME}" || true
120120
121- - name : Run linuxdeployqt
121+ - name : Bundle Wayland plugins & run linuxdeployqt
122122 run : |
123- linuxdeployqt "AppDir/usr/share/applications/${APP_NAME}.desktop" -appimage -bundle-non-qt-libs \
124- -extra-plugins=wayland
123+ APPDIR=AppDir
124+
125+ # Ensure Qt Wayland platform plugins are in AppDir
126+ ls -la "$HOME/Qt/${QT_VERSION}/gcc_64/plugins/platforms/"
127+ mkdir -p "$APPDIR/usr/plugins/platforms"
128+ cp "$HOME/Qt/${QT_VERSION}/gcc_64/plugins/platforms/libqwayland"* "$APPDIR/usr/plugins/platforms/" || true
129+
130+ # Copy any Wayland-related Qt libraries
131+ mkdir -p "$APPDIR/usr/lib"
132+ cp -u "$HOME/Qt/${QT_VERSION}/gcc_64/lib/libQt6Wayland"* "$APPDIR/usr/lib/" || true
133+
134+ # Also bundle the xcb plugin (for fallback on X11 hosts)
135+ cp "$HOME/Qt/${QT_VERSION}/gcc_64/plugins/platforms/libqxcb.so" "$APPDIR/usr/plugins/platforms/" || true
136+
137+ # Run linuxdeployqt without relying on -extra-plugins
138+ linuxdeployqt "$APPDIR/usr/share/applications/${APP_NAME}.desktop" \
139+ -appimage -bundle-non-qt-libs
140+
125141 mv ./*.AppImage "${APP_NAME}-${PACKAGE_VERSION}.AppImage"
126142 chmod +x "${APP_NAME}-${PACKAGE_VERSION}.AppImage"
127143
@@ -137,177 +153,9 @@ jobs:
137153 path : " *.AppImage"
138154 if-no-files-found : error
139155
140- build-mac :
141- runs-on : macos-latest
142- environment : build
143- strategy :
144- matrix :
145- demo : [false, true]
146- steps :
147- - name : Checkout repository
148- uses : actions/checkout@v4
149- with :
150- fetch-depth : 0
151-
152- - name : Get latest tag version
153- run : echo "PACKAGE_VERSION=$(git describe --tags --abbrev=0 || echo 0.0.0)" >> "$GITHUB_ENV"
154-
155- - name : Apply patch
156- if : matrix.demo == true
157- run : |
158- git config --global user.name "github-actions[bot]"
159- git config --global user.email "[email protected] " 160- git diff --binary origin/main...origin/demo > demo.patch
161- git apply demo.patch
162-
163- - name : Install Qt
164- uses : jurplel/install-qt-action@v4
165- with :
166- version : ${{ env.QT_VERSION }}
167- modules : ' qtwebsockets'
168-
169- - name : Compile
170- run : |
171- mkdir -p build && cd build/
172- qmake "../src/${{ env.APP_NAME }}.pro" CONFIG+="${{ env.BUILD_TYPE }}"
173- make "-j$(sysctl -n hw.ncpu)"
174-
175- - name : Deploy
176- run : |
177- mv "build/${{ env.APP_NAME }}.app" "build/${{ env.APP_LABEL }}.app"
178- macdeployqt "build/${{ env.APP_LABEL }}.app" -dmg -verbose=2
179-
180- - run : mv "build/${{ env.APP_LABEL }}.dmg" "${{ env.APP_LABEL }}-${{ env.PACKAGE_VERSION }}${{ matrix.demo && '-demo-macos' || '' }}.dmg"
181-
182- - name : Zip builds
183- if : matrix.demo == false
184- run : zip -r -P "${{ secrets.ZIP_PASSWORD }}" "${{ env.APP_NAME }}-${{ env.PACKAGE_VERSION }}.zip" "${{ env.APP_LABEL }}-${{ env.PACKAGE_VERSION }}${{ matrix.demo && '-demo-macos' || '' }}.dmg"
185-
186- - name : Upload artifacts (demo)
187- if : matrix.demo == true
188- uses : actions/upload-artifact@v4
189- with :
190- name : ${{ env.APP_NAME }}-artifacts-mac-demo
191- path : " *.dmg"
192- if-no-files-found : error
193-
194- - name : Upload artifacts
195- if : matrix.demo == false
196- uses : actions/upload-artifact@v4
197- with :
198- name : ${{ env.APP_NAME }}-artifacts-mac
199- path : " *.zip"
200- if-no-files-found : error
201-
202- build-windows :
203- runs-on : windows-latest
204- environment : build
205- strategy :
206- matrix :
207- demo : [false, true]
208- env :
209- QT_DIR : ${{ github.workspace }}\Qt
210-
211- steps :
212- - name : Checkout repository
213- uses : actions/checkout@v4
214- with :
215- fetch-depth : 0
216-
217- - name : Get latest tag version
218- shell : pwsh
219- run : |
220- $tag = git describe --tags --abbrev=0
221- echo "PACKAGE_VERSION=$tag" >> $env:GITHUB_ENV
222-
223- - name : Apply patch
224- if : matrix.demo == true
225- run : |
226- git config --global user.name "github-actions[bot]"
227- git config --global user.email "[email protected] " 228- git diff --binary origin/main...origin/demo > demo.patch
229- git apply demo.patch
230-
231- - name : Get installer source
232- run : git checkout origin/win-installer -- ./win-installer.nsi
233-
234- - name : Install Qt (MinGW)
235- uses : jurplel/install-qt-action@v4
236- with :
237- aqtversion : ' ==3.1.19'
238- version : ${{ env.QT_VERSION }}
239- target : ' desktop'
240- arch : ' win64_mingw'
241- dir : ${{ env.QT_DIR }}
242- modules : ' qtwebsockets'
243- tools : ' tools_mingw1310'
244-
245- - name : Add Qt-bundled MinGW to PATH
246- shell : powershell
247- run : |
248- ECHO "${{ env.QT_DIR }}\Tools\mingw1310_64\bin" >> $env:GITHUB_PATH
249-
250- - name : Compile with MinGW
251- run : |
252- MKDIR build
253- CD build
254- qmake "../src/${{ env.APP_NAME }}.pro" CONFIG+="${{ env.BUILD_TYPE }}"
255- mingw32-make -j4
256-
257- - name : Deploy with windeployqt
258- run : |
259- MKDIR deploy
260- MOVE "build\${{ env.BUILD_TYPE }}\${{ env.APP_NAME }}.exe" deploy
261- CD deploy
262- windeployqt.exe --verbose 1 "${{ env.APP_NAME }}.exe"
263-
264- - name : Install NSIS via Scoop
265- run : |
266- iwr -useb get.scoop.sh -outfile 'install.ps1'
267- .\install.ps1 -RunAsAdmin
268- scoop update
269- scoop bucket add extras
270- scoop install nsis 7zip
271-
272- - name : Print NSIS version
273- run : makensis -VERSION
274-
275- - name : Create NSIS installer
276- run : |
277- makensis /DAPP_NAME="${{ env.APP_NAME }}" /DPACKAGE_VERSION="${{ env.PACKAGE_VERSION }}" win-installer.nsi
278-
279- - name : Rename installer
280- if : matrix.demo == true
281- run : |
282- MOVE "${{ env.APP_NAME }}-${{ env.PACKAGE_VERSION }}.exe" "${{ env.APP_NAME }}-${{ env.PACKAGE_VERSION }}-demo.exe"
283-
284- - name : Zip builds
285- if : matrix.demo == false
286- run : |
287- MOVE "${{ env.APP_NAME }}-${{ env.PACKAGE_VERSION }}.exe" "${{ env.APP_NAME }}-${{ env.PACKAGE_VERSION }}.exe"
288- 7z a -p"${{ secrets.ZIP_PASSWORD }}" -tzip "${{ env.APP_NAME }}-${{ env.PACKAGE_VERSION }}.zip" "${{ env.APP_NAME }}-${{ env.PACKAGE_VERSION }}.exe"
289-
290- - name : Upload artifacts (demo)
291- if : matrix.demo == true
292- uses : actions/upload-artifact@v4
293- with :
294- name : ${{ env.APP_NAME }}-artifacts-win-demo
295- path : " *.exe"
296- if-no-files-found : error
297-
298- - name : Upload artifacts
299- if : matrix.demo == false
300- uses : actions/upload-artifact@v4
301- with :
302- name : ${{ env.APP_NAME }}-artifacts-win
303- path : " *.zip"
304- if-no-files-found : error
305-
306156 release :
307157 needs :
308158 - build-linux
309- - build-mac
310- - build-windows
311159 if : startsWith(github.ref, 'refs/tags/')
312160 runs-on : ubuntu-latest
313161
0 commit comments