NOTE: Flatpaks are built with a wrapper repo, which downloads everything needed including the main torzu repo.
First install flatpak
and flatpak-builder
for your specific distro:
bash
sudo pacman -Syu --needed flatpak flatpak-builder
bash
sudo apt-get install flatpak flatpak-builder
bash
sudo dnf install flatpak flatpak-builder
Then install flatpak dependencies from within flatpak:
flatpak install org.kde.Sdk//5.15-23.08 io.qt.qtwebengine.BaseApp//5.15-23.08
Clone the torzu-flatpak repo and dependencies (note: this github repo is the correct one):
git clone --depth 1 --recursive https://github.com/litucks/onion.torzu_emu.torzu.git torzuFlatpak
Enter the cloned directory and run the build script:
cd torzuFlatpak && ./build.sh
The resulting torzu.flatpak
will be in the same directory as the build script.
To install:
flatpak install torzu.flatpak
The AppImage Builder is included in the main torzu repo.
First you must build a native linux version from the section below, with the resulting executables in the torzu/build/bin
folder. Leave everything where it is.
After that you only have to run the following (assuming you're still in the build
folder after running ninja
):
cd .. && ./AppImage-build.sh
The script enters the AppImageBuilder
folder and generates the AppImage executable.
The resulting torzu.AppImage
file is moved back into the main root torzu
folder where AppImage-build.sh
is.
To run it:
./torzu.AppImage
These steps are included as an option in the native build instructions below!
NOTE: the native binaries will still be in the torzu/build/bin
folder, so you can archive them to have both versions.
You'll need to download and install the following:
The following are handled by torzu's externals:
If version 5.15.2 is not already installed, pre-compiled binaries for Qt 5.15.2 will be downloaded from here automatically by CMake:
All other dependencies will be downloaded by vcpkg if needed:
All Distros
VCPKG_FORCE_SYSTEM_BINARIES=1
.Arch / Manjaro:
sudo pacman -Syu --needed base-devel boost catch2 cmake ffmpeg fmt git glslang libzip lz4 mbedtls ninja nlohmann-json openssl opus qt5 sdl2 unzip zip zlib zstd perl
-DCMAKE_CXX_FLAGS="-I/usr/include/qt/QtWebEngineWidgets"
with qt5-webengine installed.GCC 11 or later is required.
Debian / Ubuntu / Linux Mint:
sudo apt-get install autoconf catch2 cmake g++-11 gcc-11 git glslang-tools libasound2 libavcodec-dev libavfilter-dev libboost-context-dev libfmt-dev libglu1-mesa-dev libhidapi-dev liblz4-dev libmbedtls-dev libpulse-dev libssl-dev libswscale-dev libtool libudev-dev libva-dev libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-render-util0 libxcb-xinerama0 libxcb-xkb1 libxext-dev libxkbcommon-x11-0 libxxhash-dev libzstd-dev mesa-common-dev nasm ninja-build nlohmann-json3-dev qtbase5-dev qtbase5-private-dev qtmultimedia5-dev qttools5-dev qtwebengine5-dev shasum
-DYUZU_USE_QT_WEB_ENGINE=ON
when running CMake.-DCMAKE_C_COMPILER=gcc-11 -DCMAKE_CXX_COMPILER=g++-11
when running CMake. i.e.-DYUZU_USE_EXTERNAL_SDL2=OFF
bash
cmake .. -GNinja -DYUZU_USE_BUNDLED_VCPKG=ON -DYUZU_TESTS=OFF -DCMAKE_C_COMPILER=gcc-11 -DCMAKE_CXX_COMPILER=g++-11 -DYUZU_USE_QT_WEB_ENGINE=ON
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
clang
, and configure CMake to use it via -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang
-DYUZU_USE_BUNDLED_SDL2=OFF -DYUZU_USE_EXTERNAL_SDL2=OFF
-DYUZU_USE_EXTERNAL_FFMPEG=OFF
RPM Fusion (free) is required to install ffmpeg-devel
Gentoo:
bash
emerge --ask app-arch/lz4 dev-libs/boost dev-libs/hidapi dev-libs/libzip dev-libs/openssl dev-qt/linguist dev-qt/qtconcurrent dev-qt/qtcore dev-util/cmake dev-util/glslang dev-vcs/git media-libs/alsa-lib media-libs/opus media-sound/pulseaudio media-video/ffmpeg net-libs/mbedtls sys-libs/zlib x11-libs/libXext
pulseaudio
, bindist
and context
to the USE
flag.from Codeberg repo:
git clone --depth 1 https://notabug.org/litucks/torzu.git
from Torzu repo (assuming Tor is installed as a service, such as sudo apt install tor
using default settings):
git -c http.proxy=socks5h://127.0.0.1:9050 clone --depth 1 http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu.git
If you need to run ctests, you can disable -DYUZU_TESTS=OFF
and install Catch2.
Be sure to swap your above distro-specific commands into the line starting with cmake
(the options already included below should still be used):
cd torzu
git submodule update --init --recursive
mkdir build && cd build
cmake .. -GNinja -DYUZU_USE_BUNDLED_VCPKG=ON -DYUZU_TESTS=OFF
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:
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:
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.
You can choose to (all starting from the build
folder):
Make an AppImage (the resulting torzu.AppImage
will be in the torzu
folder):
cd .. && ./AppImage-build.sh
Install the binaries to your system with shortcuts:
sudo ninja install
Run them without installing:
cd bin
./yuzu
# or
./yuzu-cmd
PORTABLE INSTALL - use the native binaries (without being installed to the system) and add a user
folder next to them (does not work with AppImage or Flatpak):
cd bin
mkdir user
./yuzu
All data usually in the ~/.local/share/yuzu
folder will now be located in the user
folder instead, so you can easily archive and restore a working install.
Optionally, you can use cmake-gui ..
instead to adjust various options (e.g. disable the Qt GUI).
Same as above, but add -DCMAKE_BUILD_TYPE=Debug
:
cmake .. -GNinja -DCMAKE_BUILD_TYPE=Debug -DYUZU_USE_BUNDLED_VCPKG=ON -DYUZU_TESTS=OFF
Same as above, but use -DCMAKE_BUILD_TYPE=RelWithDebInfo
:
cmake .. -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DYUZU_USE_BUNDLED_VCPKG=ON -DYUZU_TESTS=OFF
```bash cd data gdb ../build/bin/yuzu # Start GDB (gdb) handle SIGSEGV nostop # Disable SIGSEGV exceptions, which are used by yuzu for memory access (gdb) run # Run yuzu under GDB (gdb) bt # Print a backtrace of the entire callstack to see which codepath the crash occurred on