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:
@@ -3,11 +3,11 @@
|
|||||||
cd "$APPDIR"
|
cd "$APPDIR"
|
||||||
|
|
||||||
if [ -d /usr/lib/aarch64-linux-gnu/qt5 ]; then
|
if [ -d /usr/lib/aarch64-linux-gnu/qt5 ]; then
|
||||||
exec ./yuzu-bwrap.sh
|
exec ./yuzu-bwrap.sh "$@"
|
||||||
else
|
else
|
||||||
if [ -d /usr/lib/aarch64-linux-gnu/qt6 ]; then
|
if [ -d /usr/lib/aarch64-linux-gnu/qt6 ]; then
|
||||||
exec ./yuzu-bwrap.sh
|
exec ./yuzu-bwrap.sh "$@"
|
||||||
else
|
else
|
||||||
exec ./yuzu.sh
|
exec ./yuzu.sh "$@"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
if [ -d /usr/lib/aarch64-linux-gnu/qt5 ]; then
|
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
|
else
|
||||||
if [ -d /usr/lib/aarch64-linux-gnu/qt6 ]; then
|
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
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -3,4 +3,4 @@
|
|||||||
# NOTE: the `ld-linux-aarch64.so.1` filename came from a pi debian 11 installation,
|
# 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.
|
# 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
|
# 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 "$@"
|
||||||
|
|||||||
@@ -4,21 +4,21 @@ cd "$APPDIR"
|
|||||||
|
|
||||||
# default qt5 location
|
# default qt5 location
|
||||||
if [ -d /usr/lib/x86_64-linux-gnu/qt5 ]; then
|
if [ -d /usr/lib/x86_64-linux-gnu/qt5 ]; then
|
||||||
exec ./yuzu-bwrap.sh
|
exec ./yuzu-bwrap.sh "$@"
|
||||||
else
|
else
|
||||||
# qt5 on Steam Deck (as qt)
|
# qt5 on Steam Deck (as qt)
|
||||||
if [ -d /usr/lib/qt ]; then
|
if [ -d /usr/lib/qt ]; then
|
||||||
exec ./yuzu-bwrap.sh
|
exec ./yuzu-bwrap.sh "$@"
|
||||||
else
|
else
|
||||||
# default qt6 location
|
# default qt6 location
|
||||||
if [ -d /usr/lib/x86_64-linux-gnu/qt6 ]; then
|
if [ -d /usr/lib/x86_64-linux-gnu/qt6 ]; then
|
||||||
exec ./yuzu-bwrap.sh
|
exec ./yuzu-bwrap.sh "$@"
|
||||||
else
|
else
|
||||||
# qt6 on Steam Deck
|
# qt6 on Steam Deck
|
||||||
if [ -d /usr/lib/qt6 ]; then
|
if [ -d /usr/lib/qt6 ]; then
|
||||||
exec ./yuzu-bwrap.sh
|
exec ./yuzu-bwrap.sh "$@"
|
||||||
else
|
else
|
||||||
exec ./yuzu.sh
|
exec ./yuzu.sh "$@"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -2,19 +2,19 @@
|
|||||||
|
|
||||||
# default qt5 location
|
# default qt5 location
|
||||||
if [ -d /usr/lib/x86_64-linux-gnu/qt5 ]; then
|
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
|
else
|
||||||
# qt5 on Steam Deck (as qt)
|
# qt5 on Steam Deck (as qt)
|
||||||
if [ -d /usr/lib/qt ]; then
|
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
|
else
|
||||||
# default qt6 location
|
# default qt6 location
|
||||||
if [ -d /usr/lib/x86_64-linux-gnu/qt6 ]; then
|
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
|
else
|
||||||
# qt6 on Steam Deck
|
# qt6 on Steam Deck
|
||||||
if [ -d /usr/lib/qt6 ]; then
|
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
|
fi
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
#! /bin/sh
|
#! /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 "$@"
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ fi
|
|||||||
# Get paths
|
# Get paths
|
||||||
ARCH="$(uname -m)"
|
ARCH="$(uname -m)"
|
||||||
SYSTEM_LIBS="/usr/lib"
|
SYSTEM_LIBS="/usr/lib"
|
||||||
|
SYSTEM_LIBS64="/usr/lib64"
|
||||||
YUZU_BIN="${1}/bin"
|
YUZU_BIN="${1}/bin"
|
||||||
YUZU_BIN_GUI="${YUZU_BIN}/yuzu"
|
YUZU_BIN_GUI="${YUZU_BIN}/yuzu"
|
||||||
|
|
||||||
@@ -24,20 +25,29 @@ rm -rf build
|
|||||||
mkdir build
|
mkdir build
|
||||||
|
|
||||||
# NOTE: some of these aren't used now, but can be reordered in priority when torzu is converted to QT6
|
# 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"
|
QTFOUND="true"
|
||||||
QTDIR="$SYSTEM_LIBS"/${ARCH}-linux-gnu/qt5/plugins
|
QTDIR="$SYSTEM_LIBS"/${ARCH}-linux-gnu/qt5/plugins
|
||||||
if [ ! -d "$QTDIR" ]; then
|
if [ ! -d "$QTDIR" ]; then
|
||||||
# default qt5 folder not found, check for Steam Deck qt (qt5) folder
|
# default qt5 folder not found, check for 64-bit qt5 folder
|
||||||
QTDIR="$SYSTEM_LIBS"/qt/plugins
|
QTDIR="$SYSTEM_LIBS64"/qt5/plugins
|
||||||
if [ ! -d "$QTDIR" ]; then
|
if [ ! -d "$QTDIR" ]; then
|
||||||
# Steam Deck qt (qt5) folder not found, check for regular qt6 folder
|
# 64-bit qt5 folder not found, check for Steam Deck qt (qt5) folder
|
||||||
QTDIR="$SYSTEM_LIBS"/${ARCH}-linux-gnu/qt6/plugins
|
QTDIR="$SYSTEM_LIBS"/qt/plugins
|
||||||
if [ ! -d "$QTDIR" ]; then
|
if [ ! -d "$QTDIR" ]; then
|
||||||
# regular qt6 folder not found, check for Steam Deck qt6 folder
|
# Steam Deck qt (qt5) folder not found, check for regular qt6 folder
|
||||||
QTDIR="$SYSTEM_LIBS"/qt6/plugins
|
QTDIR="$SYSTEM_LIBS"/${ARCH}-linux-gnu/qt6/plugins
|
||||||
if [ ! -d "$QTDIR" ]; then
|
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
|
fi
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -70,6 +70,8 @@ option(YUZU_DOWNLOAD_TIME_ZONE_DATA "Always download time zone binaries" OFF)
|
|||||||
|
|
||||||
option(YUZU_ENABLE_PORTABLE "Allow yuzu to enable portable mode if a user folder is found in the CWD" ON)
|
option(YUZU_ENABLE_PORTABLE "Allow yuzu to enable portable mode if a user folder is found in the CWD" ON)
|
||||||
|
|
||||||
|
option(YUZU_USE_LLVM_DEMANGLE "Use LLVM Demangle" ON)
|
||||||
|
|
||||||
CMAKE_DEPENDENT_OPTION(YUZU_USE_FASTER_LD "Check if a faster linker is available" ON "NOT WIN32" OFF)
|
CMAKE_DEPENDENT_OPTION(YUZU_USE_FASTER_LD "Check if a faster linker is available" ON "NOT WIN32" OFF)
|
||||||
|
|
||||||
CMAKE_DEPENDENT_OPTION(USE_SYSTEM_MOLTENVK "Use the system MoltenVK lib (instead of the bundled one)" OFF "APPLE" OFF)
|
CMAKE_DEPENDENT_OPTION(USE_SYSTEM_MOLTENVK "Use the system MoltenVK lib (instead of the bundled one)" OFF "APPLE" OFF)
|
||||||
@@ -299,7 +301,9 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)
|
|||||||
find_package(Boost 1.79.0 REQUIRED context)
|
find_package(Boost 1.79.0 REQUIRED context)
|
||||||
find_package(enet 1.3 MODULE)
|
find_package(enet 1.3 MODULE)
|
||||||
find_package(fmt REQUIRED)
|
find_package(fmt REQUIRED)
|
||||||
find_package(LLVM 17.0.2 MODULE COMPONENTS Demangle)
|
if (YUZU_USE_LLVM_DEMANGLE)
|
||||||
|
find_package(LLVM 17.0.2 MODULE COMPONENTS Demangle)
|
||||||
|
endif()
|
||||||
find_package(lz4 REQUIRED)
|
find_package(lz4 REQUIRED)
|
||||||
find_package(nlohmann_json 3.8 REQUIRED)
|
find_package(nlohmann_json 3.8 REQUIRED)
|
||||||
find_package(Opus 1.3 MODULE)
|
find_package(Opus 1.3 MODULE)
|
||||||
|
|||||||
@@ -128,7 +128,7 @@ All other dependencies will be downloaded by [vcpkg](https://vcpkg.io/) if neede
|
|||||||
- Fedora:
|
- Fedora:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo dnf install autoconf ccache cmake ffmpeg-devel fmt-devel gcc{,-c++} glslang hidapi-devel json-devel libtool libusb1-devel libXext-devel libzstd-devel lz4-devel nasm ninja-build openssl-devel pulseaudio-libs-devel qt5-linguist qt5-qtbase{-private,}-devel qt5-qtmultimedia-devel qt5-qtwebengine-devel shasum speexdsp-devel wayland-devel zlib-devel
|
sudo dnf install autoconf ccache cmake ffmpeg-devel fmt-devel gcc{,-c++} glslang hidapi-devel json-devel libtool libusb1-devel libXext-devel libzstd-devel lz4-devel nasm ninja-build openssl-devel pulseaudio-libs-devel qt5-linguist qt5-qtbase{-private,}-devel qt5-qtmultimedia-devel qt5-qtwebengine-devel shasum speexdsp-devel wayland-devel zlib-devel perl-Digest-SHA
|
||||||
```
|
```
|
||||||
- Fedora 32 or later is required.
|
- Fedora 32 or later is required.
|
||||||
- Due to GCC 12, Fedora 36 or later users need to install `clang`, and configure CMake to use it via `-DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang`
|
- Due to GCC 12, Fedora 36 or later users need to install `clang`, and configure CMake to use it via `-DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang`
|
||||||
@@ -173,6 +173,24 @@ mkdir build && cd build
|
|||||||
cmake .. -GNinja -DYUZU_USE_BUNDLED_VCPKG=ON -DYUZU_TESTS=OFF
|
cmake .. -GNinja -DYUZU_USE_BUNDLED_VCPKG=ON -DYUZU_TESTS=OFF
|
||||||
ninja
|
ninja
|
||||||
```
|
```
|
||||||
|
|
||||||
|
If building for the Steam Deck and you have LLVM 17 installed, you need to disable linking against it in the CMake command. The Steam Deck, as of SteamOS v3.6.20, includes `libLLVM-16`.
|
||||||
|
|
||||||
|
To verify which libraries your application is linking against, you can use the ldd command. For example:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
ldd torzu/build/bin/yuzu
|
||||||
|
```
|
||||||
|
|
||||||
|
Look for entries related to `libLLVM` (or grep the ldd output). If it shows `libLLVM-17`, you need to adjust your configuration.
|
||||||
|
|
||||||
|
Use the following CMake command to disable linking against LLVM 17, instead of the one above:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cmake .. -GNinja -DYUZU_USE_BUNDLED_VCPKG=ON -DYUZU_TESTS=OFF -DYUZU_USE_LLVM_DEMANGLE=OFF
|
||||||
|
ninja
|
||||||
|
```
|
||||||
|
|
||||||
There should now be executable binaries located in the `torzu/build/bin` folder.
|
There should now be executable binaries located in the `torzu/build/bin` folder.
|
||||||
|
|
||||||
You can choose to (all starting from the `build` folder):
|
You can choose to (all starting from the `build` folder):
|
||||||
|
|||||||
Reference in New Issue
Block a user