mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 13:27:45 -07:00
add CPU architecture detection and remove linuxdeploy-checkrt-plugin
This commit is contained in:
parent
d55d844eda
commit
13c81e423e
@ -1,7 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Environment variables
|
||||
export ARCH=x86_64
|
||||
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=/usr/lib/qt6/bin/qmake
|
||||
|
||||
@ -19,23 +33,20 @@ rm -rf ./AppDir/usr/share/dolphin-emu
|
||||
sed -i 's/env QT_QPA_PLATFORM=xcb dolphin-emu/dolphin-emu/g' ./AppDir/usr/share/applications/dolphin-emu.desktop
|
||||
|
||||
# Prepare Tools for building the AppImage
|
||||
wget -N https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
|
||||
wget -N https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage
|
||||
wget -N https://github.com/linuxdeploy/linuxdeploy-plugin-checkrt/releases/download/continuous/linuxdeploy-plugin-checkrt-x86_64.sh
|
||||
wget -N https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.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-x86_64.AppImage
|
||||
chmod a+x linuxdeploy-plugin-qt-x86_64.AppImage
|
||||
chmod a+x linuxdeploy-plugin-checkrt-x86_64.sh
|
||||
chmod a+x appimagetool-x86_64.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-x86_64.AppImage \
|
||||
./linuxdeploy-${ARCH}.AppImage \
|
||||
--appdir AppDir \
|
||||
--plugin qt \
|
||||
--plugin checkrt
|
||||
--plugin qt
|
||||
|
||||
echo 'export QT_QPA_PLATFORM=xcb' >> ./AppDir/apprun-hooks/linuxdeploy-plugin-qt-hook.sh
|
||||
echo 'env QT_QPA_PLATFORM=xcb' >> ./AppDir/apprun-hooks/linuxdeploy-plugin-qt-hook.sh
|
||||
|
||||
./appimagetool-x86_64.AppImage ./AppDir
|
||||
./appimagetool-${ARCH}.AppImage ./AppDir
|
||||
|
Loading…
Reference in New Issue
Block a user