Skip to content

Commit

Permalink
build(linux): use linuxdeploy qt plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
NikhilNarayana committed Feb 13, 2024
1 parent 4b7c472 commit b1b804e
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion build-appimage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ LINUXDEPLOY_PATH="https://github.com/linuxdeploy/linuxdeploy/releases/download/c
LINUXDEPLOY_FILE="linuxdeploy-x86_64.AppImage"
LINUXDEPLOY_URL="${LINUXDEPLOY_PATH}/${LINUXDEPLOY_FILE}"

LINUXDEPLOY_QT_PLUGIN_PATH="https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/1-alpha-20240109-1"
LINUXDEPLOY_QT_PLUGIN_FILE="linuxdeploy-plugin-qt-x86_64.AppImage"
LINUXDEPLOY_QT_PLUGIN_URL="${LINUXDEPLOY_QT_PLUGIN_PATH}/${LINUXDEPLOY_QT_PLUGIN_FILE}"

UPDATEPLUG_PATH="https://github.com/linuxdeploy/linuxdeploy-plugin-appimage/releases/download/continuous"
UPDATEPLUG_FILE="linuxdeploy-plugin-appimage-x86_64.AppImage"
UPDATEPLUG_URL="${UPDATEPLUG_PATH}/${UPDATEPLUG_FILE}"
Expand All @@ -27,6 +31,9 @@ export NO_STRIP=on
if [ ! -e ./Tools/linuxdeploy ]; then
wget ${LINUXDEPLOY_URL} -O ./Tools/linuxdeploy
fi
if [ ! -e "./Tools/${LINUXDEPLOY_QT_PLUGIN_FILE}" ]; then
wget ${LINUXDEPLOY_QT_PLUGIN_URL} -O "./Tools/${LINUXDEPLOY_QT_PLUGIN_FILE}"
fi
if [ ! -e ./Tools/linuxdeploy-update-plugin ]; then
wget ${UPDATEPLUG_URL} -O ./Tools/linuxdeploy-update-plugin
fi
Expand All @@ -37,6 +44,7 @@ fi
chmod +x ./Tools/linuxdeploy
chmod +x ./Tools/linuxdeploy-update-plugin
chmod +x ./Tools/appimageupdatetool
chmod +x "./Tools/${LINUXDEPLOY_QT_PLUGIN_FILE}"

# Delete the AppDir folder to prevent build issues
rm -rf ./AppDir/
Expand All @@ -45,13 +53,18 @@ rm -rf ./AppDir/
mkdir -p ${APPDIR_HOOKS}
cp Data/linux-env.sh ${APPDIR_HOOKS}

# Ensure qt6 is properly set
qtchooser -install qt6 $(which qmake6)
export QT_SELECT=qt6

# Build the AppDir directory for this image
mkdir -p AppDir
./Tools/linuxdeploy \
--appdir=./AppDir \
-e ./build/Binaries/dolphin-emu \
-d ./Data/slippi-dolphin.desktop \
-i ./Data/dolphin-emu.png
-i ./Data/dolphin-emu.png \
--plugin qt

# Add the Sys dir to the AppDir for packaging
cp -r Data/Sys ${APPDIR_BIN}
Expand Down

0 comments on commit b1b804e

Please sign in to comment.