mirror of
https://notabug.org/litucks/torzu.git
synced 2026-01-12 02:32:25 +00:00
Compare commits
132 commits
2024-05-31
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
63f808b365 | ||
|
|
e40391eedd | ||
|
|
6210feba12 | ||
|
|
641c18e1a8 | ||
|
|
295aa94a05 | ||
|
|
59bda52beb | ||
|
|
25c6aaec18 | ||
|
|
dee5dca459 | ||
|
|
fd908334af | ||
|
|
c72862af09 | ||
|
|
1ea9565cb4 | ||
|
|
945de31fb9 | ||
|
|
634acab40b | ||
|
|
8561b75518 | ||
|
|
15d00322a0 | ||
|
|
7bd0bfbb0c | ||
|
|
829fad8b66 | ||
|
|
b539eef054 | ||
|
|
f7849077e1 | ||
|
|
35f4aa964f | ||
|
|
5b478bdb9c | ||
|
|
b10bcac0cf | ||
|
|
cfbaa32d66 | ||
|
|
125f4e2372 | ||
|
|
4e6bf7e82e | ||
|
|
76516783d3 | ||
|
|
a426de1c51 | ||
|
|
335570dfd3 | ||
|
|
1319089702 | ||
|
|
a640bbee41 | ||
|
|
709f70a3b2 | ||
|
|
977ed0063a | ||
|
|
7c17d72b1a | ||
|
|
ff2e94b286 | ||
|
|
5de4fd6c76 | ||
|
|
8f1b45003b | ||
|
|
f78b30dbc4 | ||
|
|
e7e5906892 | ||
|
|
1526678a53 | ||
|
|
2384d30c2a | ||
|
|
e52e4ca429 | ||
|
|
a16e593fa8 | ||
|
|
f8ae0e4f2a | ||
|
|
b23dea24cd | ||
|
|
eaa9c9e3a4 | ||
|
|
3d24fc2f00 | ||
|
|
6ead429195 | ||
|
|
914def23f6 | ||
|
|
3f6a2bac86 | ||
|
|
bc4239dd9f | ||
|
|
20ac5cd42b | ||
|
|
d306ebea30 | ||
|
|
02cfee3f18 | ||
|
|
86f6184375 | ||
|
|
a04ba7cd1e | ||
|
|
bb142c9657 | ||
|
|
266eb0d318 | ||
|
|
d231c26e22 | ||
|
|
247f61e1f9 | ||
|
|
154aab7c4b | ||
|
|
56f062ac4d | ||
|
|
05ccbaa8fa | ||
|
|
95ef5431c5 | ||
|
|
066d0e7eaa | ||
|
|
14d40552e5 | ||
|
|
9efce71072 | ||
|
|
5de1cb53bb | ||
|
|
85dc40ad23 | ||
|
|
f45341ef55 | ||
|
|
4259889895 | ||
|
|
a9b7cae667 | ||
|
|
6d2368b07b | ||
|
|
f52a2c5d99 | ||
|
|
11cd91ea01 | ||
|
|
783e8952e0 | ||
|
|
15470284cf | ||
|
|
a41691dbbb | ||
|
|
1a0d98f984 | ||
|
|
eefc75732f | ||
|
|
d6ca4f11c1 | ||
|
|
ab4c093976 | ||
|
|
ec2e6dfdac | ||
|
|
7b143fb07e | ||
|
|
6e61673959 | ||
|
|
ee37c4989c | ||
|
|
e157415bd9 | ||
|
|
8eea774401 | ||
|
|
3785f2a2c8 | ||
|
|
587825f60a | ||
|
|
0719273fed | ||
|
|
60a8bf844f | ||
|
|
cd40133aa4 | ||
|
|
1b51d49e16 | ||
|
|
c8997e4ab5 | ||
|
|
456612d272 | ||
|
|
f38060714a | ||
|
|
c92b9f9024 | ||
|
|
a1c2940b31 | ||
|
|
a41955cc58 | ||
|
|
ede46f9bd2 | ||
|
|
f615bac08e | ||
|
|
00ac6ff600 | ||
|
|
b5e4a009b4 | ||
|
|
8935e96db9 | ||
|
|
7e27e6476d | ||
|
|
224ec03070 | ||
|
|
32b2991a53 | ||
|
|
238c5e33dd | ||
|
|
e3ea6f2059 | ||
|
|
93c9c33b9f | ||
|
|
e8f43b7078 | ||
|
|
fb0ec55198 | ||
|
|
a9f6342ea4 | ||
|
|
b1895cf7ae | ||
|
|
c432641245 | ||
|
|
ccd735ec8a | ||
|
|
f064967e32 | ||
|
|
39af5e51ff | ||
|
|
cc81504195 | ||
|
|
3635a7a322 | ||
|
|
4208203ea4 | ||
|
|
a7d7aa0a5b | ||
|
|
4afc305458 | ||
|
|
1e8ea3af21 | ||
|
|
35fe455e5c | ||
|
|
002d0559f2 | ||
|
|
3319522789 | ||
|
|
fa84e4a2a4 | ||
|
|
252b2b11af | ||
|
|
66ae161cf8 | ||
|
|
63ea3f52f3 | ||
|
|
e339153ede |
322 changed files with 53504 additions and 1604 deletions
6
.gitignore
vendored
6
.gitignore
vendored
|
|
@ -5,6 +5,12 @@
|
|||
[Bb]uild*/
|
||||
doc-build/
|
||||
|
||||
# AppImageBuilder directory and torzu.AppImage
|
||||
AppImageBuilder/build/
|
||||
AppImageBuilder/appimagetool.AppImage
|
||||
AppImageBuilder/torzu.AppImage
|
||||
torzu.AppImage
|
||||
|
||||
# Generated source files
|
||||
src/common/scm_rev.cpp
|
||||
dist/english_plurals/generated_en.ts
|
||||
|
|
|
|||
30
.gitmodules
vendored
30
.gitmodules
vendored
|
|
@ -10,18 +10,12 @@
|
|||
[submodule "libusb"]
|
||||
path = externals/libusb/libusb
|
||||
url = https://github.com/libusb/libusb.git
|
||||
[submodule "Vulkan-Headers"]
|
||||
path = externals/Vulkan-Headers
|
||||
url = https://github.com/KhronosGroup/Vulkan-Headers.git
|
||||
[submodule "xbyak"]
|
||||
path = externals/xbyak
|
||||
url = https://github.com/herumi/xbyak.git
|
||||
[submodule "opus"]
|
||||
path = externals/opus
|
||||
url = https://github.com/xiph/opus.git
|
||||
[submodule "SDL"]
|
||||
path = externals/SDL
|
||||
url = https://github.com/libsdl-org/SDL.git
|
||||
[submodule "cpp-httplib"]
|
||||
path = externals/cpp-httplib
|
||||
url = https://github.com/yhirose/cpp-httplib.git
|
||||
|
|
@ -31,24 +25,18 @@
|
|||
[submodule "vcpkg"]
|
||||
path = externals/vcpkg
|
||||
url = https://github.com/microsoft/vcpkg.git
|
||||
[submodule "cpp-jwt"]
|
||||
path = externals/cpp-jwt
|
||||
url = https://github.com/arun11299/cpp-jwt.git
|
||||
[submodule "libadrenotools"]
|
||||
path = externals/libadrenotools
|
||||
url = https://github.com/bylaws/libadrenotools.git
|
||||
[submodule "tzdb_to_nx"]
|
||||
path = externals/nx_tzdb/tzdb_to_nx
|
||||
url = https://github.com/lat9nq/tzdb_to_nx.git
|
||||
[submodule "VulkanMemoryAllocator"]
|
||||
path = externals/VulkanMemoryAllocator
|
||||
url = https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git
|
||||
[submodule "simpleini"]
|
||||
path = externals/simpleini
|
||||
url = https://github.com/brofield/simpleini.git
|
||||
[submodule "oaknut"]
|
||||
path = externals/oaknut
|
||||
url = https://github.com/merryhime/oaknut
|
||||
[submodule "Vulkan-Utility-Libraries"]
|
||||
path = externals/Vulkan-Utility-Libraries
|
||||
url = https://github.com/KhronosGroup/Vulkan-Utility-Libraries.git
|
||||
[submodule "externals/SPIRV-Headers"]
|
||||
path = externals/SPIRV-Headers
|
||||
url = https://github.com/KhronosGroup/SPIRV-Headers.git
|
||||
|
|
@ -58,3 +46,15 @@
|
|||
[submodule "externals/fmt"]
|
||||
path = externals/fmt
|
||||
url = https://github.com/fmtlib/fmt.git
|
||||
[submodule "externals/Vulkan-Utility-Libraries"]
|
||||
path = externals/Vulkan-Utility-Libraries
|
||||
url = https://github.com/KhronosGroup/Vulkan-Utility-Libraries.git
|
||||
[submodule "externals/VulkanMemoryAllocator"]
|
||||
path = externals/VulkanMemoryAllocator
|
||||
url = https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git
|
||||
[submodule "externals/Vulkan-Headers"]
|
||||
path = externals/Vulkan-Headers
|
||||
url = https://github.com/KhronosGroup/Vulkan-Headers.git
|
||||
[submodule "externals/SDL"]
|
||||
path = externals/SDL
|
||||
url = https://github.com/libsdl-org/SDL.git
|
||||
|
|
|
|||
99
AppImage-build-debian-inner.sh
Executable file
99
AppImage-build-debian-inner.sh
Executable file
|
|
@ -0,0 +1,99 @@
|
|||
#! /bin/bash
|
||||
set -e
|
||||
|
||||
# Make sure script is called from inside our container
|
||||
test -e /tmp/torzu-src-ro || (echo "Script MUST NOT be called directly!" ; exit 1)
|
||||
|
||||
# Set up environment
|
||||
export LANG=C.UTF-8
|
||||
export LC_ALL=C.UTF-8
|
||||
unset LC_ADDRESS LC_NAME LC_MONETARY LC_PAPER LC_TELEPHONE LC_MEASUREMENT LC_TIME
|
||||
|
||||
# Raise max open files count
|
||||
ulimit -n 50000
|
||||
|
||||
# Install dependencies
|
||||
apt -y install cmake ninja-build build-essential autoconf pkg-config locales wget git file mold libtool lsb-release wget software-properties-common gnupg \
|
||||
glslang-tools libssl-dev libavcodec-dev libavfilter-dev libavutil-dev libswscale-dev libpulse-dev libasound2-dev libudev-dev libice6
|
||||
if [ "$BUILD_QT" = 1 ]; then
|
||||
apt -y install libxcb-composite0-dev libxcb-damage0-dev libxcb-dpms0-dev libxcb-dri2-0-dev libxcb-dri3-dev libxcb-ewmh-dev libxcb-present-dev libxcb-record0-dev libxcb-res0-dev libxcb-screensaver0-dev libxcb-xf86dri0-dev libxcb-xtest0-dev libxcb-xv0-dev libxcb-xvmc0-dev libfontconfig1-dev libfreetype6-dev libx11-dev libx11-xcb-dev libxext-dev libxfixes-dev libxi-dev libxrender-dev libxcb1-dev libxcb-cursor-dev libxcb-glx0-dev libxcb-keysyms1-dev libxcb-image0-dev libxcb-shm0-dev libxcb-icccm4-dev libxcb-sync-dev libxcb-xfixes0-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-render-util0-dev libxcb-util-dev libxcb-xinerama0-dev libxcb-xkb-dev libxkbcommon-dev libxkbcommon-x11-dev libgl-dev
|
||||
else
|
||||
apt -y install qt6-base-dev qt6-base-private-dev qt6-multimedia-dev qt6-qpa-plugins
|
||||
fi
|
||||
if [ ! "$BUILD_USE_CPM" = 1 ]; then
|
||||
apt -y install libfmt-dev libenet-dev liblz4-dev nlohmann-json3-dev zlib1g-dev libopus-dev libsimpleini-dev libstb-dev libzstd-dev libusb-1.0-0-dev libcubeb-dev libcpp-jwt-dev libvulkan-dev gamemode-dev libasound2-dev libglu1-mesa-dev libxext-dev mesa-common-dev libva-dev
|
||||
|
||||
if [ ! -f /usr/local/lib/cmake/Boost-1.88.0/BoostConfigVersion.cmake ]; then
|
||||
# Install Boost
|
||||
wget https://archives.boost.io/release/1.88.0/source/boost_1_88_0.tar.bz2
|
||||
echo "Extracting Boost sources..."
|
||||
tar xf boost_1_88_0.tar.bz2
|
||||
cd boost_1_88_0
|
||||
./bootstrap.sh
|
||||
./b2 install --with-{headers,context,system,fiber,atomic,filesystem} link=static
|
||||
cd ..
|
||||
rm -rf boost_1_88_0 boost_1_88_0.tar.bz2
|
||||
fi
|
||||
fi
|
||||
|
||||
# Install Clang
|
||||
if ([ "$BUILD_USE_CLANG" = 1 ] && ! clang-19 --version); then
|
||||
cd /tmp
|
||||
wget https://apt.llvm.org/llvm.sh
|
||||
chmod +x llvm.sh
|
||||
./llvm.sh 19
|
||||
rm llvm.sh
|
||||
fi
|
||||
|
||||
# Mount Torzu sources with temporary overlay
|
||||
cd /tmp
|
||||
mkdir torzu-src-upper torzu-src-work torzu-src
|
||||
mount -t overlay overlay -olowerdir=torzu-src-ro,upperdir=torzu-src-upper,workdir=torzu-src-work torzu-src
|
||||
|
||||
# Get extra configuration/compilation options
|
||||
EXTRA_COMPILE_FLAGS=""
|
||||
EXTRA_CMAKE_FLAGS=""
|
||||
if [ "$BUILD_USE_CLANG" = 1 ]; then
|
||||
export CC=clang-19 CXX=clang++-19
|
||||
EXTRA_CMAKE_FLAGS="-DCMAKE_C_COMPILER=$CC -DCMAKE_CXX_COMPILER=$CXX"
|
||||
EXTRA_COMPILE_FLAGS="-fuse-ld=lld-19 -Wno-unused-command-line-argument"
|
||||
FATLTO_FLAG="-flto=full"
|
||||
else
|
||||
FATLTO_FLAG="-flto"
|
||||
fi
|
||||
if [ "$BUILD_USE_THIN_LTO" = 1 ]; then
|
||||
EXTRA_COMPILE_FLAGS="$EXTRA_COMPILE_FLAGS -flto=thin"
|
||||
fi
|
||||
if [ "$BUILD_USE_FAT_LTO" = 1 ]; then
|
||||
EXTRA_COMPILE_FLAGS="$EXTRA_COMPILE_FLAGS $FATLTO_FLAG"
|
||||
fi
|
||||
if [ "$BUILD_USE_CPM" = 1 ]; then
|
||||
EXTRA_CMAKE_FLAGS="$EXTRA_CMAKE_FLAGS -DYUZU_USE_CPM=ON"
|
||||
fi
|
||||
if [ "$BUILD_QT" = 1 ]; then
|
||||
EXTRA_CMAKE_FLAGS="$EXTRA_CMAKE_FLAGS -DYUZU_BUILD_QT6=ON"
|
||||
if [ "$BUILD_PREFER_STATIC" = 1 ]; then
|
||||
EXTRA_CMAKE_FLAGS="$EXTRA_CMAKE_FLAGS -DYUZU_BUILD_QT6_STATIC=ON"
|
||||
fi
|
||||
fi
|
||||
if [ "$BUILD_PREFER_STATIC" = 1 ]; then
|
||||
EXTRA_CMAKE_FLAGS="$EXTRA_CMAKE_FLAGS -DBUILD_SHARED_LIBS=OFF -DCMAKE_FIND_LIBRARY_SUFFIXES=.a;.so"
|
||||
fi
|
||||
|
||||
# Build Torzu
|
||||
cd /tmp
|
||||
mkdir torzu-build
|
||||
cd torzu-build
|
||||
cmake /tmp/torzu-src -GNinja -DCMAKE_BUILD_TYPE=Release -DYUZU_TESTS=OFF -DENABLE_QT_TRANSLATION=OFF -DSPIRV_WERROR=OFF -DSPIRV-Headers_SOURCE_DIR=/tmp/torzu-src/externals/SPIRV-Headers -DCMAKE_{C,CXX}_FLAGS="$EXTRA_COMPILE_FLAGS -fdata-sections -ffunction-sections" -DCMAKE_{EXE,SHARED}_LINKER_FLAGS="-Wl,--gc-sections" $EXTRA_CMAKE_FLAGS
|
||||
ninja || (
|
||||
echo "Compilation has failed. Dropping you into a shell so you can inspect the situation. Run 'ninja' to retry and exit shell once compilation has finished successfully."
|
||||
echo "Note that any changes made here will not be reflected to the host environment."
|
||||
bash
|
||||
)
|
||||
|
||||
# Generate AppImage
|
||||
cp -rv /tmp/torzu-src/AppImageBuilder /tmp/AppImageBuilder
|
||||
cd /tmp/AppImageBuilder
|
||||
./build.sh /tmp/torzu-build /tmp/torzu.AppImage || echo "This error is known. Using workaround..."
|
||||
cp /lib/$(uname -m)-linux-gnu/libICE.so.6 build/
|
||||
mv build /tmp/hosttmp/torzu-debian-appimage-rootfs
|
||||
85
AppImage-build-debian.sh
Executable file
85
AppImage-build-debian.sh
Executable file
|
|
@ -0,0 +1,85 @@
|
|||
#! /bin/bash
|
||||
set -e
|
||||
|
||||
# Parse options
|
||||
for i in "$@"
|
||||
do
|
||||
case $i in
|
||||
-l|--clang)
|
||||
export BUILD_USE_CLANG=1
|
||||
echo "-> Using Clang for compilation."
|
||||
;;
|
||||
-o|--thin-lto)
|
||||
export BUILD_USE_THIN_LTO=1
|
||||
echo "-> Thin link time optimization enabled."
|
||||
;;
|
||||
-O|--fat-lto)
|
||||
export BUILD_USE_FAT_LTO=1
|
||||
echo "-> Fat link time optimization enabled."
|
||||
;;
|
||||
-p|--use-cpm)
|
||||
export BUILD_USE_CPM=1
|
||||
echo "-> Using CPM to download most dependencies."
|
||||
;;
|
||||
-q|--build-qt)
|
||||
export BUILD_QT=1
|
||||
echo "-> Building Qt."
|
||||
;;
|
||||
-s|--prefer-static)
|
||||
export BUILD_PREFER_STATIC=1
|
||||
export QTSTATIC=true
|
||||
echo "-> Preferring static libraries."
|
||||
;;
|
||||
-k|--keep-rootfs)
|
||||
BUILD_KEEP_ROOTFS=1
|
||||
echo "-> Not deleting rootfs after successful build."
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 [--clang/-l] [--thin-lto/-o] [--fat-lto/-O] [--use-cpm/-p] [--build-qt/-q] [--prefer-static/-s] [--keep-rootfs/-k]"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Make sure options are valid
|
||||
if [ "$BUILD_USE_THIN_LTO" = 1 ] && [ "$BUILD_USE_CLANG" != 1 ]; then
|
||||
echo "Thin LTO can't be used without Clang!"
|
||||
exit 2
|
||||
fi
|
||||
if [ "$BUILD_USE_THIN_LTO" = 1 ] && [ "$BUILD_USE_FAT_LTO" = 1 ]; then
|
||||
echo "Only either thin or fat LTO can be used!"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
# Get torzu source dir
|
||||
TORZU_SOURCE_DIR="$(realpath "$(dirname "${BASH_SOURCE[0]}")")"
|
||||
echo "-> Source dir is $TORZU_SOURCE_DIR"
|
||||
rm -rf "$TORZU_SOURCE_DIR/AppImageBuilder/build"
|
||||
|
||||
# Generate debian rootfs
|
||||
cd /tmp
|
||||
echo "Cleaning up before build..."
|
||||
rm -rf torzu-debian-appimage-rootfs
|
||||
if ! [ -d rootfs-torzu-appimage-build ]; then
|
||||
debootstrap bookworm rootfs-torzu-appimage-build http://deb.debian.org/debian/
|
||||
else
|
||||
rm -rf rootfs-torzu-appimage-build/tmp/*
|
||||
fi
|
||||
bwrap --bind rootfs-torzu-appimage-build / \
|
||||
--unshare-pid \
|
||||
--dev-bind /dev /dev --proc /proc --ro-bind /sys /sys --dev-bind /run /run \
|
||||
--tmpfs /var/tmp \
|
||||
--chmod 1777 /tmp \
|
||||
--ro-bind /etc/resolv.conf /etc/resolv.conf \
|
||||
--ro-bind "$TORZU_SOURCE_DIR" /tmp/torzu-src-ro \
|
||||
--chdir / \
|
||||
--tmpfs /home \
|
||||
--setenv HOME /home \
|
||||
--bind /tmp /tmp/hosttmp \
|
||||
/tmp/torzu-src-ro/AppImage-build-debian-inner.sh
|
||||
appimagetool torzu-debian-appimage-rootfs torzu.AppImage
|
||||
echo "AppImage generated at /tmp/torzu.AppImage! Cleaning up..."
|
||||
rm -rf torzu-debian-appimage-rootfs
|
||||
if [ ! "$BUILD_KEEP_ROOTFS" = 1 ]; then
|
||||
rm -rf rootfs-torzu-appimage-build
|
||||
fi
|
||||
42
AppImage-build-local.sh
Executable file
42
AppImage-build-local.sh
Executable file
|
|
@ -0,0 +1,42 @@
|
|||
#!/bin/bash
|
||||
|
||||
FILE=build/bin/yuzu
|
||||
if test -f "$FILE"; then
|
||||
# remove any previously made AppImage in the base torzu git folder
|
||||
rm ./torzu.AppImage
|
||||
|
||||
# enter AppImage utility folder
|
||||
cd AppImageBuilder
|
||||
|
||||
# run the build script to create the AppImage
|
||||
# (usage) ./build.sh [source torzu build folder] [destination .AppImage file]
|
||||
./build.sh ../build ./torzu.AppImage
|
||||
|
||||
FILE=./torzu.AppImage
|
||||
if test -f "$FILE"; then
|
||||
# move the AppImage to the main torzu folder
|
||||
mv torzu.AppImage ..
|
||||
# return to main torzu folder
|
||||
cd ..
|
||||
# show contents of current folder
|
||||
echo
|
||||
ls
|
||||
# show AppImages specifically
|
||||
echo
|
||||
ls *.AppImage
|
||||
echo
|
||||
echo "'torzu.AppImage' is now located in the current folder."
|
||||
echo
|
||||
else
|
||||
cd ..
|
||||
echo "AppImage was not built."
|
||||
fi
|
||||
else
|
||||
echo
|
||||
echo "$FILE does not exist."
|
||||
echo
|
||||
echo "No yuzu executable found in the /torzu/build/bin folder!"
|
||||
echo
|
||||
echo "You must first build a native linux version of torzu before running this script!"
|
||||
echo
|
||||
fi
|
||||
11
AppImageBuilder/assets/AppRun
Executable file
11
AppImageBuilder/assets/AppRun
Executable file
|
|
@ -0,0 +1,11 @@
|
|||
#! /bin/bash
|
||||
|
||||
cd "$APPDIR"
|
||||
|
||||
if [ -d /usr/lib/$(uname -m)-linux-gnu/qt5 ] || [ -d /usr/lib/qt ]; then
|
||||
# System-wide Qt5
|
||||
exec ./yuzu.sh "$@"
|
||||
else
|
||||
# Bundled Qt5
|
||||
exec ./yuzu-bqt.sh "$@"
|
||||
fi
|
||||
6
AppImageBuilder/assets/torzu.desktop
Normal file
6
AppImageBuilder/assets/torzu.desktop
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=torzu
|
||||
Icon=torzu
|
||||
Exec=AppRun
|
||||
Categories=Game;
|
||||
2
AppImageBuilder/assets/torzu.svg
Normal file
2
AppImageBuilder/assets/torzu.svg
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg clip-rule="evenodd" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2" version="1.1" viewBox="0 0 152 152" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><circle cx="75.585" cy="75.585" r="75.585" fill="url(#_Radial1)"/><clipPath id="_clip2"></clipPath><g clip-path="url(#_clip2)"><path d="m75.585 17.097c11.94-0 21.635 9.694 21.635 21.635s-9.695 21.635-21.635 21.635c-11.941 0-21.635-9.694-21.635-21.635s9.694-21.635 21.635-21.635zm-0 5.21c-9.066 0-16.425 7.36-16.425 16.425s7.359 16.425 16.425 16.425c9.065-0 16.424-7.36 16.424-16.425s-7.359-16.425-16.424-16.425z"/><path d="m75.585 27.343c6.285 0 11.388 5.103 11.388 11.389s-5.103 11.389-11.388 11.389c-6.286-0-11.389-5.103-11.389-11.389s5.103-11.389 11.389-11.389zm-0 5.21c-3.41 0-6.179 2.769-6.179 6.179s2.769 6.179 6.179 6.179 6.178-2.769 6.178-6.179-2.768-6.179-6.178-6.179z"/><path d="m112.44 53.95c11.941-0 21.635 9.694 21.635 21.635 0 11.94-9.694 21.635-21.635 21.635s-21.635-9.695-21.635-21.635c0-11.941 9.694-21.635 21.635-21.635zm0 5.21c-9.065-0-16.425 7.359-16.425 16.425 0 9.065 7.36 16.424 16.425 16.424s16.425-7.359 16.425-16.424c-0-9.066-7.36-16.425-16.425-16.425z"/><path d="m112.44 64.196c6.286-0 11.389 5.103 11.389 11.389-0 6.285-5.103 11.388-11.389 11.388s-11.389-5.103-11.389-11.388c0-6.286 5.103-11.389 11.389-11.389zm0 5.21c-3.41-0-6.178 2.769-6.178 6.179s2.768 6.178 6.178 6.178 6.179-2.768 6.179-6.178-2.769-6.179-6.179-6.179z"/><path d="m75.585 90.802c11.94 0 21.635 9.694 21.635 21.635s-9.695 21.635-21.635 21.635c-11.941 0-21.635-9.694-21.635-21.635s9.694-21.635 21.635-21.635zm-0 5.21c-9.066 0-16.425 7.36-16.425 16.425s7.359 16.425 16.425 16.425c9.065-0 16.424-7.36 16.424-16.425s-7.359-16.425-16.424-16.425z"/><path d="m75.585 101.05c6.285 0 11.388 5.103 11.388 11.389s-5.103 11.389-11.388 11.389c-6.286-0-11.389-5.103-11.389-11.389s5.103-11.389 11.389-11.389zm-0 5.211c-3.41-0-6.179 2.768-6.179 6.178s2.769 6.179 6.179 6.179 6.178-2.769 6.178-6.179-2.768-6.178-6.178-6.178z"/><path d="m38.732 53.95c11.941-0 21.635 9.694 21.635 21.635 0 11.94-9.694 21.635-21.635 21.635s-21.635-9.695-21.635-21.635c-0-11.941 9.694-21.635 21.635-21.635zm-0 5.21c-9.065-0-16.425 7.359-16.425 16.425 0 9.065 7.36 16.424 16.425 16.424s16.425-7.359 16.425-16.424c-0-9.066-7.36-16.425-16.425-16.425z"/><path d="m38.732 64.196c6.286-0 11.389 5.103 11.389 11.389-0 6.285-5.103 11.388-11.389 11.388s-11.389-5.103-11.389-11.388c0-6.286 5.103-11.389 11.389-11.389zm-0 5.21c-3.41-0-6.179 2.769-6.179 6.179s2.769 6.178 6.179 6.178 6.179-2.768 6.179-6.178-2.769-6.179-6.179-6.179z"/></g><defs><radialGradient id="_Radial1" cx="0" cy="0" r="1" gradientTransform="matrix(-81.196 -81.196 81.196 -81.196 114.32 116.87)" gradientUnits="userSpaceOnUse"><stop stop-color="#ff2088" offset="0"/><stop stop-color="#c24bac" offset=".44"/><stop stop-color="#37aeff" offset="1"/></radialGradient></defs></svg>
|
||||
|
After Width: | Height: | Size: 2.9 KiB |
3
AppImageBuilder/assets/yuzu-bqt.sh
Executable file
3
AppImageBuilder/assets/yuzu-bqt.sh
Executable file
|
|
@ -0,0 +1,3 @@
|
|||
#! /bin/sh
|
||||
|
||||
LD_LIBRARY_PATH=./qt5:/usr/lib/$(uname -m)-linux-gnu:/usr/lib:. QT_PLUGIN_PATH=./qt5 exec ./yuzu "$@"
|
||||
3
AppImageBuilder/assets/yuzu.sh
Executable file
3
AppImageBuilder/assets/yuzu.sh
Executable file
|
|
@ -0,0 +1,3 @@
|
|||
#! /bin/sh
|
||||
|
||||
LD_LIBRARY_PATH=/usr/lib/$(uname -m)-linux-gnu:/usr/lib:. exec ./yuzu "$@"
|
||||
0
AppImageBuilder/assets_aarch64/.gitkeep
Normal file
0
AppImageBuilder/assets_aarch64/.gitkeep
Normal file
BIN
AppImageBuilder/assets_aarch64/bwrap
Normal file
BIN
AppImageBuilder/assets_aarch64/bwrap
Normal file
Binary file not shown.
1
AppImageBuilder/assets_aarch64/bwrap-info.txt
Normal file
1
AppImageBuilder/assets_aarch64/bwrap-info.txt
Normal file
|
|
@ -0,0 +1 @@
|
|||
This is a statically compiled bubblewrap 0.9.0 executable.
|
||||
BIN
AppImageBuilder/assets_x86_64/bwrap
Executable file
BIN
AppImageBuilder/assets_x86_64/bwrap
Executable file
Binary file not shown.
1
AppImageBuilder/assets_x86_64/bwrap-info.txt
Normal file
1
AppImageBuilder/assets_x86_64/bwrap-info.txt
Normal file
|
|
@ -0,0 +1 @@
|
|||
This is a statically compiled bubblewrap 0.9.0 executable.
|
||||
172
AppImageBuilder/build.sh
Executable file
172
AppImageBuilder/build.sh
Executable file
|
|
@ -0,0 +1,172 @@
|
|||
#! /bin/bash
|
||||
set -e
|
||||
|
||||
# Check arguments
|
||||
if [[ $# != 2 ]]; then
|
||||
>&2 echo "Bad usage!"
|
||||
echo "Usage: $0 <build dir> <output file>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Get paths
|
||||
ARCH="$(uname -m)"
|
||||
SYSTEM_LIBS="/usr/lib"
|
||||
SYSTEM_LIBS64="/usr/lib64"
|
||||
YUZU_BIN="${1}/bin"
|
||||
YUZU_BIN_GUI="${YUZU_BIN}/yuzu"
|
||||
|
||||
# Make sure executable exists
|
||||
if [[ $(file -b --mime-type "$YUZU_BIN_GUI") != application/x-pie-executable ]]; then
|
||||
>&2 echo "Invalid yuzu executable!"
|
||||
fi
|
||||
|
||||
# Clean up build dir
|
||||
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
|
||||
# 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 64-bit qt5 folder
|
||||
QTDIR="$SYSTEM_LIBS64"/qt5/plugins
|
||||
if [ ! -d "$QTDIR" ]; then
|
||||
# 64-bit qt5 folder not found, check for Steam Deck qt (qt5) folder
|
||||
QTDIR="$SYSTEM_LIBS"/qt/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
|
||||
if [ ! -d "$QTDIR" ]; then
|
||||
# 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
|
||||
if [ $QTFOUND == "true" ] || [ -n "$QTSTATIC" ]; then
|
||||
echo "QT plugins from $QTDIR will be used."
|
||||
|
||||
# Copy system dependencies used to build and required by the yuzu binary
|
||||
# includes:
|
||||
# - '/lib64/ld-linux-x86-64.so.2' or `/lib/ld-linux-aarch64.so.1` file per architecture
|
||||
# - required files from `/usr/lib/x86_64-linux-gnu` or `/usr/lib/aarch64-linux-gnu`
|
||||
# - different for SteamDeck, but still does it automatically
|
||||
function copy_libs {
|
||||
for lib in $(ldd "$1"); do
|
||||
(cp -vn "$lib" ./build/ 2> /dev/null) || true
|
||||
done
|
||||
}
|
||||
echo "Copying main dependencies..."
|
||||
copy_libs "$YUZU_BIN_GUI"
|
||||
|
||||
# Copy QT dependency folders, path determined above
|
||||
if [ -z "$QTSTATIC" ]; then
|
||||
echo "Copying Qt dependencies..."
|
||||
mkdir ./build/qt5
|
||||
cp -rv "$QTDIR"/{imageformats,platforms,platformthemes,xcbglintegrations} ./build/qt5/
|
||||
fi
|
||||
|
||||
# Discover indirect dependencies (mostly from runtime-loaded Qt plugins)
|
||||
echo "Copying extra dependencies..."
|
||||
while true; do
|
||||
LIBS="$(find ./build -name \*.so\*)"
|
||||
LIB_COUNT=$(echo "$LIBS" | wc -l)
|
||||
echo "$LIB_COUNT dependency libraries discovered so far..."
|
||||
if [ $LIB_COUNT == "$PREV_LIB_COUNT" ]; then
|
||||
break
|
||||
fi
|
||||
PREV_LIB_COUNT=$LIB_COUNT
|
||||
|
||||
for plib in $LIBS; do
|
||||
if [ -f "$plib" ]; then
|
||||
copy_libs "$plib"
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
||||
# Copy executable
|
||||
cp -v "$YUZU_BIN_GUI" ./build/
|
||||
|
||||
# Copy assets for the appropriate arch
|
||||
cp -v ./assets_"${ARCH}"/* ./build/
|
||||
# Copy common assets
|
||||
cp -v ./assets/* ./build/
|
||||
|
||||
# Strip all libraries and executables
|
||||
for file in $(find ./build -type f); do
|
||||
(strip -v "$file" 2> /dev/null) || true
|
||||
done
|
||||
|
||||
PASSED_CHECKSUM="false"
|
||||
FILE=appimagetool.AppImage
|
||||
# total number of times to try downloading if a checksum doesn't match
|
||||
DL_TRIES=3
|
||||
while [ $PASSED_CHECKSUM == "false" ] && [ "$DL_TRIES" -gt 0 ]; do
|
||||
case $ARCH in
|
||||
x86_64)
|
||||
# Static copy from the 'ext-linux-bin' repo.
|
||||
# Checksum will need to be changed when/if this file in the repo is updated.
|
||||
if ! test -f "$FILE"; then
|
||||
echo "Downloading appimagetool for architecture '$ARCH'"
|
||||
wget -O appimagetool.AppImage https://github.com/litucks/ext-linux-bin/raw/refs/heads/main/appimage/appimagetool-x86_64.AppImage
|
||||
fi
|
||||
if [ $(shasum -a 256 appimagetool.AppImage | cut -d' ' -f1) = "110751478abece165a18460acbd7fd1398701f74a9405ad8ac053427d937bd5d" ] ; then
|
||||
PASSED_CHECKSUM="true"
|
||||
fi
|
||||
# DISABLED TO USE THE ABOVE
|
||||
# The current continuous release channel option, until a static copy is put in 'ext-linux-bin'.
|
||||
# The checksum will pass until the continuous release is updated, then a new one needs to be
|
||||
# generated to update this script.
|
||||
#if ! test -f "$FILE"; then
|
||||
# echo "Downloading appimagetool for architecture '$ARCH'"
|
||||
# wget -O appimagetool.AppImage https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage
|
||||
#fi
|
||||
#if [ $(shasum -a 256 appimagetool.AppImage | cut -d' ' -f1) = "46fdd785094c7f6e545b61afcfb0f3d98d8eab243f644b4b17698c01d06083d1" ] ; then
|
||||
# PASSED_CHECKSUM="true"
|
||||
#fi
|
||||
;;
|
||||
aarch64)
|
||||
# Currently set to the continuous release channel until a static copy is put in 'ext-linux-bin'.
|
||||
# The checksum will pass until the continuous release is updated, then a new one needs to be
|
||||
# generated to update this script.
|
||||
if ! test -f "$FILE"; then
|
||||
echo "Downloading appimagetool for architecture '$ARCH'"
|
||||
wget -O appimagetool.AppImage https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-aarch64.AppImage
|
||||
fi
|
||||
if [ $(shasum -a 256 appimagetool.AppImage | cut -d' ' -f1) = "04f45ea45b5aa07bb2b071aed9dbf7a5185d3953b11b47358c1311f11ea94a96" ] ; then
|
||||
PASSED_CHECKSUM="true"
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
PASSED_CHECKSUM="invalid_arch"
|
||||
;;
|
||||
esac
|
||||
# delete the appimagetool downloaded if the checksum doesn't match.
|
||||
if [ ! $PASSED_CHECKSUM == "true" ]; then
|
||||
rm -f appimagetool.AppImage
|
||||
fi
|
||||
((DL_TRIES-=1))
|
||||
done
|
||||
if [ $PASSED_CHECKSUM == "true" ]; then
|
||||
echo "Checksum passed. Proceeding to build image."
|
||||
# Build AppImage
|
||||
chmod a+x appimagetool.AppImage
|
||||
./appimagetool.AppImage ./build "$2"
|
||||
elif [ $PASSED_CHECKSUM == "invalid_arch" ]; then
|
||||
echo "No download found for architecture '$ARCH'. Building halted."
|
||||
else
|
||||
echo "Checksum for appimagetool does not match. Building halted."
|
||||
echo "If the file to be downloaded has been changed, a new checksum will need to be generated for this script."
|
||||
fi
|
||||
else
|
||||
echo "QT not found, aborting AppImage build."
|
||||
fi
|
||||
606
CMakeLists.txt
606
CMakeLists.txt
|
|
@ -12,6 +12,13 @@ include(DownloadExternals)
|
|||
include(CMakeDependentOption)
|
||||
include(CTest)
|
||||
|
||||
option(YUZU_USE_BUNDLED_VCPKG "Use vcpkg for yuzu dependencies" "${MSVC}")
|
||||
if (NOT YUZU_USE_BUNDLED_VCPKG)
|
||||
option(YUZU_USE_CPM "Use CPM.cmake for yuzu dependencies" OFF)
|
||||
else()
|
||||
set(YUZU_USE_CPM OFF)
|
||||
endif()
|
||||
|
||||
# Set bundled sdl2/qt as dependent options.
|
||||
# OFF by default, but if ENABLE_SDL2 and MSVC are true then ON
|
||||
option(ENABLE_SDL2 "Enable the SDL2 frontend" ON)
|
||||
|
|
@ -24,28 +31,45 @@ cmake_dependent_option(ENABLE_LIBUSB "Enable the use of LibUSB" ON "NOT ANDROID"
|
|||
option(ENABLE_OPENGL "Enable OpenGL" ON)
|
||||
mark_as_advanced(FORCE ENABLE_OPENGL)
|
||||
option(ENABLE_QT "Enable the Qt frontend" ON)
|
||||
option(ENABLE_QT6 "Allow usage of Qt6 to be attempted" OFF)
|
||||
set(QT6_LOCATION "" CACHE PATH "Additional Location to search for Qt6 libraries like C:/Qt/6.3.1/msvc2019_64/")
|
||||
|
||||
option(ENABLE_QT_TRANSLATION "Enable translations for the Qt frontend" OFF)
|
||||
CMAKE_DEPENDENT_OPTION(YUZU_USE_BUNDLED_QT "Download bundled Qt binaries" "${MSVC}" "ENABLE_QT" OFF)
|
||||
if (ENABLE_QT)
|
||||
option(YUZU_BUILD_QT6 "Build Qt6 at configure time" OFF)
|
||||
if (YUZU_BUILD_QT6)
|
||||
option(YUZU_BUILD_QT6_STATIC "Build Qt6 statically" OFF)
|
||||
endif()
|
||||
|
||||
option(ENABLE_QT_TRANSLATION "Enable translations for the Qt frontend" ON)
|
||||
|
||||
option(YUZU_USE_QT_MULTIMEDIA "Use QtMultimedia for Camera" OFF)
|
||||
|
||||
option(YUZU_USE_QT_WEB_ENGINE "Use QtWebEngine for web applet implementation" OFF)
|
||||
endif()
|
||||
|
||||
set(ENABLE_WEB_SERVICE OFF)
|
||||
|
||||
option(YUZU_USE_BUNDLED_FFMPEG "Download/Build bundled FFmpeg" "${WIN32}")
|
||||
|
||||
option(YUZU_USE_EXTERNAL_VULKAN_HEADERS "Use Vulkan-Headers from externals" ON)
|
||||
if (NOT YUZU_USE_CPM)
|
||||
option(YUZU_USE_EXTERNAL_VULKAN_HEADERS "Use Vulkan-Headers from externals" ON)
|
||||
|
||||
option(YUZU_USE_EXTERNAL_VULKAN_UTILITY_LIBRARIES "Use Vulkan-Utility-Libraries from externals" ON)
|
||||
option(YUZU_USE_EXTERNAL_VULKAN_UTILITY_LIBRARIES "Use Vulkan-Utility-Libraries from externals" ON)
|
||||
|
||||
option(YUZU_USE_EXTERNAL_VULKAN_SPIRV_TOOLS "Use SPIRV-Tools from externals" ON)
|
||||
option(YUZU_USE_EXTERNAL_VULKAN_SPIRV_TOOLS "Use SPIRV-Tools from externals" ON)
|
||||
else()
|
||||
set(YUZU_USE_EXTERNAL_VULKAN_HEADERS OFF)
|
||||
|
||||
option(YUZU_USE_QT_MULTIMEDIA "Use QtMultimedia for Camera" OFF)
|
||||
set(YUZU_USE_EXTERNAL_VULKAN_UTILITY_LIBRARIES OFF)
|
||||
|
||||
option(YUZU_USE_QT_WEB_ENGINE "Use QtWebEngine for web applet implementation" OFF)
|
||||
set(YUZU_USE_EXTERNAL_VULKAN_SPIRV_TOOLS OFF)
|
||||
endif()
|
||||
|
||||
option(ENABLE_CUBEB "Enables the cubeb audio backend" ON)
|
||||
|
||||
option(USE_DISCORD_PRESENCE "Enables Discord Rich Presence" OFF)
|
||||
|
||||
option(YUZU_NO_CPU_DEBUGGER "Do not build debugging code" OFF)
|
||||
|
||||
option(YUZU_TESTS "Compile tests" "${BUILD_TESTING}")
|
||||
|
||||
option(YUZU_USE_PRECOMPILED_HEADERS "Use precompiled headers" ON)
|
||||
|
|
@ -54,9 +78,9 @@ option(YUZU_DOWNLOAD_ANDROID_VVL "Download validation layer binary for android"
|
|||
|
||||
CMAKE_DEPENDENT_OPTION(YUZU_ROOM "Compile LDN room server" ON "NOT ANDROID" OFF)
|
||||
|
||||
CMAKE_DEPENDENT_OPTION(YUZU_CRASH_DUMPS "Compile crash dump (Minidump) support" OFF "WIN32 OR LINUX" OFF)
|
||||
option(YUZU_CMD "Compile the -cmd executable (can disable if -cmd is unused)" ON)
|
||||
|
||||
option(YUZU_USE_BUNDLED_VCPKG "Use vcpkg for yuzu dependencies" "${MSVC}")
|
||||
CMAKE_DEPENDENT_OPTION(YUZU_CRASH_DUMPS "Compile crash dump (Minidump) support" OFF "WIN32 OR LINUX" OFF)
|
||||
|
||||
option(YUZU_CHECK_SUBMODULES "Check if submodules are present" ON)
|
||||
|
||||
|
|
@ -66,10 +90,72 @@ 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_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(USE_SYSTEM_MOLTENVK "Use the system MoltenVK lib (instead of the bundled one)" OFF "APPLE" OFF)
|
||||
|
||||
# Detect current compilation architecture and create standard definitions
|
||||
# =======================================================================
|
||||
|
||||
include(CheckSymbolExists)
|
||||
function(detect_architecture symbol arch)
|
||||
if (NOT DEFINED ARCHITECTURE)
|
||||
set(CMAKE_REQUIRED_QUIET 1)
|
||||
check_symbol_exists("${symbol}" "" ARCHITECTURE_${arch})
|
||||
unset(CMAKE_REQUIRED_QUIET)
|
||||
|
||||
# The output variable needs to be unique across invocations otherwise
|
||||
# CMake's crazy scope rules will keep it defined
|
||||
if (ARCHITECTURE_${arch})
|
||||
set(ARCHITECTURE "${arch}" PARENT_SCOPE)
|
||||
set(ARCHITECTURE_${arch} 1 PARENT_SCOPE)
|
||||
add_definitions(-DARCHITECTURE_${arch}=1)
|
||||
endif()
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
if (NOT ENABLE_GENERIC)
|
||||
if (MSVC)
|
||||
detect_architecture("_M_AMD64" x86_64)
|
||||
detect_architecture("_M_IX86" x86)
|
||||
detect_architecture("_M_ARM" arm)
|
||||
detect_architecture("_M_ARM64" arm64)
|
||||
else()
|
||||
detect_architecture("__x86_64__" x86_64)
|
||||
detect_architecture("__i386__" x86)
|
||||
detect_architecture("__arm__" arm)
|
||||
detect_architecture("__aarch64__" arm64)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED ARCHITECTURE)
|
||||
set(ARCHITECTURE "GENERIC")
|
||||
set(ARCHITECTURE_GENERIC 1)
|
||||
add_definitions(-DARCHITECTURE_GENERIC=1)
|
||||
endif()
|
||||
message(STATUS "Target architecture: ${ARCHITECTURE} (${YUZU_MARCH})")
|
||||
|
||||
if (MSVC AND NOT CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
set(YUZU_MARCH "SSE4.2" CACHE STRING "Compile for specified x86 arch (AVX, AVX2, etc.)")
|
||||
add_compile_options(/arch:${YUZU_MARCH})
|
||||
else()
|
||||
if (ARCHITECTURE STREQUAL "x86_64")
|
||||
set(YUZU_MARCH "x86-64-v2" CACHE STRING "Compile for specified x86 microarchitecture level (x86-64-v3, native, etc.)")
|
||||
add_compile_options(-march=${YUZU_MARCH})
|
||||
elseif (ARCHITECTURE STREQUAL "arm64")
|
||||
set(YUZU_MARCH "armv8-a" CACHE STRING "Compile for specified ARM architecture (armv8.1-a, native, etc.)")
|
||||
add_compile_options(-march=${YUZU_MARCH})
|
||||
else()
|
||||
message(WARNING "Architecture ${ARCHITECTURE} unknown, EXPECT THINGS TO GO WRONG.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (MSVC)
|
||||
add_definitions(-DWIN32)
|
||||
endif()
|
||||
|
||||
set(DEFAULT_ENABLE_OPENSSL ON)
|
||||
if (ANDROID OR WIN32 OR APPLE)
|
||||
# - Windows defaults to the Schannel backend.
|
||||
|
|
@ -83,21 +169,26 @@ endif()
|
|||
option(ENABLE_OPENSSL "Enable OpenSSL backend for ISslConnection" ${DEFAULT_ENABLE_OPENSSL})
|
||||
|
||||
if (ANDROID AND YUZU_DOWNLOAD_ANDROID_VVL)
|
||||
set(vvl_version "sdk-1.3.261.1")
|
||||
set(vvl_version "1.4.304.1")
|
||||
set(vvl_zip_file "${CMAKE_BINARY_DIR}/externals/vvl-android.zip")
|
||||
if (NOT EXISTS "${vvl_zip_file}")
|
||||
# Download and extract validation layer release to externals directory
|
||||
set(vvl_base_url "https://github.com/KhronosGroup/Vulkan-ValidationLayers/releases/download")
|
||||
file(DOWNLOAD "${vvl_base_url}/${vvl_version}/android-binaries-${vvl_version}-android.zip"
|
||||
"${vvl_zip_file}" SHOW_PROGRESS)
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E tar xf "${vvl_zip_file}"
|
||||
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/externals")
|
||||
endif()
|
||||
|
||||
# Copy the arm64 binary to src/android/app/main/jniLibs
|
||||
set(vvl_lib_path "${CMAKE_CURRENT_SOURCE_DIR}/src/android/app/src/main/jniLibs/arm64-v8a/")
|
||||
file(COPY "${CMAKE_BINARY_DIR}/externals/android-binaries-${vvl_version}/arm64-v8a/libVkLayer_khronos_validation.so"
|
||||
DESTINATION "${vvl_lib_path}")
|
||||
set(vvl_final_lib "${vvl_lib_path}/libVkLayer_khronos_validation.so")
|
||||
|
||||
if (NOT EXISTS "${vvl_final_lib}")
|
||||
# Download and extract validation layer release to externals directory
|
||||
if (NOT EXISTS "${vvl_zip_file}")
|
||||
set(vvl_base_url "https://github.com/KhronosGroup/Vulkan-ValidationLayers/releases/download")
|
||||
file(DOWNLOAD "${vvl_base_url}/vulkan-sdk-${vvl_version}/android-binaries-${vvl_version}.zip"
|
||||
"${vvl_zip_file}" SHOW_PROGRESS)
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E tar xf "${vvl_zip_file}"
|
||||
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/externals")
|
||||
endif()
|
||||
|
||||
# Copy the arm64 binary to src/android/app/main/jniLibs
|
||||
file(COPY "${CMAKE_BINARY_DIR}/externals/android-binaries-${vvl_version}/arm64-v8a/libVkLayer_khronos_validation.so"
|
||||
DESTINATION "${vvl_lib_path}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (ANDROID)
|
||||
|
|
@ -126,7 +217,7 @@ if (YUZU_USE_BUNDLED_VCPKG)
|
|||
set(VCPKG_DOWNLOADS_PATH ${PROJECT_SOURCE_DIR}/externals/vcpkg/downloads)
|
||||
set(NASM_VERSION "2.16.01")
|
||||
set(NASM_DESTINATION_PATH ${VCPKG_DOWNLOADS_PATH}/nasm-${NASM_VERSION}-win64.zip)
|
||||
set(NASM_DOWNLOAD_URL "https://github.com/yuzu-emu/ext-windows-bin/raw/master/nasm/nasm-${NASM_VERSION}-win64.zip")
|
||||
set(NASM_DOWNLOAD_URL "https://github.com/litucks/ext-windows-bin/raw/master/nasm/nasm-${NASM_VERSION}-win64.zip")
|
||||
|
||||
if (NOT EXISTS ${NASM_DESTINATION_PATH})
|
||||
file(DOWNLOAD ${NASM_DOWNLOAD_URL} ${NASM_DESTINATION_PATH} SHOW_PROGRESS STATUS NASM_STATUS)
|
||||
|
|
@ -141,6 +232,9 @@ if (YUZU_USE_BUNDLED_VCPKG)
|
|||
if (YUZU_TESTS)
|
||||
list(APPEND VCPKG_MANIFEST_FEATURES "yuzu-tests")
|
||||
endif()
|
||||
if (ENABLE_WEB_SERVICE)
|
||||
list(APPEND VCPKG_MANIFEST_FEATURES "web-service")
|
||||
endif()
|
||||
if (ANDROID)
|
||||
list(APPEND VCPKG_MANIFEST_FEATURES "android")
|
||||
endif()
|
||||
|
|
@ -217,46 +311,6 @@ if (NOT EXISTS ${PROJECT_BINARY_DIR}/dist/compatibility_list/compatibility_list.
|
|||
file(WRITE ${PROJECT_BINARY_DIR}/dist/compatibility_list/compatibility_list.json "")
|
||||
endif()
|
||||
|
||||
# Detect current compilation architecture and create standard definitions
|
||||
# =======================================================================
|
||||
|
||||
include(CheckSymbolExists)
|
||||
function(detect_architecture symbol arch)
|
||||
if (NOT DEFINED ARCHITECTURE)
|
||||
set(CMAKE_REQUIRED_QUIET 1)
|
||||
check_symbol_exists("${symbol}" "" ARCHITECTURE_${arch})
|
||||
unset(CMAKE_REQUIRED_QUIET)
|
||||
|
||||
# The output variable needs to be unique across invocations otherwise
|
||||
# CMake's crazy scope rules will keep it defined
|
||||
if (ARCHITECTURE_${arch})
|
||||
set(ARCHITECTURE "${arch}" PARENT_SCOPE)
|
||||
set(ARCHITECTURE_${arch} 1 PARENT_SCOPE)
|
||||
add_definitions(-DARCHITECTURE_${arch}=1)
|
||||
endif()
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
if (NOT ENABLE_GENERIC)
|
||||
if (MSVC)
|
||||
detect_architecture("_M_AMD64" x86_64)
|
||||
detect_architecture("_M_IX86" x86)
|
||||
detect_architecture("_M_ARM" arm)
|
||||
detect_architecture("_M_ARM64" arm64)
|
||||
else()
|
||||
detect_architecture("__x86_64__" x86_64)
|
||||
detect_architecture("__i386__" x86)
|
||||
detect_architecture("__arm__" arm)
|
||||
detect_architecture("__aarch64__" arm64)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED ARCHITECTURE)
|
||||
set(ARCHITECTURE "GENERIC")
|
||||
set(ARCHITECTURE_GENERIC 1)
|
||||
add_definitions(-DARCHITECTURE_GENERIC=1)
|
||||
endif()
|
||||
message(STATUS "Target architecture: ${ARCHITECTURE}")
|
||||
|
||||
if (UNIX)
|
||||
add_definitions(-DYUZU_UNIX=1)
|
||||
|
|
@ -289,31 +343,222 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)
|
|||
# =======================================================================
|
||||
|
||||
# Enforce the search mode of non-required packages for better and shorter failure messages
|
||||
find_package(Boost 1.79.0 REQUIRED context)
|
||||
find_package(enet 1.3 MODULE)
|
||||
find_package(fmt 9 REQUIRED)
|
||||
find_package(LLVM 17.0.2 MODULE COMPONENTS Demangle)
|
||||
find_package(lz4 REQUIRED)
|
||||
find_package(nlohmann_json 3.8 REQUIRED)
|
||||
find_package(Opus 1.3 MODULE)
|
||||
find_package(RenderDoc MODULE)
|
||||
find_package(SimpleIni MODULE)
|
||||
find_package(stb MODULE)
|
||||
find_package(VulkanMemoryAllocator CONFIG)
|
||||
find_package(ZLIB 1.2 REQUIRED)
|
||||
find_package(zstd 1.5 REQUIRED)
|
||||
if (NOT YUZU_USE_CPM)
|
||||
find_package(Boost 1.86.0 REQUIRED headers context system fiber)
|
||||
find_package(enet 1.3 MODULE)
|
||||
find_package(fmt REQUIRED)
|
||||
if (YUZU_USE_LLVM_DEMANGLE)
|
||||
find_package(LLVM 17.0.2 MODULE COMPONENTS Demangle)
|
||||
endif()
|
||||
find_package(lz4 REQUIRED)
|
||||
find_package(nlohmann_json 3.8 REQUIRED)
|
||||
find_package(Opus 1.3 MODULE)
|
||||
find_package(RenderDoc MODULE)
|
||||
find_package(SimpleIni MODULE)
|
||||
find_package(stb MODULE)
|
||||
find_package(VulkanMemoryAllocator CONFIG)
|
||||
find_package(ZLIB 1.2 REQUIRED)
|
||||
find_package(zstd 1.5 REQUIRED)
|
||||
else()
|
||||
include(CMakeModules/CPM.cmake)
|
||||
|
||||
# Disable tests in all externals supporting the standard option name
|
||||
set(BUILD_TESTING OFF)
|
||||
|
||||
# Some externals take these options instead
|
||||
set(BUILD_TESTS OFF)
|
||||
set(BUILD_TOOLS OFF)
|
||||
|
||||
# Build only static externals
|
||||
set(BUILD_SHARED_LIBS OFF)
|
||||
|
||||
# Do not attempt to use Brotli in httplib since we're not downloading it
|
||||
set(HTTPLIB_USE_BROTLI_IF_AVAILABLE OFF)
|
||||
|
||||
# Configure Opus to not generate as much overhead
|
||||
set(OPUS_BUILD_TESTING OFF)
|
||||
set(OPUS_BUILD_PROGRAMS OFF)
|
||||
set(OPUS_INSTALL_PKG_CONFIG_MODULE OFF)
|
||||
set(OPUS_INSTALL_CMAKE_CONFIG_MODULE OFF)
|
||||
|
||||
message(STATUS "Downloading and extracting boost library sources. This will take some time...")
|
||||
CPMAddPackage(
|
||||
NAME boost
|
||||
URL "https://github.com/boostorg/boost/releases/download/boost-1.88.0/boost-1.88.0-cmake.7z"
|
||||
PATCHES boost-1.88.0-fix.patch
|
||||
VERSION 1.88.0
|
||||
)
|
||||
CPMAddPackage("gh:lsalzman/enet@1.3.18")
|
||||
CPMAddPackage("gh:fmtlib/fmt#11.1.4")
|
||||
CPMAddPackage(
|
||||
NAME lz4
|
||||
GIT_REPOSITORY https://github.com/lz4/lz4.git
|
||||
VERSION 1.10.0
|
||||
DOWNLOAD_ONLY YES
|
||||
)
|
||||
add_subdirectory(${lz4_SOURCE_DIR}/build/cmake lz4)
|
||||
CPMAddPackage("gh:nlohmann/json@3.8.0")
|
||||
CPMAddPackage("gh:xiph/opus@1.3.1")
|
||||
CPMAddPackage("gh:brofield/simpleini@4.22")
|
||||
CPMAddPackage("gh:GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator@3.2.1")
|
||||
CPMAddPackage("gh:madler/zlib@1.2.13")
|
||||
CPMAddPackage(
|
||||
NAME zstd
|
||||
GIT_REPOSITORY https://github.com/facebook/zstd.git
|
||||
VERSION 1.5.7
|
||||
DOWNLOAD_ONLY YES
|
||||
)
|
||||
add_subdirectory(${zstd_SOURCE_DIR}/build/cmake zstd)
|
||||
CPMAddPackage("gh:KhronosGroup/SPIRV-Headers#vulkan-sdk-1.3.280.0")
|
||||
CPMAddPackage("gh:yhirose/cpp-httplib@0.20.0")
|
||||
|
||||
# Set up required aliases
|
||||
add_library(Opus::opus ALIAS opus)
|
||||
add_library(lz4::lz4 ALIAS lz4)
|
||||
add_library(zstd::zstd ALIAS libzstd)
|
||||
if (NOT YUZU_BUILD_QT6)
|
||||
add_library(zstd::libzstd ALIAS libzstd)
|
||||
endif()
|
||||
add_library(nlohmann::json ALIAS nlohmann_json)
|
||||
|
||||
# Enet specific setup to add missing include dir
|
||||
add_library(enet_fixed INTERFACE)
|
||||
target_link_libraries(enet_fixed INTERFACE enet)
|
||||
target_include_directories(enet_fixed INTERFACE ${enet_SOURCE_DIR}/include)
|
||||
add_library(enet::enet ALIAS enet_fixed)
|
||||
endif()
|
||||
|
||||
if (YUZU_BUILD_QT6)
|
||||
set(QT_VERSION "6.9.1")
|
||||
set(QT_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/qt-install")
|
||||
set(QT_SOURCE_DIR "${CMAKE_BINARY_DIR}/qt-src")
|
||||
set(QT_TARBALL_PATH "${CMAKE_BINARY_DIR}/qt-${QT_VERSION}.tar.xz")
|
||||
|
||||
# Extract major and minor versions from QT_VERSION
|
||||
string(REPLACE "." ";" QT_VERSION_PARTS "${QT_VERSION}")
|
||||
list(GET QT_VERSION_PARTS 0 QT_MAJOR)
|
||||
list(GET QT_VERSION_PARTS 1 QT_MINOR)
|
||||
|
||||
set(QT_URL "https://download.qt.io/archive/qt/${QT_MAJOR}.${QT_MINOR}/${QT_VERSION}/single/qt-everywhere-src-${QT_VERSION}.tar.xz")
|
||||
|
||||
set(QT_SUBMODULES "qtbase,qttranslations")
|
||||
if (YUZU_USE_QT_MULTIMEDIA)
|
||||
set(QT_SUBMODULES "${QT_SUBMODULES},qtmultimedia")
|
||||
endif()
|
||||
|
||||
if (YUZU_BUILD_QT6_STATIC)
|
||||
set(QT_LIBTYPE "-static")
|
||||
else()
|
||||
set(QT_LIBTYPE "-shared")
|
||||
endif()
|
||||
|
||||
# Check prerequisites
|
||||
find_program(NINJA_EXECUTABLE ninja)
|
||||
if(NOT NINJA_EXECUTABLE)
|
||||
message(FATAL_ERROR "'ninja' executable not found. Install it or ensure it's in your PATH. It's required for building Qt6.")
|
||||
endif()
|
||||
|
||||
# Download Qt source
|
||||
if (NOT EXISTS ${QT_TARBALL_PATH})
|
||||
message(STATUS "Downloading Qt library sources. This will take some time...")
|
||||
file(DOWNLOAD
|
||||
${QT_URL}
|
||||
${QT_TARBALL_PATH}
|
||||
SHOW_PROGRESS
|
||||
STATUS download_status
|
||||
)
|
||||
|
||||
# Check download success
|
||||
list(GET download_status 0 status_code)
|
||||
if(NOT status_code EQUAL 0)
|
||||
list(GET download_status 1 error_msg)
|
||||
message(FATAL_ERROR "Download failed: ${error_msg}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Extract source
|
||||
if (NOT EXISTS "${QT_SOURCE_DIR}/qt-everywhere-src-${QT_VERSION}/CMakeLists.txt")
|
||||
message(STATUS "Extracting Qt library sources. This will take some time...")
|
||||
file(ARCHIVE_EXTRACT
|
||||
INPUT ${QT_TARBALL_PATH}
|
||||
DESTINATION ${QT_SOURCE_DIR}
|
||||
)
|
||||
endif()
|
||||
|
||||
# Configure Qt
|
||||
message(STATUS "Configuring Qt library. This will take some time...")
|
||||
if (MSVC)
|
||||
set(QT_CONFIGURE_COMMAND "${QT_SOURCE_DIR}/qt-everywhere-src-${QT_VERSION}/configure.bat")
|
||||
else()
|
||||
set(QT_CONFIGURE_COMMAND "${QT_SOURCE_DIR}/qt-everywhere-src-${QT_VERSION}/configure")
|
||||
endif()
|
||||
message(STATUS "Configuring Qt library using ${QT_CONFIGURE_COMMAND}")
|
||||
file(MAKE_DIRECTORY "${QT_SOURCE_DIR}/build")
|
||||
execute_process(COMMAND ${QT_CONFIGURE_COMMAND}
|
||||
-opensource -confirm-license
|
||||
-prefix "${QT_INSTALL_PREFIX}"
|
||||
-release ${QT_LIBTYPE} -ltcg
|
||||
-submodules ${QT_SUBMODULES}
|
||||
-no-feature-vulkan
|
||||
-nomake examples -nomake tests
|
||||
-qt-doubleconversion -no-glib -qt-pcre -qt-zlib -qt-harfbuzz -qt-libpng -qt-libjpeg
|
||||
WORKING_DIRECTORY "${QT_SOURCE_DIR}/build"
|
||||
RESULT_VARIABLE ret
|
||||
)
|
||||
if (NOT ret EQUAL "0")
|
||||
message(FATAL_ERROR "Qt library failed to configure.")
|
||||
endif()
|
||||
|
||||
# Build and install Qt
|
||||
message(STATUS "Building Qt library. This will take some time...")
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} --build "${QT_SOURCE_DIR}/build" --parallel
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
RESULT_VARIABLE ret
|
||||
)
|
||||
if (NOT ret EQUAL "0")
|
||||
message(FATAL_ERROR "Qt library failed to build.")
|
||||
endif()
|
||||
|
||||
message(STATUS "Installing Qt library. This will take some time...")
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} --install "${QT_SOURCE_DIR}/build"
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
RESULT_VARIABLE ret
|
||||
)
|
||||
if (NOT ret EQUAL "0")
|
||||
message(FATAL_ERROR "Qt library failed to install.")
|
||||
endif()
|
||||
|
||||
# Add Qt installation to search path
|
||||
message(STATUS "Qt library installed to ${QT_INSTALL_PREFIX}")
|
||||
list(PREPEND CMAKE_PREFIX_PATH ${QT_INSTALL_PREFIX})
|
||||
list(PREPEND CMAKE_MODULE_PATH ${QT_INSTALL_PREFIX}/lib/cmake)
|
||||
set(Qt6_DIR "${QT_INSTALL_PREFIX}/lib/cmake/Qt6" CACHE PATH "" FORCE)
|
||||
set(QT_QMAKE_EXECUTABLE "${QT_INSTALL_PREFIX}/bin/qmake6" CACHE PATH "" FORCE)
|
||||
endif()
|
||||
|
||||
if (NOT YUZU_USE_EXTERNAL_VULKAN_HEADERS)
|
||||
find_package(VulkanHeaders 1.3.274 REQUIRED)
|
||||
if (NOT YUZU_USE_CPM)
|
||||
find_package(VulkanHeaders 1.3.274 REQUIRED)
|
||||
else()
|
||||
CPMAddPackage("gh:KhronosGroup/Vulkan-Headers@1.3.274")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (NOT YUZU_USE_EXTERNAL_VULKAN_UTILITY_LIBRARIES)
|
||||
find_package(VulkanUtilityLibraries REQUIRED)
|
||||
if (NOT YUZU_USE_CPM)
|
||||
find_package(VulkanUtilityLibraries REQUIRED)
|
||||
else()
|
||||
CPMAddPackage("gh:KhronosGroup/Vulkan-Utility-Libraries#fce11d52fee0344bb10a098b0a398dff42cb5d51")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (NOT YUZU_USE_EXTERNAL_VULKAN_SPIRV_TOOLS)
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(SPIRV-Tools REQUIRED SPIRV-Tools)
|
||||
if (NOT YUZU_USE_CPM)
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(SPIRV-Tools REQUIRED SPIRV-Tools)
|
||||
else()
|
||||
CPMAddPackage("gh:KhronosGroup/SPIRV-Tools#dd4b663e13c07fea4fbb3f70c1c91c86731099f7") # This is tag v2024.2, but some weird but is preventing us from using it here
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (ENABLE_LIBUSB)
|
||||
|
|
@ -340,7 +585,9 @@ if (USE_DISCORD_PRESENCE)
|
|||
find_package(DiscordRPC MODULE)
|
||||
endif()
|
||||
|
||||
find_package(httplib 0.12 MODULE COMPONENTS OpenSSL)
|
||||
if (ENABLE_WEB_SERVICE)
|
||||
find_package(cpp-jwt 1.4 CONFIG)
|
||||
endif()
|
||||
|
||||
if (YUZU_TESTS)
|
||||
find_package(Catch2 3.0.1 REQUIRED)
|
||||
|
|
@ -360,7 +607,7 @@ if (UNIX AND NOT APPLE)
|
|||
endif()
|
||||
|
||||
# Please consider this as a stub
|
||||
if(ENABLE_QT6 AND Qt6_LOCATION)
|
||||
if(Qt6_LOCATION)
|
||||
list(APPEND CMAKE_PREFIX_PATH "${Qt6_LOCATION}")
|
||||
endif()
|
||||
|
||||
|
|
@ -390,153 +637,34 @@ endfunction(set_yuzu_qt_components)
|
|||
|
||||
# Qt5 requires that we find components, so it doesn't fit our pretty little find package function
|
||||
if(ENABLE_QT)
|
||||
set(QT_VERSION 5.15)
|
||||
set(QT_VERSION 6.3.1)
|
||||
# These are used to specify minimum versions
|
||||
set(QT5_VERSION 5.15)
|
||||
set(QT6_VERSION 6.3.1)
|
||||
|
||||
set_yuzu_qt_components()
|
||||
if (ENABLE_QT6)
|
||||
find_package(Qt6 ${QT6_VERSION} COMPONENTS ${YUZU_QT_COMPONENTS})
|
||||
endif()
|
||||
find_package(Qt6 ${QT6_VERSION} COMPONENTS ${YUZU_QT_COMPONENTS})
|
||||
if (Qt6_FOUND)
|
||||
message(STATUS "yuzu/CMakeLists.txt: Found Qt6 at ${Qt6_CONFIG} (widgets at ${Qt6Widgets_CONFIG})")
|
||||
message(STATUS "yuzu/CMakeLists.txt: Qt6Widgets_VERSION ${Qt6Widgets_VERSION}, setting QT_VERSION")
|
||||
set(QT_VERSION ${Qt6Widgets_VERSION})
|
||||
set(QT_MAJOR_VERSION 6)
|
||||
# Qt6 sets cxx_std_17 and we need to undo that
|
||||
set_target_properties(Qt6::Platform PROPERTIES INTERFACE_COMPILE_FEATURES "")
|
||||
else()
|
||||
message(STATUS "yuzu/CMakeLists.txt: Qt6 not found/not selected, trying for Qt5")
|
||||
# When Qt6 partially found, need this set to use Qt5 when not specifying version
|
||||
set(QT_DEFAULT_MAJOR_VERSION 5)
|
||||
set(QT_MAJOR_VERSION 5)
|
||||
|
||||
set(YUZU_USE_QT_MULTIMEDIA ON)
|
||||
# Check for system Qt on Linux, fallback to bundled Qt
|
||||
if (UNIX AND NOT APPLE)
|
||||
if (NOT YUZU_USE_BUNDLED_QT)
|
||||
find_package(Qt5 ${QT5_VERSION} COMPONENTS Widgets DBus Multimedia)
|
||||
endif()
|
||||
if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux" AND (NOT Qt5_FOUND OR YUZU_USE_BUNDLED_QT))
|
||||
# Check for dependencies, then enable bundled Qt download
|
||||
|
||||
# Check that the system GLIBCXX version is compatible
|
||||
find_program(OBJDUMP objdump)
|
||||
if (NOT OBJDUMP)
|
||||
message(FATAL_ERROR "Required program `objdump` not found.")
|
||||
endif()
|
||||
find_library(LIBSTDCXX libstdc++.so.6)
|
||||
execute_process(
|
||||
COMMAND
|
||||
${OBJDUMP} -T ${LIBSTDCXX}
|
||||
COMMAND
|
||||
grep GLIBCXX_3.4.28
|
||||
COMMAND
|
||||
sed "s/[0-9a-f]*.* //"
|
||||
COMMAND
|
||||
sed "s/ .*//"
|
||||
COMMAND
|
||||
sort -u
|
||||
OUTPUT_VARIABLE
|
||||
GLIBCXX_MET
|
||||
)
|
||||
if (NOT GLIBCXX_MET)
|
||||
message(FATAL_ERROR "Qt too old or not found, and bundled Qt package is not \
|
||||
compatible with this system. Either install Qt ${QT_VERSION}, or provide the path \
|
||||
to Qt by setting the variable Qt5_ROOT.")
|
||||
endif()
|
||||
|
||||
# Check for headers
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(QT_DEP_GLU QUIET glu>=9.0.0)
|
||||
if (NOT QT_DEP_GLU_FOUND)
|
||||
message(FATAL_ERROR "Qt bundled package dependency `glu` not found. \
|
||||
Perhaps `libglu1-mesa-dev` needs to be installed?")
|
||||
endif()
|
||||
pkg_check_modules(QT_DEP_MESA QUIET dri>=20.0.8)
|
||||
if (NOT QT_DEP_MESA_FOUND)
|
||||
message(FATAL_ERROR "Qt bundled package dependency `dri` not found. \
|
||||
Perhaps `mesa-common-dev` needs to be installed?")
|
||||
endif()
|
||||
|
||||
# Check for X libraries
|
||||
set(BUNDLED_QT_REQUIREMENTS
|
||||
libxcb-icccm.so.4
|
||||
libxcb-image.so.0
|
||||
libxcb-keysyms.so.1
|
||||
libxcb-randr.so.0
|
||||
libxcb-render-util.so.0
|
||||
libxcb-render.so.0
|
||||
libxcb-shape.so.0
|
||||
libxcb-shm.so.0
|
||||
libxcb-sync.so.1
|
||||
libxcb-xfixes.so.0
|
||||
libxcb-xinerama.so.0
|
||||
libxcb-xkb.so.1
|
||||
libxcb.so.1
|
||||
libxkbcommon-x11.so.0
|
||||
libxkbcommon.so.0
|
||||
)
|
||||
set(UNRESOLVED_QT_DEPS "")
|
||||
foreach (REQUIREMENT ${BUNDLED_QT_REQUIREMENTS})
|
||||
find_library(BUNDLED_QT_${REQUIREMENT} ${REQUIREMENT})
|
||||
if (NOT BUNDLED_QT_${REQUIREMENT})
|
||||
set(UNRESOLVED_QT_DEPS ${UNRESOLVED_QT_DEPS} ${REQUIREMENT})
|
||||
endif()
|
||||
unset(BUNDLED_QT_${REQUIREMENT})
|
||||
endforeach()
|
||||
unset(BUNDLED_QT_REQUIREMENTS)
|
||||
|
||||
if (NOT "${UNRESOLVED_QT_DEPS}" STREQUAL "")
|
||||
message(FATAL_ERROR "Bundled Qt package missing required dependencies: ${UNRESOLVED_QT_DEPS}")
|
||||
endif()
|
||||
|
||||
set(YUZU_USE_BUNDLED_QT ON CACHE BOOL "Download bundled Qt" FORCE)
|
||||
endif()
|
||||
if (YUZU_USE_BUNDLED_QT)
|
||||
# Binary package currently does not support Qt webengine, so make sure it's disabled
|
||||
set(YUZU_USE_QT_WEB_ENGINE OFF CACHE BOOL "Use Qt Webengine" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(YUZU_QT_NO_CMAKE_SYSTEM_PATH)
|
||||
|
||||
if(YUZU_USE_BUNDLED_QT)
|
||||
if ((MSVC_VERSION GREATER_EQUAL 1920 AND MSVC_VERSION LESS 1940) AND ARCHITECTURE_x86_64)
|
||||
set(QT_BUILD qt-5.15.2-msvc2019_64)
|
||||
elseif ((${CMAKE_SYSTEM_NAME} STREQUAL "Linux") AND NOT MINGW AND ARCHITECTURE_x86_64)
|
||||
set(QT_BUILD qt5_5_15_2)
|
||||
else()
|
||||
message(FATAL_ERROR "No bundled Qt binaries for your toolchain. Disable YUZU_USE_BUNDLED_QT and provide your own.")
|
||||
endif()
|
||||
|
||||
if (DEFINED QT_BUILD)
|
||||
download_bundled_external("qt/" ${QT_BUILD} QT_PREFIX)
|
||||
endif()
|
||||
|
||||
set(QT_PREFIX_HINT HINTS "${QT_PREFIX}")
|
||||
|
||||
set(YUZU_QT_NO_CMAKE_SYSTEM_PATH "NO_CMAKE_SYSTEM_PATH")
|
||||
# Binary package for Qt5 has Qt Multimedia
|
||||
set(YUZU_USE_QT_MULTIMEDIA ON CACHE BOOL "Use Qt Multimedia" FORCE)
|
||||
endif()
|
||||
|
||||
set_yuzu_qt_components()
|
||||
find_package(Qt5 ${QT5_VERSION} COMPONENTS ${YUZU_QT_COMPONENTS} ${QT_PREFIX_HINT} ${YUZU_QT_NO_CMAKE_SYSTEM_PATH})
|
||||
message(FATAL_ERROR "yuzu/CMakeLists.txt: Qt6 not found, but is now required")
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
# find SDL2 exports a bunch of variables that are needed, so its easier to do this outside of the yuzu_find_package
|
||||
if (ENABLE_SDL2)
|
||||
if (YUZU_USE_BUNDLED_SDL2)
|
||||
# Detect toolchain and platform
|
||||
if ((MSVC_VERSION GREATER_EQUAL 1920 AND MSVC_VERSION LESS 1940) AND ARCHITECTURE_x86_64)
|
||||
## if ((MSVC_VERSION GREATER_EQUAL 1920 AND MSVC_VERSION LESS 1940) AND ARCHITECTURE_x86_64)
|
||||
if ((MSVC_VERSION GREATER_EQUAL 1920) AND ARCHITECTURE_x86_64)
|
||||
set(SDL2_VER "SDL2-2.28.2")
|
||||
else()
|
||||
message(FATAL_ERROR "No bundled SDL2 binaries for your toolchain. Disable YUZU_USE_BUNDLED_SDL2 and provide your own.")
|
||||
endif()
|
||||
|
||||
if (DEFINED SDL2_VER)
|
||||
download_bundled_external("sdl2/" ${SDL2_VER} SDL2_PREFIX)
|
||||
endif()
|
||||
|
|
@ -622,7 +750,7 @@ if (NOT CLANG_FORMAT)
|
|||
message(STATUS "Clang format not found! Downloading...")
|
||||
set(CLANG_FORMAT "${PROJECT_BINARY_DIR}/externals/clang-format${CLANG_FORMAT_POSTFIX}.exe")
|
||||
file(DOWNLOAD
|
||||
https://github.com/yuzu-emu/ext-windows-bin/raw/master/clang-format${CLANG_FORMAT_POSTFIX}.exe
|
||||
https://github.com/litucks/ext-windows-bin/raw/master/clang-format${CLANG_FORMAT_POSTFIX}.exe
|
||||
"${CLANG_FORMAT}" SHOW_PROGRESS
|
||||
STATUS DOWNLOAD_SUCCESS)
|
||||
if (NOT DOWNLOAD_SUCCESS EQUAL 0)
|
||||
|
|
@ -677,7 +805,10 @@ function(create_target_directory_groups target_name)
|
|||
endfunction()
|
||||
|
||||
# Prevent boost from linking against libs when building
|
||||
target_link_libraries(Boost::headers INTERFACE Boost::disable_autolinking)
|
||||
if (NOT TARGET Boost::headers)
|
||||
target_link_libraries(Boost::headers INTERFACE Boost::disable_autolinking)
|
||||
endif()
|
||||
|
||||
# Adjustments for MSVC + Ninja
|
||||
if (MSVC AND CMAKE_GENERATOR STREQUAL "Ninja")
|
||||
add_compile_options(
|
||||
|
|
@ -687,6 +818,59 @@ if (MSVC AND CMAKE_GENERATOR STREQUAL "Ninja")
|
|||
)
|
||||
endif()
|
||||
|
||||
# Adjustments for Clang-cl
|
||||
if (MSVC AND CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND ARCHITECTURE STREQUAL "x86_64")
|
||||
set(LLVM_MINGW_VERSION 20250402)
|
||||
|
||||
# Set download URL and library path within the ZIP
|
||||
set(ZIP_URL "https://github.com/mstorsjo/llvm-mingw/releases/download/${LLVM_MINGW_VERSION}/llvm-mingw-${LLVM_MINGW_VERSION}-ucrt-x86_64.zip")
|
||||
set(LIB_PATH "llvm-mingw-${LLVM_MINGW_VERSION}-ucrt-x86_64/lib/clang/20/lib/windows/libclang_rt.builtins-x86_64.a")
|
||||
|
||||
# Set paths for download and extraction
|
||||
set(DOWNLOAD_DIR "${CMAKE_BINARY_DIR}/llvm-mingw-download")
|
||||
set(ZIP_FILE "${DOWNLOAD_DIR}/llvm-mingw.zip")
|
||||
set(EXTRACTED_LIB "${DOWNLOAD_DIR}/${LIB_PATH}")
|
||||
|
||||
# Create download directory if it doesn't exist
|
||||
file(MAKE_DIRECTORY "${DOWNLOAD_DIR}")
|
||||
|
||||
# Download and extract if the library doesn't exist
|
||||
if(NOT EXISTS "${EXTRACTED_LIB}")
|
||||
message(STATUS "Downloading llvm-mingw runtime libraries...")
|
||||
|
||||
# Download the ZIP file
|
||||
file(DOWNLOAD
|
||||
${ZIP_URL}
|
||||
${ZIP_FILE}
|
||||
SHOW_PROGRESS
|
||||
# Uncomment and add EXPECTED_HASH if you know the SHA256 checksum
|
||||
EXPECTED_HASH SHA256=4edc13d878b4ec49c2f1a6e9161abb093bbaefc8b7d129f3b3f57a22a4a41d38
|
||||
)
|
||||
|
||||
message(STATUS "Extracting compiler-rt builtins library...")
|
||||
|
||||
# Extract the specific file from the ZIP
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E tar xvf "${ZIP_FILE}" "${LIB_PATH}"
|
||||
WORKING_DIRECTORY "${DOWNLOAD_DIR}"
|
||||
RESULT_VARIABLE extraction_result
|
||||
)
|
||||
|
||||
if(NOT extraction_result EQUAL 0)
|
||||
message(FATAL_ERROR "Failed to extract library: ${extraction_result}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Create imported target for the library
|
||||
add_library(llvm-mingw-runtime STATIC IMPORTED)
|
||||
set_target_properties(llvm-mingw-runtime PROPERTIES
|
||||
IMPORTED_LOCATION "${EXTRACTED_LIB}"
|
||||
)
|
||||
|
||||
# Link the library to all executables in the project
|
||||
link_libraries(llvm-mingw-runtime)
|
||||
endif()
|
||||
|
||||
if (YUZU_USE_FASTER_LD AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
# We will assume that if the compiler is GCC, it will attempt to use ld.bfd by default.
|
||||
# Try to pick a faster linker.
|
||||
|
|
@ -694,10 +878,10 @@ if (YUZU_USE_FASTER_LD AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
|||
find_program(MOLD mold)
|
||||
|
||||
if (MOLD AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "12.1")
|
||||
message(NOTICE "Selecting mold as linker")
|
||||
message(STATUS "Selecting mold as linker")
|
||||
add_link_options("-fuse-ld=mold")
|
||||
elseif (LLD)
|
||||
message(NOTICE "Selecting lld as linker")
|
||||
message(STATUS "Selecting lld as linker")
|
||||
add_link_options("-fuse-ld=lld")
|
||||
endif()
|
||||
endif()
|
||||
|
|
|
|||
1291
CMakeModules/CPM.cmake
Normal file
1291
CMakeModules/CPM.cmake
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -98,22 +98,22 @@ function(copy_yuzu_Qt5_deps target_dir)
|
|||
"${Qt5_XCBGLINTEGRATIONS_DIR}libqxcb-glx-integration.so"
|
||||
)
|
||||
foreach(LIB ${Qt5_DLLS})
|
||||
file(COPY ${LIB} DESTINATION "${DLL_DEST}/lib" FOLLOW_SYMLINK_CHAIN)
|
||||
file(COPY "${LIB}" DESTINATION "${DLL_DEST}/lib" FOLLOW_SYMLINK_CHAIN)
|
||||
endforeach()
|
||||
foreach(LIB ${Qt5_IMAGEFORMAT_DLLS})
|
||||
file(COPY ${LIB} DESTINATION "${DLL_DEST}plugins/imageformats/" FOLLOW_SYMLINK_CHAIN)
|
||||
file(COPY "${LIB}" DESTINATION "${DLL_DEST}plugins/imageformats/" FOLLOW_SYMLINK_CHAIN)
|
||||
endforeach()
|
||||
foreach(LIB ${Qt5_PLATFORMTHEME_DLLS})
|
||||
file(COPY ${LIB} DESTINATION "${DLL_DEST}plugins/platformthemes/" FOLLOW_SYMLINK_CHAIN)
|
||||
file(COPY "${LIB}" DESTINATION "${DLL_DEST}plugins/platformthemes/" FOLLOW_SYMLINK_CHAIN)
|
||||
endforeach()
|
||||
foreach(LIB ${Qt5_PLATFORM_DLLS})
|
||||
file(COPY ${LIB} DESTINATION "${DLL_DEST}plugins/platforms/" FOLLOW_SYMLINK_CHAIN)
|
||||
file(COPY "${LIB}" DESTINATION "${DLL_DEST}plugins/platforms/" FOLLOW_SYMLINK_CHAIN)
|
||||
endforeach()
|
||||
foreach(LIB ${Qt5_PLATFORMINPUTCONTEXT_DLLS})
|
||||
file(COPY ${LIB} DESTINATION "${DLL_DEST}plugins/platforminputcontexts/" FOLLOW_SYMLINK_CHAIN)
|
||||
file(COPY "${LIB}" DESTINATION "${DLL_DEST}plugins/platforminputcontexts/" FOLLOW_SYMLINK_CHAIN)
|
||||
endforeach()
|
||||
foreach(LIB ${Qt5_XCBGLINTEGRATION_DLLS})
|
||||
file(COPY ${LIB} DESTINATION "${DLL_DEST}plugins/xcbglintegrations/" FOLLOW_SYMLINK_CHAIN)
|
||||
file(COPY "${LIB}" DESTINATION "${DLL_DEST}plugins/xcbglintegrations/" FOLLOW_SYMLINK_CHAIN)
|
||||
endforeach()
|
||||
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
# prefix_var: name of a variable which will be set with the path to the extracted contents
|
||||
function(download_bundled_external remote_path lib_name prefix_var)
|
||||
|
||||
set(package_base_url "https://github.com/torzu/")
|
||||
set(package_base_url "https://github.com/litucks/")
|
||||
set(package_repo "no_platform")
|
||||
set(package_extension "no_platform")
|
||||
if (WIN32)
|
||||
|
|
|
|||
|
|
@ -12,16 +12,25 @@ set(__windows_copy_files YES)
|
|||
|
||||
# Any number of files to copy from SOURCE_DIR to DEST_DIR can be specified after DEST_DIR.
|
||||
# This copying happens post-build.
|
||||
function(windows_copy_files TARGET SOURCE_DIR DEST_DIR)
|
||||
# windows commandline expects the / to be \ so switch them
|
||||
string(REPLACE "/" "\\\\" SOURCE_DIR ${SOURCE_DIR})
|
||||
string(REPLACE "/" "\\\\" DEST_DIR ${DEST_DIR})
|
||||
if (CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
|
||||
function(windows_copy_files TARGET SOURCE_DIR DEST_DIR)
|
||||
# windows commandline expects the / to be \ so switch them
|
||||
string(REPLACE "/" "\\\\" SOURCE_DIR ${SOURCE_DIR})
|
||||
string(REPLACE "/" "\\\\" DEST_DIR ${DEST_DIR})
|
||||
|
||||
# /NJH /NJS /NDL /NFL /NC /NS /NP - Silence any output
|
||||
# cmake adds an extra check for command success which doesn't work too well with robocopy
|
||||
# so trick it into thinking the command was successful with the || cmd /c "exit /b 0"
|
||||
add_custom_command(TARGET ${TARGET} POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${DEST_DIR}
|
||||
COMMAND robocopy ${SOURCE_DIR} ${DEST_DIR} ${ARGN} /NJH /NJS /NDL /NFL /NC /NS /NP || cmd /c "exit /b 0"
|
||||
)
|
||||
endfunction()
|
||||
# /NJH /NJS /NDL /NFL /NC /NS /NP - Silence any output
|
||||
# cmake adds an extra check for command success which doesn't work too well with robocopy
|
||||
# so trick it into thinking the command was successful with the || cmd /c "exit /b 0"
|
||||
add_custom_command(TARGET ${TARGET} POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${DEST_DIR}
|
||||
COMMAND robocopy ${SOURCE_DIR} ${DEST_DIR} ${ARGN} /NJH /NJS /NDL /NFL /NC /NS /NP || cmd /c "exit /b 0"
|
||||
)
|
||||
endfunction()
|
||||
else()
|
||||
function(windows_copy_files TARGET SOURCE_DIR DEST_DIR)
|
||||
add_custom_command(TARGET ${TARGET} POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${DEST_DIR}
|
||||
COMMAND cp -ra ${SOURCE_DIR}/. ${DEST_DIR}
|
||||
)
|
||||
endfunction()
|
||||
endif()
|
||||
|
|
|
|||
7
FAQ.md
7
FAQ.md
|
|
@ -16,16 +16,19 @@ Whenever a mirror repository gets taken down, I'll just move on to another git s
|
|||
|
||||
**Q:** But you're just stealing changes from other forks!<br/>
|
||||
**A:** This is a pretty normal thing to do in the open source world. Yes, a lot of the changes are cherry-picked from other forks. There is no point in duplicating work unnecessarily and keeping good additions out of the project just because they are not mine. Original contributors are always credited as commit author of course.
|
||||
Note however that all changes listed in the README file are my own work and other forks should feel free to cherry-pick them!
|
||||
Note however that all changes listed in the README file are the work of Torzu contributors and other forks should feel free to cherry-pick them!
|
||||
|
||||
**Q:** Will there ever be an Android version?<br/>
|
||||
**A:** Unfortunately I am pretty inexperienced in the Android world. This whole gradle stuff makes no sense to me and I've given up for now.
|
||||
Let's say, it'd be a nice bonus but it's very low priority. If you'd like to run Yuzu on Android you'd probably be better off with Sudachi.
|
||||
Let's say, it'd be a nice bonus but it's very low priority. If you'd like to run Yuzu on Android you'd probably be better off with Sudachi. I'm [looking for people interested in helping out](http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu/issues/20)!
|
||||
|
||||
**Q:** This fork is going to be abandoned very soon!<br/>
|
||||
**A:** I have committed myself to at the very least keep it updated enough to compile and run on modern systems for the next decade or so. If you don't see commits for a while it doesn't mean I've abandoned it.
|
||||
I have ADHD and need to shift my focus between different projects sometimes to stay motivated. Also, personal life is a thing. ~~Who knows maybe I'll be run over by a car tomorrow? Joking, that's not going to happen. Hopefully.~~
|
||||
|
||||
**Q:** Why don't you reply on Reddit?
|
||||
**A:** Reddit doesn't like the way I anonymize my connection and heavily restricts my actions. Whenever I post something, it's immediately flagged and deleted. The `r/torzu` subreddit isn't mine, I was just given moderator privileges to it.
|
||||
|
||||
Enjoy playing your favorite (and legally obtained) Nintendo games on whatever device and emulator you prefer!<br/>
|
||||
Don't let Nintendo pressure you into using their kind of terrible and overpriced hardware... I'm truly sorry if no emulator can currently play the game you want to play.
|
||||
|
||||
|
|
|
|||
83
README.md
83
README.md
|
|
@ -5,24 +5,21 @@ SPDX-License-Identifier: GPL-2.0-or-later
|
|||
|
||||
<h1 align="center">
|
||||
<br>
|
||||
<a href="http://y2nlvhmmk5jnsvechppxnbyzmmv3vbl7dvzn6ltwcdbpgxixp3clkgqd.onion/torzu-emu/torzu"><img src="https://raw.githubusercontent.com/litucks/torzu/master/dist/yuzu.bmp" alt="torzu" width="200"></a>
|
||||
<a href="http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu"><img src="https://notabug.org/litucks/torzu/raw/master/dist/yuzu.png" alt="torzu" width="200"></a>
|
||||
<br>
|
||||
<b>torzu</b>
|
||||
<br>
|
||||
</h1>
|
||||
|
||||
<h4 align="center"><b>torzu</b> is a fork of yuzu, the world's most popular, open-source, Nintendo Switch emulator.
|
||||
<h4 align="center"><b>torzu</b> is a fork of yuzu, an open-source Nintendo Switch emulator.
|
||||
<br>
|
||||
It is written in C++ with portability in mind, and I plan to actively maintain builds for Linux, Android and Windows.
|
||||
It is written in C++ with portability in mind and runs on Linux, Windows and Android
|
||||
</h4>
|
||||
|
||||
<p align="center">
|
||||
<a href="#compatibility">Compatibility</a> |
|
||||
<a href="#development">Development</a> |
|
||||
<a href="#building">Building</a> |
|
||||
<a href="#download">Download</a> |
|
||||
<a href="#license">License</a>
|
||||
</p>
|
||||
## Fake websites
|
||||
|
||||
A lot of fake Torzu websites have popped up. These are not mine. **This project will not have a clearnet website for the foreseeable future!**
|
||||
I highly advice against downloading anything from these websites, specially if their intention is clearly to make money through advertisements.
|
||||
|
||||
## Compatibility
|
||||
|
||||
|
|
@ -30,63 +27,45 @@ The emulator is capable of running most commercial games at full speed, provided
|
|||
|
||||
It runs most Nintendo Switch games released until the date of the Yuzu takedown.
|
||||
|
||||
## Changes
|
||||
|
||||
Following are the changes made since forking from Yuzu:
|
||||
|
||||
- Added option to optimize generated SPIR-V shaders via spirv-opt
|
||||
- Added option to synchronize CPU clock to render speed limit
|
||||
- Added option to launch home menu from Switch firmware
|
||||
- Fixed crash when switching away from null graphics per-game
|
||||
- Fixed controller UI being cut off at the bottom
|
||||
- Removed analytics and authentication as they'd be useless (perhaps even outright dangerous) now
|
||||
- Minor improvements and additions
|
||||
|
||||
## Goals
|
||||
|
||||
The first and foremost goal is long-term maintenance. Even if I stop commiting new features I will always do my best to keep the emulator functional and third party dependencies updated. This also means most of the changes made will eventually be bug fixes.
|
||||
Essentially, the main goal is that you can still use this emulator on modern systems in 20 years.
|
||||
It is very important to me that this project is going to be a good base to fork once grass has grown over the whole legal dilemma and people are willing to do real work on this emulator non-anonymously.
|
||||
**Consider this project in feature freeze!** This means no new features are going to be added. All further updates are going to be focused on maintaining compatibility with modern systems.
|
||||
|
||||
A secondary goal is the improvement of usability on low-end systems. This includes both improving the performance of the emulator as well as making games more playable below 100% speed whenever possible (the sync CPU to render speed limit option already helps with that in few cases).
|
||||
I think this project has done a really good job with keeping regressions from Yuzu to the minimum. If a game runs on Yuzu, and on the current version of Torzu, it's extremely likely that it works just as well on all future versions of Torzu.
|
||||
|
||||
Android support is low priority but would be a nice bonus.
|
||||
Regardless, I am very happy with how things are right now.
|
||||
If you're looking for a Yuzu fork that definitely runs the games the original Yuzu emulator did well without any regressions, Torzu is probably your best bet for now.
|
||||
|
||||
## Development
|
||||
|
||||
Most of the development happens on [Dark Git](http://y2nlvhmmk5jnsvechppxnbyzmmv3vbl7dvzn6ltwcdbpgxixp3clkgqd.onion/). It's also where [our central repository](http://y2nlvhmmk5jnsvechppxnbyzmmv3vbl7dvzn6ltwcdbpgxixp3clkgqd.onion/torzu-emu/torzu) is hosted.
|
||||
All development happens on [Dark Git](http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/). It's also where [our central repository](http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu) is hosted.
|
||||
|
||||
Currently, development is somewhat limited to external commits as I'm working on improvements in dynarmic! This will increase emulation speed in CPU-bound scenarios.
|
||||
To clone this git repository, use these commands (assuming tor is installed as a service and running):
|
||||
|
||||
If you want to contribute, please take a look at the [Contributor's Guide](http://y2nlvhmmk5jnsvechppxnbyzmmv3vbl7dvzn6ltwcdbpgxixp3clkgqd.onion/torzu-emu/torzu/wiki/Contributing) and [Developer Information](http://y2nlvhmmk5jnsvechppxnbyzmmv3vbl7dvzn6ltwcdbpgxixp3clkgqd.onion/torzu-emu/torzu/wiki/Developer-Information).
|
||||
```bash
|
||||
git -c http.proxy=socks5h://127.0.0.1:9050 clone --depth 1 http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu.git
|
||||
cd torzu
|
||||
git submodule update --init --recursive
|
||||
```
|
||||
|
||||
To clone this git repository, you can use these commands given tor is installed and running:
|
||||
Alternatively, you can clone from the [NotABug mirror repository](https://notabug.org/litucks/torzu):
|
||||
|
||||
git -c http.proxy=socks5h://127.0.0.1:9050 clone http://y2nlvhmmk5jnsvechppxnbyzmmv3vbl7dvzn6ltwcdbpgxixp3clkgqd.onion/torzu-emu/torzu.git
|
||||
cd torzu
|
||||
git submodule update --init --depth 1 --recursive
|
||||
```bash
|
||||
git clone --depth 1 https://notabug.org/litucks/torzu.git
|
||||
cd torzu
|
||||
git submodule update --init --recursive
|
||||
```
|
||||
|
||||
Alternatively, you can clone from the [GitHub mirror repository](https://github.com/litucks/torzu):
|
||||
Note that above repository may be taken down any time. Do not rely on its existence in production. In case the NotABug mirror goes down, another mirror will be most likely be set up on Bitbucket.
|
||||
|
||||
git clone https://github.com/litucks/torzu.git --depth 1 --recursive
|
||||
|
||||
Note that above repository may be taken down any time. Do not rely on its existence in production. In case the GitHub mirror goes down, another mirror will be most likely be set up on Bitbucket.
|
||||
|
||||
This project incorporates several commits from the [Suyu](https://suyu.dev) and [Sudachi](https://github.com/sudachi-emu/sudachi) forks (but cleaned up due to the typically mediocre code/commit quality from both projects) as well as changes listed in **Changes**.
|
||||
This project incorporates several commits from the [Suyu](https://suyu.dev), [Sudachi](https://github.com/sudachi-emu/sudachi) and [Citron](https://github.com/ong19th/Citron) forks, as well as changes listed in **Changes**.
|
||||
|
||||
## Building
|
||||
|
||||
* __Linux__: [Linux Build](http://y2nlvhmmk5jnsvechppxnbyzmmv3vbl7dvzn6ltwcdbpgxixp3clkgqd.onion/torzu-emu/torzu/wiki/Building-for-Linux)
|
||||
* __Windows__: [Windows Build](http://y2nlvhmmk5jnsvechppxnbyzmmv3vbl7dvzn6ltwcdbpgxixp3clkgqd.onion/torzu-emu/torzu/wiki/Building-for-Windows)
|
||||
* ~~__Android__: [Android Build](http://y2nlvhmmk5jnsvechppxnbyzmmv3vbl7dvzn6ltwcdbpgxixp3clkgqd.onion/torzu-emu/torzu/wiki/Building-For-Android)~~
|
||||
* ~~__macOS__: [macOS Build](http://y2nlvhmmk5jnsvechppxnbyzmmv3vbl7dvzn6ltwcdbpgxixp3clkgqd.onion/torzu-emu/torzu/wiki/Building-for-macOS)~~
|
||||
|
||||
(Only Linux and Windows builds are available for now. Android is planned eventually.)
|
||||
|
||||
## Download
|
||||
|
||||
Precompiled build are available **in the releases section**.
|
||||
<!-- -->
|
||||
* [Android Build](http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu/src/branch/master/build-for-android.md) (NotABug [alt](https://notabug.org/litucks/torzu/src/master/build-for-android.md))
|
||||
* [Linux Build](http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu/src/branch/master/build-for-linux.md) (NotABug [alt](https://notabug.org/litucks/torzu/src/master/build-for-linux.md))
|
||||
* [Windows Build](http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu/src/branch/master/build-for-windows.md) (NotABug [alt](https://notabug.org/litucks/torzu/src/master/build-for-windows.md))
|
||||
|
||||
## License
|
||||
|
||||
yuzu is licensed under the GPLv3 (or any later version). Refer to the [LICENSE.txt](https://github.com/yuzu-emu/yuzu/blob/master/LICENSE.txt) file.
|
||||
torzu is licensed under the GPLv3 (or any later version). Refer to the [LICENSE.txt](./LICENSE.txt) file.
|
||||
|
|
|
|||
BIN
blog/000-intro.md.sig
Normal file
BIN
blog/000-intro.md.sig
Normal file
Binary file not shown.
203
blog/001-arm-emulation.md
Normal file
203
blog/001-arm-emulation.md
Normal file
|
|
@ -0,0 +1,203 @@
|
|||
# Blog Entry 1: ARM CPU emulation
|
||||
|
||||
I've been studying the ARM recompiler used by Yuzu (Dynarmic) for quite a while now, and have learnt a lot on the way there.
|
||||
|
||||
This is going to be a rather technical post, but I hope it might help people like me understand what goes on under the hood.
|
||||
|
||||
## Native code execution
|
||||
|
||||
Let me start by giving a greatly simplified explaination of what happens on actual ARM hardware (like the Nintendo Switch) when an application is started:
|
||||
|
||||
1. Initial address space is set up
|
||||
2. Stack pointer and finally program counter and are set
|
||||
3. CPU goes into a loop where instructions are fetched, decoded, then executed
|
||||
|
||||
The first step includes loading the executable into memory and allocating stack space. The stack is basically a piece of memory that is used to store local variables and hold information about what address to return execution to when a routine ("function") finishes execution.
|
||||
The second step here sets (at least) 2 registers, the stack pointer which tells the CPU where the stack is and the program counter which tells the CPU where to execute code from. It would point to a specific routine inside the executable.
|
||||
The third step is to just let the CPU execute the application. In reality this step is much more complex but this explaination will do the job here.
|
||||
|
||||
Yuzu is able to run ARM64 code natively on ARM64 CPUs through "NCE", sidestepping the need for recompilation.
|
||||
|
||||
## Code recompilation
|
||||
|
||||
Now, what would this look like when emulating an ARM CPU with Dynarmic? In fact, the first 2 steps are exactly the same, except that the register values are stored in memory at first.
|
||||
But then it gets interesting since the instructions at the program counter can't be "just executed". Instead, they have to go through a transformation from the architecture that is being emulated (like ARM64) to the architecture of the host CPU (like x64).
|
||||
|
||||
Let's take a look at this function:
|
||||
```c
|
||||
unsigned long add(unsigned long a, unsigned long b) {
|
||||
return a + b;
|
||||
}
|
||||
```
|
||||
|
||||
When compiled to ARM64, it looks like this:
|
||||
```arm64
|
||||
add x0, x0, x1
|
||||
ret
|
||||
```
|
||||
|
||||
This could very easily be translated into x64 like this:
|
||||
```x64
|
||||
add rdi,rsi
|
||||
mov rax,rdi
|
||||
ret
|
||||
```
|
||||
|
||||
And further optimized down like this:
|
||||
```x64
|
||||
lea rax,[rdi+rsi*1]
|
||||
ret
|
||||
```
|
||||
|
||||
### Register mapping
|
||||
|
||||
#### Static register map
|
||||
|
||||
As you can see, I have directly mapped ARM64 registers to x64 registers:
|
||||
|
||||
- `x0` -> `rax`
|
||||
- `x1` -> `rdi`
|
||||
- `x2` -> `rsi`
|
||||
|
||||
But if you know the differences between ARM64 and x64 well enough, you've probably already notices that this won't always work!
|
||||
The reason is that ARM64 has *way more* general purpose registers than x64! This unfortunately throws up a number of issues.
|
||||
|
||||
#### Dynamic register map
|
||||
|
||||
The closest we get to a good solution is to **dynamically allocate** the registers on the host machine.
|
||||
This means that instead of creating a fixed mapping between registers, we do what C compilers do when there are more local variables in a function than registers available: Just store the least frequently used registers in memory instead and load them into a register (discarding *its* value into memory) as needed.
|
||||
|
||||
This sounds pretty cool, doesn't it? It's not that easy.
|
||||
Dynarmic operates in **blocks of code**. That means that instead of recompiling the whole application right from the start, only recently executed code is recompiled and kept in memory. There are multiple reasons for this:
|
||||
|
||||
1. Startup time (recompiling everything can take a long time)
|
||||
2. Memory usage (a limit for how much recompiled code to keep in memory can be defined)
|
||||
3. Dynamic code generation (the guest application could overwrite and replace its own code at any time)
|
||||
|
||||
It is what makes Dynarmic a **dynamic** recompiler.
|
||||
|
||||
This comes with a pitfall in combination with dynamic register allocation though: Each block must be able to pick up execution from where the previous block stopped. This means that all registers must be stored in a predefined (fixed) location so that a block can be entered from different places.
|
||||
For example, if block A expects the `x27` register to be in memory, but block B expects the same register to be in an actual register things would go horribly wrong.
|
||||
|
||||
This is typically solved by either storing all or a fixed set of registers at specific locations in memory and the rest of the registers in actual registers at the end of a block, and loading the registers back from memory into actual registers as needed at the start of another block.
|
||||
This brings quite an unfortunate performance penalty but there is no real way around this.
|
||||
|
||||
More details on that later.
|
||||
|
||||
### Intermediate representation
|
||||
|
||||
So far, I've made it seem like the code transformation happens *directly* from the guest to the host architecture. This isn't actually true: There is something called an "intermediate representation" (short "IR") inbetween.
|
||||
Pretty much all recompilers including Dynarmic have these 3 main components:
|
||||
|
||||
1. Frontend ("lifts" guest instructions into IR)
|
||||
2. Middleend (runs transformations like optimization, more on that later)
|
||||
3. Backend ("lowers" IR into host instructions)
|
||||
|
||||
This system has the major advantage that frontend and backend can be replaced individually and makes many different combinations possible.
|
||||
Dynarmic has 2 frontends:
|
||||
|
||||
- ARM32
|
||||
- ARM64
|
||||
|
||||
And 3 backend:
|
||||
|
||||
- ARM64
|
||||
- RISCV64
|
||||
- x64
|
||||
|
||||
Specifically the RISCV64 backend does not implement all IR instructions so it only works with the ARM32 backend.
|
||||
In theory there could be many more frontends and backends though, LLVM is great example for such a system but there are no frontends available that lift instructions to its IR, likely because its IR is too high level (too far away from machine instructions). Instead it has frontends for actual programming languages like C, C++ and Rust and many many backends, even some for GPUs.
|
||||
|
||||
Typically, one guest instruction turns into one or more IR instructions and a couple of IR instructions turn into one or more host instructions.
|
||||
|
||||
Let's take a look at the example from the beginning again:
|
||||
```arm64
|
||||
add x0, x0, x1
|
||||
ret
|
||||
```
|
||||
|
||||
And convert it as a whole block into IR:
|
||||
```c
|
||||
%0 = load_general_register 0
|
||||
%1 = load_general_register 1
|
||||
%2 = integer_add %0 %1
|
||||
store_general_register 0 %2
|
||||
%3 = load_general_register 30
|
||||
return branch_to(%3)
|
||||
```
|
||||
|
||||
This is not what any actual IR looks like but you can see the entire process of loading the register values into IR registers, performing the addition and storing the result back into a register. Finally, the block ends by performing a branch to the address in the `x30` register (which is what the `ret` instruction actually does).
|
||||
|
||||
#### Dynamic register allocation
|
||||
|
||||
You might've noticed that instead of "overwriting" the IR register `0`, a new IR register `2` is created. This is because IR registers are actually constant values and only a concept needed to generate human readable IR code. In reality, the `integer_add` instruction arguments here simply "use" the results of the `load_general_register` instructions.
|
||||
|
||||
The backend itself is then responsible for making sure the value returned by the used instruction is still available when the instruction user needs it. This can be achieved by either:
|
||||
|
||||
1. Just keeping the value in an available host register if possible
|
||||
2. Executing the instruction later, when it's actually needed
|
||||
3. Moving the value into memory until it's used
|
||||
|
||||
And this is actually how dynamic register allocation works under the hood! This concept of an intermediate representation makes it incredibly easy.
|
||||
|
||||
#### Optimization
|
||||
|
||||
One important optimization is known as "constant folding". This optimization pass figures out values at compile time. Take this piece of IR for example:
|
||||
```
|
||||
%0 = integer_add 3 4
|
||||
%1 = integer_sub %0 1
|
||||
store_general_register 7 %1
|
||||
```
|
||||
|
||||
Through constant folding, this IR can be optimized down to just:
|
||||
```
|
||||
store_general_register 7 6
|
||||
```
|
||||
|
||||
Another optimization pass known as "dead code elimination" is able to remove code that can be removed without changing the outcome. For example this piece of IR:
|
||||
```
|
||||
%0 = integer_add 3 4
|
||||
%1 = integer_sub %0 1
|
||||
store_general_register 7 %0
|
||||
```
|
||||
|
||||
Would be optimized into just:
|
||||
```
|
||||
%0 = integer_add 3 4
|
||||
store_general_register 7 %0
|
||||
```
|
||||
|
||||
By this pass.
|
||||
|
||||
There are a couple more optimization passes in Dynarmic that aren't as easy to explain, but I guess you get the point.
|
||||
Optimization passes are usually chained together to generate the most optimal code.
|
||||
|
||||
### Other issues
|
||||
|
||||
What happens if the backend architecture does not support an instruction the frontend architure does *at all*?
|
||||
One example for this is the **exclusive monitor**. It's a multithreading-related feature on ARM CPUs that can not be accurately replicated on x86_64 CPUs at all, and even the way Dynarmic implements it is extremely slow compared to an actual ARM CPU.
|
||||
|
||||
Sometimes, hard to emulate stuff like that can be emulated with less accurately to improve performance. In Torzu, such optimizations are enabled by setting the CPU accuracy to "unsafe". Some games may work fine with this, others may crash the entire emulator. Use at your own risk.
|
||||
|
||||
### Possible performance improvements in Dynarmic
|
||||
|
||||
#### Code caching
|
||||
|
||||
The idea is to cache generated IR on disk (and OS filesystem cache) to avoid reoptimizing the same blocks over and over again. This is not particularly useful for hot blocks (blocks with code that is executed very often in a loop) though since such blocks would most likely always stay in memory anyways.
|
||||
It would improve startup time though and generally works very similarly to the disk shader cache.
|
||||
|
||||
#### Branch caching
|
||||
|
||||
One other idea I've had to avoid calling into the recompiler while the game is running works very similar to **profile guided optimization**. Basically, all branches that can't be resolved at compile time could fill kind of a "branch cache" so that next time that branch is recompiled the path to previous branch locations could be shorter.
|
||||
|
||||
#### More optimization passes
|
||||
|
||||
LLVM has a big collection of optimization passes that may be worthwhile checking out.
|
||||
|
||||
## Conclusion
|
||||
|
||||
While Dynarmic is already very fast there are still possible improvements to be made.
|
||||
I'd love to get started with those right away, but the Dynarmic code base is quite complex and hard to learn and I don't want to dedicate *all* my time to Dynarmic.
|
||||
Who knows, maybe the mentioned optimizations are completely worthless? I'll keep you updated whenever something interesting happens!
|
||||
|
||||
If you see any mistakes in this post, please feel free to create an issue. I have only proofread this post myself since I am a one-man team.
|
||||
BIN
blog/001-arm-emulation.md.sig
Normal file
BIN
blog/001-arm-emulation.md.sig
Normal file
Binary file not shown.
99
blog/002-puzzle-pieces.md
Normal file
99
blog/002-puzzle-pieces.md
Normal file
|
|
@ -0,0 +1,99 @@
|
|||
# Blog Entry 2: The puzzle pieces
|
||||
|
||||
I've been excited about this for a long time! Users typically think of applications as one big piece of software.
|
||||
In almost all cases this is not true.
|
||||
|
||||
In this post, I'd like to break Yuzu down into pieces for you. If you take a look at Torzu's `src/` directory, you'll see that there are several subdirectories. These are the main components, which are compiled as separate libraries (and then linked together). If you take a look at the `externals/` directory, you'll see a large list of other projects that Yuzu depends on.
|
||||
|
||||
I will focus on the `core` library here, as it contains most of the interesting stuff.
|
||||
|
||||
## ARM code execution
|
||||
|
||||
The `core/arm' directory is one of the most important: it is responsible for executing ARM instructions. It originally contained only code for dynamic integration, but was extended last year to include Native Code Execution (NCE).
|
||||
Interestingly, it doesn't have an ARM interpreter, which usually helps a lot when debugging JIT-related issues in other emulators. Although Dynarmic already has some debug-friendly options, it might be worthwhile to add an interpreter at some point.
|
||||
|
||||
## Crypto
|
||||
|
||||
Probably the most controversial part of Yuzu so far as it contains those "access-control circumvention measures". Not much to say about it, it is the core part of key derivation, ROM decryption, etc.
|
||||
|
||||
## Filesystem
|
||||
|
||||
There are file systems everywhere: Inside game ROMs, on the SD card, the internal flash, etc. `core/file_sys` is responsible for organizing them and their contents, as well as applying patches and overlays.
|
||||
|
||||
## Frontend
|
||||
|
||||
Despite the name, there is no actual frontend code here. It's just support code that can be used by different frontends.
|
||||
|
||||
There are currently 2 frontends that come with Yuzu:
|
||||
|
||||
- `yuzu`: Simply being called Yuzu, this is what you're interacting with most of the time. It is written in Qt Widgets.
|
||||
- `yuzu-cmd`: An SDL2 based frontend useful for light debugging. There's rarely a reason to use this.
|
||||
|
||||
## High-level emulation
|
||||
|
||||
Finally! This is where things get interesting.
|
||||
|
||||
Processes on an operating system can't do anything useful on their own. Typically, they can only access a small, predefined piece of RAM, and that's it. This is where the operating system APIs come in. Whenever a user process wants to access a file on a file system, query user input, or do just about anything else, it must use the operating system API to ask the operating system to perform that action on behalf of the process.
|
||||
|
||||
On modern operating systems, all of these things happen inside the operating system kernel. These kernels are called "monolithic kernels", but the operating system on the Nintendo Switch ("Horizon") doesn't work this way; it's called a "microkernel". Basically, instead of having the kernel handle hardware access, there are dedicated user processes called "services" that have direct access to the hardware they are responsible for. All the kernel does is manage memory, schedule tasks, and pass API calls to these services.
|
||||
|
||||
This is what a process accessing a driver would look like on a monolithic kernel like Linux or Windows:
|
||||
|
||||
```
|
||||
[Userspace ] [Kernel ]
|
||||
User process -> Kernel API -> Driver
|
||||
```
|
||||
|
||||
And this is what the same thing would look like on a microkernel like Horizon:
|
||||
|
||||
```
|
||||
[Userspace-] [Kernel------------------] [Userspace------]
|
||||
User process -> Kernel API -> Services API -> Service -> Driver
|
||||
```
|
||||
|
||||
As you can see, the path is much longer and therefore less efficient. Also note that each switch between userspace and kernel is quite slow, and that this path also has to be traversed backwards after the requested action is completed. However, this also means that if there is an exploit in a service, the rest of the system remains inaccessible to the attacker, and bugs can't bring down the kernel (which would kill the entire system).
|
||||
|
||||
Yes, Nintendo really did prioritize good security so that the Switch wouldn't be so easily hacked over performance on already weak hardware. Thanks, Nintendo.
|
||||
|
||||
Anyway, since Yuzu is a high-level emulator, it has to implement the kernel API and all those services itself. This is done in the `core/hle` directory. If you'd like to learn more, check out these Switchbrew pages:
|
||||
|
||||
- https://switchbrew.org/wiki/SVC: Kernel API
|
||||
- https://switchbrew.org/wiki/Services_API: Services API + Service list
|
||||
|
||||
## Internal network
|
||||
|
||||
This part of the code handles the lowest level of networking, as well as redirection to a multiplayer server (Did you know? Yuzu multiplayer servers work kind of like a VPN!). Nothing special or noteworthy here at all.
|
||||
|
||||
## Loader
|
||||
|
||||
This is where ROM files are loaded:
|
||||
|
||||
- Mapping of executable code and data to memory
|
||||
- Filesystem setup
|
||||
|
||||
## Memory
|
||||
|
||||
Nope, no memory management here. Not sure why this directory is called "memory" at all, since all it contains is the code responsible for applying cheats. Yes, cheats end up only interacting with memory, but it should have just been called "cheat".
|
||||
|
||||
Of note is the cheat VM, which is a nice, tiny cheat interpreter. Pretty cool!
|
||||
|
||||
## Tools
|
||||
|
||||
Here you'll find some debugging tools, including a "memory freezer" that allows you to silently prevent the game from changing data at certain memory addresses.
|
||||
|
||||
Quoting from `freezer.h`:
|
||||
|
||||
> This class allows the user to prevent an application from writing new values to certain memory
|
||||
> locations. This has a variety of uses when attempting to reverse a game.
|
||||
>
|
||||
> One example could be a cheat to prevent Mario from taking damage in SMO. One could freeze the
|
||||
> memory address that the game uses to store Mario's health so when he takes damage (and the game
|
||||
> tries to write the new health value to memory), the value won't change.
|
||||
|
||||
And then there's also RenderDoc integration for graphics debugging.
|
||||
|
||||
## Conclusion
|
||||
|
||||
There are many more components I could have listed here, especially outside the `core' directory, but I feel these are the most important ones, and I don't want this article to go on forever.
|
||||
|
||||
Thank you for reading and making it to the end. I welcome you to create issues for any mistgakes you find here!
|
||||
BIN
blog/002-puzzle-pieces.md.sig
Normal file
BIN
blog/002-puzzle-pieces.md.sig
Normal file
Binary file not shown.
24
boost-1.88.0-fix.patch
Normal file
24
boost-1.88.0-fix.patch
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
diff -ruN boost-src/libs/cobalt/include/boost/cobalt/concepts.hpp boost-src-patched/libs/cobalt/include/boost/cobalt/concepts.hpp
|
||||
--- boost-src/libs/cobalt/include/boost/cobalt/concepts.hpp 2025-04-12 18:25:53.791233755 +0200
|
||||
+++ boost-src-patched/libs/cobalt/include/boost/cobalt/concepts.hpp 2025-04-12 18:29:50.304496166 +0200
|
||||
@@ -62,7 +62,7 @@
|
||||
template <typename T>
|
||||
concept with_get_executor = requires (T& t)
|
||||
{
|
||||
- {t.get_executor()} -> asio::execution::executor;
|
||||
+ t.get_executor();
|
||||
};
|
||||
|
||||
|
||||
diff -ruN boost-src/libs/context/CMakeLists.txt boost-src-patched/libs/context/CMakeLists.txt
|
||||
--- boost-src/libs/context/CMakeLists.txt 2025-04-12 18:25:53.847233801 +0200
|
||||
+++ boost-src-patched/libs/context/CMakeLists.txt 2025-04-12 18:29:33.436479899 +0200
|
||||
@@ -189,7 +189,7 @@
|
||||
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
set_property(SOURCE ${ASM_SOURCES} APPEND PROPERTY COMPILE_OPTIONS "-x" "assembler-with-cpp")
|
||||
- elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
+ elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND NOT MSVC)
|
||||
set_property(SOURCE ${ASM_SOURCES} APPEND PROPERTY COMPILE_OPTIONS "-Wno-unused-command-line-argument")
|
||||
endif()
|
||||
|
||||
129
build-for-android.md
Normal file
129
build-for-android.md
Normal file
|
|
@ -0,0 +1,129 @@
|
|||
## Using Android Studio
|
||||
|
||||
**Note: These build instructions are a work-in-progress.**
|
||||
|
||||
### Dependencies
|
||||
* [Android Studio](https://developer.android.com/studio)
|
||||
* [NDK 26.3.11579264 and CMake 3.22.1](https://developer.android.com/studio/projects/install-ndk#default-version)
|
||||
* [Git](https://git-scm.com/download)
|
||||
|
||||
#### WINDOWS ONLY - Additional Dependencies
|
||||
* **[Visual Studio 2022 Community](https://visualstudio.microsoft.com/downloads/)** - **Make sure to select "Desktop development with C++" support in the installer. Make sure to update to the latest version if already installed.**
|
||||
* **[Vulkan SDK](https://vulkan.lunarg.com/sdk/home#windows)** - **Make sure to select Latest SDK.**
|
||||
|
||||
### Cloning yuzu with Git
|
||||
**from Codeberg repo (the `--recursive` option automatically clones the required Git submodules):**
|
||||
```
|
||||
git clone --depth 1 --recursive https://notabug.org/litucks/torzu.git
|
||||
cd torzu
|
||||
```
|
||||
**from Torzu repo (assuming Tor is installed as a service):**
|
||||
```
|
||||
git -c http.proxy=socks5h://127.0.0.1:9050 clone --depth 1 http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu.git
|
||||
cd torzu
|
||||
git submodule update --init --recursive
|
||||
```
|
||||
yuzu by default will be cloned into:
|
||||
* `C:\Users\<user-name>\torzu` on Windows
|
||||
* `~/torzu` on Linux
|
||||
* And wherever on macOS
|
||||
|
||||
### Building
|
||||
1. Start Android Studio, on the startup dialog select `Open`.
|
||||
2. Navigate to the `torzu/src/android` directory and click on `OK`.
|
||||
3. In `Build > Select Build Variant`, select `release` or `relWithDebInfo` as the "Active build variant".
|
||||
4. Build the project with `Build > Make Project` or run it on an Android device with `Run > Run 'app'`.
|
||||
|
||||
### Additional Resources
|
||||
https://developer.android.com/studio/intro
|
||||
|
||||
## Using CLI
|
||||
|
||||
**Note: These build instructions are for building on Debian Bookworm or newer**
|
||||
|
||||
### Dependencies
|
||||
```
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y sdkmanager openjdk-21-jdk build-essential curl git pkg-config glslang-tools zip
|
||||
sudo sdkmanager "ndk;26.3.11579264" "platforms;android-35" "build-tools;35.0.0" "cmake;3.22.1" "platform-tools;35.0.2"
|
||||
sudo update-alternatives --config java # Select Java 21 here if possible
|
||||
```
|
||||
|
||||
### Cloning Yuzu with Git
|
||||
Follow clone instructions for Android Studio above
|
||||
|
||||
### Build
|
||||
```
|
||||
./externals/vcpkg/bootstrap-vcpkg.sh -disableMetrics
|
||||
export ANDROID_HOME=/opt/android-sdk
|
||||
cd src/android
|
||||
./gradlew assembleRelease
|
||||
```
|
||||
|
||||
The APK will be at `src/android/app/build/outputs/apk/mainline/release/app-mainline-release.apk`
|
||||
|
||||
## Building an installable turnip driver package
|
||||
|
||||
Adapted from the mesa documentation [here](https://docs.mesa3d.org/android.html#building-using-the-android-ndk) and the released zip in [this](https://github.com/K11MCH1/AdrenoToolsDrivers) GitHub repo.
|
||||
|
||||
### Dependencies
|
||||
|
||||
Follow the steps to setup a CLI build above and additionally run
|
||||
```
|
||||
sudo apt-get install -y python3-mako python3-yaml byacc flex
|
||||
```
|
||||
to install some additional required packages.
|
||||
|
||||
Create a file `~/.local/share/meson/cross/android-aarch64` with the following content:
|
||||
```
|
||||
[binaries]
|
||||
ar = '/opt/android-sdk/ndk/26.3.11579264/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar'
|
||||
c = ['/opt/android-sdk/ndk/26.3.11579264/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android30-clang']
|
||||
cpp = ['/opt/android-sdk/ndk/26.3.11579264/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android30-clang++', '-fno-exceptions', '-fno-unwind-tables', '-fno-asynchronous-unwind-tables', '-static-libstdc++']
|
||||
c_ld = 'lld'
|
||||
cpp_ld = 'lld'
|
||||
strip = '/opt/android-sdk/ndk/26.3.11579264/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip'
|
||||
pkg-config = ['env', 'PKG_CONFIG_LIBDIR=/opt/android-sdk/ndk/26.3.11579264/toolchains/llvm/prebuilt/linux-x86_64/python3/lib/pkgconfig', '/usr/bin/pkg-config']
|
||||
[host_machine]
|
||||
system = 'android'
|
||||
cpu_family = 'aarch64'
|
||||
cpu = 'armv8'
|
||||
endian = 'little'
|
||||
```
|
||||
This informs `meson` (the build system used by mesa) about the Android NDK tools.
|
||||
If you need to modify this file with newer versions you can use a command like `find /opt/android-sdk -name "aarch64-linux-android*-clang"` to find the new paths.
|
||||
|
||||
### Clone the mesa git repo
|
||||
```
|
||||
git clone https://gitlab.freedesktop.org/mesa/mesa.git
|
||||
```
|
||||
Then use `git checkout <version>` to checkout the version you want to build (for example `mesa-24.2.0`).
|
||||
|
||||
### Compiling the turnip driver
|
||||
```
|
||||
meson setup build-android-aarch64 --cross-file android-aarch64 -Dplatforms=android -Dplatform-sdk-version=30 -Dandroid-stub=true -Dgallium-drivers= -Dvulkan-drivers=freedreno -Dfreedreno-kmds=kgsl -Dbuildtype=release
|
||||
meson compile -C build-android-aarch64
|
||||
```
|
||||
|
||||
### Create an installable driver package
|
||||
Check the file `VERSION` for the Mesa version and the file `include/vulkan/vulkan_core.h` and look for `VK_HEADER_VERSION_COMPLETE` for the Vulkan version.
|
||||
|
||||
Create a file named `meta.json` with the following content (replacing the `<placeholders>`)
|
||||
```
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"name": "Mesa Turnip Driver <mesa_version>",
|
||||
"description": "Compiled from source.",
|
||||
"author": "<name>",
|
||||
"packageVersion": "1",
|
||||
"vendor": "Mesa",
|
||||
"driverVersion": "Vulkan <vulkan_version>",
|
||||
"minApi": 30,
|
||||
"libraryName": "libvulkan_freedreno.so"
|
||||
}
|
||||
```
|
||||
and run these commands to create the package
|
||||
```
|
||||
mv ./build-android-aarch64/src/freedreno/vulkan/libvulkan_freedreno.so libvulkan_freedreno.so
|
||||
zip turnip.zip meta.json libvulkan_freedreno.so
|
||||
```
|
||||
263
build-for-linux.md
Normal file
263
build-for-linux.md
Normal file
|
|
@ -0,0 +1,263 @@
|
|||
# Flatpak Build
|
||||
|
||||
**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:
|
||||
|
||||
* Arch / Manjaro:
|
||||
```bash
|
||||
sudo pacman -Syu --needed flatpak flatpak-builder
|
||||
```
|
||||
* Debian / Ubuntu / Linux Mint:
|
||||
```bash
|
||||
sudo apt-get install flatpak flatpak-builder
|
||||
```
|
||||
* Fedora:
|
||||
```bash
|
||||
sudo dnf install flatpak flatpak-builder
|
||||
```
|
||||
|
||||
Then install flatpak dependencies from within flatpak:
|
||||
|
||||
```bash
|
||||
flatpak install org.kde.Sdk//5.15-23.08 io.qt.qtwebengine.BaseApp//5.15-23.08
|
||||
```
|
||||
Clone the torzu-flatpak repo and dependencies **(assuming tor is installed as a service and running)**:
|
||||
```bash
|
||||
git -c http.proxy=socks5h://127.0.0.1:9050 clone --depth 1 --recursive http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/onion.torzu_emu.torzu torzuFlatpak
|
||||
```
|
||||
Alternatively, you can clone from the github repo:
|
||||
```bash
|
||||
git clone --depth 1 --recursive https://github.com/litucks/onion.torzu_emu.torzu.git torzuFlatpak
|
||||
```
|
||||
Enter the cloned directory and run the build script:
|
||||
```bash
|
||||
cd torzuFlatpak && ./build.sh
|
||||
```
|
||||
The resulting `torzu.flatpak` will be in the same directory as the build script.
|
||||
|
||||
To install:
|
||||
```bash
|
||||
flatpak install torzu.flatpak
|
||||
```
|
||||
---
|
||||
---
|
||||
---
|
||||
|
||||
# AppImage Build
|
||||
|
||||
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`):
|
||||
```bash
|
||||
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:
|
||||
```bash
|
||||
./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.**
|
||||
|
||||
---
|
||||
---
|
||||
---
|
||||
|
||||
# Native Builds
|
||||
|
||||
### Dependencies (easy copy/paste commands provided after)
|
||||
|
||||
You'll need to download and install the following:
|
||||
|
||||
* [GCC](https://gcc.gnu.org/) v11+ (for C++20 support) & misc
|
||||
* This page is being updated as we transition to GCC 11
|
||||
* If GCC 12 is installed, [Clang](https://clang.llvm.org/) v14+ is required for compiling
|
||||
* [CMake](https://www.cmake.org/) 3.15+
|
||||
|
||||
The following are handled by torzu's externals:
|
||||
|
||||
* [FFmpeg](https://ffmpeg.org/)
|
||||
* [SDL2](https://www.libsdl.org/download-2.0.php) 2.0.18+
|
||||
* [opus](https://opus-codec.org/downloads/)
|
||||
|
||||
If version 5.15.2 is not already installed, pre-compiled binaries for Qt 5.15.2 will be downloaded from [here](https://github.com/litucks/ext-linux-bin) automatically by CMake:
|
||||
|
||||
* [Qt](https://qt-project.org/downloads) 5.15+
|
||||
|
||||
All other dependencies will be downloaded by [vcpkg](https://vcpkg.io/) if needed:
|
||||
|
||||
* [Boost](https://www.boost.org/users/download/) 1.86.0+
|
||||
* [Catch2](https://github.com/catchorg/Catch2) 2.13.7 - 2.13.9
|
||||
* [fmt](https://fmt.dev/) 8.0.1+
|
||||
* [lz4](http://www.lz4.org) 1.8+
|
||||
* [nlohmann_json](https://github.com/nlohmann/json) 3.8+
|
||||
* [OpenSSL](https://www.openssl.org/source/)
|
||||
* [ZLIB](https://www.zlib.net/) 1.2+
|
||||
* [zstd](https://facebook.github.io/zstd/) 1.5+
|
||||
|
||||
### Dependencies are listed here as commands that can be copied/pasted. Of course, they should be inspected before being run.
|
||||
|
||||
- All Distros
|
||||
|
||||
- If an ARM64 build is intended, export `VCPKG_FORCE_SYSTEM_BINARIES=1`.
|
||||
|
||||
- Arch / Manjaro:
|
||||
|
||||
```bash
|
||||
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
|
||||
```
|
||||
- Building with QT Web Engine needs to be specified when running CMake with the param `-DCMAKE_CXX_FLAGS="-I/usr/include/qt/QtWebEngineWidgets"` with qt5-webengine installed.
|
||||
- GCC 11 or later is required.
|
||||
|
||||
- Debian / Ubuntu / Linux Mint:
|
||||
|
||||
```bash
|
||||
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
|
||||
```
|
||||
- Debian 11 (Bullseye), Ubuntu 22.04, Linux Mint 20 or later is required.
|
||||
- Users need to manually specify building with QT Web Engine enabled. This is done using the parameter `-DYUZU_USE_QT_WEB_ENGINE=ON` when running CMake.
|
||||
- Users need to manually specify building with GCC 11. This can be done by adding the parameters `-DCMAKE_C_COMPILER=gcc-11 -DCMAKE_CXX_COMPILER=g++-11` when running CMake. i.e.
|
||||
- Users need to manually disable building SDL2 from externals if they intend to use the version provided by their system by adding the parameters `-DYUZU_USE_EXTERNAL_SDL2=OFF`
|
||||
- ***example cmake without system SDL2 (swap into full build commands below):***
|
||||
```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
|
||||
```
|
||||
- Fedora:
|
||||
|
||||
```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 perl-Digest-SHA
|
||||
```
|
||||
- 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`
|
||||
- CMake arguments to force system libraries:
|
||||
- SDL2: `-DYUZU_USE_BUNDLED_SDL2=OFF -DYUZU_USE_EXTERNAL_SDL2=OFF`
|
||||
- FFmpeg: `-DYUZU_USE_EXTERNAL_FFMPEG=OFF`
|
||||
- [RPM Fusion](https://rpmfusion.org/) (free) is required to install `ffmpeg-devel`
|
||||
|
||||
- Gentoo:
|
||||
|
||||
- **\*\*Disclaimer\*\***: this dependency list was written by a novice Gentoo user who first set it up with a DE, and then based this list off of the Fedora dependency list. This may be missing some requirements, or includes too many. Caveat emptor.
|
||||
```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
|
||||
```
|
||||
- GCC 11 or later is required.
|
||||
- Users may need to append `pulseaudio`, `bindist` and `context` to the `USE` flag.
|
||||
|
||||
# Building
|
||||
|
||||
### Clone the source with Git
|
||||
|
||||
**from Notabug repo:**
|
||||
```bash
|
||||
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):**
|
||||
```bash
|
||||
git -c http.proxy=socks5h://127.0.0.1:9050 clone --depth 1 http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu.git
|
||||
```
|
||||
|
||||
### Build in Release Mode (Optimized)
|
||||
|
||||
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):
|
||||
|
||||
```bash
|
||||
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:
|
||||
|
||||
```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.
|
||||
|
||||
You can choose to (all starting from the `build` folder):
|
||||
|
||||
* **Make an AppImage** (the resulting `torzu.AppImage` will be in the `torzu` folder):
|
||||
```bash
|
||||
cd .. && ./AppImage-build.sh
|
||||
```
|
||||
|
||||
* **Install the binaries to your system with shortcuts**:
|
||||
```bash
|
||||
sudo ninja install
|
||||
```
|
||||
|
||||
* **Run them without installing**:
|
||||
```bash
|
||||
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):
|
||||
```bash
|
||||
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).
|
||||
|
||||
---
|
||||
---
|
||||
---
|
||||
|
||||
### Build in Debug Mode (Slow)
|
||||
|
||||
Same as above, but add `-DCMAKE_BUILD_TYPE=Debug`:
|
||||
```bash
|
||||
cmake .. -GNinja -DCMAKE_BUILD_TYPE=Debug -DYUZU_USE_BUNDLED_VCPKG=ON -DYUZU_TESTS=OFF
|
||||
```
|
||||
|
||||
### Build with debug symbols
|
||||
|
||||
Same as above, but use `-DCMAKE_BUILD_TYPE=RelWithDebInfo`:
|
||||
|
||||
```bash
|
||||
cmake .. -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DYUZU_USE_BUNDLED_VCPKG=ON -DYUZU_TESTS=OFF
|
||||
```
|
||||
|
||||
### Debugging
|
||||
|
||||
1. Enable CPU debugging
|
||||

|
||||
2. Disable both Host MMU emulation options
|
||||

|
||||
3. Run gdb
|
||||
|
||||
```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
|
||||
<crash>
|
||||
(gdb) bt # Print a backtrace of the entire callstack to see which codepath the crash occurred on
|
||||
38
build-for-macos.md
Normal file
38
build-for-macos.md
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
# This article was written for developers. yuzu support for macOS is not ready for casual use.
|
||||
|
||||
# NOTE: yuzu officially discontinued support for MacOS when Apple deprecated OpenGL... this is provided as-is but may not work.
|
||||
---
|
||||
|
||||
Install dependencies from Homebrew:
|
||||
```sh
|
||||
brew install autoconf automake boost@1.76 ccache ffmpeg fmt glslang hidapi libtool libusb lz4 ninja nlohmann-json openssl pkg-config qt@5 sdl2 speexdsp zlib zlib zstd
|
||||
```
|
||||
|
||||
Build with debug symbols (vcpkg is not currently used due to broken boost-context library):
|
||||
```sh
|
||||
mkdir build && cd build
|
||||
export Qt5_DIR="/opt/homebrew/opt/qt@5/lib/cmake"
|
||||
cmake .. -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DYUZU_USE_BUNDLED_VCPKG=OFF -DYUZU_TESTS=OFF -DENABLE_WEB_SERVICE=OFF -DENABLE_LIBUSB=OFF
|
||||
ninja
|
||||
```
|
||||
|
||||
- TODO: use newer vcpkg. This fixes the boost context library, and allows using the web service
|
||||
- TODO: figure out what's up with libusb
|
||||
|
||||
Run the output:
|
||||
```
|
||||
bin/yuzu.app/Contents/MacOS/yuzu
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
To run with MoltenVK, install additional dependencies:
|
||||
```sh
|
||||
brew install molten-vk vulkan-loader
|
||||
```
|
||||
|
||||
Run with Vulkan loader path:
|
||||
```sh
|
||||
export LIBVULKAN_PATH=/opt/homebrew/lib/libvulkan.dylib
|
||||
bin/yuzu.app/Contents/MacOS/yuzu
|
||||
```
|
||||
341
build-for-windows.md
Normal file
341
build-for-windows.md
Normal file
|
|
@ -0,0 +1,341 @@
|
|||
# Method I: MSVC Build for Windows (MS Visual Studio)
|
||||
|
||||
### MSVC: Overview
|
||||
|
||||
* Install Minimal Dependencies (details and setup below)
|
||||
* Visual Studio Community 2022
|
||||
* CMake
|
||||
* Vulkan SDK
|
||||
* Python
|
||||
* Git for Windows
|
||||
* Build via Command Line (simplest if dependencies are installed correctly)
|
||||
* (or) Build with GUI Tools (backup graphical interface)
|
||||
|
||||
|
||||
### MSVC: Install Minimal Dependencies
|
||||
|
||||
To build torzu on Windows with Visual Studio, you need to install:
|
||||
|
||||
* **[Visual Studio 2022 Community](https://visualstudio.microsoft.com/downloads/)**
|
||||
* **Update to the latest version if already installed. (continued below)**
|
||||
|
||||

|
||||
|
||||
* **Visual Studio 2022 Community (continued)**
|
||||
* Be sure to select "Desktop development with C++"
|
||||
* Select the MSVC components outlined in red below (**especially VS 2019 build tools**.)
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
* **[CMake](https://cmake.org/download/)** - Used to generate Visual Studio project files. Choose 32-bit or 64-bit according to your system.
|
||||
* **If it asks to be added to your system PATH, say YES.**
|
||||
|
||||

|
||||
|
||||
* **[Vulkan SDK](https://vulkan.lunarg.com/sdk/home#windows)** - Make sure to select Latest SDK.
|
||||
* **If it asks to be added to your system PATH, say YES.**
|
||||
|
||||

|
||||
|
||||
* **[Python](https://www.python.org/downloads/windows/)** - Select latest stable Windows installer. Choose 32-bit or 64-bit according to your system.
|
||||
* **If it asks to be added to your system PATH, say YES.**
|
||||
|
||||

|
||||
|
||||
* **[Git for Windows](https://gitforwindows.org)** - (see next step)
|
||||
|
||||

|
||||
|
||||
* When installing Git, include it in your system PATH by choosing the "**Git from the command line and also from 3rd-party software**" option.
|
||||
|
||||

|
||||
|
||||
* **REBOOT YOUR SYSTEM, to be sure all dependencies are registered before proceeding.**
|
||||
|
||||
---
|
||||
---
|
||||
|
||||
## MSVC: Build from the Command Line
|
||||
|
||||
* Open a command line (cmd.exe), navigate to a directory where you want to download the repo, then pick one option to clone into a subdirectory named "torzu":
|
||||
|
||||
**from Notabug repo:**
|
||||
```
|
||||
git clone --depth 1 https://notabug.org/litucks/torzu.git
|
||||
```
|
||||
**from Torzu repo (assuming Tor is installed as a service):**
|
||||
```
|
||||
git -c http.proxy=socks5h://127.0.0.1:9050 clone --depth 1 http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu.git
|
||||
```
|
||||
|
||||
* Assuming all dependencies were installed correctly, you should be able to continue from the above `git clone` and run the following commands to build:
|
||||
|
||||
```
|
||||
cd torzu
|
||||
git submodule update --init --recursive
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -G "Visual Studio 17 2022" -A x64 -DYUZU_TESTS=OFF -DYUZU_BUILD_QT6=ON
|
||||
cmake --build . --config Release
|
||||
```
|
||||
* You'll find the resulting files in the `build/bin/Release` folder. To make it a portable install with all AppData files local to the torzu folder, add a "user" folder:
|
||||
```
|
||||
cd bin
|
||||
cd Release
|
||||
mkdir user
|
||||
```
|
||||
|
||||
* **ERRORS:** If you get an error after running the first cmake command (such as a missing library or CMakeLists.txt), first try running `git submodule update --init --recursive` from inside "torzu" folder again. If that doesn't work, try deleting the whole "torzu" folder and recloning via git from the beginning (as sometimes submodules will be incomplete without throwing an error.)
|
||||
|
||||
---
|
||||
---
|
||||
|
||||
## MSVC: Build with GUI Tools (Graphical Interface)
|
||||
|
||||
* Open a command line (cmd.exe), navigate to a directory where you want to download the repo, then pick one option to clone into a subdirectory named "torzu":
|
||||
|
||||
**from Notabug repo:**
|
||||
```
|
||||
git clone --depth 1 https://notabug.org/litucks/torzu.git
|
||||
```
|
||||
**from Torzu repo (assuming Tor is installed as a service):**
|
||||
```
|
||||
git -c http.proxy=socks5h://127.0.0.1:9050 clone --depth 1 http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu.git
|
||||
```
|
||||
then download dependencies with:
|
||||
```
|
||||
cd torzu
|
||||
git submodule update --init --recursive
|
||||
```
|
||||
|
||||
<!--* *(Note: yuzu by default downloads to `C:\Users\<user-name>\yuzu` (Master) or `C:\Users\<user-name>\yuzu-mainline` (Mainline)*-->
|
||||
|
||||
* Open the CMake GUI application and point it to the `torzu` directory (instead of `yuzu-canary`).
|
||||
|
||||

|
||||
|
||||
* Use a `/build` subdirectory inside the `torzu` directory or some other directory of your choice. (Tell CMake to create it.)
|
||||
|
||||

|
||||

|
||||
|
||||
* Click the "Configure" button and choose `Visual Studio 17 2022`, with `x64` for the optional platform.
|
||||
|
||||

|
||||
|
||||
* *(Note: If you used GitHub's own app to clone, run `git submodule update --init --recursive` to get the remaining dependencies)*
|
||||
|
||||
* **ERRORS:** If you get an error about missing packages, enable `YUZU_USE_BUNDLED_VCPKG`, and then click Configure again.
|
||||
|
||||
* *(You may also want to disable `YUZU_TESTS` in this case since Catch2 is not yet supported with this.)*
|
||||
|
||||

|
||||
|
||||
* **ERRORS:** If you get an error "Unable to find a valid Visual Studio instance", make sure that you installed the required MSVC components displayed above (**especially VS 2019 build tools**) and then try again.
|
||||
|
||||
* Click "Generate" to create the project files.
|
||||
|
||||

|
||||
|
||||
* Open the solution file `yuzu.sln` in Visual Studio 2022, which is located in the `build` directory.
|
||||
|
||||

|
||||
|
||||
* Select `yuzu` in the Solution Explorer, right-click and `Set as StartUp Project` (the yuzu, yuzu-cmd and yuzu-room executables will all be built.)
|
||||
|
||||
 
|
||||
|
||||
* Select the appropriate build type, Debug for debug purposes or Release for performance (in case of doubt choose Release).
|
||||
|
||||

|
||||
|
||||
* Right-click the project you want to build and press Build in the submenu or press F5.
|
||||
|
||||

|
||||
|
||||
* After build completed you can find the Torzu program files in a directory specified in the output log (usually `build\bin\Release`.)
|
||||
|
||||

|
||||
|
||||
---
|
||||
---
|
||||
---
|
||||
---
|
||||
---
|
||||
|
||||
# Method II: Clang-CL on Linux
|
||||
|
||||
Yet to be written. These loose snippets may help you:
|
||||
|
||||
https://github.com/mstorsjo/msvc-wine
|
||||
|
||||
https://apt.llvm.org
|
||||
|
||||
https://kb.firedaemon.com/support/solutions/articles/4000121705#Download-OpenSSL
|
||||
|
||||
https://github.com/clamwin/openssl
|
||||
|
||||
```
|
||||
# Probably not needed, use if include files can't be found
|
||||
exec bwrap --bind / / --tmpfs /usr/include --tmpfs /usr/lib/pkgconfig --tmpfs /usr/lib/x86_64-linux-gnu/pkgconfig --tmpfs /usr/lib/cmake --dev /dev /bin/bash
|
||||
```
|
||||
```
|
||||
# in build/linux
|
||||
../../configure -opensource -confirm-license -prefix ~/qt-everywhere-src-6.9.1/inst/linux -release ${QT_LIBTYPE} -ltcg -submodules qtbase,qttranslations,qtmultimedia -no-feature-vulkan -nomake examples -nomake tests -qt-doubleconversion -no-glib -qt-pcre -qt-zlib -qt-harfbuzz -qt-libpng -qt-libjpeg
|
||||
ninja install
|
||||
|
||||
# in build/windows
|
||||
cp -rv ../../qtmultimedia/src/multimedia/windows qtbase/include/QtMultimedia/private
|
||||
CC=clang-cl-19 CXX=clang-cl-19 CFLAGS="--target=x86_64-windows-msvc -fuse-ld=lld-link-19" CXXFLAGS="--target=x86_64-windows-msvc -fuse-ld=lld-link-19" ../../configure -opensource -confirm-license -prefix ~/qt-everywhere-src-6.9.1/inst/windows -release -static -ltcg -submodules qtbase,qtdeclarative,qtmultimedia -skip qtactiveqt -no-feature-vulkan -nomake examples -nomake tests -qt-doubleconversion -no-glib -qt-pcre -qt-zlib -qt-harfbuzz -qt-libpng -qt-libjpeg -platform win32-clang-msvc -qt-host-path ~/qt-everywhere-src-6.9.1/inst/linux -- -DCMAKE_SYSTEM_NAME=Windows
|
||||
ninja
|
||||
ninja install
|
||||
```
|
||||
```
|
||||
CC=clang-cl-19 CXX=clang-cl-19 cmake /tmp/torzu -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_ASM_FLAGS="--target=x86_64-windows-msvc" -DCMAKE_{C,CXX}_FLAGS:STRING="--target=x86_64-windows-msvc -DNOMINMAX /EHa -Wno-unused-command-line-argument -Wno-unknown-argument -flto=full -fdata-sections -ffunction-sections" -DCMAKE_EXE_LINKER_FLAGS="-Wl,--gc-sections" -DCMAKE_SYSTEM_NAME:STRING=Windows -DYUZU_USE_BUNDLED_VCPKG=OFF -DYUZU_USE_CPM=ON -DENABLE_OPENSSL=OFF -DENABLE_WEB_SERVICE=OFF -DENABLE_LIBUSB=OFF -DYUZU_TESTS=OFF -DQT_QMAKE_EXECUTABLE:FILEPATH=/home/user/qt-everywhere-src-6.9.1/inst/windows/bin/qmake -DCMAKE_PREFIX_PATH:PATH=/home/user/qt-everywhere-src-6.9.1/inst -GNinja
|
||||
```
|
||||
|
||||
---
|
||||
---
|
||||
---
|
||||
---
|
||||
---
|
||||
|
||||
# Method III: MinGW-w64 Build with MSYS2
|
||||
|
||||
## Prerequisites to install
|
||||
|
||||
* [MSYS2](https://www.msys2.org)
|
||||
* [Vulkan SDK](https://vulkan.lunarg.com/sdk/home#windows) - **Make sure to select Latest SDK.**
|
||||
* Make sure to follow the instructions and update to the latest version by running `pacman -Syu` as many times as needed.
|
||||
|
||||
## Install other dependencies
|
||||
* Open the `MSYS2 MinGW 64-bit` (mingw64.exe) shell
|
||||
|
||||

|
||||
|
||||
* Download and install all dependencies using: `pacman -Syu git make mingw-w64-x86_64-SDL2 mingw-w64-x86_64-cmake mingw-w64-x86_64-qt5 mingw-w64-x86_64-toolchain`
|
||||
|
||||
## Setup environment variables
|
||||
```
|
||||
export PATH="<Absolute path to the Bin folder in Vulkan SDK>:$PATH"
|
||||
export VCPKG_DEFAULT_HOST_TRIPLET=x64-mingw-static
|
||||
export VCPKG_DEFAULT_TRIPLET=x64-mingw-static
|
||||
```
|
||||
We have to manually set some VCPKG variables for some reason.
|
||||
This issue probably already exists in the original Yuzu.
|
||||
|
||||
## Clone the torzu repository with Git
|
||||
|
||||
Navigate to a directory where you want the repo, then use one option below to clone into a subdirectory named "torzu":
|
||||
|
||||
<!---->
|
||||
|
||||
**from NotABug repo:**
|
||||
```
|
||||
git clone --depth 1 https://notabug.org/litucks/torzu.git
|
||||
```
|
||||
**from Torzu repo (assuming Tor is installed as a service):**
|
||||
```
|
||||
git -c http.proxy=socks5h://127.0.0.1:9050 clone --depth 1 http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu.git
|
||||
```
|
||||
then download the submodule dependencies with:
|
||||
```
|
||||
cd torzu
|
||||
git submodule update --init --recursive
|
||||
```
|
||||
|
||||
## Generating makefile
|
||||
```
|
||||
mkdir build && cd build
|
||||
cmake -G "MSYS Makefiles" -DYUZU_USE_BUNDLED_VCPKG=ON -DYUZU_TESTS=OFF -DVCPKG_TARGET_TRIPLET=x64-mingw-static ..
|
||||
```
|
||||
`DVCPKG_TARGET_TRIPLET` has to be overriden to `x64-mingw-static` here to generate a static build that doesn't require extra DLLs to be packaged.
|
||||
|
||||
## Build torzu
|
||||
```
|
||||
make -j$(nproc) yuzu
|
||||
```
|
||||
The reason we are not using `make all` is that linker will fail.
|
||||
This is because Yuzu developer didn't set linker flags properly in their `CMakeLists.txt` for some reason. So we have add something manually.
|
||||
```
|
||||
VERBOSE=1 make yuzu
|
||||
```
|
||||
This will shows the exact link command, should be something like:
|
||||
```
|
||||
cd ***/src/yuzu && /mingw64/bin/c++.exe -O3 -DNDEBUG -Wl,--subsystem,windows -Wl,--whole-archive ...
|
||||
```
|
||||
Copy the command line and add the following arguments:
|
||||
```
|
||||
-static-libstdc++ -lws2_32 -s -Wl,--Map,../../bin/yuzu.map
|
||||
```
|
||||
Explanation of the extra arguments:
|
||||
- `-static-libstdc++`: Force usage of static libstdc++, without this argument the binary will have no entrypoint.
|
||||
- `-lws2_32`: Link the ws2_32.a provided by mingw.
|
||||
- `-s`: Optional, strip the symbols from the output binary.
|
||||
- `-Wl,--Map,../../bin/yuzu.map`: Optional, output a separated linker map to `../../bin/yuzu.map`
|
||||
Please note that `-lw2_32` is already added, but the order is not correct and hence cause linking fails.
|
||||
|
||||
Now the built executable should work properly. Repeating step 4 should build `yuzu-cmd` as well.
|
||||
Some DLLs (e.g., Qt) are still required as they cannot being linked statically. Copying those DLLs from the latest release is one option.
|
||||
|
||||
## Building without Qt (Optional)
|
||||
|
||||
Doesn't require the rather large Qt dependency, but you will lack a GUI frontend:
|
||||
|
||||
* Pass the `-DENABLE_QT=NO` flag to cmake
|
||||
|
||||
---
|
||||
---
|
||||
---
|
||||
---
|
||||
---
|
||||
|
||||
# Method IV: CLion Environment Setup
|
||||
|
||||
## Minimal Dependencies
|
||||
|
||||
To build yuzu, you need to install the following:
|
||||
|
||||
* [CLion](https://www.jetbrains.com/clion/) - This IDE is not free; for a free alternative, check Method I
|
||||
* [Vulkan SDK](https://vulkan.lunarg.com/sdk/home#windows) - Make sure to select the Latest SDK.
|
||||
|
||||
## Cloning yuzu with CLion
|
||||
|
||||
* Clone the Repository:
|
||||
|
||||

|
||||
|
||||
* using `https://notabug.org/litucks/torzu.git` (instead of the shown yuzu repo):
|
||||
|
||||

|
||||

|
||||
|
||||
|
||||
|
||||
## Building & Setup
|
||||
|
||||
* Once Cloned, You will be taken to a prompt like the image below:
|
||||
|
||||

|
||||
|
||||
* Set the settings to the image below:
|
||||
* Change `Build type: Release`
|
||||
* Change `Name: Release`
|
||||
* Change `Toolchain Visual Studio`
|
||||
* Change `Generator: Let CMake decide`
|
||||
* Change `Build directory: build`
|
||||
|
||||

|
||||
|
||||
* Click OK; now Clion will build a directory and index your code to allow for IntelliSense. Please be patient.
|
||||
* Once this process has been completed (No loading bar bottom right), you can now build yuzu
|
||||
* In the top right, click on the drop-down menu, select all configurations, then select yuzu
|
||||
|
||||

|
||||
|
||||
* Now run by clicking the play button or pressing Shift+F10, and yuzu will auto-launch once built.
|
||||
|
||||

|
||||
|
||||
6
dist/72-yuzu-input.rules
vendored
6
dist/72-yuzu-input.rules
vendored
|
|
@ -7,13 +7,13 @@
|
|||
|
||||
# Switch Pro Controller (USB/Bluetooth)
|
||||
KERNEL=="hidraw*", ATTRS{idVendor}=="057e", ATTRS{idProduct}=="2009", MODE="0660", TAG+="uaccess"
|
||||
KERNEL=="hidraw*", KERNELS=="*057e:2009*", MODE="0660", TAG+="uaccess"
|
||||
KERNEL=="hidraw*", KERNELS=="*057E:2009*", MODE="0660", TAG+="uaccess"
|
||||
|
||||
# Joy-Con L (Bluetooth)
|
||||
KERNEL=="hidraw*", KERNELS=="*057e:2006*", MODE="0660", TAG+="uaccess"
|
||||
KERNEL=="hidraw*", KERNELS=="*057E:2006*", MODE="0660", TAG+="uaccess"
|
||||
|
||||
# Joy-Con R (Bluetooth)
|
||||
KERNEL=="hidraw*", KERNELS=="*057e:2007*", MODE="0660", TAG+="uaccess"
|
||||
KERNEL=="hidraw*", KERNELS=="*057E:2007*", MODE="0660", TAG+="uaccess"
|
||||
|
||||
# Joy-Con Charging Grip (USB)
|
||||
KERNEL=="hidraw*", ATTRS{idVendor}=="057e", ATTRS{idProduct}=="200e", MODE="0660", TAG+="uaccess"
|
||||
|
|
|
|||
4
dist/languages/ar.ts
vendored
4
dist/languages/ar.ts
vendored
|
|
@ -754,7 +754,9 @@ This option recompresses RGBA8 to either the BC1 or BC3 format, saving VRAM but
|
|||
</message>
|
||||
<message>
|
||||
<location filename="../../src/yuzu/configuration/shared_translation.cpp" line="168"/>
|
||||
<source>Selects whether the emulator should prefer to conserve memory or make maximum usage of available video memory for performance. Has no effect on integrated graphics. Aggressive mode may severely impact the performance of other applications such as recording software.</source>
|
||||
<source>Selects whether the emulator should prefer to conserve memory or make maximum usage of available video memory for performance.
|
||||
Aggressive mode may severely impact the performance of other applications such as recording software.
|
||||
Has no effect on integrated graphics.</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
|
|
|
|||
4
dist/languages/ca.ts
vendored
4
dist/languages/ca.ts
vendored
|
|
@ -752,7 +752,9 @@ This option recompresses RGBA8 to either the BC1 or BC3 format, saving VRAM but
|
|||
</message>
|
||||
<message>
|
||||
<location filename="../../src/yuzu/configuration/shared_translation.cpp" line="168"/>
|
||||
<source>Selects whether the emulator should prefer to conserve memory or make maximum usage of available video memory for performance. Has no effect on integrated graphics. Aggressive mode may severely impact the performance of other applications such as recording software.</source>
|
||||
<source>Selects whether the emulator should prefer to conserve memory or make maximum usage of available video memory for performance.
|
||||
Aggressive mode may severely impact the performance of other applications such as recording software.
|
||||
Has no effect on integrated graphics.</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
|
|
|
|||
4
dist/languages/cs.ts
vendored
4
dist/languages/cs.ts
vendored
|
|
@ -752,7 +752,9 @@ This option recompresses RGBA8 to either the BC1 or BC3 format, saving VRAM but
|
|||
</message>
|
||||
<message>
|
||||
<location filename="../../src/yuzu/configuration/shared_translation.cpp" line="168"/>
|
||||
<source>Selects whether the emulator should prefer to conserve memory or make maximum usage of available video memory for performance. Has no effect on integrated graphics. Aggressive mode may severely impact the performance of other applications such as recording software.</source>
|
||||
<source>Selects whether the emulator should prefer to conserve memory or make maximum usage of available video memory for performance.
|
||||
Aggressive mode may severely impact the performance of other applications such as recording software.
|
||||
Has no effect on integrated graphics.</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
|
|
|
|||
4
dist/languages/da.ts
vendored
4
dist/languages/da.ts
vendored
|
|
@ -754,7 +754,9 @@ This option recompresses RGBA8 to either the BC1 or BC3 format, saving VRAM but
|
|||
</message>
|
||||
<message>
|
||||
<location filename="../../src/yuzu/configuration/shared_translation.cpp" line="168"/>
|
||||
<source>Selects whether the emulator should prefer to conserve memory or make maximum usage of available video memory for performance. Has no effect on integrated graphics. Aggressive mode may severely impact the performance of other applications such as recording software.</source>
|
||||
<source>Selects whether the emulator should prefer to conserve memory or make maximum usage of available video memory for performance.
|
||||
Aggressive mode may severely impact the performance of other applications such as recording software.
|
||||
Has no effect on integrated graphics.</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
|
|
|
|||
4
dist/languages/de.ts
vendored
4
dist/languages/de.ts
vendored
|
|
@ -753,7 +753,9 @@ This option recompresses RGBA8 to either the BC1 or BC3 format, saving VRAM but
|
|||
</message>
|
||||
<message>
|
||||
<location filename="../../src/yuzu/configuration/shared_translation.cpp" line="168"/>
|
||||
<source>Selects whether the emulator should prefer to conserve memory or make maximum usage of available video memory for performance. Has no effect on integrated graphics. Aggressive mode may severely impact the performance of other applications such as recording software.</source>
|
||||
<source>Selects whether the emulator should prefer to conserve memory or make maximum usage of available video memory for performance.
|
||||
Aggressive mode may severely impact the performance of other applications such as recording software.
|
||||
Has no effect on integrated graphics.</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
|
|
|
|||
4
dist/languages/el.ts
vendored
4
dist/languages/el.ts
vendored
|
|
@ -754,7 +754,9 @@ This option recompresses RGBA8 to either the BC1 or BC3 format, saving VRAM but
|
|||
</message>
|
||||
<message>
|
||||
<location filename="../../src/yuzu/configuration/shared_translation.cpp" line="168"/>
|
||||
<source>Selects whether the emulator should prefer to conserve memory or make maximum usage of available video memory for performance. Has no effect on integrated graphics. Aggressive mode may severely impact the performance of other applications such as recording software.</source>
|
||||
<source>Selects whether the emulator should prefer to conserve memory or make maximum usage of available video memory for performance.
|
||||
Aggressive mode may severely impact the performance of other applications such as recording software.
|
||||
Has no effect on integrated graphics.</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
|
|
|
|||
4
dist/languages/es.ts
vendored
4
dist/languages/es.ts
vendored
|
|
@ -783,7 +783,9 @@ Esta opción recomprime RGBA8 al formato BC1 o BC3, sacrificando calidad de imag
|
|||
</message>
|
||||
<message>
|
||||
<location filename="../../src/yuzu/configuration/shared_translation.cpp" line="168"/>
|
||||
<source>Selects whether the emulator should prefer to conserve memory or make maximum usage of available video memory for performance. Has no effect on integrated graphics. Aggressive mode may severely impact the performance of other applications such as recording software.</source>
|
||||
<source>Selects whether the emulator should prefer to conserve memory or make maximum usage of available video memory for performance.
|
||||
Aggressive mode may severely impact the performance of other applications such as recording software.
|
||||
Has no effect on integrated graphics.</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
|
|
|
|||
8
dist/languages/fr.ts
vendored
8
dist/languages/fr.ts
vendored
|
|
@ -784,8 +784,12 @@ Cette option recomprime le RGBA8 en format BC1 ou BC3, économisant ainsi la VRA
|
|||
</message>
|
||||
<message>
|
||||
<location filename="../../src/yuzu/configuration/shared_translation.cpp" line="168"/>
|
||||
<source>Selects whether the emulator should prefer to conserve memory or make maximum usage of available video memory for performance. Has no effect on integrated graphics. Aggressive mode may severely impact the performance of other applications such as recording software.</source>
|
||||
<translation>Sélectionne si l'émulateur doit privilégier la conservation de la mémoire ou utiliser au maximum la mémoire vidéo disponible pour les performances. N'a aucun effet sur les graphiques intégrés. Le mode agressif peut avoir un impact sévère sur les performances d'autres applications telles que les logiciels d'enregistrement.</translation>
|
||||
<source>Selects whether the emulator should prefer to conserve memory or make maximum usage of available video memory for performance.
|
||||
Aggressive mode may severely impact the performance of other applications such as recording software.
|
||||
Has no effect on integrated graphics.</source>
|
||||
<translation>Sélectionne si l'émulateur doit privilégier la conservation de la mémoire ou utiliser au maximum la mémoire vidéo disponible pour les performances.
|
||||
Le mode agressif peut avoir un impact sévère sur les performances d'autres applications telles que les logiciels d'enregistrement.
|
||||
N'a aucun effet sur les graphiques intégrés.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/yuzu/configuration/shared_translation.cpp" line="173"/>
|
||||
|
|
|
|||
8
dist/languages/hu.ts
vendored
8
dist/languages/hu.ts
vendored
|
|
@ -783,8 +783,12 @@ Ez az opció az RGBA8-at BC1 vagy BC3 formátumra tömöríti vissza, ami VRAM-o
|
|||
</message>
|
||||
<message>
|
||||
<location filename="../../src/yuzu/configuration/shared_translation.cpp" line="168"/>
|
||||
<source>Selects whether the emulator should prefer to conserve memory or make maximum usage of available video memory for performance. Has no effect on integrated graphics. Aggressive mode may severely impact the performance of other applications such as recording software.</source>
|
||||
<translation>Kiválasztja, hogy az emulátor a teljesítmény érdekében inkább takarékoskodjon a memóriával, vagy maximálisan kihasználja a rendelkezésre álló videomemóriát. Integrált grafikára nincs hatással. Az agresszív üzemmód jelentősen befolyásolhatja más alkalmazások, például a rögzítő szoftverek teljesítményét.</translation>
|
||||
<source>Selects whether the emulator should prefer to conserve memory or make maximum usage of available video memory for performance.
|
||||
Aggressive mode may severely impact the performance of other applications such as recording software.
|
||||
Has no effect on integrated graphics.</source>
|
||||
<translation>Kiválasztja, hogy az emulátor a teljesítmény érdekében inkább takarékoskodjon a memóriával, vagy maximálisan kihasználja a rendelkezésre álló videomemóriát.
|
||||
Az agresszív üzemmód jelentősen befolyásolhatja más alkalmazások, például a rögzítő szoftverek teljesítményét.
|
||||
Integrált grafikára nincs hatással.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/yuzu/configuration/shared_translation.cpp" line="173"/>
|
||||
|
|
|
|||
4
dist/languages/id.ts
vendored
4
dist/languages/id.ts
vendored
|
|
@ -783,7 +783,9 @@ Opsi ini merekompres RGBA8 ke format BC1 atau BC3, menghemat VRAM tetapi mempeng
|
|||
</message>
|
||||
<message>
|
||||
<location filename="../../src/yuzu/configuration/shared_translation.cpp" line="168"/>
|
||||
<source>Selects whether the emulator should prefer to conserve memory or make maximum usage of available video memory for performance. Has no effect on integrated graphics. Aggressive mode may severely impact the performance of other applications such as recording software.</source>
|
||||
<source>Selects whether the emulator should prefer to conserve memory or make maximum usage of available video memory for performance.
|
||||
Aggressive mode may severely impact the performance of other applications such as recording software.
|
||||
Has no effect on integrated graphics.</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
|
|
|
|||
4
dist/languages/it.ts
vendored
4
dist/languages/it.ts
vendored
|
|
@ -754,7 +754,9 @@ This option recompresses RGBA8 to either the BC1 or BC3 format, saving VRAM but
|
|||
</message>
|
||||
<message>
|
||||
<location filename="../../src/yuzu/configuration/shared_translation.cpp" line="168"/>
|
||||
<source>Selects whether the emulator should prefer to conserve memory or make maximum usage of available video memory for performance. Has no effect on integrated graphics. Aggressive mode may severely impact the performance of other applications such as recording software.</source>
|
||||
<source>Selects whether the emulator should prefer to conserve memory or make maximum usage of available video memory for performance.
|
||||
Aggressive mode may severely impact the performance of other applications such as recording software.
|
||||
Has no effect on integrated graphics.</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
|
|
|
|||
4
dist/languages/ja_JP.ts
vendored
4
dist/languages/ja_JP.ts
vendored
|
|
@ -754,7 +754,9 @@ This option recompresses RGBA8 to either the BC1 or BC3 format, saving VRAM but
|
|||
</message>
|
||||
<message>
|
||||
<location filename="../../src/yuzu/configuration/shared_translation.cpp" line="168"/>
|
||||
<source>Selects whether the emulator should prefer to conserve memory or make maximum usage of available video memory for performance. Has no effect on integrated graphics. Aggressive mode may severely impact the performance of other applications such as recording software.</source>
|
||||
<source>Selects whether the emulator should prefer to conserve memory or make maximum usage of available video memory for performance.
|
||||
Aggressive mode may severely impact the performance of other applications such as recording software.
|
||||
Has no effect on integrated graphics.</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
|
|
|
|||
4
dist/languages/ko_KR.ts
vendored
4
dist/languages/ko_KR.ts
vendored
|
|
@ -754,7 +754,9 @@ This option recompresses RGBA8 to either the BC1 or BC3 format, saving VRAM but
|
|||
</message>
|
||||
<message>
|
||||
<location filename="../../src/yuzu/configuration/shared_translation.cpp" line="168"/>
|
||||
<source>Selects whether the emulator should prefer to conserve memory or make maximum usage of available video memory for performance. Has no effect on integrated graphics. Aggressive mode may severely impact the performance of other applications such as recording software.</source>
|
||||
<source>Selects whether the emulator should prefer to conserve memory or make maximum usage of available video memory for performance.
|
||||
Aggressive mode may severely impact the performance of other applications such as recording software.
|
||||
Has no effect on integrated graphics.</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
|
|
|
|||
4
dist/languages/nb.ts
vendored
4
dist/languages/nb.ts
vendored
|
|
@ -754,7 +754,9 @@ This option recompresses RGBA8 to either the BC1 or BC3 format, saving VRAM but
|
|||
</message>
|
||||
<message>
|
||||
<location filename="../../src/yuzu/configuration/shared_translation.cpp" line="168"/>
|
||||
<source>Selects whether the emulator should prefer to conserve memory or make maximum usage of available video memory for performance. Has no effect on integrated graphics. Aggressive mode may severely impact the performance of other applications such as recording software.</source>
|
||||
<source>Selects whether the emulator should prefer to conserve memory or make maximum usage of available video memory for performance.
|
||||
Aggressive mode may severely impact the performance of other applications such as recording software.
|
||||
Has no effect on integrated graphics.</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
|
|
|
|||
4
dist/languages/nl.ts
vendored
4
dist/languages/nl.ts
vendored
|
|
@ -754,7 +754,9 @@ This option recompresses RGBA8 to either the BC1 or BC3 format, saving VRAM but
|
|||
</message>
|
||||
<message>
|
||||
<location filename="../../src/yuzu/configuration/shared_translation.cpp" line="168"/>
|
||||
<source>Selects whether the emulator should prefer to conserve memory or make maximum usage of available video memory for performance. Has no effect on integrated graphics. Aggressive mode may severely impact the performance of other applications such as recording software.</source>
|
||||
<source>Selects whether the emulator should prefer to conserve memory or make maximum usage of available video memory for performance.
|
||||
Aggressive mode may severely impact the performance of other applications such as recording software.
|
||||
Has no effect on integrated graphics.</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
|
|
|
|||
4
dist/languages/pl.ts
vendored
4
dist/languages/pl.ts
vendored
|
|
@ -754,7 +754,9 @@ This option recompresses RGBA8 to either the BC1 or BC3 format, saving VRAM but
|
|||
</message>
|
||||
<message>
|
||||
<location filename="../../src/yuzu/configuration/shared_translation.cpp" line="168"/>
|
||||
<source>Selects whether the emulator should prefer to conserve memory or make maximum usage of available video memory for performance. Has no effect on integrated graphics. Aggressive mode may severely impact the performance of other applications such as recording software.</source>
|
||||
<source>Selects whether the emulator should prefer to conserve memory or make maximum usage of available video memory for performance.
|
||||
Aggressive mode may severely impact the performance of other applications such as recording software.
|
||||
Has no effect on integrated graphics.</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
|
|
|
|||
8
dist/languages/pt_BR.ts
vendored
8
dist/languages/pt_BR.ts
vendored
|
|
@ -784,8 +784,12 @@ Esta opção recompacta o RGBA8 ou pro formato BC1 ou pro BC3, economizando VRAM
|
|||
</message>
|
||||
<message>
|
||||
<location filename="../../src/yuzu/configuration/shared_translation.cpp" line="168"/>
|
||||
<source>Selects whether the emulator should prefer to conserve memory or make maximum usage of available video memory for performance. Has no effect on integrated graphics. Aggressive mode may severely impact the performance of other applications such as recording software.</source>
|
||||
<translation>Define se o emulador deve preferir conservar ou fazer o uso máximo da memória de vídeo disponível para melhorar a performance. Não tem efeito em gráficos integrados. O modo Agressivo pode impactar fortemente na performance de outras aplicações, tipo programas de gravação de tela.</translation>
|
||||
<source>Selects whether the emulator should prefer to conserve memory or make maximum usage of available video memory for performance.
|
||||
Aggressive mode may severely impact the performance of other applications such as recording software.
|
||||
Has no effect on integrated graphics.</source>
|
||||
<translation>Define se o emulador deve preferir conservar ou fazer o uso máximo da memória de vídeo disponível para melhorar a performance.
|
||||
O modo Agressivo pode impactar fortemente na performance de outras aplicações, tipo programas de gravação de tela.
|
||||
Não tem efeito em gráficos integrados.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/yuzu/configuration/shared_translation.cpp" line="173"/>
|
||||
|
|
|
|||
8
dist/languages/pt_PT.ts
vendored
8
dist/languages/pt_PT.ts
vendored
|
|
@ -784,8 +784,12 @@ Esta opção recompacta o RGBA8 ou pro formato BC1 ou pro BC3, economizando VRAM
|
|||
</message>
|
||||
<message>
|
||||
<location filename="../../src/yuzu/configuration/shared_translation.cpp" line="168"/>
|
||||
<source>Selects whether the emulator should prefer to conserve memory or make maximum usage of available video memory for performance. Has no effect on integrated graphics. Aggressive mode may severely impact the performance of other applications such as recording software.</source>
|
||||
<translation>Define se o emulador deve preferir conservar ou fazer o uso máximo da memória de vídeo disponível para melhorar a performance. Não tem efeito em gráficos integrados. O modo Agressivo pode impactar fortemente na performance de outras aplicações, tipo programas de gravação de tela.</translation>
|
||||
<source>Selects whether the emulator should prefer to conserve memory or make maximum usage of available video memory for performance.
|
||||
Aggressive mode may severely impact the performance of other applications such as recording software.
|
||||
Has no effect on integrated graphics.</source>
|
||||
<translation>Define se o emulador deve preferir conservar ou fazer o uso máximo da memória de vídeo disponível para melhorar a performance.
|
||||
O modo Agressivo pode impactar fortemente na performance de outras aplicações, tipo programas de gravação de tela.
|
||||
Não tem efeito em gráficos integrados.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/yuzu/configuration/shared_translation.cpp" line="173"/>
|
||||
|
|
|
|||
4
dist/languages/ru_RU.ts
vendored
4
dist/languages/ru_RU.ts
vendored
|
|
@ -780,7 +780,9 @@ This option recompresses RGBA8 to either the BC1 or BC3 format, saving VRAM but
|
|||
</message>
|
||||
<message>
|
||||
<location filename="../../src/yuzu/configuration/shared_translation.cpp" line="168"/>
|
||||
<source>Selects whether the emulator should prefer to conserve memory or make maximum usage of available video memory for performance. Has no effect on integrated graphics. Aggressive mode may severely impact the performance of other applications such as recording software.</source>
|
||||
<source>Selects whether the emulator should prefer to conserve memory or make maximum usage of available video memory for performance.
|
||||
Aggressive mode may severely impact the performance of other applications such as recording software.
|
||||
Has no effect on integrated graphics.</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
|
|
|
|||
4
dist/languages/sv.ts
vendored
4
dist/languages/sv.ts
vendored
|
|
@ -754,7 +754,9 @@ This option recompresses RGBA8 to either the BC1 or BC3 format, saving VRAM but
|
|||
</message>
|
||||
<message>
|
||||
<location filename="../../src/yuzu/configuration/shared_translation.cpp" line="168"/>
|
||||
<source>Selects whether the emulator should prefer to conserve memory or make maximum usage of available video memory for performance. Has no effect on integrated graphics. Aggressive mode may severely impact the performance of other applications such as recording software.</source>
|
||||
<source>Selects whether the emulator should prefer to conserve memory or make maximum usage of available video memory for performance.
|
||||
Aggressive mode may severely impact the performance of other applications such as recording software.
|
||||
Has no effect on integrated graphics.</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
|
|
|
|||
4
dist/languages/tr_TR.ts
vendored
4
dist/languages/tr_TR.ts
vendored
|
|
@ -754,7 +754,9 @@ This option recompresses RGBA8 to either the BC1 or BC3 format, saving VRAM but
|
|||
</message>
|
||||
<message>
|
||||
<location filename="../../src/yuzu/configuration/shared_translation.cpp" line="168"/>
|
||||
<source>Selects whether the emulator should prefer to conserve memory or make maximum usage of available video memory for performance. Has no effect on integrated graphics. Aggressive mode may severely impact the performance of other applications such as recording software.</source>
|
||||
<source>Selects whether the emulator should prefer to conserve memory or make maximum usage of available video memory for performance.
|
||||
Aggressive mode may severely impact the performance of other applications such as recording software.
|
||||
Has no effect on integrated graphics.</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
|
|
|
|||
4
dist/languages/uk.ts
vendored
4
dist/languages/uk.ts
vendored
|
|
@ -754,7 +754,9 @@ This option recompresses RGBA8 to either the BC1 or BC3 format, saving VRAM but
|
|||
</message>
|
||||
<message>
|
||||
<location filename="../../src/yuzu/configuration/shared_translation.cpp" line="168"/>
|
||||
<source>Selects whether the emulator should prefer to conserve memory or make maximum usage of available video memory for performance. Has no effect on integrated graphics. Aggressive mode may severely impact the performance of other applications such as recording software.</source>
|
||||
<source>Selects whether the emulator should prefer to conserve memory or make maximum usage of available video memory for performance.
|
||||
Aggressive mode may severely impact the performance of other applications such as recording software.
|
||||
Has no effect on integrated graphics.</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
|
|
|
|||
4
dist/languages/vi.ts
vendored
4
dist/languages/vi.ts
vendored
|
|
@ -754,7 +754,9 @@ This option recompresses RGBA8 to either the BC1 or BC3 format, saving VRAM but
|
|||
</message>
|
||||
<message>
|
||||
<location filename="../../src/yuzu/configuration/shared_translation.cpp" line="168"/>
|
||||
<source>Selects whether the emulator should prefer to conserve memory or make maximum usage of available video memory for performance. Has no effect on integrated graphics. Aggressive mode may severely impact the performance of other applications such as recording software.</source>
|
||||
<source>Selects whether the emulator should prefer to conserve memory or make maximum usage of available video memory for performance.
|
||||
Aggressive mode may severely impact the performance of other applications such as recording software.
|
||||
Has no effect on integrated graphics.</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
|
|
|
|||
4
dist/languages/vi_VN.ts
vendored
4
dist/languages/vi_VN.ts
vendored
|
|
@ -754,7 +754,9 @@ This option recompresses RGBA8 to either the BC1 or BC3 format, saving VRAM but
|
|||
</message>
|
||||
<message>
|
||||
<location filename="../../src/yuzu/configuration/shared_translation.cpp" line="168"/>
|
||||
<source>Selects whether the emulator should prefer to conserve memory or make maximum usage of available video memory for performance. Has no effect on integrated graphics. Aggressive mode may severely impact the performance of other applications such as recording software.</source>
|
||||
<source>Selects whether the emulator should prefer to conserve memory or make maximum usage of available video memory for performance.
|
||||
Aggressive mode may severely impact the performance of other applications such as recording software.
|
||||
Has no effect on integrated graphics.</source>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
|
|
|
|||
4
dist/languages/zh_CN.ts
vendored
4
dist/languages/zh_CN.ts
vendored
|
|
@ -784,7 +784,9 @@ This option recompresses RGBA8 to either the BC1 or BC3 format, saving VRAM but
|
|||
</message>
|
||||
<message>
|
||||
<location filename="../../src/yuzu/configuration/shared_translation.cpp" line="168"/>
|
||||
<source>Selects whether the emulator should prefer to conserve memory or make maximum usage of available video memory for performance. Has no effect on integrated graphics. Aggressive mode may severely impact the performance of other applications such as recording software.</source>
|
||||
<source>Selects whether the emulator should prefer to conserve memory or make maximum usage of available video memory for performance.
|
||||
Aggressive mode may severely impact the performance of other applications such as recording software.
|
||||
Has no effect on integrated graphics.</source>
|
||||
<translation>指定模拟器使用 VRAM 的方式。此选项对核芯显卡没有影响。
|
||||
保守模式:模拟器更倾向于节省 VRAM。
|
||||
激进模式:最大限度利用 VRAM 来提高性能。
|
||||
|
|
|
|||
4
dist/languages/zh_TW.ts
vendored
4
dist/languages/zh_TW.ts
vendored
|
|
@ -784,7 +784,9 @@ This option recompresses RGBA8 to either the BC1 or BC3 format, saving VRAM but
|
|||
</message>
|
||||
<message>
|
||||
<location filename="../../src/yuzu/configuration/shared_translation.cpp" line="168"/>
|
||||
<source>Selects whether the emulator should prefer to conserve memory or make maximum usage of available video memory for performance. Has no effect on integrated graphics. Aggressive mode may severely impact the performance of other applications such as recording software.</source>
|
||||
<source>Selects whether the emulator should prefer to conserve memory or make maximum usage of available video memory for performance.
|
||||
Aggressive mode may severely impact the performance of other applications such as recording software.
|
||||
Has no effect on integrated graphics.</source>
|
||||
<translation>指定模拟器倾向于节省 VRAM 或最大限度利用 VRAM 来提高性能。对核芯显卡没有影响。激进模式可能会严重影响其他应用程序(如录屏软件)的性能。</translation>
|
||||
</message>
|
||||
<message>
|
||||
|
|
|
|||
4
dist/onion.torzu_emu.torzu.metainfo.xml
vendored
4
dist/onion.torzu_emu.torzu.metainfo.xml
vendored
|
|
@ -22,8 +22,8 @@ SPDX-License-Identifier: CC0-1.0
|
|||
<keyword>switch</keyword>
|
||||
<keyword>emulator</keyword>
|
||||
</keywords>
|
||||
<url type="bugtracker">http://y2nlvhmmk5jnsvechppxnbyzmmv3vbl7dvzn6ltwcdbpgxixp3clkgqd.onion/torzu-emu/torzu/issues</url>
|
||||
<url type="vcs-browser">http://y2nlvhmmk5jnsvechppxnbyzmmv3vbl7dvzn6ltwcdbpgxixp3clkgqd.onion/torzu-emu/torzu</url>
|
||||
<url type="bugtracker">http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu/issues</url>
|
||||
<url type="vcs-browser">http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu</url>
|
||||
<launchable type="desktop-id">onion.torzu_emu.torzu.desktop</launchable>
|
||||
<provides>
|
||||
<binary>yuzu</binary>
|
||||
|
|
|
|||
BIN
dist/yuzu.png
vendored
Normal file
BIN
dist/yuzu.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 30 KiB |
55
externals/CMakeLists.txt
vendored
55
externals/CMakeLists.txt
vendored
|
|
@ -15,17 +15,21 @@ set(BUILD_SHARED_LIBS OFF)
|
|||
set_directory_properties(PROPERTIES EXCLUDE_FROM_ALL ON)
|
||||
|
||||
# SPIRV Headers
|
||||
find_package(SPIRV-Headers)
|
||||
if (NOT TARGET SPIRV-Headers::SPIRV-Headers)
|
||||
add_subdirectory(SPIRV-Headers)
|
||||
find_package(SPIRV-Headers)
|
||||
if (NOT TARGET SPIRV-Headers::SPIRV-Headers)
|
||||
add_subdirectory(SPIRV-Headers)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# fmt (also used by Dynarmic, so needs to be added first)
|
||||
find_package(fmt)
|
||||
if (NOT TARGET fmt::fmt)
|
||||
# fmtlib formatting library
|
||||
set(FMT_INSTALL ON)
|
||||
add_subdirectory(fmt)
|
||||
find_package(fmt)
|
||||
if (NOT TARGET fmt::fmt)
|
||||
# fmtlib formatting library
|
||||
set(FMT_INSTALL ON)
|
||||
add_subdirectory(fmt)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Xbyak (also used by Dynarmic, so needs to be added first)
|
||||
|
|
@ -46,10 +50,31 @@ if ((ARCHITECTURE_x86_64 OR ARCHITECTURE_arm64) AND NOT TARGET dynarmic::dynarmi
|
|||
endif()
|
||||
|
||||
# getopt
|
||||
if (MSVC)
|
||||
include(CheckIncludeFile)
|
||||
check_include_file(getopt.h HAS_GETOPT)
|
||||
if (NOT HAS_GETOPT)
|
||||
message(STATUS "Using bundled getopt")
|
||||
add_subdirectory(getopt)
|
||||
endif()
|
||||
|
||||
# clang_rt_builtins
|
||||
check_c_source_compiles("
|
||||
#include <stdint.h>
|
||||
|
||||
volatile __uint128_t a = 100;
|
||||
volatile __uint128_t b = 2;
|
||||
|
||||
int main() {
|
||||
__uint128_t result = a / b;
|
||||
(void)result;
|
||||
return 0;
|
||||
}
|
||||
" HAVE_UDIVTI3)
|
||||
if(NOT HAVE_UDIVTI3)
|
||||
message(STATUS "Adding clang_rt_builtins due to missing __udivti3")
|
||||
add_subdirectory(clang_rt_builtins)
|
||||
endif()
|
||||
|
||||
# Glad
|
||||
add_subdirectory(glad)
|
||||
|
||||
|
|
@ -133,11 +158,19 @@ endif()
|
|||
add_subdirectory(sirit)
|
||||
|
||||
# httplib
|
||||
if (NOT TARGET httplib::httplib)
|
||||
if (ENABLE_WEB_SERVICE AND NOT TARGET httplib::httplib)
|
||||
set(HTTPLIB_REQUIRE_OPENSSL ON)
|
||||
add_subdirectory(cpp-httplib)
|
||||
endif()
|
||||
|
||||
# cpp-jwt
|
||||
if (ENABLE_WEB_SERVICE AND NOT TARGET cpp-jwt::cpp-jwt)
|
||||
set(CPP_JWT_BUILD_EXAMPLES OFF)
|
||||
set(CPP_JWT_BUILD_TESTS OFF)
|
||||
set(CPP_JWT_USE_VENDORED_NLOHMANN_JSON ${YUZU_USE_CPM})
|
||||
add_subdirectory(cpp-jwt)
|
||||
endif()
|
||||
|
||||
# Opus
|
||||
if (NOT TARGET Opus::opus)
|
||||
set(OPUS_BUILD_TESTING OFF)
|
||||
|
|
@ -189,8 +222,10 @@ if (NOT TARGET LLVM::Demangle)
|
|||
add_library(LLVM::Demangle ALIAS demangle)
|
||||
endif()
|
||||
|
||||
add_library(stb stb/stb_dxt.cpp)
|
||||
target_include_directories(stb PUBLIC ./stb)
|
||||
if (NOT TARGET stb)
|
||||
add_library(stb stb/stb_dxt.cpp)
|
||||
target_include_directories(stb PUBLIC ./stb)
|
||||
endif()
|
||||
|
||||
if (NOT TARGET stb::headers)
|
||||
add_library(stb::headers ALIAS stb)
|
||||
|
|
|
|||
2
externals/SDL
vendored
2
externals/SDL
vendored
|
|
@ -1 +1 @@
|
|||
Subproject commit cc016b0046d563287f0aa9f09b958b5e70d43696
|
||||
Subproject commit 2359383fc187386204c3bb22de89655a494cd128
|
||||
2
externals/SPIRV-Headers
vendored
2
externals/SPIRV-Headers
vendored
|
|
@ -1 +1 @@
|
|||
Subproject commit 8b246ff75c6615ba4532fe4fde20f1be090c3764
|
||||
Subproject commit 2a9b6f951c7d6b04b6c21fe1bf3f475b68b84801
|
||||
2
externals/SPIRV-Tools
vendored
2
externals/SPIRV-Tools
vendored
|
|
@ -1 +1 @@
|
|||
Subproject commit 3983d15a1d34fb95656818af0fc89c6260cbf316
|
||||
Subproject commit 6dcc7e350a0b9871a825414d42329e44b0eb8109
|
||||
2
externals/Vulkan-Headers
vendored
2
externals/Vulkan-Headers
vendored
|
|
@ -1 +1 @@
|
|||
Subproject commit 80207f9da86423ce33aff8328a792fd715f3c08f
|
||||
Subproject commit 36872f9062b17b1a30b8ed1d81ca5ea6bb608a72
|
||||
2
externals/Vulkan-Utility-Libraries
vendored
2
externals/Vulkan-Utility-Libraries
vendored
|
|
@ -1 +1 @@
|
|||
Subproject commit 524f8910d0e4a5f2ec5961996b23e5b74b95cb1d
|
||||
Subproject commit b538fb5b08513aa78346cd414ad5e576a2a3e920
|
||||
2
externals/VulkanMemoryAllocator
vendored
2
externals/VulkanMemoryAllocator
vendored
|
|
@ -1 +1 @@
|
|||
Subproject commit 2f382df218d7e8516dee3b3caccb819a62b571a2
|
||||
Subproject commit c788c52156f3ef7bc7ab769cb03c110a53ac8fcb
|
||||
4
externals/clang_rt_builtins/CMakeLists.txt
vendored
Normal file
4
externals/clang_rt_builtins/CMakeLists.txt
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
cmake_minimum_required(VERSION 3.10)
|
||||
project(clang_rt_builtins C)
|
||||
|
||||
add_library(clang_rt_builtins STATIC udivti3.c)
|
||||
36
externals/clang_rt_builtins/udivti3.c
vendored
Normal file
36
externals/clang_rt_builtins/udivti3.c
vendored
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
typedef unsigned __int128 tu_int;
|
||||
|
||||
tu_int __udivti3(tu_int a, tu_int b)
|
||||
{
|
||||
if (b == 0) {
|
||||
// Handle division by zero (could also trigger a fault)
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (b > a) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int shift;
|
||||
for (shift = 0;; shift++) {
|
||||
if (shift >= 128) {
|
||||
break;
|
||||
}
|
||||
tu_int shifted_b = b << shift;
|
||||
if (shifted_b > a || (shifted_b >> shift) != b) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
shift--;
|
||||
|
||||
tu_int quotient = 0;
|
||||
for (; shift >= 0; shift--) {
|
||||
tu_int shifted_b = b << shift;
|
||||
if (shifted_b <= a) {
|
||||
quotient |= (tu_int) 1 << shift;
|
||||
a -= shifted_b;
|
||||
}
|
||||
}
|
||||
|
||||
return quotient;
|
||||
}
|
||||
1
externals/cpp-jwt
vendored
Submodule
1
externals/cpp-jwt
vendored
Submodule
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 10ef5735d842b31025f1257ae78899f50a40fb14
|
||||
47
externals/dynarmic/CMakeLists.txt
vendored
47
externals/dynarmic/CMakeLists.txt
vendored
|
|
@ -140,7 +140,9 @@ if (DYNARMIC_USE_BUNDLED_EXTERNALS)
|
|||
set(CMAKE_DISABLE_FIND_PACKAGE_Zydis ON)
|
||||
endif()
|
||||
|
||||
find_package(Boost 1.57 REQUIRED)
|
||||
if (NOT TARGET boost_headers)
|
||||
find_package(Boost 1.57 REQUIRED)
|
||||
endif()
|
||||
find_package(fmt 9 CONFIG)
|
||||
find_package(mcl 0.1.12 EXACT CONFIG)
|
||||
find_package(tsl-robin-map CONFIG)
|
||||
|
|
@ -182,26 +184,29 @@ endif()
|
|||
#
|
||||
# Install
|
||||
#
|
||||
include(GNUInstallDirs)
|
||||
include(CMakePackageConfigHelpers)
|
||||
# Only try to install if boost wasn't included as submodule
|
||||
if (NOT TARGET boost_headers)
|
||||
include(GNUInstallDirs)
|
||||
include(CMakePackageConfigHelpers)
|
||||
|
||||
install(TARGETS dynarmic EXPORT dynarmicTargets)
|
||||
install(EXPORT dynarmicTargets
|
||||
NAMESPACE dynarmic::
|
||||
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/dynarmic"
|
||||
)
|
||||
install(TARGETS dynarmic EXPORT dynarmicTargets)
|
||||
install(EXPORT dynarmicTargets
|
||||
NAMESPACE dynarmic::
|
||||
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/dynarmic"
|
||||
)
|
||||
|
||||
configure_package_config_file(CMakeModules/dynarmicConfig.cmake.in
|
||||
dynarmicConfig.cmake
|
||||
INSTALL_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/dynarmic"
|
||||
)
|
||||
write_basic_package_version_file(dynarmicConfigVersion.cmake
|
||||
COMPATIBILITY SameMajorVersion
|
||||
)
|
||||
install(FILES
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/dynarmicConfig.cmake"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/dynarmicConfigVersion.cmake"
|
||||
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/dynarmic"
|
||||
)
|
||||
configure_package_config_file(CMakeModules/dynarmicConfig.cmake.in
|
||||
dynarmicConfig.cmake
|
||||
INSTALL_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/dynarmic"
|
||||
)
|
||||
write_basic_package_version_file(dynarmicConfigVersion.cmake
|
||||
COMPATIBILITY SameMajorVersion
|
||||
)
|
||||
install(FILES
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/dynarmicConfig.cmake"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/dynarmicConfigVersion.cmake"
|
||||
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/dynarmic"
|
||||
)
|
||||
|
||||
install(DIRECTORY src/dynarmic TYPE INCLUDE FILES_MATCHING PATTERN "*.h")
|
||||
install(DIRECTORY src/dynarmic TYPE INCLUDE FILES_MATCHING PATTERN "*.h")
|
||||
endif()
|
||||
|
|
|
|||
13
externals/dynarmic/src/dynarmic/CMakeLists.txt
vendored
13
externals/dynarmic/src/dynarmic/CMakeLists.txt
vendored
|
|
@ -503,11 +503,22 @@ set_target_properties(dynarmic PROPERTIES
|
|||
target_compile_options(dynarmic PRIVATE ${DYNARMIC_CXX_FLAGS})
|
||||
target_link_libraries(dynarmic
|
||||
PRIVATE
|
||||
Boost::boost
|
||||
fmt::fmt
|
||||
merry::mcl
|
||||
tsl::robin_map
|
||||
)
|
||||
if (TARGET boost_headers)
|
||||
target_link_libraries(dynarmic
|
||||
PRIVATE
|
||||
boost_headers boost_variant boost_icl
|
||||
)
|
||||
else()
|
||||
target_link_libraries(dynarmic
|
||||
PRIVATE
|
||||
Boost::boost
|
||||
)
|
||||
endif()
|
||||
|
||||
if (DYNARMIC_USE_LLVM)
|
||||
target_include_directories(dynarmic PRIVATE ${LLVM_INCLUDE_DIRS})
|
||||
target_compile_definitions(dynarmic PRIVATE DYNARMIC_USE_LLVM=1 ${LLVM_DEFINITIONS})
|
||||
|
|
|
|||
2
externals/ffmpeg/ffmpeg
vendored
2
externals/ffmpeg/ffmpeg
vendored
|
|
@ -1 +1 @@
|
|||
Subproject commit 65c1c83ca42540415516c37e21c9aeb7dd2c96d1
|
||||
Subproject commit e0db1f51d6ddf9eb2c1314c23d063a29255b607a
|
||||
2
externals/fmt
vendored
2
externals/fmt
vendored
|
|
@ -1 +1 @@
|
|||
Subproject commit e69e5f977d458f2650bb346dadf2ad30c5320281
|
||||
Subproject commit 0c9fce2ffefecfdce794e1859584e25877b7b592
|
||||
4
externals/getopt/CMakeLists.txt
vendored
4
externals/getopt/CMakeLists.txt
vendored
|
|
@ -1,7 +1,7 @@
|
|||
# SPDX-FileCopyrightText: 2015 Greg Wicks <gpwicks@email.wm.edu>
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
add_library(getopt
|
||||
add_library(getopt STATIC
|
||||
getopt.c
|
||||
getopt.h
|
||||
)
|
||||
|
|
@ -9,4 +9,4 @@ add_library(getopt
|
|||
create_target_directory_groups(getopt)
|
||||
|
||||
target_compile_definitions(getopt PUBLIC STATIC_GETOPT)
|
||||
target_include_directories(getopt INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
target_include_directories(getopt PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
|
|
|||
2
externals/libadrenotools
vendored
2
externals/libadrenotools
vendored
|
|
@ -1 +1 @@
|
|||
Subproject commit 5cd3f5c5ceea6d9e9d435ccdd922d9b99e55d10b
|
||||
Subproject commit 5deac9f1ab2bd833ad664bc3386ac1e8998cecb3
|
||||
1
externals/nx_tzdb/tzdb_to_nx
vendored
1
externals/nx_tzdb/tzdb_to_nx
vendored
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 97929690234f2b4add36b33657fe3fe09bd57dfd
|
||||
52
externals/nx_tzdb/tzdb_to_nx/.github/workflows/cmake.yml
vendored
Normal file
52
externals/nx_tzdb/tzdb_to_nx/.github/workflows/cmake.yml
vendored
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
name: CMake
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
pull_request:
|
||||
branches: [ "main" ]
|
||||
|
||||
env:
|
||||
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
|
||||
BUILD_TYPE: Release
|
||||
|
||||
jobs:
|
||||
build:
|
||||
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
|
||||
# You can convert this to a matrix build if you need cross-platform coverage.
|
||||
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
|
||||
strategy:
|
||||
matrix:
|
||||
platform: [ubuntu-latest,macos-latest]
|
||||
runs-on: ${{ matrix.platform }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: 'true'
|
||||
|
||||
- name: Configure CMake
|
||||
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
|
||||
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
|
||||
run: |
|
||||
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
|
||||
echo "nx_tzdb_dir=$(grep NX_TZDB_DIR ${{github.workspace}}/build/CMakeCache.txt | sed 's/.*=//g')" > "$GITHUB_ENV"
|
||||
|
||||
- name: Build
|
||||
# Build your program with the given configuration
|
||||
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target x80e
|
||||
|
||||
- name: Package
|
||||
run: |
|
||||
mkdir -p ${{github.workspace}}/artifacts
|
||||
cp -Rv ${{ env.nx_tzdb_dir }} ${{github.workspace}}/artifacts/
|
||||
|
||||
- name: Version
|
||||
run: |
|
||||
echo "nx_version=$(cat ${{ env.nx_tzdb_dir }}/version.txt)" > "$GITHUB_ENV"
|
||||
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ${{ env.nx_version }}_${{ matrix.platform }}
|
||||
path: artifacts/nx
|
||||
2
externals/nx_tzdb/tzdb_to_nx/.gitignore
vendored
Normal file
2
externals/nx_tzdb/tzdb_to_nx/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
.cache
|
||||
build
|
||||
3
externals/nx_tzdb/tzdb_to_nx/.gitmodules
vendored
Normal file
3
externals/nx_tzdb/tzdb_to_nx/.gitmodules
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
[submodule "externals/tz/tz"]
|
||||
path = externals/tz/tz
|
||||
url = https://github.com/eggert/tz.git
|
||||
21
externals/nx_tzdb/tzdb_to_nx/CMakeLists.txt
vendored
Normal file
21
externals/nx_tzdb/tzdb_to_nx/CMakeLists.txt
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
cmake_minimum_required(VERSION 3.10)
|
||||
|
||||
project(tzdb2nx VERSION 1.0)
|
||||
|
||||
option(TZDB2NX_ZONEINFO_DIR "Specify a custom zoneinfo directory containing time zone data you wish to use" "")
|
||||
option(TZDB2NX_VERSION "Specify a custom zoneinfo version with the directory" "")
|
||||
|
||||
if (TZDB2NX_ZONEINFO_DIR AND NOT TZDB2NX_VERSION)
|
||||
message(FATAL_ERROR "TZDB2NX_ZONEINFO_DIR was specified but TZDB2NX_VERSION was left undefined.")
|
||||
endif()
|
||||
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
|
||||
option(TZ_LINK_INTL "Enable if gettext needs to link with libintl" ${APPLE})
|
||||
|
||||
if (TZ_LINK_INTL)
|
||||
find_package(Intl REQUIRED)
|
||||
endif()
|
||||
|
||||
add_subdirectory(externals)
|
||||
add_subdirectory(src)
|
||||
10
externals/nx_tzdb/tzdb_to_nx/CMakeModules/list_directory.cmake
vendored
Normal file
10
externals/nx_tzdb/tzdb_to_nx/CMakeModules/list_directory.cmake
vendored
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
set(WITH_DIRECTORIES ${CMAKE_ARGV3})
|
||||
set(RECURSE ${CMAKE_ARGV4})
|
||||
|
||||
set(HOW_TO_GLOB "GLOB")
|
||||
if (RECURSE)
|
||||
set(HOW_TO_GLOB "GLOB_RECURSE")
|
||||
endif()
|
||||
|
||||
file(${HOW_TO_GLOB} FILE_LIST LIST_DIRECTORIES ${WITH_DIRECTORIES} RELATIVE ${CMAKE_SOURCE_DIR} "*")
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E echo "${FILE_LIST};")
|
||||
21
externals/nx_tzdb/tzdb_to_nx/LICENSE
vendored
Normal file
21
externals/nx_tzdb/tzdb_to_nx/LICENSE
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright © 2023 lat9nq
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the “Software”), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||
of the Software, and to permit persons to whom the Software is furnished to do
|
||||
so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
22
externals/nx_tzdb/tzdb_to_nx/README.md
vendored
Normal file
22
externals/nx_tzdb/tzdb_to_nx/README.md
vendored
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
# tzdb_to_nx
|
||||
|
||||
This is a CMake/C++ project to convert RFC 8536 time zone data to the Nintendo Switch's format.
|
||||
This makes use a lot of Unix system calls as well as a bash script to convert the data, so it likely requires a bit of work to port to a non-POSIX platform, such as Windows.
|
||||
|
||||
Intended for use with the [yuzu Emulator](https://yuzu-emu.org/) project, but the project in the future likely won't ship synthesized Switch archives.
|
||||
That leaves this project in a place where it is not likely to be used, but will remain here as a reference.
|
||||
|
||||
- tzdb: CMake and bash script to build and convert time zone data from https://www.iana.org/time-zones into the Nintendo Switch's format.
|
||||
- tzdb2nx: C++ program that converts a single tzif file to the Nintendo's format.
|
||||
|
||||
The fine folks over at [SwitchBrew](https://switchbrew.org/wiki/PSC_services#ITimeZoneService) have left very helpful information on reading the data.
|
||||
Nintendo's file is simply the TZif version 2 data, with standard_indicators and ut_indicators data stripped out (and the necessary modifications needed in the header to make the data valid).
|
||||
This means the TZif 1 data is not present, so essentially we are left with the second half of each file.
|
||||
|
||||
Nintendo also does not seem to run the `zic` program on their output when they build the time zone data.
|
||||
I have left the relevant build command for that in src/tzdb/CMakeLists.txt commented out, but it isn't used here.
|
||||
This lets the project produce data identical to Nintendo's firmware for time zones, however this code does not produce the time zone data on US/Pacific-New or America/East-Saskatchewan (I may have bunged up the actual paths for these as this is 3 day old memory).
|
||||
|
||||
The CMake and C++ code in this repository is licensed under the MIT License.
|
||||
The source files date.c, newstrftime.3 and strftime.c from submodule eggert/tz use the BSD-3 clause license [[source]](https://github.com/eggert/tz/blob/main/LICENSE).
|
||||
The time zone data output from this repository, like those found in archives in the Release setcion, is in the public domain [[source]](https://github.com/eggert/tz/blob/main/LICENSE).
|
||||
1
externals/nx_tzdb/tzdb_to_nx/externals/CMakeLists.txt
vendored
Normal file
1
externals/nx_tzdb/tzdb_to_nx/externals/CMakeLists.txt
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
add_subdirectory(tz)
|
||||
73
externals/nx_tzdb/tzdb_to_nx/externals/tz/CMakeLists.txt
vendored
Normal file
73
externals/nx_tzdb/tzdb_to_nx/externals/tz/CMakeLists.txt
vendored
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
set(TZ_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/tz" CACHE PATH "Time zone source directory")
|
||||
set(TZ_DIR "${CMAKE_CURRENT_BINARY_DIR}/tz")
|
||||
set(TZ_TMP_SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/tmpsrc")
|
||||
set(TZIF_LIST_FILE "${CMAKE_CURRENT_BINARY_DIR}/tzif_list.txt" CACHE PATH "List of zone info files")
|
||||
if (TZDB2NX_ZONEINFO_DIR)
|
||||
set(TZ_ZONEINFO_DIR "${TZDB2NX_ZONEINFO_DIR}" CACHE PATH "Time zone info data directory")
|
||||
else()
|
||||
set(TZ_ZONEINFO_DIR "${TZ_DIR}/usr/share/zoneinfo" CACHE PATH "Time zone info data directory")
|
||||
endif()
|
||||
|
||||
find_program(GNU_MAKE make)
|
||||
if (NOT GNU_MAKE)
|
||||
message(FATAL_ERROR "GNU make not found")
|
||||
endif()
|
||||
|
||||
if (NOT EXISTS "${TZ_DIR}" OR NOT EXISTS "${TZIF_LIST_FILE}")
|
||||
if (NOT TZDB2NX_ZONEINFO_DIR) # If a custom zoneinfo directory was specified
|
||||
# tz's makefile can only build in-tree, so copy the whole source tree to a
|
||||
# separate directory before building.
|
||||
execute_process(
|
||||
COMMAND
|
||||
${CMAKE_COMMAND} -E copy_directory "${TZ_SOURCE_DIR}" "${TZ_TMP_SOURCE_DIR}"
|
||||
COMMAND_ERROR_IS_FATAL ANY
|
||||
)
|
||||
|
||||
if (TZ_LINK_INTL)
|
||||
set(TZ_MAKEFLAGS "LDLIBS=${Intl_LIBRARY}")
|
||||
else()
|
||||
set(TZ_MAKEFLAGS)
|
||||
endif()
|
||||
|
||||
execute_process(
|
||||
COMMAND
|
||||
${GNU_MAKE} DESTDIR=${TZ_DIR} ${TZ_MAKEFLAGS} install
|
||||
WORKING_DIRECTORY
|
||||
${TZ_TMP_SOURCE_DIR}
|
||||
COMMAND_ERROR_IS_FATAL ANY
|
||||
)
|
||||
|
||||
unset(TZ_MAKEFLAGS)
|
||||
|
||||
# Step taken by Arch Linux packaging, but Nintendo apparently skips it
|
||||
# execute_process(
|
||||
# COMMAND
|
||||
# "${TZDB_LOCATION}/zic" -b fat -d ${TZDB_ZONEINFO} africa antarctica asia australasia europe northamerica southamerica etcetera backward factory
|
||||
# WORKING_DIRECTORY
|
||||
# "${TZDB_LOCATION}"
|
||||
# COMMAND_ERROR_IS_FATAL ANY
|
||||
# )
|
||||
endif()
|
||||
|
||||
execute_process(
|
||||
COMMAND
|
||||
${CMAKE_COMMAND} -P ${PROJECT_SOURCE_DIR}/CMakeModules/list_directory.cmake false ON
|
||||
WORKING_DIRECTORY
|
||||
"${TZ_ZONEINFO_DIR}"
|
||||
OUTPUT_VARIABLE
|
||||
TZIF_SCAN
|
||||
)
|
||||
|
||||
set(TZIF_LIST "")
|
||||
foreach(CANDIDATE ${TZIF_SCAN})
|
||||
if (CANDIDATE STREQUAL "\n")
|
||||
continue()
|
||||
endif()
|
||||
set(TZIF_FILE "${TZ_ZONEINFO_DIR}/${CANDIDATE}")
|
||||
file(READ "${TZIF_FILE}" HEADER LIMIT 4)
|
||||
string(SUBSTRING "${HEADER}" 0 4 HEADER) # Remove trailing newline
|
||||
if (HEADER STREQUAL "TZif")
|
||||
file(APPEND "${TZIF_LIST_FILE}" "${TZIF_FILE}\n")
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
26
externals/nx_tzdb/tzdb_to_nx/externals/tz/tz/.gitignore
vendored
Normal file
26
externals/nx_tzdb/tzdb_to_nx/externals/tz/tz/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
# Files intentionally not tracked by Git.
|
||||
# This file is in the public domain.
|
||||
*.a
|
||||
*.asc
|
||||
*.diff
|
||||
*.i
|
||||
*.o
|
||||
*.orig
|
||||
*.patch
|
||||
*.rej
|
||||
*.tar
|
||||
*.tar.*
|
||||
*.txt
|
||||
*.tzs
|
||||
*.zi
|
||||
*~
|
||||
ChangeLog
|
||||
check_*
|
||||
date
|
||||
leapseconds
|
||||
tzselect
|
||||
version
|
||||
version.h
|
||||
yearistype
|
||||
zdump
|
||||
zic
|
||||
97
externals/nx_tzdb/tzdb_to_nx/externals/tz/tz/CONTRIBUTING
vendored
Normal file
97
externals/nx_tzdb/tzdb_to_nx/externals/tz/tz/CONTRIBUTING
vendored
Normal file
|
|
@ -0,0 +1,97 @@
|
|||
# Contributing to the tz code and data
|
||||
|
||||
Please do not create issues or pull requests on GitHub, as the
|
||||
proper procedure for proposing and distributing patches is via
|
||||
email as described below.
|
||||
|
||||
The time zone database is by no means authoritative: governments
|
||||
change timekeeping rules erratically and sometimes with little
|
||||
warning, the data entries do not cover all of civil time before
|
||||
1970, and undoubtedly errors remain in the code and data. Feel
|
||||
free to fill gaps or fix mistakes, and please email improvements
|
||||
to <tz@iana.org> for use in the future. In your email, please give
|
||||
reliable sources that reviewers can check.
|
||||
|
||||
## Contributing technical changes
|
||||
|
||||
To email small changes, please run a POSIX shell command like
|
||||
'diff -u old/europe new/europe >myfix.patch', and attach
|
||||
'myfix.patch' to the email.
|
||||
|
||||
For more-elaborate or possibly-controversial changes,
|
||||
such as renaming, adding or removing zones, please read
|
||||
"Theory and pragmatics of the tz code and data"
|
||||
<https://www.iana.org/time-zones/repository/theory.html>.
|
||||
It is also good to browse the mailing list archives
|
||||
<https://mm.icann.org/pipermail/tz/> for examples of patches that tend
|
||||
to work well. Additions to data should contain commentary citing
|
||||
reliable sources as justification. Citations should use "https:" URLs
|
||||
if available.
|
||||
|
||||
For changes that fix sensitive security-related bugs, please see the
|
||||
distribution's 'SECURITY' file.
|
||||
|
||||
Please submit changes against either the latest release
|
||||
<https://www.iana.org/time-zones> or the main branch of the development
|
||||
repository. The latter is preferred.
|
||||
|
||||
## Sample Git workflow for developing contributions
|
||||
|
||||
If you use Git the following workflow may be helpful:
|
||||
|
||||
* Copy the development repository.
|
||||
|
||||
git clone https://github.com/eggert/tz.git
|
||||
cd tz
|
||||
|
||||
* Get current with the main branch.
|
||||
|
||||
git checkout main
|
||||
git pull
|
||||
|
||||
* Switch to a new branch for the changes. Choose a different
|
||||
branch name for each change set.
|
||||
|
||||
git checkout -b mybranch
|
||||
|
||||
* Sleuth by using 'git blame'. For example, when fixing data for
|
||||
Africa/Sao_Tome, if the command 'git blame africa' outputs a line
|
||||
'2951fa3b (Paul Eggert 2018-01-08 09:03:13 -0800 1068) Zone
|
||||
Africa/Sao_Tome 0:26:56 - LMT 1884', commit 2951fa3b should
|
||||
provide some justification for the 'Zone Africa/Sao_Tome' line.
|
||||
|
||||
* Edit source files. Include commentary that justifies the
|
||||
changes by citing reliable sources.
|
||||
|
||||
* Debug the changes, e.g.:
|
||||
|
||||
make check
|
||||
make install
|
||||
./zdump -v America/Los_Angeles
|
||||
|
||||
* For each separable change, commit it in the new branch, e.g.:
|
||||
|
||||
git add northamerica
|
||||
git commit
|
||||
|
||||
See recent 'git log' output for the commit-message style.
|
||||
|
||||
* Create patch files 0001-..., 0002-..., ...
|
||||
|
||||
git format-patch main
|
||||
|
||||
* After reviewing the patch files, send the patches to <tz@iana.org>
|
||||
for others to review.
|
||||
|
||||
git send-email main
|
||||
|
||||
For an archived example of such an email, see
|
||||
"[PROPOSED] Fix off-by-1 error for Jamaica and T&C before 1913"
|
||||
<https://mm.icann.org/pipermail/tz/2018-February/026122.html>.
|
||||
|
||||
* Start anew by getting current with the main branch again
|
||||
(the second step above).
|
||||
|
||||
-----
|
||||
|
||||
This file is in the public domain.
|
||||
5
externals/nx_tzdb/tzdb_to_nx/externals/tz/tz/LICENSE
vendored
Normal file
5
externals/nx_tzdb/tzdb_to_nx/externals/tz/tz/LICENSE
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
Unless specified below, all files in the tz code and data (including
|
||||
this LICENSE file) are in the public domain.
|
||||
|
||||
If the files date.c, newstrftime.3, and strftime.c are present, they
|
||||
contain material derived from BSD and use the BSD 3-clause license.
|
||||
1254
externals/nx_tzdb/tzdb_to_nx/externals/tz/tz/Makefile
vendored
Normal file
1254
externals/nx_tzdb/tzdb_to_nx/externals/tz/tz/Makefile
vendored
Normal file
File diff suppressed because it is too large
Load diff
5922
externals/nx_tzdb/tzdb_to_nx/externals/tz/tz/NEWS
vendored
Normal file
5922
externals/nx_tzdb/tzdb_to_nx/externals/tz/tz/NEWS
vendored
Normal file
File diff suppressed because it is too large
Load diff
52
externals/nx_tzdb/tzdb_to_nx/externals/tz/tz/README
vendored
Normal file
52
externals/nx_tzdb/tzdb_to_nx/externals/tz/tz/README
vendored
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
README for the tz distribution
|
||||
|
||||
"Where do I set the hands of the clock?" -- Les Tremayne as The King
|
||||
"Oh that--you can set them any place you want." -- Frank Baxter as The Scientist
|
||||
(from the Bell System film "About Time")
|
||||
|
||||
The Time Zone Database (called tz, tzdb or zoneinfo) contains code and
|
||||
data that represent the history of local time for many representative
|
||||
locations around the globe. It is updated periodically to reflect
|
||||
changes made by political bodies to time zone boundaries, UTC offsets,
|
||||
and daylight-saving rules.
|
||||
|
||||
See <https://www.iana.org/time-zones/repository/tz-link.html> or the
|
||||
file tz-link.html for how to acquire the code and data. Once acquired,
|
||||
read the comments in the file 'Makefile' and make any changes needed
|
||||
to make things right for your system, especially if you are using some
|
||||
platform other than GNU/Linux. Then run the following commands,
|
||||
substituting your desired installation directory for "$HOME/tzdir":
|
||||
|
||||
make TOPDIR=$HOME/tzdir install
|
||||
$HOME/tzdir/usr/bin/zdump -v America/Los_Angeles
|
||||
|
||||
See the file tz-how-to.html for examples of how to read the data files.
|
||||
|
||||
This database of historical local time information has several goals:
|
||||
|
||||
* Provide a compendium of data about the history of civil time that
|
||||
is useful even if not 100% accurate.
|
||||
|
||||
* Give an idea of the variety of local time rules that have existed
|
||||
in the past and thus may be expected in the future.
|
||||
|
||||
* Test the generality of the local time rule description system.
|
||||
|
||||
The information in the time zone data files is by no means authoritative;
|
||||
fixes and enhancements are welcome. Please see the file CONTRIBUTING
|
||||
for details.
|
||||
|
||||
Thanks to these Time Zone Caballeros who've made major contributions to the
|
||||
time conversion package: Keith Bostic; Bob Devine; Paul Eggert; Robert Elz;
|
||||
Guy Harris; Mark Horton; John Mackin; and Bradley White. Thanks also to
|
||||
Michael Bloom, Art Neilson, Stephen Prince, John Sovereign, and Frank Wales
|
||||
for testing work, and to Gwillim Law for checking local mean time data.
|
||||
Thanks in particular to Arthur David Olson, the project's founder and first
|
||||
maintainer, to whom the time zone community owes the greatest debt of all.
|
||||
None of them are responsible for remaining errors.
|
||||
|
||||
-----
|
||||
|
||||
This file is in the public domain, so clarified as of 2009-05-17 by
|
||||
Arthur David Olson. The other files in this distribution are either
|
||||
public domain or BSD licensed; see the file LICENSE for details.
|
||||
15
externals/nx_tzdb/tzdb_to_nx/externals/tz/tz/SECURITY
vendored
Normal file
15
externals/nx_tzdb/tzdb_to_nx/externals/tz/tz/SECURITY
vendored
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
Please report any sensitive security-related bugs via email to the
|
||||
tzdb designated coordinators, currently Paul Eggert
|
||||
<eggert@cs.ucla.edu> and Tim Parenti <tim@timtimeonline.com>.
|
||||
Put "tzdb security" at the start of your email's subject line.
|
||||
We prefer communications to be in English.
|
||||
|
||||
You should receive a response within a week. If not, please follow up
|
||||
via email to make sure we received your original message.
|
||||
|
||||
If we confirm the bug, we plan to notify affected third-party services
|
||||
or software that we know about, prepare an advisory, commit fixes to
|
||||
the main development branch as quickly as is practical, and finally
|
||||
publish the advisory on tz@iana.org. As with all tzdb contributions,
|
||||
we give credit to security contributors unless they wish to remain
|
||||
anonymous.
|
||||
1436
externals/nx_tzdb/tzdb_to_nx/externals/tz/tz/africa
vendored
Normal file
1436
externals/nx_tzdb/tzdb_to_nx/externals/tz/tz/africa
vendored
Normal file
File diff suppressed because it is too large
Load diff
309
externals/nx_tzdb/tzdb_to_nx/externals/tz/tz/antarctica
vendored
Normal file
309
externals/nx_tzdb/tzdb_to_nx/externals/tz/tz/antarctica
vendored
Normal file
|
|
@ -0,0 +1,309 @@
|
|||
# tzdb data for Antarctica and environs
|
||||
|
||||
# This file is in the public domain, so clarified as of
|
||||
# 2009-05-17 by Arthur David Olson.
|
||||
|
||||
# From Paul Eggert (1999-11-15):
|
||||
# To keep things manageable, we list only locations occupied year-round; see
|
||||
# COMNAP - Stations and Bases
|
||||
# http://www.comnap.aq/comnap/comnap.nsf/P/Stations/
|
||||
# and
|
||||
# Summary of the Peri-Antarctic Islands (1998-07-23)
|
||||
# http://www.spri.cam.ac.uk/bob/periant.htm
|
||||
# for information.
|
||||
# Unless otherwise specified, we have no time zone information.
|
||||
|
||||
# FORMAT is '-00' and STDOFF is 0 for locations while uninhabited.
|
||||
|
||||
# Argentina - year-round bases
|
||||
# Belgrano II, Confin Coast, -770227-0343737, since 1972-02-05
|
||||
# Carlini, Potter Cove, King George Island, -6414-0602320, since 1982-01
|
||||
# Esperanza, Hope Bay, -6323-05659, since 1952-12-17
|
||||
# Marambio, -6414-05637, since 1969-10-29
|
||||
# Orcadas, Laurie I, -6016-04444, since 1904-02-22
|
||||
# San Martín, Barry I, -6808-06706, since 1951-03-21
|
||||
# (except 1960-03 / 1976-03-21)
|
||||
|
||||
# Australia - territories
|
||||
# Heard Island, McDonald Islands (uninhabited)
|
||||
# previously sealers and scientific personnel wintered
|
||||
# Margaret Turner reports
|
||||
# https://web.archive.org/web/20021204222245/http://www.dstc.qut.edu.au/DST/marg/daylight.html
|
||||
# (1999-09-30) that they're UT +05, with no DST;
|
||||
# presumably this is when they have visitors.
|
||||
#
|
||||
# year-round bases
|
||||
# Casey, Bailey Peninsula, -6617+11032, since 1969
|
||||
# Davis, Vestfold Hills, -6835+07759, since 1957-01-13
|
||||
# (except 1964-11 - 1969-02)
|
||||
# Mawson, Holme Bay, -6736+06253, since 1954-02-13
|
||||
|
||||
# From Steffen Thorsen (2009-03-11):
|
||||
# Three Australian stations in Antarctica have changed their time zone:
|
||||
# Casey moved from UTC+8 to UTC+11
|
||||
# Davis moved from UTC+7 to UTC+5
|
||||
# Mawson moved from UTC+6 to UTC+5
|
||||
# The changes occurred on 2009-10-18 at 02:00 (local times).
|
||||
#
|
||||
# Government source: (Australian Antarctic Division)
|
||||
# http://www.aad.gov.au/default.asp?casid=37079
|
||||
#
|
||||
# We have more background information here:
|
||||
# https://www.timeanddate.com/news/time/antarctica-new-times.html
|
||||
|
||||
# From Steffen Thorsen (2010-03-10):
|
||||
# We got these changes from the Australian Antarctic Division: ...
|
||||
#
|
||||
# - Casey station reverted to its normal time of UTC+8 on 5 March 2010.
|
||||
# The change to UTC+11 is being considered as a regular summer thing but
|
||||
# has not been decided yet.
|
||||
#
|
||||
# - Davis station will revert to its normal time of UTC+7 at 10 March 2010
|
||||
# 20:00 UTC.
|
||||
#
|
||||
# - Mawson station stays on UTC+5.
|
||||
#
|
||||
# Background:
|
||||
# https://www.timeanddate.com/news/time/antartica-time-changes-2010.html
|
||||
|
||||
# From Steffen Thorsen (2016-10-28):
|
||||
# Australian Antarctica Division informed us that Casey changed time
|
||||
# zone to UTC+11 in "the morning of 22nd October 2016".
|
||||
|
||||
# From Steffen Thorsen (2020-10-02, as corrected):
|
||||
# Based on information we have received from the Australian Antarctic
|
||||
# Division, Casey station and Macquarie Island station will move to Tasmanian
|
||||
# daylight savings time on Sunday 4 October. This will take effect from 0001
|
||||
# hrs on Sunday 4 October 2020 and will mean Casey and Macquarie Island will
|
||||
# be on the same time zone as Hobart. Some past dates too for this 3 hour
|
||||
# time change back and forth between UTC+8 and UTC+11 for Casey:
|
||||
# - 2018 Oct 7 4:00 - 2019 Mar 17 3:00 - 2019 Oct 4 3:00 - 2020 Mar 8 3:00
|
||||
# and now - 2020 Oct 4 0:01
|
||||
|
||||
# Zone NAME STDOFF RULES FORMAT [UNTIL]
|
||||
Zone Antarctica/Casey 0 - -00 1969
|
||||
8:00 - +08 2009 Oct 18 2:00
|
||||
11:00 - +11 2010 Mar 5 2:00
|
||||
8:00 - +08 2011 Oct 28 2:00
|
||||
11:00 - +11 2012 Feb 21 17:00u
|
||||
8:00 - +08 2016 Oct 22
|
||||
11:00 - +11 2018 Mar 11 4:00
|
||||
8:00 - +08 2018 Oct 7 4:00
|
||||
11:00 - +11 2019 Mar 17 3:00
|
||||
8:00 - +08 2019 Oct 4 3:00
|
||||
11:00 - +11 2020 Mar 8 3:00
|
||||
8:00 - +08 2020 Oct 4 0:01
|
||||
11:00 - +11
|
||||
Zone Antarctica/Davis 0 - -00 1957 Jan 13
|
||||
7:00 - +07 1964 Nov
|
||||
0 - -00 1969 Feb
|
||||
7:00 - +07 2009 Oct 18 2:00
|
||||
5:00 - +05 2010 Mar 10 20:00u
|
||||
7:00 - +07 2011 Oct 28 2:00
|
||||
5:00 - +05 2012 Feb 21 20:00u
|
||||
7:00 - +07
|
||||
Zone Antarctica/Mawson 0 - -00 1954 Feb 13
|
||||
6:00 - +06 2009 Oct 18 2:00
|
||||
5:00 - +05
|
||||
# References:
|
||||
# Casey Weather (1998-02-26)
|
||||
# http://www.antdiv.gov.au/aad/exop/sfo/casey/casey_aws.html
|
||||
# Davis Station, Antarctica (1998-02-26)
|
||||
# http://www.antdiv.gov.au/aad/exop/sfo/davis/video.html
|
||||
# Mawson Station, Antarctica (1998-02-25)
|
||||
# http://www.antdiv.gov.au/aad/exop/sfo/mawson/video.html
|
||||
|
||||
# Belgium - year-round base
|
||||
# Princess Elisabeth, Queen Maud Land, -713412+0231200, since 2007
|
||||
|
||||
# Brazil - year-round base
|
||||
# Ferraz, King George Island, -6205+05824, since 1983/4
|
||||
|
||||
# Bulgaria - year-round base
|
||||
# St. Kliment Ohridski, Livingston Island, -623829-0602153, since 1988
|
||||
|
||||
# Chile - year-round bases and towns
|
||||
# Escudero, South Shetland Is, -621157-0585735, since 1994
|
||||
# Frei Montalva, King George Island, -6214-05848, since 1969-03-07
|
||||
# O'Higgins, Antarctic Peninsula, -6319-05704, since 1948-02
|
||||
# Prat, -6230-05941
|
||||
# Villa Las Estrellas (a town), around the Frei base, since 1984-04-09
|
||||
# These locations employ Region of Magallanes time; use
|
||||
# TZ='America/Punta_Arenas'.
|
||||
|
||||
# China - year-round bases
|
||||
# Great Wall, King George Island, -6213-05858, since 1985-02-20
|
||||
# Zhongshan, Larsemann Hills, Prydz Bay, -6922+07623, since 1989-02-26
|
||||
|
||||
# France - year-round bases (also see "France & Italy")
|
||||
#
|
||||
# From Antoine Leca (1997-01-20):
|
||||
# Time data entries are from Nicole Pailleau at the IFRTP
|
||||
# (French Institute for Polar Research and Technology).
|
||||
# She confirms that French Southern Territories and Terre Adélie bases
|
||||
# don't observe daylight saving time, even if Terre Adélie supplies came
|
||||
# from Tasmania.
|
||||
#
|
||||
# French Southern Territories with year-round inhabitants
|
||||
#
|
||||
# Alfred Faure, Possession Island, Crozet Islands, -462551+0515152, since 1964;
|
||||
# sealing & whaling stations operated variously 1802/1911+;
|
||||
# see Asia/Dubai.
|
||||
#
|
||||
# Martin-de-Viviès, Amsterdam Island, -374105+0773155, since 1950
|
||||
# Port-aux-Français, Kerguelen Islands, -492110+0701303, since 1951;
|
||||
# whaling & sealing station operated 1908/1914, 1920/1929, and 1951/1956
|
||||
#
|
||||
# St Paul Island - near Amsterdam, uninhabited
|
||||
# fishing stations operated variously 1819/1931
|
||||
#
|
||||
# Kerguelen - see Indian/Maldives.
|
||||
#
|
||||
# year-round base in the main continent
|
||||
# Dumont d'Urville - see Pacific/Port_Moresby.
|
||||
|
||||
# France & Italy - year-round base
|
||||
# Concordia, -750600+1232000, since 2005
|
||||
|
||||
# Germany - year-round base
|
||||
# Neumayer III, -704080-0081602, since 2009
|
||||
|
||||
# India - year-round bases
|
||||
# Bharati, -692428+0761114, since 2012
|
||||
# Maitri, -704558+0114356, since 1989
|
||||
|
||||
# Italy - year-round base (also see "France & Italy")
|
||||
# Zuchelli, Terra Nova Bay, -744140+1640647, since 1986
|
||||
|
||||
# Japan - year-round bases
|
||||
# See Asia/Riyadh.
|
||||
|
||||
# S Korea - year-round base
|
||||
# Jang Bogo, Terra Nova Bay, -743700+1641205 since 2014
|
||||
# King Sejong, King George Island, -6213-05847, since 1988
|
||||
|
||||
# New Zealand - claims
|
||||
# Balleny Islands (never inhabited)
|
||||
# Scott Island (never inhabited)
|
||||
#
|
||||
# year-round base
|
||||
# Scott Base, Ross Island, since 1957-01.
|
||||
# See Pacific/Auckland.
|
||||
|
||||
# Norway - territories
|
||||
# Bouvet (never inhabited)
|
||||
#
|
||||
# claims
|
||||
# Peter I Island (never inhabited)
|
||||
#
|
||||
# year-round base
|
||||
# Troll, Queen Maud Land, -720041+0023206, since 2005-02-12
|
||||
#
|
||||
# From Paul-Inge Flakstad (2014-03-10):
|
||||
# I recently had a long dialog about this with the developer of timegenie.com.
|
||||
# In the absence of specific dates, he decided to choose some likely ones:
|
||||
# GMT +1 - From March 1 to the last Sunday in March
|
||||
# GMT +2 - From the last Sunday in March until the last Sunday in October
|
||||
# GMT +1 - From the last Sunday in October until November 7
|
||||
# GMT +0 - From November 7 until March 1
|
||||
# The dates for switching to and from UTC+0 will probably not be absolutely
|
||||
# correct, but they should be quite close to the actual dates.
|
||||
#
|
||||
# From Paul Eggert (2014-03-21):
|
||||
# The CET-switching Troll rules require zic from tz 2014b or later, so as
|
||||
# suggested by Bengt-Inge Larsson comment them out for now, and approximate
|
||||
# with only UTC and CEST. Uncomment them when 2014b is more prevalent.
|
||||
#
|
||||
# Rule NAME FROM TO - IN ON AT SAVE LETTER/S
|
||||
#Rule Troll 2005 max - Mar 1 1:00u 1:00 +01
|
||||
Rule Troll 2005 max - Mar lastSun 1:00u 2:00 +02
|
||||
#Rule Troll 2005 max - Oct lastSun 1:00u 1:00 +01
|
||||
#Rule Troll 2004 max - Nov 7 1:00u 0:00 +00
|
||||
# Remove the following line when uncommenting the above '#Rule' lines.
|
||||
Rule Troll 2004 max - Oct lastSun 1:00u 0:00 +00
|
||||
# Zone NAME STDOFF RULES FORMAT [UNTIL]
|
||||
Zone Antarctica/Troll 0 - -00 2005 Feb 12
|
||||
0:00 Troll %s
|
||||
|
||||
# Poland - year-round base
|
||||
# Arctowski, King George Island, -620945-0582745, since 1977
|
||||
|
||||
# Romania - year-bound base
|
||||
# Law-Racoviță, Larsemann Hills, -692319+0762251, since 1986
|
||||
|
||||
# Russia - year-round bases
|
||||
# Bellingshausen, King George Island, -621159-0585337, since 1968-02-22
|
||||
# Mirny, Davis coast, -6633+09301, since 1956-02
|
||||
# Molodezhnaya, Alasheyev Bay, -6740+04551,
|
||||
# year-round from 1962-02 to 1999-07-01
|
||||
# Novolazarevskaya, Queen Maud Land, -7046+01150,
|
||||
# year-round from 1960/61 to 1992
|
||||
|
||||
# Vostok, since 1957-12-16, temporarily closed 1994-02/1994-11
|
||||
# See Asia/Urumqi.
|
||||
|
||||
# S Africa - year-round bases
|
||||
# Marion Island, -4653+03752
|
||||
# SANAE IV, Vesleskarvet, Queen Maud Land, -714022-0025026, since 1997
|
||||
|
||||
# Ukraine - year-round base
|
||||
# Vernadsky (formerly Faraday), Galindez Island, -651445-0641526, since 1954
|
||||
|
||||
# United Kingdom
|
||||
#
|
||||
# British Antarctic Territories (BAT) claims
|
||||
# South Orkney Islands
|
||||
# scientific station from 1903
|
||||
# whaling station at Signy I 1920/1926
|
||||
# South Shetland Islands
|
||||
#
|
||||
# year-round bases
|
||||
# Bird Island, South Georgia, -5400-03803, since 1983
|
||||
# Deception Island, -6259-06034, whaling station 1912/1931,
|
||||
# scientific station 1943/1967,
|
||||
# previously sealers and a scientific expedition wintered by accident,
|
||||
# and a garrison was deployed briefly
|
||||
# Halley, Coates Land, -7535-02604, since 1956-01-06
|
||||
# Halley is on a moving ice shelf and is periodically relocated
|
||||
# so that it is never more than 10km from its nominal location.
|
||||
# Rothera, Adelaide Island, -6734-6808, since 1976-12-01
|
||||
#
|
||||
# From Paul Eggert (2002-10-22)
|
||||
# <http://webexhibits.org/daylightsaving/g.html> says Rothera is -03 all year.
|
||||
#
|
||||
# Zone NAME STDOFF RULES FORMAT [UNTIL]
|
||||
Zone Antarctica/Rothera 0 - -00 1976 Dec 1
|
||||
-3:00 - -03
|
||||
|
||||
# Uruguay - year round base
|
||||
# Artigas, King George Island, -621104-0585107
|
||||
|
||||
# USA - year-round bases
|
||||
#
|
||||
# Palmer, Anvers Island, since 1965 (moved 2 miles in 1968)
|
||||
# See 'southamerica' for Antarctica/Palmer, since it uses South American DST.
|
||||
#
|
||||
# McMurdo Station, Ross Island, since 1955-12
|
||||
# Amundsen-Scott South Pole Station, continuously occupied since 1956-11-20
|
||||
#
|
||||
# From Chris Carrier (1996-06-27):
|
||||
# Siple, the first commander of the South Pole station,
|
||||
# stated that he would have liked to have kept GMT at the station,
|
||||
# but that he found it more convenient to keep GMT+12
|
||||
# as supplies for the station were coming from McMurdo Sound,
|
||||
# which was on GMT+12 because New Zealand was on GMT+12 all year
|
||||
# at that time (1957). (Source: Siple's book 90 Degrees South.)
|
||||
#
|
||||
# From Susan Smith
|
||||
# http://www.cybertours.com/whs/pole10.html
|
||||
# (1995-11-13 16:24:56 +1300, no longer available):
|
||||
# We use the same time as McMurdo does.
|
||||
# And they use the same time as Christchurch, NZ does....
|
||||
# One last quirk about South Pole time.
|
||||
# All the electric clocks are usually wrong.
|
||||
# Something about the generators running at 60.1hertz or something
|
||||
# makes all of the clocks run fast. So every couple of days,
|
||||
# we have to go around and set them back 5 minutes or so.
|
||||
# Maybe if we let them run fast all of the time, we'd get to leave here sooner!!
|
||||
#
|
||||
# See Pacific/Auckland.
|
||||
131
externals/nx_tzdb/tzdb_to_nx/externals/tz/tz/asctime.c
vendored
Normal file
131
externals/nx_tzdb/tzdb_to_nx/externals/tz/tz/asctime.c
vendored
Normal file
|
|
@ -0,0 +1,131 @@
|
|||
/* asctime and asctime_r a la POSIX and ISO C, except pad years before 1000. */
|
||||
|
||||
/*
|
||||
** This file is in the public domain, so clarified as of
|
||||
** 1996-06-05 by Arthur David Olson.
|
||||
*/
|
||||
|
||||
/*
|
||||
** Avoid the temptation to punt entirely to strftime;
|
||||
** the output of strftime is supposed to be locale specific
|
||||
** whereas the output of asctime is supposed to be constant.
|
||||
*/
|
||||
|
||||
/*LINTLIBRARY*/
|
||||
|
||||
#include "private.h"
|
||||
#include <stdio.h>
|
||||
|
||||
/*
|
||||
** All years associated with 32-bit time_t values are exactly four digits long;
|
||||
** some years associated with 64-bit time_t values are not.
|
||||
** Vintage programs are coded for years that are always four digits long
|
||||
** and may assume that the newline always lands in the same place.
|
||||
** For years that are less than four digits, we pad the output with
|
||||
** leading zeroes to get the newline in the traditional place.
|
||||
** The -4 ensures that we get four characters of output even if
|
||||
** we call a strftime variant that produces fewer characters for some years.
|
||||
** The ISO C and POSIX standards prohibit padding the year,
|
||||
** but many implementations pad anyway; most likely the standards are buggy.
|
||||
*/
|
||||
static char const ASCTIME_FMT[] = "%s %s%3d %.2d:%.2d:%.2d %-4s\n";
|
||||
/*
|
||||
** For years that are more than four digits we put extra spaces before the year
|
||||
** so that code trying to overwrite the newline won't end up overwriting
|
||||
** a digit within a year and truncating the year (operating on the assumption
|
||||
** that no output is better than wrong output).
|
||||
*/
|
||||
static char const ASCTIME_FMT_B[] = "%s %s%3d %.2d:%.2d:%.2d %s\n";
|
||||
|
||||
enum { STD_ASCTIME_BUF_SIZE = 26 };
|
||||
/*
|
||||
** Big enough for something such as
|
||||
** ??? ???-2147483648 -2147483648:-2147483648:-2147483648 -2147483648\n
|
||||
** (two three-character abbreviations, five strings denoting integers,
|
||||
** seven explicit spaces, two explicit colons, a newline,
|
||||
** and a trailing NUL byte).
|
||||
** The values above are for systems where an int is 32 bits and are provided
|
||||
** as an example; the size expression below is a bound for the system at
|
||||
** hand.
|
||||
*/
|
||||
static char buf_asctime[2*3 + 5*INT_STRLEN_MAXIMUM(int) + 7 + 2 + 1 + 1];
|
||||
|
||||
/* A similar buffer for ctime.
|
||||
C89 requires that they be the same buffer.
|
||||
This requirement was removed in C99, so support it only if requested,
|
||||
as support is more likely to lead to bugs in badly-written programs. */
|
||||
#if SUPPORT_C89
|
||||
# define buf_ctime buf_asctime
|
||||
#else
|
||||
static char buf_ctime[sizeof buf_asctime];
|
||||
#endif
|
||||
|
||||
char *
|
||||
asctime_r(register const struct tm *timeptr, char *buf)
|
||||
{
|
||||
static const char wday_name[][4] = {
|
||||
"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
|
||||
};
|
||||
static const char mon_name[][4] = {
|
||||
"Jan", "Feb", "Mar", "Apr", "May", "Jun",
|
||||
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
|
||||
};
|
||||
register const char * wn;
|
||||
register const char * mn;
|
||||
char year[INT_STRLEN_MAXIMUM(int) + 2];
|
||||
char result[sizeof buf_asctime];
|
||||
|
||||
if (timeptr == NULL) {
|
||||
errno = EINVAL;
|
||||
return strcpy(buf, "??? ??? ?? ??:??:?? ????\n");
|
||||
}
|
||||
if (timeptr->tm_wday < 0 || timeptr->tm_wday >= DAYSPERWEEK)
|
||||
wn = "???";
|
||||
else wn = wday_name[timeptr->tm_wday];
|
||||
if (timeptr->tm_mon < 0 || timeptr->tm_mon >= MONSPERYEAR)
|
||||
mn = "???";
|
||||
else mn = mon_name[timeptr->tm_mon];
|
||||
/*
|
||||
** Use strftime's %Y to generate the year, to avoid overflow problems
|
||||
** when computing timeptr->tm_year + TM_YEAR_BASE.
|
||||
** Assume that strftime is unaffected by other out-of-range members
|
||||
** (e.g., timeptr->tm_mday) when processing "%Y".
|
||||
*/
|
||||
strftime(year, sizeof year, "%Y", timeptr);
|
||||
/*
|
||||
** We avoid using snprintf since it's not available on all systems.
|
||||
*/
|
||||
sprintf(result,
|
||||
((strlen(year) <= 4) ? ASCTIME_FMT : ASCTIME_FMT_B),
|
||||
wn, mn,
|
||||
timeptr->tm_mday, timeptr->tm_hour,
|
||||
timeptr->tm_min, timeptr->tm_sec,
|
||||
year);
|
||||
if (strlen(result) < STD_ASCTIME_BUF_SIZE
|
||||
|| buf == buf_ctime || buf == buf_asctime)
|
||||
return strcpy(buf, result);
|
||||
else {
|
||||
errno = EOVERFLOW;
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
char *
|
||||
asctime(register const struct tm *timeptr)
|
||||
{
|
||||
return asctime_r(timeptr, buf_asctime);
|
||||
}
|
||||
|
||||
char *
|
||||
ctime_r(const time_t *timep, char *buf)
|
||||
{
|
||||
struct tm mytm;
|
||||
struct tm *tmp = localtime_r(timep, &mytm);
|
||||
return tmp ? asctime_r(tmp, buf) : NULL;
|
||||
}
|
||||
|
||||
char *
|
||||
ctime(const time_t *timep)
|
||||
{
|
||||
return ctime_r(timep, buf_ctime);
|
||||
}
|
||||
3955
externals/nx_tzdb/tzdb_to_nx/externals/tz/tz/asia
vendored
Normal file
3955
externals/nx_tzdb/tzdb_to_nx/externals/tz/tz/asia
vendored
Normal file
File diff suppressed because it is too large
Load diff
2222
externals/nx_tzdb/tzdb_to_nx/externals/tz/tz/australasia
vendored
Normal file
2222
externals/nx_tzdb/tzdb_to_nx/externals/tz/tz/australasia
vendored
Normal file
File diff suppressed because it is too large
Load diff
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue