Skip to content

Commit ef326ab

Browse files
committed
Add local AppImage builder + directions
1 parent 2f1ee08 commit ef326ab

File tree

2 files changed

+62
-0
lines changed

2 files changed

+62
-0
lines changed

BuildLinuxAppImage.sh

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
#!/bin/bash
2+
3+
# Environment variables
4+
if [ "$(uname -m)" = "x86_64" ];
5+
then
6+
export ARCH=x86_64
7+
echo "CPU architecture detected as x86_64."
8+
9+
elif [ "$(uname -m)" = "aarch64" ];
10+
then
11+
export ARCH=aarch64
12+
echo "CPU architecture detected as aarch64."
13+
14+
else
15+
echo "CPU architecture not supported or detected."
16+
exit 1
17+
fi
18+
19+
export APPIMAGE_EXTRACT_AND_RUN=1
20+
export QMAKE=$(which qmake6)
21+
22+
# Prepare the AppDir
23+
DESTDIR=./AppDir ninja install
24+
mkdir -p ./AppDir/usr/Source/Core
25+
cp -r ./Source/Core/DolphinQt ./AppDir/usr/Source/Core
26+
rm -rf ./AppDir/usr/Source/Core/DolphinQt/CMakeFiles
27+
rm -rf ./AppDir/usr/Source/Core/DolphinQt/dolphin-emu_autogen
28+
rm ./AppDir/usr/Source/Core/DolphinQt/cmake_install.cmake
29+
rm ./AppDir/usr/bin/dolphin-emu-nogui
30+
rm ./AppDir/usr/bin/dolphin-tool
31+
mv ./AppDir/usr/share/dolphin-emu/sys ./AppDir/usr/bin/Sys
32+
rm -rf ./AppDir/usr/share/dolphin-emu
33+
sed -i 's/env QT_QPA_PLATFORM=xcb dolphin-emu/dolphin-emu/g' ./AppDir/usr/share/applications/dolphin-emu.desktop
34+
35+
# Prepare Tools for building the AppImage
36+
wget -N https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-${ARCH}.AppImage
37+
wget -N https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-${ARCH}.AppImage
38+
wget -N https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-${ARCH}.AppImage
39+
40+
41+
chmod a+x linuxdeploy-${ARCH}.AppImage
42+
chmod a+x linuxdeploy-plugin-qt-${ARCH}.AppImage
43+
chmod a+x appimagetool-${ARCH}.AppImage
44+
45+
# Build the AppImage
46+
./linuxdeploy-${ARCH}.AppImage \
47+
--appdir AppDir \
48+
--plugin qt
49+
50+
echo 'env QT_QPA_PLATFORM=xcb' >> ./AppDir/apprun-hooks/linuxdeploy-plugin-qt-hook.sh
51+
52+
./appimagetool-${ARCH}.AppImage ./AppDir

Readme.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,16 @@ Or useful for having multiple distinct Dolphin setups for testing/development/TA
149149
4. `make -j $(nproc)`
150150
5. `cp -r ../Data/Sys/ ../Data/User/ ../Data/Launcher/ ../Data/portable.txt Binaries/`
151151

152+
153+
### Linux AppImage Build Steps:
154+
155+
Used for distribution of Project+ builds.
156+
157+
1. `mkdir Build`
158+
2. `cd Build`
159+
3. `cmake .. -DLINUX_LOCAL_DEV=true -DCMAKE_INSTALL_PREFIX=/usr -GNinja`
160+
4. `../BuildLinuxAppImage.sh`
161+
152162
## Building for Android
153163

154164
These instructions assume familiarity with Android development. If you do not have an

0 commit comments

Comments
 (0)