forked from dolphin-emu/dolphin
-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathBuildLinuxAppImage.sh
More file actions
executable file
·52 lines (41 loc) · 1.75 KB
/
BuildLinuxAppImage.sh
File metadata and controls
executable file
·52 lines (41 loc) · 1.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/bin/bash
# Environment variables
if [ "$(uname -m)" = "x86_64" ];
then
export ARCH=x86_64
echo "CPU architecture detected as x86_64."
elif [ "$(uname -m)" = "aarch64" ];
then
export ARCH=aarch64
echo "CPU architecture detected as aarch64."
else
echo "CPU architecture not supported or detected."
exit 1
fi
export APPIMAGE_EXTRACT_AND_RUN=1
export QMAKE=$(which qmake6)
# Prepare the AppDir
DESTDIR=./AppDir ninja install
mkdir -p ./AppDir/usr/Source/Core
cp -r ./Source/Core/DolphinQt ./AppDir/usr/Source/Core
rm -rf ./AppDir/usr/Source/Core/DolphinQt/CMakeFiles
rm -rf ./AppDir/usr/Source/Core/DolphinQt/project-plus-dolphin_autogen
rm ./AppDir/usr/Source/Core/DolphinQt/cmake_install.cmake
rm ./AppDir/usr/bin/project-plus-dolphin-nogui
rm ./AppDir/usr/bin/dolphin-tool
mv ./AppDir/usr/share/project-plus-dolphin/sys ./AppDir/usr/bin/Sys
rm -rf ./AppDir/usr/share/project-plus-dolphin
sed -i 's/env QT_QPA_PLATFORM=xcb project-plus-dolphin/project-plus-dolphin/g' ./AppDir/usr/share/applications/project-plus-dolphin.desktop
# Prepare Tools for building the AppImage
wget -N https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-${ARCH}.AppImage
wget -N https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-${ARCH}.AppImage
wget -N https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-${ARCH}.AppImage
chmod a+x linuxdeploy-${ARCH}.AppImage
chmod a+x linuxdeploy-plugin-qt-${ARCH}.AppImage
chmod a+x appimagetool-${ARCH}.AppImage
# Build the AppImage
./linuxdeploy-${ARCH}.AppImage \
--appdir AppDir \
--plugin qt
echo 'env QT_QPA_PLATFORM=xcb' >> ./AppDir/apprun-hooks/linuxdeploy-plugin-qt-hook.sh
./appimagetool-${ARCH}.AppImage ./AppDir