Skip to content

Commit 2c46659

Browse files
committed
Add wayland support
1 parent 09e1066 commit 2c46659

File tree

1 file changed

+33
-8
lines changed

1 file changed

+33
-8
lines changed

.github/workflows/build.yaml

Lines changed: 33 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,19 @@ jobs:
6363
zlib1g \
6464
libssl3 \
6565
libpng16-16 \
66-
wget curl python3-pip imagemagick
66+
wget curl python3-pip imagemagick \
67+
libwayland-client0 \
68+
libwayland-cursor0 \
69+
libwayland-egl1 \
70+
libwayland-server0 \
71+
qtwayland5 \
72+
qt6-wayland
6773
6874
- name: Install Qt using aqtinstall
6975
run: |
7076
python3 -m pip install --upgrade pip
7177
python3 -m pip install "aqtinstall<4"
78+
python3 -m aqt list-qt linux desktop --modules "${QT_VERSION}" linux_gcc_64
7279
python3 -m aqt install-qt --outputdir "$HOME/Qt" linux desktop "${QT_VERSION}" linux_gcc_64 -m qtwebsockets
7380
echo "$HOME/Qt/${QT_VERSION}/gcc_64/bin" >> "$GITHUB_PATH"
7481
@@ -94,14 +101,10 @@ jobs:
94101
mkdir -p "$APPDIR/usr/share/applications"
95102
mkdir -p "$APPDIR/usr/share/icons/hicolor/256x256/apps"
96103
97-
# Copy binary
98104
cp "build/${APP_NAME}" "$APPDIR/usr/bin/"
99-
100-
# Convert .ico to .png and copy it
101-
cp resources/subtivals.png $APPDIR/subtivals.png
105+
cp resources/subtivals.png "$APPDIR/subtivals.png"
102106
convert "resources/${APP_NAME}.ico" -resize 256x256 "$APPDIR/usr/share/icons/hicolor/256x256/apps/${APP_NAME}.png"
103107
104-
# Create .desktop file
105108
cat <<EOF > "$APPDIR/usr/share/applications/${APP_NAME}.desktop"
106109
[Desktop Entry]
107110
Name=${APP_NAME}
@@ -115,9 +118,31 @@ jobs:
115118
run: |
116119
ldd "$APPDIR/usr/bin/${APP_NAME}" || true
117120
118-
- name: Run linuxdeployqt
121+
- name: Bundle Wayland plugins & run linuxdeployqt
119122
run: |
120-
linuxdeployqt "AppDir/usr/share/applications/${APP_NAME}.desktop" -appimage -bundle-non-qt-libs
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 Wayland shell integration plugins
131+
mkdir -p "$APPDIR/usr/plugins/wayland-shell-integration"
132+
cp "$HOME/Qt/${QT_VERSION}/gcc_64/plugins/wayland-shell-integration/"*.so \
133+
"$APPDIR/usr/plugins/wayland-shell-integration/" || true
134+
135+
# Copy Wayland-related Qt libraries
136+
mkdir -p "$APPDIR/usr/lib"
137+
cp -u "$HOME/Qt/${QT_VERSION}/gcc_64/lib/libQt6Wayland"* "$APPDIR/usr/lib/" || true
138+
139+
# Include xcb for fallback
140+
cp "$HOME/Qt/${QT_VERSION}/gcc_64/plugins/platforms/libqxcb.so" "$APPDIR/usr/plugins/platforms/" || true
141+
142+
# Bundle everything
143+
linuxdeployqt "$APPDIR/usr/share/applications/${APP_NAME}.desktop" \
144+
-appimage -bundle-non-qt-libs
145+
121146
mv ./*.AppImage "${APP_NAME}-${PACKAGE_VERSION}.AppImage"
122147
chmod +x "${APP_NAME}-${PACKAGE_VERSION}.AppImage"
123148

0 commit comments

Comments
 (0)