Linux Build Fixes

- fixed AppImage not accepting arguments (for example -f -g ROM_file to start directly)
- adjusted AppImage build.sh so it can find Qt libs on Fedora (#98)
- perl-Digest-SHA package is needed for shasum on Fedora
- added option do disable linking against LLVM 17 (Steam Deck specific)
- updated build-for-linux.md (Steam Deck specific)
This commit is contained in:
reg_server
2025-01-03 19:49:07 +01:00
parent 02cfee3f18
commit d306ebea30
9 changed files with 58 additions and 26 deletions

View File

@@ -3,11 +3,11 @@
cd "$APPDIR"
if [ -d /usr/lib/aarch64-linux-gnu/qt5 ]; then
exec ./yuzu-bwrap.sh
exec ./yuzu-bwrap.sh "$@"
else
if [ -d /usr/lib/aarch64-linux-gnu/qt6 ]; then
exec ./yuzu-bwrap.sh
exec ./yuzu-bwrap.sh "$@"
else
exec ./yuzu.sh
exec ./yuzu.sh "$@"
fi
fi

View File

@@ -1,8 +1,8 @@
#! /bin/sh
if [ -d /usr/lib/aarch64-linux-gnu/qt5 ]; then
exec ./bwrap --dev-bind / / --tmpfs /usr/lib/aarch64-linux-gnu/qt5 ./yuzu.sh
exec ./bwrap --dev-bind / / --tmpfs /usr/lib/aarch64-linux-gnu/qt5 ./yuzu.sh "$@"
else
if [ -d /usr/lib/aarch64-linux-gnu/qt6 ]; then
exec ./bwrap --dev-bind / / --tmpfs /usr/lib/aarch64-linux-gnu/qt6 ./yuzu.sh
exec ./bwrap --dev-bind / / --tmpfs /usr/lib/aarch64-linux-gnu/qt6 ./yuzu.sh "$@"
fi
fi

View File

@@ -3,4 +3,4 @@
# NOTE: the `ld-linux-aarch64.so.1` filename came from a pi debian 11 installation,
# this may be incorrect for a different or more up-to-date system.
# Can find out the correct filename using command "ldd yuzu" on the non-AppImage app
QT_QPA_PLATFORM=xcb QT_PLUGIN_PATH=. exec ./ld-linux-aarch64.so.1 --library-path . ./yuzu
QT_QPA_PLATFORM=xcb QT_PLUGIN_PATH=. exec ./ld-linux-aarch64.so.1 --library-path . ./yuzu "$@"

View File

@@ -4,21 +4,21 @@ cd "$APPDIR"
# default qt5 location
if [ -d /usr/lib/x86_64-linux-gnu/qt5 ]; then
exec ./yuzu-bwrap.sh
exec ./yuzu-bwrap.sh "$@"
else
# qt5 on Steam Deck (as qt)
if [ -d /usr/lib/qt ]; then
exec ./yuzu-bwrap.sh
exec ./yuzu-bwrap.sh "$@"
else
# default qt6 location
if [ -d /usr/lib/x86_64-linux-gnu/qt6 ]; then
exec ./yuzu-bwrap.sh
exec ./yuzu-bwrap.sh "$@"
else
# qt6 on Steam Deck
if [ -d /usr/lib/qt6 ]; then
exec ./yuzu-bwrap.sh
exec ./yuzu-bwrap.sh "$@"
else
exec ./yuzu.sh
exec ./yuzu.sh "$@"
fi
fi
fi

View File

@@ -2,19 +2,19 @@
# default qt5 location
if [ -d /usr/lib/x86_64-linux-gnu/qt5 ]; then
exec ./bwrap --dev-bind / / --tmpfs /usr/lib/x86_64-linux-gnu/qt5 ./yuzu.sh
exec ./bwrap --dev-bind / / --tmpfs /usr/lib/x86_64-linux-gnu/qt5 ./yuzu.sh "$@"
else
# qt5 on Steam Deck (as qt)
if [ -d /usr/lib/qt ]; then
exec ./bwrap --dev-bind / / --tmpfs /usr/lib/qt ./yuzu.sh
exec ./bwrap --dev-bind / / --tmpfs /usr/lib/qt ./yuzu.sh "$@"
else
# default qt6 location
if [ -d /usr/lib/x86_64-linux-gnu/qt6 ]; then
exec ./bwrap --dev-bind / / --tmpfs /usr/lib/x86_64-linux-gnu/qt6 ./yuzu.sh
exec ./bwrap --dev-bind / / --tmpfs /usr/lib/x86_64-linux-gnu/qt6 ./yuzu.sh "$@"
else
# qt6 on Steam Deck
if [ -d /usr/lib/qt6 ]; then
exec ./bwrap --dev-bind / / --tmpfs /usr/lib/qt6 ./yuzu.sh
exec ./bwrap --dev-bind / / --tmpfs /usr/lib/qt6 ./yuzu.sh "$@"
fi
fi
fi

View File

@@ -1,2 +1,2 @@
#! /bin/sh
QT_QPA_PLATFORM=xcb QT_PLUGIN_PATH=. exec ./ld-linux-x86-64.so.2 --library-path . ./yuzu
QT_QPA_PLATFORM=xcb QT_PLUGIN_PATH=. exec ./ld-linux-x86-64.so.2 --library-path . ./yuzu "$@"

View File

@@ -11,6 +11,7 @@ fi
# Get paths
ARCH="$(uname -m)"
SYSTEM_LIBS="/usr/lib"
SYSTEM_LIBS64="/usr/lib64"
YUZU_BIN="${1}/bin"
YUZU_BIN_GUI="${YUZU_BIN}/yuzu"
@@ -24,20 +25,29 @@ rm -rf build
mkdir build
# NOTE: some of these aren't used now, but can be reordered in priority when torzu is converted to QT6
# Find QT folder (Steam Deck fix), check for default qt5 first
# QT5 - /usr/lib/${ARCH}-linux-gnu/qt5 (debian), /usr/lib64/qt5 (fedora), /usr/lib/qt (steam deck)
# QT5 - /usr/lib/${ARCH}-linux-gnu/qt6 (debian), /usr/lib64/qt6 (fedora), /usr/lib/qt6 (steam deck)
QTFOUND="true"
QTDIR="$SYSTEM_LIBS"/${ARCH}-linux-gnu/qt5/plugins
if [ ! -d "$QTDIR" ]; then
# default qt5 folder not found, check for Steam Deck qt (qt5) folder
QTDIR="$SYSTEM_LIBS"/qt/plugins
# default qt5 folder not found, check for 64-bit qt5 folder
QTDIR="$SYSTEM_LIBS64"/qt5/plugins
if [ ! -d "$QTDIR" ]; then
# Steam Deck qt (qt5) folder not found, check for regular qt6 folder
QTDIR="$SYSTEM_LIBS"/${ARCH}-linux-gnu/qt6/plugins
# 64-bit qt5 folder not found, check for Steam Deck qt (qt5) folder
QTDIR="$SYSTEM_LIBS"/qt/plugins
if [ ! -d "$QTDIR" ]; then
# regular qt6 folder not found, check for Steam Deck qt6 folder
QTDIR="$SYSTEM_LIBS"/qt6/plugins
# Steam Deck qt (qt5) folder not found, check for regular qt6 folder
QTDIR="$SYSTEM_LIBS"/${ARCH}-linux-gnu/qt6/plugins
if [ ! -d "$QTDIR" ]; then
QTFOUND="false"
# regular qt6 folder not found, check for 64-bit qt6 folder
QTDIR="$SYSTEM_LIBS64"/qt6/plugins
if [ ! -d "$QTDIR" ]; then
# 64-bit qt6 folder not found, check for Steam Deck qt6 folder
QTDIR="$SYSTEM_LIBS"/qt6/plugins
if [ ! -d "$QTDIR" ]; then
QTFOUND="false"
fi
fi
fi
fi
fi