Compare commits

...

228 commits

Author SHA1 Message Date
spectranator
63f808b365 Just some stupid readme cleanup :-) 2025-10-16 08:50:01 +00:00
spectranator
e40391eedd Removed accidentally added immature build script 2025-09-02 09:48:03 +00:00
spectranator
6210feba12 Feature freeze (or rather, more specific project goal) 2025-07-30 22:00:17 +00:00
spectranator
641c18e1a8 Added previous commit to reverts 2025-07-02 22:41:47 +02:00
spectranator
295aa94a05 Force ENABLE_WEB_SERVICE to be OFF 2025-07-02 22:39:21 +02:00
spectranator
59bda52beb Upgrade to Qt 6 (#130)
Why? Open Source Qt 5 will stop receiving updates rather sooner than later so it's worth switching to Qt 6 to remain compatible with modern systems.

Reviewed-on: http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu/pulls/130
2025-07-02 20:27:29 +00:00
spectranator
25c6aaec18 Added TZ_LINK_INTL option 2025-06-15 03:54:09 +02:00
spectranator
dee5dca459 Added missing bubblewrap executable for ARM64 AppImage 2025-06-11 16:08:59 +00:00
Shikakiru
fd908334af Updated mirror in Flatpak build guide (#123)
add tor repo for the flatpak building
maybe remove the gitub repo if you don't want to actualize enimore (ore maybe create one on Notebug)

Reviewed-on: http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu/pulls/123
Co-authored-by: Shikakiru <shikakiru@noreply.localhost>
Co-committed-by: Shikakiru <shikakiru@noreply.localhost>
2025-04-22 16:13:14 +00:00
spectranator
c72862af09 Download boost-fiber on all platforms in vcpkg 2025-04-17 17:26:20 +00:00
spectranator
1ea9565cb4 In windows build guide skeleton for clang-cl add options for LTO and GC 2025-04-16 21:44:49 +00:00
spectranator
945de31fb9 Removed unusued and duplicate YUZU_NO_PRECOMPILED_HEADERS 2025-04-16 21:51:17 +02:00
spectranator
634acab40b Update some Android dependencies and fix build by making boost-process optional (#120)
Based on #119

Co-authored-by: Ramiro <ramiro.depaoli@gmail.com>
Co-authored-by: spectranator <spectranator@y2nlvhmmk5jnsvechppxnbyzmmv3vbl7dvzn6ltwcdbpgxixp3clkgqd.onion>
Reviewed-on: http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu/pulls/120
2025-04-16 19:47:40 +00:00
spectranator
8561b75518 Replaced shasum with perl in Arch Linux package dependency list as shasum doesn't exist anymore 2025-04-13 22:49:56 +00:00
spectranator
15d00322a0 In containerized AppImage build script, actually install all required boost components 2025-04-13 19:53:19 +02:00
spectranator
7bd0bfbb0c Do not attempt to find boost in dynarmic if its target already exists 2025-04-13 17:45:01 +02:00
spectranator
829fad8b66 Updated vcpkg baseline for updated Boost library 2025-04-13 14:59:01 +00:00
spectranator
b539eef054 Updated revert list with previous commit 2025-04-13 16:11:38 +02:00
spectranator
f7849077e1 Removed Git SCM string anonymization as it's proven quite useless and hindering in understanding bug report 2025-04-13 16:10:03 +02:00
spectranator
35f4aa964f Fixed about dialog window being too small for content 2025-04-13 16:01:45 +02:00
spectranator
5b478bdb9c Link against all required Boost components 2025-04-13 13:05:27 +02:00
spectranator
b10bcac0cf Added loose snippets for Windows build on Linux guide 2025-04-13 00:21:17 +00:00
spectranator
cfbaa32d66 Updated minimum Boost version in Linux build guide 2025-04-13 00:14:42 +00:00
spectranator
125f4e2372 Updated vcpkg for updated Boost 2025-04-12 23:27:30 +02:00
spectranator
4e6bf7e82e In containerized AppImage build script allow CPM to be used with Clang 2025-04-12 22:48:09 +02:00
spectranator
76516783d3 Optionally use Clang for containerized AppImage build 2025-04-12 22:33:53 +02:00
spectranator
a426de1c51 Optionally use CPM in containerized AppImage build 2025-04-12 22:12:47 +02:00
spectranator
335570dfd3 In containerized AppImage build use Clang and allow thin/fat LTO for smaller and more optimized AppImages 2025-04-12 21:18:30 +02:00
spectranator
1319089702 Also mention Citron in README 2025-04-12 18:48:29 +02:00
spectranator
a640bbee41 Allow Yuzu to be built using Clang-CL for better compiler optimizations for Windows
Also updates Boost to 1.88.0
2025-04-12 18:46:13 +02:00
spectranator
709f70a3b2 Fix shader compile error if source directory path contains spaces 2025-04-12 12:28:22 +00:00
spectranator
977ed0063a Implemented dependency collection via CPM.cmake 2025-04-12 04:10:29 +02:00
spectranator
7c17d72b1a Restored accidentally removed IRC section in README 2025-04-11 19:10:12 +00:00
spectranator
ff2e94b286 Updated SDL to fix pipewire related compile error 2025-04-11 15:32:53 +02:00
spectranator
5de4fd6c76 Minor fixes around cleanup code in containerized AppImage build script 2025-04-06 22:48:56 +00:00
Zephyron
8f1b45003b service/vi: Improve OpenDisplay validation
Updates the OpenDisplay function in IApplicationDisplayService to properly
validate display names. Instead of only accepting "Default", now validates
against all known valid display names: "Default", "External", "Edid",
"Internal", and "Null".

- Changes log level from WARNING to DEBUG since this is no longer stubbed
- Adds proper validation for all valid display names
- Returns ResultOperationFailed for invalid display names
- Improves logging by including the requested display name
2025-04-06 23:41:57 +02:00
Zephyron
f78b30dbc4 cmake: Optimize Android VVL download logic
Improve the Vulkan Validation Layer (VVL) download logic for Android by checking
for the final library file instead of just the zip archive. This prevents
unnecessary re-downloads and extractions when the library is already in place.

The check now looks for libVkLayer_khronos_validation.so in the final
destination path before attempting to download and extract the archive.
2025-04-06 23:14:29 +02:00
Zephyron
e7e5906892 vulkan: Improve memory allocation robustness
Enhances the Vulkan memory allocator with better OOM handling and memory
alignment:

* Add memory recovery by cleaning up empty allocations before failing
* Implement proper fallback to non-device-local memory
* Simplify memory alignment handling for different vendors
* Add better error logging for allocation failures
* Add IsEmpty() helper to track unused allocations
* Fix alignment requirements for Adreno (4KB) vs other vendors

These changes improve the robustness of memory allocation, particularly
in low-memory situations, and streamline vendor-specific alignment
requirements.
2025-04-06 23:08:13 +02:00
spectranator
1526678a53 Removed "limited development" section from readme
It's not like I want the project to become "super public" again, I just dislike the way that section is written. It mostly still applies.
2025-04-06 22:47:41 +02:00
spectranator
2384d30c2a AppImage runtime scripts rewrite (now functional on Steam Deck!) 2025-04-06 21:32:47 +02:00
spectranator
e52e4ca429 Removed leftover Debian container AppImage build debug code 2025-04-06 20:59:06 +02:00
spectranator
a16e593fa8 Made AppImages way more robust, compatible and reproducible using containerization and by using system-provided glibc 2025-04-06 19:15:22 +02:00
EmulationEnjoyer
f8ae0e4f2a Register ssl:s service to fix game hangs (#109)
Fixes an infinite timeout hanging issue when booting "Xenoblade Chronicles X: Definitive Edition"
(may apply to other titles as well)

>  Service.SM <Info> core\hle\service\sm\sm.cpp:GetServiceImpl:187: Waiting for service ssl:s to become available

ref: 51800e249b

Reviewed-on: http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu/pulls/109
Co-authored-by: EmulationEnjoyer <emulationenjoyer@noreply.localhost>
Co-committed-by: EmulationEnjoyer <emulationenjoyer@noreply.localhost>
2025-04-06 11:52:50 +00:00
spectranator
b23dea24cd Added note about recent infrastructure issues to readme 2025-04-06 13:48:37 +02:00
spectranator
eaa9c9e3a4 Updatd Vulkan Memory Allocator 2025-02-22 17:57:15 +01:00
spectranator
3d24fc2f00 Updated SPIRV and Vulkan externals 2025-02-22 17:52:59 +01:00
deftdawg
6ead429195 Fix: Joycon udev rules not applying due to typo in dist/72-yuzu-input.rules (#106)
Fixes - https://github.com/NixOS/nixpkgs/issues/374238

Without this Joycons are only detectable/usable when running yuzu/torzu as sudo/root (however sound does not work as sudo/root).

Reviewed-on: http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu/pulls/106
Co-authored-by: deftdawg <deftdawg@noreply.localhost>
Co-committed-by: deftdawg <deftdawg@noreply.localhost>
2025-02-04 23:05:52 +00:00
spectranator
914def23f6 Note dead email address in readme 2025-01-22 20:45:33 +00:00
EmulationEnjoyer
3f6a2bac86 Implement HID function stub "SetGestureOutputRanges" (#105)
Add function stub for "SetGestureOutputRanges" in HID service

Fixes userspace panic when booting Donkey Kong Country Returns HD:

> Debug <Critical> core\hle\service\service.cpp:operator ():78: Assertion Failed!
Unknown / unimplemented function '92(<unknown>)': port='hid' cmd_buf={[0]=0x6, [1]=0x8000000C, [2]=0x1, [3]=0x0, [4]=0x4F434653, [5]=0x0, [6]=0x0, [7]=0x0, [8]=0x49434653}
> Service.AM <Info> core\hle\service\am\service\application_functions.cpp:SetTerminateResult:187: (STUBBED) called, result=0x1a80a (2010-0212)
> Debug.Emulated <Critical> core\hle\kernel\svc\svc_exception.cpp:Break:52: Userspace PANIC! info1=0x0000001086D02C4C, info2=0x0000000000000004
> Debug.Emulated <Critical> core\hle\kernel\svc\svc_exception.cpp:operator ():33: debug_buffer_err_code=1A80A
> Debug.Emulated <Critical> core\hle\kernel\svc\svc_exception.cpp:Break:102: Emulated program broke execution! reason=0x0000000000000000, info1=0x0000001086D02C4C, info2=0x0000000000000004

ref: 132077e18f

![](https://i.imgur.com/hbBnlYs.png)

Reviewed-on: http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu/pulls/105
Co-authored-by: EmulationEnjoyer <emulationenjoyer@noreply.localhost>
Co-committed-by: EmulationEnjoyer <emulationenjoyer@noreply.localhost>
2025-01-22 20:42:58 +00:00
Laconix
bc4239dd9f Turn off predictive back gesture to fix hardware back button not working in android 13 or higher 2025-01-10 06:17:51 +00:00
FireBurn
20ac5cd42b Include memory header
This stops build failures for missing std::shared_ptr which is in multiple files

Signed-off-by: FireBurn <mike@fireburn.co.uk>
2025-01-10 06:16:46 +00:00
reg_server
d306ebea30 Linux Build Fixes
- fixed AppImage not accepting arguments (for example -f -g ROM_file to start directly)
- adjusted AppImage build.sh so it can find Qt libs on Fedora (#98)
- perl-Digest-SHA package is needed for shasum on Fedora
- added option do disable linking against LLVM 17 (Steam Deck specific)
- updated build-for-linux.md (Steam Deck specific)
2025-01-03 19:49:07 +01:00
spectranator
02cfee3f18 Remove hard fmt version requirement in main CMakeLists.txt 2024-12-15 17:51:34 +01:00
Zuckerwatte1
86f6184375 Add 12gb DRAM option (#90)
This adds the option to allow the emulator to use 12gb of RAM for something like really big texture packs.

Co-authored-by: smiRaphi <neogt404@gmail.com>
Reviewed-on: http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu/pulls/90
Co-authored-by: Zuckerwatte1 <zuckerwatte1@noreply.localhost>
Co-committed-by: Zuckerwatte1 <zuckerwatte1@noreply.localhost>
2024-12-15 15:14:54 +00:00
spectranator
a04ba7cd1e Mention IRC in readme 2024-11-23 16:49:24 +00:00
EmulationEnjoyer
bb142c9657 shader/recompiler: Revert NVN storage buffer bias range
- Return to original NVN bias values which better cover the full range of storage buffer accesses:
- offset_begin: 0x110 -> 0x100
- offset_end: 0x610 -> 0x700

The wider range ensures we catch all valid storage buffer accesses
while maintaining the same alignment requirements.

ref: 2564e721df
2024-11-15 12:16:49 +00:00
EmulationEnjoyer
266eb0d318 arm: Skip duplicate consecutive addresses in backtrace output
ref: aa56430f2a
2024-11-15 12:16:49 +00:00
EmulationEnjoyer
d231c26e22 chore(HLE): Update HLE API version constants
- Updated Horizon OS version to 19.0.1 and NintendoSDK version to 1.0. Adjusted `VERSION_HASH`, `DISPLAY_VERSION`, and `DISPLAY_TITLE` to match the new firmware versions.

ref: fcb6444037
2024-11-15 12:16:49 +00:00
EmulationEnjoyer
247f61e1f9 perf(VideoCore): Refactor DispatchIndirect
- Added automatic safe or unsafe processing for better emulation accuracy.

ref: 8cae0310e3
2024-11-15 12:16:49 +00:00
EmulationEnjoyer
154aab7c4b feat(shader): implement geometry shader invocation info
- Update EmitInvocationInfo in SPIRV backend to handle geometry shader stage

ref: 1266fad681 (diff-4cbf73a98ed4ad649a4a6f38b569bc31fcf68cf7)
2024-11-15 12:16:49 +00:00
EmulationEnjoyer
56f062ac4d core: Add new error modules to ErrorModule enum
- Add support for homebrew error modules to improve error handling
2024-11-15 12:16:49 +00:00
EmulationEnjoyer
05ccbaa8fa Update src/audio_core/common/feature_support.h
Updated AudioCore Revision from 11 -> 13
2024-11-15 12:16:49 +00:00
EmulationEnjoyer
95ef5431c5 feat: update HLE API version constants to Horizon OS 19.0.0
- Updated Horizon OS version constants from 12.1.0 to 19.0.0.
- Changed the version hash from `76b10c2dab7d3aa73fc162f8dff1655e6a21caf4` to `52971eebbba7ab9e6e23d73753aa63e0c3794b16`.
- Updated `DISPLAY_TITLE` and `DISPLAY_VERSION` to reflect the new firmware version "NintendoSDK Firmware for NX 19.0.0-4.0".
- Incremented Atmosphere release version constants to 1.8.0.

ref: 3276bf8780
2024-11-15 12:16:49 +00:00
anon
066d0e7eaa merge AppImage builder into main repo with revised linux guide (#78)
Tested as working.

It is self-contained with no dependencies, uses relative paths, downloads what it needs on the fly, requires the main repo to already be cloned and built for native linux, so it doesn't need to be a separate repo.

- Copied the `build.sh` file and `assets` folder into a new `AppImageBuilder` folder on the torzu repo root.
- Created a `AppImage-build.sh` shortcut on the repo root that checks if an executable is already in `build/bin`. If it doesn't find one, it prompts the user to build a native version first. If it does find one:
    - enters the `AppImageBuilder` folder
    - runs the command `./build.sh ../build ./torzu.AppImage`, using the correct relative path to the build folder (if they followed the build instructions as directed)
    - moves the resulting `torzu.AppImage` executable back into the main `torzu` folder
    - returns back to the main folder and shows current directory contents
- Added relevant entries to `.gitignore`
- Added AppImage section to linux build guide, with some clarifying explanation for Flatpaks, and section separators

Co-authored-by: anon <anon@no.reply>
Reviewed-on: http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu/pulls/78
Co-authored-by: anon <anon@noreply.localhost>
Co-committed-by: anon <anon@noreply.localhost>
2024-11-15 12:11:25 +00:00
anon
14d40552e5 dma_pusher.cpp: remove now unused variable that breaks the android build (#76)
Completes http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu/pulls/71

Discovered when building android version on debian via command line.

Reviewed-on: http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu/pulls/76
Co-authored-by: anon <anon@noreply.localhost>
Co-committed-by: anon <anon@noreply.localhost>
2024-11-03 12:34:19 +00:00
lui
9efce71072 externals: update fmt to 11.0.2 and vcpkg to 2024.09.30 (#68)
Updated to fmt 11 with the required source changes for it to work.

Also updated vcpkg for this, and as an added benefit it fixes the `Unable to find a valid Visual Studio instance` error, and the VS 2019 build tools are no longer required. Just make sure to delete the existing downloaded vcpkg tool and binaries in `externals/vcpkg` if you have compiled before, or else it will continue to use the old version and give the error.

Reviewed-on: http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu/pulls/68
Co-authored-by: lui <lui@vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion>
Co-committed-by: lui <lui@vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion>
2024-11-03 12:25:47 +00:00
anon
5de1cb53bb update-build-guides (#65)
Windows

- added summary Overview section for MSVC
- consolidated Visual Studio settings screens for C++ etc at the beginning (instead of providing them in the CMake GUI steps if they get an error)
- added notes to dependencies, to add them to Windows PATH if they ask for it
- moved the MSVC command line section (from the very bottom of the page under the Clion section), to between "dependency installation" and the "GUI method of building"
    - prioritizing MSVC command line over GUI since it's much shorter and easier if all dependencies are installed correctly
- moved/duplicated contents of MSVC "Clone with Git" section into both the "MSVC command line" and "MSVC GUI" sections, so all steps are together for each and not split up
- changed some header sizes for better separation
- added a large separator bar area between MSVC, MinGW and CLion sections, and smaller separator bar areas between the three main sections of MSVC for readability
- added a specific repo-to-use note to the Clion cloning section
- corrected repo urls

Linux/Debian

- added flatpak build section at the top, labeled the existing as native builds
- added qttools5-dev and libva-dev to dependency cut and paste (were needed to compile on Debian)
- corrected repo url

MacOS

- removed redundant to-do items
- corrected repo url

Android

- corrected repo url

Reviewed-on: http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu/pulls/65
Co-authored-by: anon <anon@noreply.localhost>
Co-committed-by: anon <anon@noreply.localhost>
2024-10-26 16:11:23 +00:00
cow
85dc40ad23 kepler_compute: use safe memory read
If unsafe read is done there can sometimes be corrupt data in the
KeplerCompute::ProcessLaunch qmd structure.

Fixes GPU crashes in 'Princess Peach: Showtime!' when using vulkan
renderer. Requires using "Accuracy Level High" (crashes will still
happen if using "Normal").

Tested on Radeon 6750XT, Linux 6.11.2, Mesa 24.2.5 (RADV driver).

Unsafe read was introduced in 115792158d
"VideoCore: Implement DispatchIndirect"

How did I debug this:
- Used VK_LAYER_KHRONOS_validation which found invalid vkCmdDispatch
  (along with a lot of other noise!)
- Instrumented all calls to vulkan Dispatch(), set breakpoint when
  grid_dim_x > 1024 (an obviously invalid value). Found dispatch came
  from RasterizerVulkan::DispatchCompute().
- Commented out DispatchCompute() entirely, game runs with no crashes
  but some graphics effects are missing.
- Keep going one layer up, observe corrupted `launch_description` in
  KeplerCompute::ProcessLaunch()
- Attempted safe ReadBlock (`which = VideoCommon::CacheType::All`)
  instead of ReadBlockUnsafe in KeplerCompute::ProcessLaunch(), did not
  help
- Go one layer up to DmaPusher. Switch to safe_process(). No more
  corrupt `launch_description`.
2024-10-22 17:48:59 +00:00
spectranator
f45341ef55 Readme: Moved "Move away from Codeberg" section further down 2024-10-22 17:41:12 +00:00
anon
4259889895 Remove "/DEBUG" flag from CMAKE_EXE_LINKER_FLAGS_RELEASE
lol, has the emulator been running in a slower debug mode, even in release builds, ever since it was yuzu? This has been there since 4176. I was wondering why *.pdb debugging files still get generated.
2024-10-13 04:29:29 +00:00
lui
a9b7cae667 capitalize 'Open Current Mirror Repo' to match other menu options 2024-10-12 23:35:58 +00:00
lui
6d2368b07b configuration: break up tooltip for 'VRAM Usage Mode' into multiple lines 2024-10-12 23:35:58 +00:00
lui
f52a2c5d99 configuration: increase default height of per-game configuration window 2024-10-12 23:35:58 +00:00
lui
11cd91ea01 configure_graphics: use stylesheet for background button color
Keeps things consistent with the color picker from d6ca4f11c1 and joycon color picker buttons
2024-10-12 23:35:58 +00:00
spectranator
783e8952e0 Display linker messages in mode STATUS to be consistent 2024-10-12 23:22:31 +00:00
spectranator
15470284cf Readded some missing steps to MinGW-w64 build guide 2024-10-04 16:13:08 +00:00
spectranator
a41691dbbb Updated MinGW64 (MSYS2) build guide (#59) 2024-10-04 16:06:55 +00:00
lui
1a0d98f984 renderer: add area sampling scaling method (#57)
Adds Area Sampling to the list of scaling options. Works well to achieve a high-quality, smooth super-sampling effect. Dolphin has had this for a while, and now Ryujinx has recently added it too, so I decided to port it.

Not sure if adding the extra uniform to the OpenGL WindowAdaptPass was a good idea or not, or if using the push constants under Vulkan was either, but I wasn't sure about the best way to get the window size for use in the shader, and other scaling methods still work fine. Implementation seems to work fine under both Vulkan and OpenGL, but might still need some minor tweaks to the shader. Should definitely do some testing before merging, I have tested on an Nvidia RTX 3080 under Windows.

Adapted from these two PRs:
https://github.com/Ryujinx/Ryujinx/pull/7304
https://github.com/dolphin-emu/dolphin/pull/11999

Reviewed-on: http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu/pulls/57
Co-authored-by: lui <lui@vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion>
Co-committed-by: lui <lui@vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion>
2024-10-03 13:25:58 +00:00
spectranator
eefc75732f ALL development is happening on dark git now :-) 2024-10-03 13:06:37 +00:00
lui
d6ca4f11c1 profile_manager: Implement firmware avatar selector (#56)
Adds an option to set a user's profile image from the avatars in the firmware. Background color can be changed with a color picker. Also modifies profile image saving to account for this, and as a result images are now saved as JPEG with 100% quality. Any PNG, JPEG, or BMP can now also be used in the image file picker instead of just JPEG.

Also of note: I am not a C/C++ developer so please let me know if anything should be changed. Used ryujinx's implementation and other parts of the yuzu codebase for reference.

Reviewed-on: http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu/pulls/56
Co-authored-by: lui <lui@vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion>
Co-committed-by: lui <lui@vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion>
2024-10-03 12:50:46 +00:00
echosys
ab4c093976 Fix Android crash caused by incorrect type in progress dialog callbacks (#58)
Bug discovered via an incomplete fix in Sudachi.

Some Progress Dialog callbacks pass the wrong type (Double instead of Long) from C++ to Java code causing a crash at runtime.
To fix this a new function is implemented to convert to a Java Long and that is used instead of the function that converts to a Double.

Reviewed-on: http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu/pulls/58
Co-authored-by: echosys <echosys@noreply.localhost>
Co-committed-by: echosys <echosys@noreply.localhost>
2024-10-03 12:08:28 +00:00
echosys
ec2e6dfdac Add turnip driver build guide (#54)
Adds a section on building an installable turnip driver package to the android build documentation.

Currently set to WIP because I would like to get some feedback and possibly improve the guide before merging.

Reviewed-on: http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu/pulls/54
Co-authored-by: echosys <echosys@noreply.localhost>
Co-committed-by: echosys <echosys@noreply.localhost>
2024-09-25 17:21:42 +00:00
spectranator
7b143fb07e Added new Blog article (2: Puzzle Pieces) 2024-09-06 11:07:14 +00:00
spectranator
6e61673959 Updated README.md to reflect current state 2024-09-01 04:16:59 +02:00
echosys
ee37c4989c Readme paths and icon fix (#53)
Changes the links in the README to be relative so it should work on any mirrors.
Also converts the uncompressed bmp icon to a compressed png one (this improves loading times, especially over tor).

You could also use the svg for an even smaller file, but that seems to be missing the black rings that are part of the logo.

Reviewed-on: http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu/pulls/53
Co-authored-by: echosys <echosys@noreply.localhost>
Co-committed-by: echosys <echosys@noreply.localhost>
2024-09-01 01:49:31 +00:00
echosys
e157415bd9 Update Android app dependencies (#52)
Update the dependencies of the Android app (used libraries and SDK). The Android SDK was not updated to the latest version, because then the build fails.

The `gradle-wrapper.jar` (the only binary blob touched in this PR) can be verified by checking against the official checksums [here](gradle-wrapper.jar).

Co-authored-by: spectranator <spectranator@vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion>
Reviewed-on: http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu/pulls/52
Co-authored-by: echosys <echosys@noreply.localhost>
Co-committed-by: echosys <echosys@noreply.localhost>
2024-08-24 16:53:35 +00:00
spectranator
8eea774401 Updated notes regarding mirror repository 2024-08-24 15:11:46 +02:00
spectranator
3785f2a2c8 Added reverts.txt for list of commits to revert to get specific features back in the future (#30)
Your opinion? Any commits I should add?

Reviewed-on: http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu/pulls/30
2024-08-24 11:35:37 +00:00
echosys
587825f60a Fix x86_64 build for Android (#49)
Fixes x86_64 builds for Android by stubbing a function that calls into libadrenotools to query GPU driver information. libadrenotools is only available for arm64.
The function should not be called anyways, as the menu that would display the information is disabled on unsupported devices.

To enable x86_64 for building change the line `abiFilters += listOf("arm64-v8a")` in `src/android/app/build.gradle.kts` to `abiFilters += listOf("arm64-v8a", "x86_64")`.
I did not do this by default as it significantly increases the build time (the native part needs to be build once for each architecture) and increases the app size (this is less of a concern as games are already significantly larger).
It might allow usage on Chromebooks (the internet tells me those run on x86_64) and some few Android devices. The main advantage I see is for development of the app itself, as it allows running it in waydroid for local testing.

Reviewed-on: http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu/pulls/49
Co-authored-by: echosys <echosys@noreply.localhost>
Co-committed-by: echosys <echosys@noreply.localhost>
2024-08-11 12:11:13 +00:00
anon
0719273fed Reorder configuration tabs (#32)
Co-authored-by: spectranator <spectranator@vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion>
Reviewed-on: http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu/pulls/32
Co-authored-by: anon <anon@noreply.localhost>
Co-committed-by: anon <anon@noreply.localhost>
2024-08-10 13:28:05 +00:00
rancidtowpath
60a8bf844f Update build-for-windows.md (#45)
Updated and added some images. Added additional info about required MSVC components for Cmake configuration and where to find Torzu executable after build completed.

Reviewed-on: http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu/pulls/45
Co-authored-by: rancidtowpath <rancidtowpath@noreply.localhost>
Co-committed-by: rancidtowpath <rancidtowpath@noreply.localhost>
2024-08-10 12:54:53 +00:00
echosys
cd40133aa4 Be more explicit on struct init (#46)
Older versions of gcc (gcc-11 which is used in the build guide) seem to struggle with these two struct initializations (if I understand this correctly it is using "designated initialization" which is new in C++20) leading to compile errors (see #42).
This replaces those two initializations with a more explicit one that also compiles on gcc-11.

Reviewed-on: http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu/pulls/46
Co-authored-by: echosys <echosys@noreply.localhost>
Co-committed-by: echosys <echosys@noreply.localhost>
2024-08-10 12:53:04 +00:00
rancidtowpath
1b51d49e16 Update build-for-windows.md (#39)
Added Python as minimal dependency for first building method.
By following building steps without Python installed, I got same error as mentioned in #36.
After Python installed, issue was gone and Cmake config and generate was successful.

Reviewed-on: http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu/pulls/39
Co-authored-by: rancidtowpath <rancidtowpath@noreply.localhost>
Co-committed-by: rancidtowpath <rancidtowpath@noreply.localhost>
2024-07-31 10:35:13 +00:00
anon
c8997e4ab5 Remove elements for removed buttons in web config (#31)
Reviewed-on: http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu/pulls/31
Co-authored-by: anon <anon@noreply.localhost>
Co-committed-by: anon <anon@noreply.localhost>
2024-07-26 22:15:01 +00:00
spectranator
456612d272 Update documentation for Android 2024-07-26 18:21:41 +02:00
anon
f38060714a Better text spacing in about dialog (partial #22) 2024-07-26 17:51:02 +02:00
spectranator
c92b9f9024 Automatically generate token (#22/#28)
Co-authored-by: anon <anon@noreply.localhost>
Co-authored-by: spectranator <spectranator@y2nlvhmmk5jnsvechppxnbyzmmv3vbl7dvzn6ltwcdbpgxixp3clkgqd.onion>
Reviewed-on: http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu/pulls/22
Reviewed-on: http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu/pulls/28
2024-07-26 17:40:08 +02:00
anon
a1c2940b31 option to skip compiling the -cmd executable (#26)
There's already a `-DYUZU_ROOM` flag that can be set to OFF to skip compiling that executable.

This adds a `-DYUZU_CMD` flag that is ON by default, but can be set to OFF to also skip compiling the yuzu-cmd executable.

Setting both to OFF saves **_a lot_** of compiling time if you don't ever use either the yuzu-room or yuzu-cmd exes.

Reviewed-on: http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu/pulls/26
Co-authored-by: anon <anon@noreply.localhost>
Co-committed-by: anon <anon@noreply.localhost>
2024-07-24 23:24:18 +00:00
echosys
a41955cc58 Remove early access Android app variant (#27)
Removes the early access Android app variant from the build config and removes the get early access button from the settings tab.

I also tried to remove the code for the variant (different logo + colors) and the code for the button, but I am no Android developer so I might have missed some stuff.
Additionally I did not touch the translation files.

Essentially this gets rid of the now useless fancy button and improves build times as it only needs to build one apk now.

Reviewed-on: http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu/pulls/27

Spec's note:
Whatever there's left can still be removed at a later point.
Co-authored-by: echosys <echosys@noreply.localhost>
Co-committed-by: echosys <echosys@noreply.localhost>
2024-07-24 23:05:03 +00:00
anon
ede46f9bd2 correct URLs for build guides (#21)
Reviewed-on: http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu/pulls/21
Co-authored-by: anon <anon@noreply.localhost>
Co-committed-by: anon <anon@noreply.localhost>
2024-07-20 20:34:08 +00:00
spectranator
f615bac08e FAQ: Mention Reddit issues 2024-07-19 19:48:00 +00:00
spectranator
00ac6ff600 FAQ: Added notes about Android builds and mention the work of contributors in general (not just me) 2024-07-19 19:40:39 +00:00
anon
b5e4a009b4 add build guides (#16)
Reviewed-on: http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu/pulls/16
Co-authored-by: anon <anon@noreply.localhost>
Co-committed-by: anon <anon@noreply.localhost>
2024-07-19 19:22:35 +00:00
anon
8935e96db9 re-enable translations for GUI (#11)
Reviewed-on: http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu/pulls/11
Co-authored-by: anon <anon@noreply.localhost>
Co-committed-by: anon <anon@noreply.localhost>
2024-07-19 19:17:42 +00:00
echosys
7e27e6476d Add option to only optimize SPIRV during load (#13)
Adds a new option "On Load" to the "Optimize SPIRV output" option that turns on optimizations during the loading of the shader cache from disk, but turns it off after that.
The previous checkbox states have been named "Never" for unchecked and "Always" for checked.

The idea is that once the shader cache has most of the shaders in a game cached they can be optimized during initial game startup (where a performance hit matters less) and the few shaders that get compiled during runtime are not optimized to reduce performance hits.

Most of the commit is adding the setting to the Android app, the main logic is in the `gl_shader_cache.cpp` and `vk_pipeline_cache.cpp` files.

Reviewed-on: http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu/pulls/13
Co-authored-by: echosys <echosys@noreply.localhost>
Co-committed-by: echosys <echosys@noreply.localhost>
2024-07-19 19:14:19 +00:00
spectranator
224ec03070 Added note about fake websites to README 2024-07-11 22:26:03 +00:00
anon
32b2991a53 Update README.md for logo location (#8)
Reviewed-on: http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu/pulls/8
Co-authored-by: anon <anon@noreply.localhost>
Co-committed-by: anon <anon@noreply.localhost>
2024-07-11 22:15:04 +00:00
spectranator
238c5e33dd Updated README for new mirror repository 2024-07-11 23:44:48 +02:00
spectranator
e3ea6f2059 Revert "Added abgr8 srgb to d24s8 conversion shader"
This reverts commit e8f43b7078.
2024-07-06 22:39:54 +02:00
mateomaui
93c9c33b9f revert changes introduced in EA3835 to audio sink auto-select, fixing stuttering in Diablo 3, etc (#3)
Reverts most of this commit (but not all, some parts are still needed, or were reverted already in later EAs): 39c8ddcda2 or 39c8ddcda2

Above commit to the audio sink was first included in EA-3835, changing the way an audio engine is auto-selected by lowest latency... but still doesn't work very well, often using cubeb when it should use SDL.

A side effect of this was that microstuttering was introduced in a few titles. In Diablo 3, the main player character appears to teleport forward a few steps, every couple of steps. It's a consistent, constant stutter when simply walking forward. Occurs for both SDL and cubeb, with cubeb noticeably worse.

3834 and 3833 didn't have this issue with SDL, and the commit above was the bulk of the changes for 3835. Reverting those changes back to the 3833 version has fixed the stutter (for me at least) in D3 as long as SDL is selected (cubeb still stutters). The only observed negative is the audio engine may need to be manually selected in global settings instead of using auto.

Also seems to have fixed intermittent microstutters in TOTK and RDR. Unaware of other titles this may fix, or possibly create a problem for (though creating issues probably is not likely.)
2024-07-06 20:38:09 +00:00
Jarrod Norwell
e8f43b7078 Added abgr8 srgb to d24s8 conversion shader 2024-07-06 20:38:09 +00:00
spectranator
fb0ec55198 Note added to README about DEFINITELY incoming DMCA takedown 2024-07-06 22:31:49 +02:00
spectranator
a9f6342ea4 Added ILibraryAppletSelfAccessor::UnpopInData stub 2024-06-30 17:55:17 +02:00
spectranator
b1895cf7ae Changed some outdated statements in README 2024-06-30 17:41:41 +02:00
Reg Tiangha
c432641245 MacOS: Fix Debugger namespace naming confilct 2024-06-30 15:18:24 +00:00
Reg Tiangha
ccd735ec8a hardware_composer.cpp: Add missing includes 2024-06-30 15:18:24 +00:00
spectranator
f064967e32 Fixed multiplayer lobby list (thanks to anonymous contributor!) 2024-06-30 17:14:51 +02:00
spectranator
39af5e51ff Revert "Removed web service reminiscents" in preparation to fix multiplayer lobby list
This reverts commit ffc907460f.
2024-06-30 16:54:56 +02:00
spectranator
cc81504195 Added note about main repo having open issues again 2024-06-30 16:50:56 +02:00
spectranator
3635a7a322 Decreased urgency of possible pending mirror takedown message as nothing has happened within a week 2024-06-30 16:24:35 +02:00
spectranator
4208203ea4 Possible pending Github takedown 2024-06-23 23:43:15 +02:00
spectranator
a7d7aa0a5b Updated ffmpeg submodule 2024-06-19 21:09:54 +02:00
spectranator
4afc305458 Added note about pull requests to README 2024-06-16 15:07:47 +02:00
mateomaui
1e8ea3af21
Remove MSVC compiler version upper limit for QT and SDL to allow compiling with latest version of Visual Studio (#21)
* Update CMakeLists.txt

Commented out the upper limit of 1940 for the MSVC version for  QT and SDL. The current version of the MSVC compiler is 19.40.XXXX, so it needs to be "LESS 1941" or higher to work now.

* removed explanatory comments for less clutter
2024-06-16 05:55:11 -07:00
mateomaui
35fe455e5c
Replace URLs for precompiled windows binaries 2024-06-11 08:13:25 -07:00
spectranator
002d0559f2 Updated onion site links 2024-06-10 19:41:41 +02:00
litucks
3319522789
Update README.md 2024-06-10 13:39:40 +00:00
Spectranator
fa84e4a2a4 Created first blog entry 2024-06-02 11:01:28 +00:00
Spectranator
252b2b11af Uploaded my PGP public key
You can use this public key to verify an e-mail has actually been sent by me or to encrypt messages

Signed-off-by: Spectranator <spectranator@noreply.localhost>
2024-06-01 14:05:11 +00:00
Jarrod Norwell
66ae161cf8 Stubbed QueryLastPlayTime 2024-06-01 15:22:10 +02:00
spectranator
63ea3f52f3 Mention Suyu and Sudachi in changes list 2024-05-31 15:25:30 +02:00
spectranator
e339153ede Updated Vulkan stuff for bug fixes and improved hardware compatibility (#21)
Fixes TOTK crashes on Steam Deck and potentially VRAM leak issues

Reviewed-on: http://y2nlvhmmk5jnsvechppxnbyzmmv3vbl7dvzn6ltwcdbpgxixp3clkgqd.onion/torzu-emu/torzu/pulls/21
2024-05-31 15:17:47 +02:00
spectranator
910ffe7c10 Ran clang-format 2024-05-31 10:19:41 +02:00
Jarrod Norwell
01d9c403f2 Added HDCP authentication state event and stubs 2024-05-31 10:02:07 +02:00
Jarrod Norwell
009aa57f4a Implemented LogicOp fix 2024-05-31 09:53:22 +02:00
Jarrod Norwell
ab9cdab883 Added ISslConnection::{Get,Set}NextAlpnProto stubs 2024-05-31 09:40:20 +02:00
Jarrod Norwell
3ade835323 Added missing error codes and increased audio renderer revision (fixes Animal Well) 2024-05-31 09:21:21 +02:00
spectranator
505dbf93d0 Changed precompiled binary download path own fork from yuzu-mirror
Nintendo will not be able to take these repositories down anyways, they'd have to get my whole Github account banned for that
2024-05-29 08:27:33 +02:00
spectranator
316f96eafe Added introductory blog post (welcome to the blog!) 2024-05-27 20:59:13 +02:00
spectranator
94c7db25e6 Moved fmt external out of dynarmic and updated fmt to 10.2.1 2024-05-19 16:06:56 +02:00
spectranator
a96e97ea13 Simplified CoreTiming::GetClockTicks() 2024-05-19 15:39:21 +02:00
spectranator
74df9ec3a7 Next mirror will most likely be set up on Bitbucket, NOT GitLab
This is because I do not seem to be able to register anonymously on GitLab :-/
2024-05-19 15:05:00 +02:00
spectranator
2184968eb4 Applied clang-format 2024-05-13 23:11:32 +02:00
spectranator
ffc907460f Removed web service reminiscents
This will be undone (except for the analytics part) once a good reimplementation is available. I will include a configuration value for the server to use.
2024-05-13 23:03:36 +02:00
spectranator
e966068fea Update README: Windows bullds now available in releases section 2024-05-10 03:44:35 +02:00
spectranator
fad5984210 Added FAQ document 2024-05-08 23:35:57 +02:00
lol
e96b877ee2 fix qlaunch on firmware 18 (from Suyu 70c52a1914) 2024-05-08 20:55:18 +02:00
spectranator
377c9bc831 Implemented safer and faster way to get current mirror URL 2024-05-08 17:47:00 +02:00
spectranator
ef6fc3e26a Updated README.md: Removed Windows build off goals list as it is done 2024-05-08 15:29:51 +02:00
spectranator
bef55d43a5 Removed old menu entries for pages that don't exist anymore 2024-05-08 14:30:57 +02:00
spectranator
08f47542e8 Added menu option to locate current mirror repository 2024-05-08 14:16:40 +02:00
spectranator
cdcbfdc837 Removed leftover submodule path externals/boost-headers 2024-05-08 13:23:45 +02:00
spectranator
036a7edb2c Removed custom fibers implementation due to issues caused on Windows
Looks like the Windows ATL doesn't play along well at all. What a bummer.
2024-05-08 07:58:20 +02:00
spectranator
1df1841ad1 Disabled problematic MSVC warning-to-errors 2024-05-07 18:57:50 +02:00
darktux
5097c6a0b9 Updated README: Building for Windows is now possible 2024-05-07 16:26:38 +02:00
darktux
4821698cd8 Mention analytics and authentication code removal in README 2024-05-07 16:18:03 +02:00
spectranator
4ebd9dc2b5 Readd MSWSOCK_LIBRARY for MINGW 2024-05-06 23:30:50 +02:00
spectranator
12ccc468f4 Download precompiled Windows blobs from yuzu-mirror 2024-05-06 21:54:38 +02:00
spectranator
82fce02827 Do not build SPIRV-Tools executables 2024-05-06 21:04:31 +02:00
darktux
bddfb77343 Added words about project goals to README 2024-05-06 07:28:15 +02:00
darktux
f7f1114ec1 Don't use SVG in README because of rendering issue 2024-05-06 07:03:03 +02:00
darktux
c1449cca64 Changed misleading header statememt regarding Citra developers 2024-05-06 07:01:28 +02:00
spectranator
b242ac022c Fixed controller UI being cut off at the bottom 2024-05-06 01:12:46 +02:00
spectranator
37e53d50bb Clarified recompiler work in README 2024-05-06 00:47:02 +02:00
spectranator
b6e8e04533 Fixed SVG logo rendering black on certain renderers 2024-05-06 00:38:49 +02:00
spectranator
f890dbb064 Mention next mirror location in README 2024-05-06 00:33:52 +02:00
spectranator
f05ffb6b05 Added changelog to README 2024-05-06 00:32:53 +02:00
spectranator
934d816fd6 Changed about dialog and main window titles 2024-04-29 00:17:17 +02:00
spectranator
e49ac15049 Updated logo and name in preparation for flatpak 2024-04-28 23:23:39 +02:00
spectranator
2ad113f22c Added option to synchronize core tick speed to max speed percentage 2024-04-27 15:02:53 +02:00
spectranator
d37c170663 Added note about paused development for recompiler work 2024-04-22 12:33:33 +02:00
Jarrod Norwell
e0e2a4c0c5 Rewrote mm:u to follow switchbrew.org documentation 2024-04-20 10:52:25 +02:00
Spectranator
178db2388c Added new logo to README.md 2024-04-12 13:53:53 +00:00
spectranator
42075072c6 Added new icons 2024-04-12 15:48:51 +02:00
Spectranator
ad1d17405b Make it clear that Windows, Android and macOS are unsupported for now 2024-04-12 13:13:28 +00:00
spectranator
fc87c76263 Updated repository URL 2024-04-12 14:14:56 +02:00
darktux
47e20e1ae6 Fixed potential null-dereference in Fiber::DestroyThreadFiber() 2024-04-11 18:37:31 +02:00
darktux
ca068f6df2 Fixed non-external SPIRV-Tools linkage 2024-04-11 18:34:14 +02:00
darktux
fac1dbc7e6 Optionally optimize generated SPIRV with spirv-opt (#10)
Reviewed-on: http://y2nlvhmmk5jnsvechppxnbyzmmv3vbl7dvzn6ltwcdbpgxixp3clkgqd.onion/darktux/torzu/pulls/10
Co-authored-by: darktux <darktux@y2nlvhmmk5jnsvechppxnbyzmmv3vbl7dvzn6ltwcdbpgxixp3clkgqd.onion>
Co-committed-by: darktux <darktux@y2nlvhmmk5jnsvechppxnbyzmmv3vbl7dvzn6ltwcdbpgxixp3clkgqd.onion>
2024-04-10 22:04:09 +00:00
darktux
69dd658a0b 18.0.0 firmware changes from Suyu (plus formatting fixes) (#8)
This commit rolls in changes required for 18.0.0 firmware from Suyus codebase plus some formatting fixes.

Co-authored-by: Exverge <exverge@exverge.xyz>
Reviewed-on: http://y2nlvhmmk5jnsvechppxnbyzmmv3vbl7dvzn6ltwcdbpgxixp3clkgqd.onion/darktux/torzu/pulls/8
Co-authored-by: darktux <darktux@y2nlvhmmk5jnsvechppxnbyzmmv3vbl7dvzn6ltwcdbpgxixp3clkgqd.onion>
Co-committed-by: darktux <darktux@y2nlvhmmk5jnsvechppxnbyzmmv3vbl7dvzn6ltwcdbpgxixp3clkgqd.onion>
2024-04-10 11:19:34 +00:00
darktux
dfa2204aa2 Fixed crash when changing per-game backend from null 2024-04-08 01:48:22 +02:00
darktux
53ad973d6a Removed Fiber::YieldTo debug round counter 2024-04-08 00:40:46 +02:00
darktux
00dd7295a3 Improve SPIRV-Headers loading behavior 2024-04-08 00:30:51 +02:00
darktux
68ced8ab4f Disabled MCO_USE_VMEM_ALLOCATOR because standard stack size seems to suffice 2024-04-06 01:18:21 +02:00
darktux
69a4d26b1e Add SR_WScaleFactorXY/SR_WScaleFactorZ stubs for Prince of Persia (#5)
Pulled in and cleaned up from Sudachi

Reviewed-on: http://y2nlvhmmk5jnsvechppxnbyzmmv3vbl7dvzn6ltwcdbpgxixp3clkgqd.onion/darktux/torzu/pulls/5
Co-authored-by: darktux <darktux@y2nlvhmmk5jnsvechppxnbyzmmv3vbl7dvzn6ltwcdbpgxixp3clkgqd.onion>
Co-committed-by: darktux <darktux@y2nlvhmmk5jnsvechppxnbyzmmv3vbl7dvzn6ltwcdbpgxixp3clkgqd.onion>
2024-04-05 23:04:37 +00:00
darktux
5bc8aaa78b Mention GitHub mirror repository in README 2024-04-05 09:34:47 +02:00
darktux
56505be4c5 Link to Suyu and Sudachi in README 2024-04-05 09:26:54 +02:00
darktux
964b66bb00 Do not use --recursive twice in clone example in README 2024-04-05 09:21:26 +02:00
darktux
d02da8726d Remove accidental use of standard format instead of libfmt format 2024-04-05 01:58:30 +02:00
darktux
487089ecaa Reverted recent tzdb_to_nx update 2024-04-05 01:58:30 +02:00
darktux
c5fe645224 Added v18.0.0 stubs and updated tzdb_to_nx 2024-04-05 01:58:30 +02:00
darktux
85baaf0ab1 Vulkan validation error fix.
Different image usage flags between image creation and image view
creation.
2024-04-05 01:58:30 +02:00
darktux
566ba0cb2b Save memory by using dyamic stack size in Fiber 2024-04-05 01:58:30 +02:00
darktux
30da7e61a4 Fix NROs crashing and loading infinitely (#3)
Commit from Suyu, looks like Yuzu devs forgot to initialize memory here.

Comment from darktux: I've changed the use of memset to std::fill.

Co-authored-by: Belal Ashraf <nullequal@noreply.localhost>
Reviewed-on: http://y2nlvhmmk5jnsvechppxnbyzmmv3vbl7dvzn6ltwcdbpgxixp3clkgqd.onion/darktux/torzu/pulls/3
Co-authored-by: darktux <darktux@y2nlvhmmk5jnsvechppxnbyzmmv3vbl7dvzn6ltwcdbpgxixp3clkgqd.onion>
Co-committed-by: darktux <darktux@y2nlvhmmk5jnsvechppxnbyzmmv3vbl7dvzn6ltwcdbpgxixp3clkgqd.onion>
2024-04-05 01:58:30 +02:00
darktux
22acf85d05 Fix GCC builds with Debug build type
When compiling with -DCMAKE_BUILD_TYPE=Debug, GCC would (correctly) fail to
compile intrinsics in stb and host1x due to lack of optimizations.

Sadly, the compilation error given is bogus and Clang completing the builds
without issues does raise some eyebrows.

Therefore, force optimizations for the offending files under GCC when
creating Debug builds.

Signed-off-by: voidanix <voidanix@keyedlimepie.org>
2024-04-05 01:58:30 +02:00
darktux
2c213a4002 Searching for Vulkan before QT6, so it doesn't messes with Vulkan. 2024-04-05 01:58:30 +02:00
darktux
8bfdd8f9ae Solves warning about GuestMemory having internal linkage.
It is very hard to explain why this public interface class was defined
in an anonymous namespace inside a header file.
2024-04-05 01:58:30 +02:00
darktux
5fdce35a27 Added support for Princess Peach: Showtime! 2024-04-05 01:58:30 +02:00
darktux
a884e168ac Improve upon last commit 2024-04-05 01:58:30 +02:00
darktux
ad1970bd05 Add comment on how to clone repo 2024-04-05 01:58:30 +02:00
darktux
fdd57f3615 Fixed formatting in new stubs ported from Suyu 2024-04-05 01:58:30 +02:00
darktux
1c88616a03 Updated copyright headers 2024-04-05 01:58:30 +02:00
darktux
67e139edba Ported some stubs from Suyu (2ba2db7795) 2024-04-05 01:58:30 +02:00
darktux
40824a903d Fixed minicoro.h formatting 2024-04-05 01:58:30 +02:00
darktux
7e44e3d471 Implemented a more correct version of ISfServiceMonitor::GetGroupInfo 2024-04-05 01:58:30 +02:00
darktux
603702b64d Radeon gpu profiler detection support 2024-04-05 01:58:30 +02:00
darktux
f2592ff593 clang-formated new fiber.cpp and minicoro.h 2024-04-05 01:58:30 +02:00
darktux
b07b266b87 Implemented rewindless Fiber without Boost (using minicoro) 2024-04-05 01:58:30 +02:00
darktux
3857ff1aa8 Removed telemetry and anonymized SCM (git) strings 2024-04-05 01:58:30 +02:00
darktux
d0ef57274a Return correct amount of values from IFriendService::GetReceivedFriendRequestCount 2024-04-05 01:58:30 +02:00
darktux
30bd90424f Actually return 0 in IFriendService::GetReceivedFriendRequestCount 2024-04-05 01:58:30 +02:00
darktux
268ee291a1 Fixed minor issues from previous PR related to buffers and a typo in npns 2024-04-05 01:58:30 +02:00
darktux
d75906a3e2 Implemented IFriendService::GetUserPresenceView stub to get QLaunch friends list running 2024-04-05 01:58:30 +02:00
darktux
0cb34b7bc3 Always report command ID in log and implement LoadUserSetting stub 2024-04-05 01:58:30 +02:00
darktux
a5a11e03a1 Disable "Open Home Menu" action as appropriate 2024-04-05 01:58:30 +02:00
darktux
4c25cbae7b fix for amd video playback (green videos) 2024-04-05 01:58:29 +02:00
darktux
fc18b71a20 Port changes from Early Access 2024-04-05 01:58:29 +02:00
darktux
11b815703f Android: Add ability to run Qlaunch 2024-04-05 01:58:29 +02:00
darktux
9e5df3461f Implement option to start QLaunch from Tools menu 2024-04-05 01:58:29 +02:00
darktux
372918fe0f Replaced API URL 2024-04-05 01:58:29 +02:00
darktux
920e2504c3 Downgraded mbedtls and updated for latest dynarmic 2024-04-05 01:58:29 +02:00
darktux
9bb9b8b30b Fixed configurarion without SIRIT_USE_SYSTEM_SPIRV_HEADERS set 2024-04-05 01:58:29 +02:00
darktux
c456568564 Deleted contact links from issue templates 2024-04-05 01:58:28 +02:00
darktux
19158e468e Deleted workflows and funding 2024-04-05 01:58:28 +02:00
darktux
c60f13169a Updated README to reflect current state of things 2024-04-05 01:58:28 +02:00
darktux
56b06200e9 Deleted all CI scripts (rework planned) 2024-04-05 01:58:28 +02:00
darktux
9b991208cd Added submodule contents into tree 2024-04-05 01:58:27 +02:00
darktux
01a752555c Removed bad submodules 2024-04-05 01:58:27 +02:00
4567 changed files with 1410545 additions and 10031 deletions

View file

@ -1,29 +0,0 @@
#!/bin/bash -ex
# SPDX-FileCopyrightText: 2023 yuzu Emulator Project
# SPDX-License-Identifier: GPL-3.0-or-later
export NDK_CCACHE="$(which ccache)"
ccache -s
BUILD_FLAVOR="mainline"
BUILD_TYPE="release"
if [ "${GITHUB_REPOSITORY}" == "yuzu-emu/yuzu" ]; then
BUILD_TYPE="relWithDebInfo"
fi
if [ ! -z "${ANDROID_KEYSTORE_B64}" ]; then
export ANDROID_KEYSTORE_FILE="${GITHUB_WORKSPACE}/ks.jks"
base64 --decode <<< "${ANDROID_KEYSTORE_B64}" > "${ANDROID_KEYSTORE_FILE}"
fi
cd src/android
chmod +x ./gradlew
./gradlew "assemble${BUILD_FLAVOR}${BUILD_TYPE}" "bundle${BUILD_FLAVOR}${BUILD_TYPE}"
ccache -s
if [ ! -z "${ANDROID_KEYSTORE_B64}" ]; then
rm "${ANDROID_KEYSTORE_FILE}"
fi

View file

@ -1,21 +0,0 @@
#!/bin/bash -ex
# SPDX-FileCopyrightText: 2024 yuzu Emulator Project
# SPDX-License-Identifier: GPL-3.0-or-later
export NDK_CCACHE="$(which ccache)"
ccache -s
export ANDROID_KEYSTORE_FILE="${GITHUB_WORKSPACE}/ks.jks"
base64 --decode <<< "${EA_PLAY_ANDROID_KEYSTORE_B64}" > "${ANDROID_KEYSTORE_FILE}"
export ANDROID_KEY_ALIAS="${PLAY_ANDROID_KEY_ALIAS}"
export ANDROID_KEYSTORE_PASS="${PLAY_ANDROID_KEYSTORE_PASS}"
export SERVICE_ACCOUNT_KEY_PATH="${GITHUB_WORKSPACE}/sa.json"
base64 --decode <<< "${EA_SERVICE_ACCOUNT_KEY_B64}" > "${SERVICE_ACCOUNT_KEY_PATH}"
./gradlew "publishEaReleaseBundle"
ccache -s
if [ ! -z "${ANDROID_KEYSTORE_B64}" ]; then
rm "${ANDROID_KEYSTORE_FILE}"
fi

View file

@ -1,21 +0,0 @@
#!/bin/bash -ex
# SPDX-FileCopyrightText: 2024 yuzu Emulator Project
# SPDX-License-Identifier: GPL-3.0-or-later
export NDK_CCACHE="$(which ccache)"
ccache -s
export ANDROID_KEYSTORE_FILE="${GITHUB_WORKSPACE}/ks.jks"
base64 --decode <<< "${MAINLINE_PLAY_ANDROID_KEYSTORE_B64}" > "${ANDROID_KEYSTORE_FILE}"
export ANDROID_KEY_ALIAS="${PLAY_ANDROID_KEY_ALIAS}"
export ANDROID_KEYSTORE_PASS="${PLAY_ANDROID_KEYSTORE_PASS}"
export SERVICE_ACCOUNT_KEY_PATH="${GITHUB_WORKSPACE}/sa.json"
base64 --decode <<< "${MAINLINE_SERVICE_ACCOUNT_KEY_B64}" > "${SERVICE_ACCOUNT_KEY_PATH}"
./gradlew "publishMainlineReleaseBundle"
ccache -s
if [ ! -z "${ANDROID_KEYSTORE_B64}" ]; then
rm "${ANDROID_KEYSTORE_FILE}"
fi

View file

@ -1,22 +0,0 @@
#!/bin/bash -ex
# SPDX-FileCopyrightText: 2023 yuzu Emulator Project
# SPDX-License-Identifier: GPL-3.0-or-later
. ./.ci/scripts/common/pre-upload.sh
REV_NAME="yuzu-${GITDATE}-${GITREV}"
BUILD_FLAVOR="mainline"
BUILD_TYPE_LOWER="release"
BUILD_TYPE_UPPER="Release"
if [ "${GITHUB_REPOSITORY}" == "yuzu-emu/yuzu" ]; then
BUILD_TYPE_LOWER="relWithDebInfo"
BUILD_TYPE_UPPER="RelWithDebInfo"
fi
cp src/android/app/build/outputs/apk/"${BUILD_FLAVOR}/${BUILD_TYPE_LOWER}/app-${BUILD_FLAVOR}-${BUILD_TYPE_LOWER}.apk" \
"artifacts/${REV_NAME}.apk"
cp src/android/app/build/outputs/bundle/"${BUILD_FLAVOR}${BUILD_TYPE_UPPER}"/"app-${BUILD_FLAVOR}-${BUILD_TYPE_LOWER}.aab" \
"artifacts/${REV_NAME}.aab"

View file

@ -1,32 +0,0 @@
#!/bin/bash -ex
# SPDX-FileCopyrightText: 2021 yuzu Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later
# Exit on error, rather than continuing with the rest of the script.
set -e
ccache -s
mkdir build || true && cd build
cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_FLAGS="-march=x86-64-v2" \
-DCMAKE_CXX_COMPILER=/usr/lib/ccache/clang++ \
-DCMAKE_C_COMPILER=/usr/lib/ccache/clang \
-DCMAKE_INSTALL_PREFIX="/usr" \
-DDISPLAY_VERSION=$1 \
-DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON \
-DENABLE_QT_TRANSLATION=ON \
-DUSE_DISCORD_PRESENCE=ON \
-DYUZU_CRASH_DUMPS=ON \
-DYUZU_ENABLE_COMPATIBILITY_REPORTING=${ENABLE_COMPATIBILITY_REPORTING:-"OFF"} \
-DYUZU_USE_BUNDLED_FFMPEG=ON \
-GNinja
ninja
ccache -s
ctest -VV -C Release

View file

@ -1,11 +0,0 @@
#!/bin/bash -ex
# SPDX-FileCopyrightText: 2021 yuzu Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later
mkdir -p "ccache" || true
chmod a+x ./.ci/scripts/clang/docker.sh
# the UID for the container yuzu user is 1027
sudo chown -R 1027 ./
docker run -e ENABLE_COMPATIBILITY_REPORTING -e CCACHE_DIR=/yuzu/ccache -v "$(pwd):/yuzu" -w /yuzu yuzuemu/build-environments:linux-fresh /bin/bash /yuzu/.ci/scripts/clang/docker.sh "$1"
sudo chown -R $UID ./

View file

@ -1,23 +0,0 @@
#!/bin/bash -ex
# SPDX-FileCopyrightText: 2021 yuzu Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later
. .ci/scripts/common/pre-upload.sh
REV_NAME="yuzu-linux-${GITDATE}-${GITREV}"
ARCHIVE_NAME="${REV_NAME}.tar.xz"
COMPRESSION_FLAGS="-cJvf"
if [ "${RELEASE_NAME}" = "mainline" ]; then
DIR_NAME="${REV_NAME}"
else
DIR_NAME="${REV_NAME}_${RELEASE_NAME}"
fi
mkdir "$DIR_NAME"
cp build/bin/yuzu-cmd "$DIR_NAME"
cp build/bin/yuzu "$DIR_NAME"
. .ci/scripts/common/post-upload.sh

View file

@ -1,20 +0,0 @@
#!/bin/bash -ex
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later
# Copy documentation
cp LICENSE.txt "$DIR_NAME"
cp README.md "$DIR_NAME"
if [[ -z "${NO_SOURCE_PACK}" ]]; then
git clone --depth 1 file://$(readlink -e .) ${REV_NAME}-source
tar -cJvf "${REV_NAME}-source.tar.xz" ${REV_NAME}-source
cp -v "${REV_NAME}-source.tar.xz" "$DIR_NAME"
cp -v "${REV_NAME}-source.tar.xz" "${ARTIFACTS_DIR}/"
fi
tar $COMPRESSION_FLAGS "$ARCHIVE_NAME" "$DIR_NAME"
# move the compiled archive into the artifacts directory to be uploaded by travis releases
mv "$ARCHIVE_NAME" "${ARTIFACTS_DIR}/"

View file

@ -1,10 +0,0 @@
#!/bin/bash -ex
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later
GITDATE="`git show -s --date=short --format='%ad' | sed 's/-//g'`"
GITREV="`git show -s --format='%h'`"
ARTIFACTS_DIR="$PWD/artifacts"
mkdir -p "${ARTIFACTS_DIR}/"

View file

@ -1,9 +0,0 @@
#!/bin/bash -ex
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later
# Run clang-format
cd /yuzu
chmod a+x ./.ci/scripts/format/script.sh
./.ci/scripts/format/script.sh

View file

@ -1,10 +0,0 @@
#!/bin/bash -ex
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later
chmod a+x ./.ci/scripts/format/docker.sh
# the UID for the container yuzu user is 1027
sudo chown -R 1027 ./
docker run -v "$(pwd):/yuzu" -w /yuzu yuzuemu/build-environments:linux-clang-format /bin/bash -ex /yuzu/.ci/scripts/format/docker.sh
sudo chown -R $UID ./

View file

@ -1,37 +0,0 @@
#!/bin/bash -ex
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later
shopt -s nullglob globstar
if git grep -nrI '\s$' src **/*.yml **/*.txt **/*.md Doxyfile .gitignore .gitmodules .ci* dist/*.desktop dist/*.svg dist/*.xml; then
echo Trailing whitespace found, aborting
exit 1
fi
# Default clang-format points to default 3.5 version one
CLANG_FORMAT="${CLANG_FORMAT:-clang-format-15}"
"$CLANG_FORMAT" --version
# Turn off tracing for this because it's too verbose
set +x
# Check everything for branch pushes
FILES_TO_LINT="$(find src/ -name '*.cpp' -or -name '*.h')"
for f in $FILES_TO_LINT; do
echo "$f"
"$CLANG_FORMAT" -i "$f"
done
DIFF=$(git -c core.fileMode=false diff)
if [ ! -z "$DIFF" ]; then
echo "!!! Not compliant to coding style, here is the fix:"
echo "$DIFF"
exit 1
fi
cd src/android
./gradlew ktlintCheck

View file

@ -1,79 +0,0 @@
#!/bin/bash -ex
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later
# Exit on error, rather than continuing with the rest of the script.
set -e
ccache -s
mkdir build || true && cd build
cmake .. \
-DBoost_USE_STATIC_LIBS=ON \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_CXX_FLAGS="-march=x86-64-v2" \
-DCMAKE_CXX_COMPILER=/usr/lib/ccache/g++ \
-DCMAKE_C_COMPILER=/usr/lib/ccache/gcc \
-DCMAKE_INSTALL_PREFIX="/usr" \
-DDISPLAY_VERSION=$1 \
-DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON \
-DENABLE_QT_TRANSLATION=ON \
-DUSE_DISCORD_PRESENCE=ON \
-DYUZU_ENABLE_COMPATIBILITY_REPORTING=${ENABLE_COMPATIBILITY_REPORTING:-"OFF"} \
-DYUZU_USE_BUNDLED_FFMPEG=ON \
-DYUZU_ENABLE_LTO=ON \
-DYUZU_CRASH_DUMPS=ON \
-GNinja
ninja
ccache -s
ctest -VV -C Release
# Separate debug symbols from specified executables
for EXE in yuzu; do
EXE_PATH="bin/$EXE"
# Copy debug symbols out
objcopy --only-keep-debug $EXE_PATH $EXE_PATH.debug
# Add debug link and strip debug symbols
objcopy -g --add-gnu-debuglink=$EXE_PATH.debug $EXE_PATH $EXE_PATH.out
# Overwrite original with stripped copy
mv $EXE_PATH.out $EXE_PATH
done
# Strip debug symbols from all executables
find bin/ -type f -not -regex '.*.debug' -exec strip -g {} ';'
DESTDIR="$PWD/AppDir" ninja install
rm -vf AppDir/usr/bin/yuzu-cmd AppDir/usr/bin/yuzu-tester
# Download tools needed to build an AppImage
wget -nc https://raw.githubusercontent.com/yuzu-emu/ext-linux-bin/main/appimage/deploy-linux.sh
wget -nc https://raw.githubusercontent.com/yuzu-emu/AppImageKit-checkrt/old/AppRun.sh
wget -nc https://github.com/yuzu-emu/ext-linux-bin/raw/main/appimage/exec-x86_64.so
# Set executable bit
chmod 755 \
deploy-linux.sh \
AppRun.sh \
exec-x86_64.so \
# Workaround for https://github.com/AppImage/AppImageKit/issues/828
export APPIMAGE_EXTRACT_AND_RUN=1
mkdir -p AppDir/usr/optional
mkdir -p AppDir/usr/optional/libstdc++
mkdir -p AppDir/usr/optional/libgcc_s
# Deploy yuzu's needed dependencies
DEPLOY_QT=1 ./deploy-linux.sh AppDir/usr/bin/yuzu AppDir
# Workaround for libQt5MultimediaGstTools indirectly requiring libwayland-client and breaking Vulkan usage on end-user systems
find AppDir -type f -regex '.*libwayland-client\.so.*' -delete -print
# Workaround for building yuzu with GCC 10 but also trying to distribute it to Ubuntu 18.04 et al.
# See https://github.com/darealshinji/AppImageKit-checkrt
cp exec-x86_64.so AppDir/usr/optional/exec.so
cp AppRun.sh AppDir/AppRun
cp --dereference /usr/lib/x86_64-linux-gnu/libstdc++.so.6 AppDir/usr/optional/libstdc++/libstdc++.so.6
cp --dereference /lib/x86_64-linux-gnu/libgcc_s.so.1 AppDir/usr/optional/libgcc_s/libgcc_s.so.1

View file

@ -1,16 +0,0 @@
#!/bin/bash -ex
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later
mkdir -p "ccache" || true
chmod a+x ./.ci/scripts/linux/docker.sh
# the UID for the container yuzu user is 1027
sudo chown -R 1027 ./
# The environment variables listed below:
# AZURECIREPO TITLEBARFORMATIDLE TITLEBARFORMATRUNNING DISPLAYVERSION
# are requested in src/common/CMakeLists.txt and appear to be provided somewhere in Azure DevOps
docker run -e AZURECIREPO -e TITLEBARFORMATIDLE -e TITLEBARFORMATRUNNING -e DISPLAYVERSION -e ENABLE_COMPATIBILITY_REPORTING -e CCACHE_DIR=/yuzu/ccache -v "$(pwd):/yuzu" -w /yuzu yuzuemu/build-environments:linux-fresh /bin/bash /yuzu/.ci/scripts/linux/docker.sh "$1"
sudo chown -R $UID ./

View file

@ -1,67 +0,0 @@
#!/bin/bash -ex
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later
. .ci/scripts/common/pre-upload.sh
APPIMAGE_NAME="yuzu-${RELEASE_NAME}-${GITDATE}-${GITREV}.AppImage"
BASE_NAME="yuzu-linux"
REV_NAME="${BASE_NAME}-${GITDATE}-${GITREV}"
ARCHIVE_NAME="${REV_NAME}.tar.xz"
COMPRESSION_FLAGS="-cJvf"
if [ "${RELEASE_NAME}" = "mainline" ] || [ "${RELEASE_NAME}" = "early-access" ]; then
DIR_NAME="${BASE_NAME}-${RELEASE_NAME}"
else
DIR_NAME="${REV_NAME}-${RELEASE_NAME}"
fi
mkdir "$DIR_NAME"
cp build/bin/yuzu-cmd "$DIR_NAME"
if [ "${RELEASE_NAME}" != "early-access" ] && [ "${RELEASE_NAME}" != "mainline" ]; then
cp build/bin/yuzu "$DIR_NAME"
fi
# Build an AppImage
cd build
wget -nc https://github.com/yuzu-emu/ext-linux-bin/raw/main/appimage/appimagetool-x86_64.AppImage
chmod 755 appimagetool-x86_64.AppImage
# if FUSE is not available, then fallback to extract and run
if ! ./appimagetool-x86_64.AppImage --version; then
export APPIMAGE_EXTRACT_AND_RUN=1
fi
# Don't let AppImageLauncher ask to integrate EA
if [ "${RELEASE_NAME}" = "mainline" ] || [ "${RELEASE_NAME}" = "early-access" ]; then
echo "X-AppImage-Integrate=false" >> AppDir/org.yuzu_emu.yuzu.desktop
fi
if [ "${RELEASE_NAME}" = "mainline" ]; then
# Generate update information if releasing to mainline
./appimagetool-x86_64.AppImage -u "gh-releases-zsync|yuzu-emu|yuzu-${RELEASE_NAME}|latest|yuzu-*.AppImage.zsync" AppDir "${APPIMAGE_NAME}"
else
./appimagetool-x86_64.AppImage AppDir "${APPIMAGE_NAME}"
fi
cd ..
# Copy the AppImage and update info to the artifacts directory and avoid compressing it
cp "build/${APPIMAGE_NAME}" "${ARTIFACTS_DIR}/"
if [ -f "build/${APPIMAGE_NAME}.zsync" ]; then
cp "build/${APPIMAGE_NAME}.zsync" "${ARTIFACTS_DIR}/"
fi
# Copy the AppImage to the general release directory and remove git revision info
if [ "${RELEASE_NAME}" = "mainline" ] || [ "${RELEASE_NAME}" = "early-access" ]; then
cp "build/${APPIMAGE_NAME}" "${DIR_NAME}/yuzu-${RELEASE_NAME}.AppImage"
fi
# Copy debug symbols to artifacts
cd build/bin
tar $COMPRESSION_FLAGS "${ARTIFACTS_DIR}/${REV_NAME}-debug.tar.xz" *.debug
cd -
. .ci/scripts/common/post-upload.sh

View file

@ -1,48 +0,0 @@
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later
# Download all pull requests as patches that match a specific label
# Usage: python download-patches-by-label.py <Label to Match> <Root Path Folder to DL to>
import requests, sys, json, shutil, subprocess, os, traceback
org = os.getenv("PRIVATEMERGEORG", "yuzu-emu")
repo = os.getenv("PRIVATEMERGEREPO", "yuzu-private")
tagline = sys.argv[3]
user = sys.argv[1]
dl_list = {}
TAG_NAME = sys.argv[2]
def check_individual(repo_id, pr_id):
url = 'https://%sdev.azure.com/%s/%s/_apis/git/repositories/%s/pullRequests/%s/labels?api-version=5.1-preview.1' % (user, org, repo, repo_id, pr_id)
response = requests.get(url)
if (response.ok):
try:
js = response.json()
return any(tag.get('name') == TAG_NAME for tag in js['value'])
except:
return False
return False
def merge_pr(pn, ref):
print("Matched PR# %s" % pn)
print(subprocess.check_output(["git", "fetch", "https://%sdev.azure.com/%s/_git/%s" % (user, org, repo), ref, "-f", "--no-recurse-submodules"]))
print(subprocess.check_output(["git", "merge", "--squash", 'origin/' + ref.replace('refs/heads/','')]))
print(subprocess.check_output(["git", "commit", "-m\"Merge %s PR %s\"" % (tagline, pn)]))
def main():
url = 'https://%sdev.azure.com/%s/%s/_apis/git/pullrequests?api-version=5.1' % (user, org, repo)
response = requests.get(url)
if (response.ok):
js = response.json()
tagged_prs = filter(lambda pr: check_individual(pr['repository']['id'], pr['pullRequestId']), js['value'])
map(lambda pr: merge_pr(pr['pullRequestId'], pr['sourceRefName']), tagged_prs)
if __name__ == '__main__':
try:
main()
except:
traceback.print_exc(file=sys.stdout)
sys.exit(-1)

View file

@ -1,38 +0,0 @@
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later
# Download all pull requests as patches that match a specific label
# Usage: python apply-patches-by-label.py <Label to Match>
import json, requests, subprocess, sys, traceback
tagline = sys.argv[2]
def check_individual(labels):
for label in labels:
if (label["name"] == sys.argv[1]):
return True
return False
def do_page(page):
url = f"https://api.github.com/repos/yuzu-emu/yuzu/pulls?page={page}"
response = requests.get(url)
response.raise_for_status()
if (response.ok):
j = json.loads(response.content)
if j == []:
return
for pr in j:
if (check_individual(pr["labels"])):
pn = pr["number"]
print(f"Matched PR# {pn}")
print(subprocess.check_output(["git", "fetch", "https://github.com/yuzu-emu/yuzu.git", f"pull/{pn}/head:pr-{pn}", "-f", "--no-recurse-submodules"]))
print(subprocess.check_output(["git", "merge", "--squash", f"pr-{pn}"]))
print(subprocess.check_output(["git", "commit", f"-m\"Merge {tagline} PR {pn}\""]))
try:
for i in range(1,10):
do_page(i)
except:
traceback.print_exc(file=sys.stdout)
sys.exit(-1)

View file

@ -1,21 +0,0 @@
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later
# Checks to see if the specified pull request # has the specified tag
# Usage: python check-label-presence.py <Pull Request ID> <Name of Label>
import requests, json, sys
try:
url = 'https://api.github.com/repos/yuzu-emu/yuzu/issues/%s' % sys.argv[1]
response = requests.get(url)
if (response.ok):
j = json.loads(response.content)
for label in j["labels"]:
if label["name"] == sys.argv[2]:
print('##vso[task.setvariable variable=enabletesting;]true')
sys.exit()
except:
sys.exit(-1)
print('##vso[task.setvariable variable=enabletesting;]false')

View file

@ -1,5 +0,0 @@
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later
git config --global user.email "yuzu@yuzu-emu.org"
git config --global user.name "yuzubot"

View file

@ -1,19 +0,0 @@
#!/bin/bash -e
# SPDX-FileCopyrightText: 2021 yuzu Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later
set -x
echo -e "\e[1m\e[33mBuild tools information:\e[0m"
cmake --version
gcc -v
tx --version
mkdir build && cd build
cmake .. -DENABLE_QT_TRANSLATION=ON -DGENERATE_QT_TRANSLATION=ON -DCMAKE_BUILD_TYPE=Release -DENABLE_SDL2=OFF -DYUZU_TESTS=OFF -DYUZU_USE_BUNDLED_VCPKG=ON
make translation
cd ..
cd dist/languages
tx push -s

View file

@ -1,66 +0,0 @@
#!/bin/bash -ex
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later
set -e
#cd /yuzu
ccache -sv
mkdir -p build && cd build
cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_TOOLCHAIN_FILE="${PWD}/../CMakeModules/MinGWCross.cmake" \
-DDISPLAY_VERSION="$1" \
-DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON \
-DENABLE_QT_TRANSLATION=ON \
-DUSE_CCACHE=ON \
-DYUZU_USE_BUNDLED_SDL2=OFF \
-DYUZU_USE_EXTERNAL_SDL2=OFF \
-DYUZU_TESTS=OFF \
-GNinja
ninja yuzu yuzu-cmd
ccache -sv
echo "Tests skipped"
#ctest -VV -C Release
echo 'Prepare binaries...'
cd ..
mkdir package
if [ -d "/usr/x86_64-w64-mingw32/lib/qt5/plugins/platforms/" ]; then
QT_PLUGINS_PATH='/usr/x86_64-w64-mingw32/lib/qt5/plugins'
else
#fallback to qt
QT_PLUGINS_PATH='/usr/x86_64-w64-mingw32/lib/qt/plugins'
fi
find build/ -name "yuzu*.exe" -exec cp {} 'package' \;
# copy Qt plugins
mkdir package/platforms
cp -v "${QT_PLUGINS_PATH}/platforms/qwindows.dll" package/platforms/
cp -rv "${QT_PLUGINS_PATH}/mediaservice/" package/
cp -rv "${QT_PLUGINS_PATH}/imageformats/" package/
cp -rv "${QT_PLUGINS_PATH}/styles/" package/
rm -f package/mediaservice/*d.dll
for i in package/*.exe; do
# we need to process pdb here, however, cv2pdb
# does not work here, so we just simply strip all the debug symbols
x86_64-w64-mingw32-strip "${i}"
done
python3 .ci/scripts/windows/scan_dll.py package/*.exe package/imageformats/*.dll "package/"
# copy FFmpeg libraries
EXTERNALS_PATH="$(pwd)/build/externals"
FFMPEG_DLL_PATH="$(find "${EXTERNALS_PATH}" -maxdepth 1 -type d | grep 'ffmpeg-')/bin"
find ${FFMPEG_DLL_PATH} -type f -regex ".*\.dll" -exec cp -nv {} package/ ';'
# copy libraries from yuzu.exe path
find "$(pwd)/build/bin/" -type f -regex ".*\.dll" -exec cp -v {} package/ ';'

View file

@ -1,11 +0,0 @@
#!/bin/bash -ex
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later
mkdir -p "ccache" || true
chmod a+x ./.ci/scripts/windows/docker.sh
# the UID for the container yuzu user is 1027
sudo chown -R 1027 ./
docker run -e CCACHE_DIR=/yuzu/ccache -v "$(pwd):/yuzu" -w /yuzu yuzuemu/build-environments:linux-mingw /bin/bash -ex /yuzu/.ci/scripts/windows/docker.sh "$1"
sudo chown -R $UID ./

View file

@ -1,33 +0,0 @@
# SPDX-FileCopyrightText: 2023 yuzu Emulator Project
# SPDX-License-Identifier: GPL-3.0-or-later
$ErrorActionPreference = "Stop"
$VulkanSDKVer = "1.3.250.1"
$ExeFile = "VulkanSDK-$VulkanSDKVer-Installer.exe"
$Uri = "https://sdk.lunarg.com/sdk/download/$VulkanSDKVer/windows/$ExeFile"
$Destination = "./$ExeFile"
echo "Downloading Vulkan SDK $VulkanSDKVer from $Uri"
$WebClient = New-Object System.Net.WebClient
$WebClient.DownloadFile($Uri, $Destination)
echo "Finished downloading $ExeFile"
$VULKAN_SDK = "C:/VulkanSDK/$VulkanSDKVer"
$Arguments = "--root `"$VULKAN_SDK`" --accept-licenses --default-answer --confirm-command install"
echo "Installing Vulkan SDK $VulkanSDKVer"
$InstallProcess = Start-Process -FilePath $Destination -NoNewWindow -PassThru -Wait -ArgumentList $Arguments
$ExitCode = $InstallProcess.ExitCode
if ($ExitCode -ne 0) {
echo "Error installing Vulkan SDK $VulkanSDKVer (Error: $ExitCode)"
Exit $ExitCode
}
echo "Finished installing Vulkan SDK $VulkanSDKVer"
if ("$env:GITHUB_ACTIONS" -eq "true") {
echo "VULKAN_SDK=$VULKAN_SDK" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
echo "$VULKAN_SDK/Bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
}

View file

@ -1,109 +0,0 @@
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later
import pefile
import sys
import re
import os
import queue
import shutil
# constant definitions
KNOWN_SYS_DLLS = ['WINMM.DLL', 'MSVCRT.DLL', 'VERSION.DLL', 'MPR.DLL',
'DWMAPI.DLL', 'UXTHEME.DLL', 'DNSAPI.DLL', 'IPHLPAPI.DLL']
# below is for Ubuntu 18.04 with specified PPA enabled, if you are using
# other distro or different repositories, change the following accordingly
DLL_PATH = [
'/usr/x86_64-w64-mingw32/bin/',
'/usr/x86_64-w64-mingw32/lib/',
'/usr/lib/gcc/x86_64-w64-mingw32/7.3-posix/'
]
missing = []
def parse_imports(file_name):
results = []
pe = pefile.PE(file_name, fast_load=True)
pe.parse_data_directories()
for entry in pe.DIRECTORY_ENTRY_IMPORT:
current = entry.dll.decode()
current_u = current.upper() # b/c Windows is often case insensitive
# here we filter out system dlls
# dll w/ names like *32.dll are likely to be system dlls
if current_u.upper() not in KNOWN_SYS_DLLS and not re.match(string=current_u, pattern=r'.*32\.DLL'):
results.append(current)
return results
def parse_imports_recursive(file_name, path_list=[]):
q = queue.Queue() # create a FIFO queue
# file_name can be a string or a list for the convenience
if isinstance(file_name, str):
q.put(file_name)
elif isinstance(file_name, list):
for i in file_name:
q.put(i)
full_list = []
while q.qsize():
current = q.get_nowait()
print('> %s' % current)
deps = parse_imports(current)
# if this dll does not have any import, ignore it
if not deps:
continue
for dep in deps:
# the dependency already included in the list, skip
if dep in full_list:
continue
# find the requested dll in the provided paths
full_path = find_dll(dep)
if not full_path:
missing.append(dep)
continue
full_list.append(dep)
q.put(full_path)
path_list.append(full_path)
return full_list
def find_dll(name):
for path in DLL_PATH:
for root, _, files in os.walk(path):
for f in files:
if name.lower() == f.lower():
return os.path.join(root, f)
def deploy(name, dst, dry_run=False):
dlls_path = []
parse_imports_recursive(name, dlls_path)
for dll_entry in dlls_path:
if not dry_run:
shutil.copy(dll_entry, dst)
else:
print('[Dry-Run] Copy %s to %s' % (dll_entry, dst))
print('Deploy completed.')
return dlls_path
def main():
if len(sys.argv) < 3:
print('Usage: %s [files to examine ...] [target deploy directory]')
return 1
to_deploy = sys.argv[1:-1]
tgt_dir = sys.argv[-1]
if not os.path.isdir(tgt_dir):
print('%s is not a directory.' % tgt_dir)
return 1
print('Scanning dependencies...')
deploy(to_deploy, tgt_dir)
if missing:
print('Following DLLs are not found: %s' % ('\n'.join(missing)))
return 0
if __name__ == '__main__':
main()

View file

@ -1,118 +0,0 @@
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later
param($BUILD_NAME)
$GITDATE = $(git show -s --date=short --format='%ad') -replace "-", ""
$GITREV = $(git show -s --format='%h')
if ("$BUILD_NAME" -eq "mainline") {
$RELEASE_DIST = "yuzu-windows-msvc"
}
else {
$RELEASE_DIST = "yuzu-windows-msvc-$BUILD_NAME"
}
$MSVC_BUILD_ZIP = "yuzu-windows-msvc-$GITDATE-$GITREV.zip" -replace " ", ""
$MSVC_BUILD_PDB = "yuzu-windows-msvc-$GITDATE-$GITREV-debugsymbols.zip" -replace " ", ""
$MSVC_SEVENZIP = "yuzu-windows-msvc-$GITDATE-$GITREV.7z" -replace " ", ""
$MSVC_TAR = "yuzu-windows-msvc-$GITDATE-$GITREV.tar" -replace " ", ""
$MSVC_TARXZ = "yuzu-windows-msvc-$GITDATE-$GITREV.tar.xz" -replace " ", ""
$MSVC_SOURCE = "yuzu-windows-msvc-source-$GITDATE-$GITREV" -replace " ", ""
$MSVC_SOURCE_TAR = "$MSVC_SOURCE.tar"
$MSVC_SOURCE_TARXZ = "$MSVC_SOURCE_TAR.xz"
$env:BUILD_ZIP = $MSVC_BUILD_ZIP
$env:BUILD_SYMBOLS = $MSVC_BUILD_PDB
$env:BUILD_UPDATE = $MSVC_SEVENZIP
if (Test-Path -Path ".\build\bin\Release") {
$BUILD_DIR = ".\build\bin\Release"
} else {
$BUILD_DIR = ".\build\bin\"
}
# Cleanup unneeded data in submodules
git submodule foreach git clean -fxd
# Upload debugging symbols
mkdir pdb
Get-ChildItem "$BUILD_DIR\" -Recurse -Filter "*.pdb" | Copy-Item -destination .\pdb
7z a -tzip $MSVC_BUILD_PDB .\pdb\*.pdb
rm "$BUILD_DIR\*.pdb"
# Create artifact directories
mkdir $RELEASE_DIST
mkdir $MSVC_SOURCE
mkdir "artifacts"
$CURRENT_DIR = Convert-Path .
# Build a tar.xz for the source of the release
git clone --depth 1 file://$CURRENT_DIR $MSVC_SOURCE
7z a -r -ttar $MSVC_SOURCE_TAR $MSVC_SOURCE
7z a -r -txz $MSVC_SOURCE_TARXZ $MSVC_SOURCE_TAR
# Following section is quick hack to package artifacts differently for GitHub Actions
if ("$env:GITHUB_ACTIONS" -eq "true") {
echo "Hello GitHub Actions"
# With vcpkg we now have a few more dll files
ls .\build\bin\*.dll
cp .\build\bin\*.dll .\artifacts\
# Hopefully there is an exe in either .\build\bin or .\build\bin\Release
cp .\build\bin\yuzu*.exe .\artifacts\
Copy-Item "$BUILD_DIR\*" -Destination "artifacts" -Recurse
Remove-Item .\artifacts\tests.exe -ErrorAction ignore
# None of the other GHA builds are including source, so commenting out today
#Copy-Item $MSVC_SOURCE_TARXZ -Destination "artifacts"
# Debugging symbols
cp .\build\bin\yuzu*.pdb .\artifacts\
# Write out a tag BUILD_TAG to environment for the Upload step
# We're getting ${{ github.event.number }} as $env:PR_NUMBER"
echo "env:PR_NUMBER: $env:PR_NUMBER"
if (Test-Path env:PR_NUMBER) {
$PR_NUMBER = $env:PR_NUMBER.Substring(2) -as [int]
$PR_NUMBER_TAG = "pr"+([string]$PR_NUMBER).PadLeft(5,'0')
if ($PR_NUMBER -gt 1){
$BUILD_TAG="verify-$PR_NUMBER_TAG-$GITDATE-$GITREV"
} else {
$BUILD_TAG = "verify-$GITDATE-$GITREV"
}
} else {
# If env:PR_NUMBER isn't set, we should still write out a variable
$BUILD_TAG = "verify-$GITDATE-$GITREV"
}
echo "BUILD_TAG=$BUILD_TAG"
echo "BUILD_TAG=$BUILD_TAG" >> $env:GITHUB_ENV
# For extra job, just the exe
$INDIVIDUAL_EXE = "yuzu-msvc-$BUILD_TAG.exe"
echo "INDIVIDUAL_EXE=$INDIVIDUAL_EXE"
echo "INDIVIDUAL_EXE=$INDIVIDUAL_EXE" >> $env:GITHUB_ENV
echo "Just the exe: $INDIVIDUAL_EXE"
cp .\artifacts\yuzu.exe .\$INDIVIDUAL_EXE
} else {
# Build the final release artifacts
Copy-Item $MSVC_SOURCE_TARXZ -Destination $RELEASE_DIST
Copy-Item "$BUILD_DIR\*" -Destination $RELEASE_DIST -Recurse
rm "$RELEASE_DIST\*.exe"
Get-ChildItem "$BUILD_DIR" -Recurse -Filter "yuzu*.exe" | Copy-Item -destination $RELEASE_DIST
Get-ChildItem "$BUILD_DIR" -Recurse -Filter "QtWebEngineProcess*.exe" | Copy-Item -destination $RELEASE_DIST
7z a -tzip $MSVC_BUILD_ZIP $RELEASE_DIST\*
7z a $MSVC_SEVENZIP $RELEASE_DIST
7z a -r -ttar $MSVC_TAR $RELEASE_DIST
7z a -r -txz $MSVC_TARXZ $MSVC_TAR
Get-ChildItem . -Filter "*.zip" | Copy-Item -destination "artifacts"
Get-ChildItem . -Filter "*.7z" | Copy-Item -destination "artifacts"
Get-ChildItem . -Filter "*.tar.xz" | Copy-Item -destination "artifacts"
}

View file

@ -1,22 +0,0 @@
#!/bin/bash -ex
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later
. .ci/scripts/common/pre-upload.sh
REV_NAME="yuzu-windows-mingw-${GITDATE}-${GITREV}"
ARCHIVE_NAME="${REV_NAME}.tar.xz"
COMPRESSION_FLAGS="-cJvf"
if [ "${RELEASE_NAME}" = "mainline" ]; then
DIR_NAME="${REV_NAME}"
else
DIR_NAME="${REV_NAME}_${RELEASE_NAME}"
fi
mkdir "$DIR_NAME"
# get around the permission issues
cp -r package/* "$DIR_NAME"
. .ci/scripts/common/post-upload.sh

View file

@ -1,8 +0,0 @@
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later
steps:
- script: mkdir artifacts || echo 'X' > artifacts/T1.txt
- publish: artifacts
artifact: 'yuzu-$(BuildName)-mock'
displayName: 'Upload Artifacts'

View file

@ -1,31 +0,0 @@
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later
parameters:
artifactSource: 'true'
cache: 'false'
version: ''
steps:
- task: Powershell@2
displayName: 'Install Vulkan SDK'
inputs:
targetType: 'filePath'
filePath: './.ci/scripts/windows/install-vulkan-sdk.ps1'
- script: refreshenv && glslangValidator --version && mkdir build && cd build && cmake -E env CXXFLAGS="/Gw" cmake -G "Visual Studio 17 2022" -A x64 -DCMAKE_POLICY_DEFAULT_CMP0069=NEW -DYUZU_ENABLE_LTO=ON -DYUZU_USE_BUNDLED_QT=1 -DYUZU_USE_BUNDLED_SDL2=1 -DYUZU_USE_QT_WEB_ENGINE=ON -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DYUZU_ENABLE_COMPATIBILITY_REPORTING=${COMPAT} -DYUZU_TESTS=OFF -DUSE_DISCORD_PRESENCE=ON -DENABLE_QT_TRANSLATION=ON -DDISPLAY_VERSION=${{ parameters['version'] }} -DCMAKE_BUILD_TYPE=Release -DYUZU_CRASH_DUMPS=ON .. && cd ..
displayName: 'Configure CMake'
- task: MSBuild@1
displayName: 'Build'
inputs:
solution: 'build/yuzu.sln'
maximumCpuCount: true
configuration: release
- task: PowerShell@2
displayName: 'Package Artifacts'
inputs:
targetType: 'filePath'
filePath: './.ci/scripts/windows/upload.ps1'
arguments: '$(BuildName)'
- publish: artifacts
artifact: 'yuzu-$(BuildName)-windows-msvc'
displayName: 'Upload Artifacts'

View file

@ -1,26 +0,0 @@
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later
parameters:
artifactSource: 'true'
cache: 'false'
version: ''
steps:
- task: DockerInstaller@0
displayName: 'Prepare Environment'
inputs:
dockerVersion: '17.09.0-ce'
- task: CacheBeta@0
displayName: 'Cache Build System'
inputs:
key: yuzu-v1-$(BuildName)-$(BuildSuffix)-$(CacheSuffix)
path: $(System.DefaultWorkingDirectory)/ccache
cacheHitVar: CACHE_RESTORED
- script: chmod a+x ./.ci/scripts/$(ScriptFolder)/exec.sh && ./.ci/scripts/$(ScriptFolder)/exec.sh ${{ parameters['version'] }}
displayName: 'Build'
- script: chmod a+x ./.ci/scripts/$(ScriptFolder)/upload.sh && RELEASE_NAME=$(BuildName) ./.ci/scripts/$(ScriptFolder)/upload.sh
displayName: 'Package Artifacts'
- publish: artifacts
artifact: 'yuzu-$(BuildName)-$(BuildSuffix)'
displayName: 'Upload Artifacts'

View file

@ -1,33 +0,0 @@
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later
parameters:
version: ''
jobs:
- job: build
displayName: 'standard'
pool:
vmImage: ubuntu-latest
strategy:
maxParallel: 10
matrix:
windows:
BuildSuffix: 'windows-mingw'
ScriptFolder: 'windows'
clang:
BuildSuffix: 'clang'
ScriptFolder: 'clang'
linux:
BuildSuffix: 'linux'
ScriptFolder: 'linux'
steps:
- template: ./sync-source.yml
parameters:
artifactSource: $(parameters.artifactSource)
needSubmodules: 'true'
- template: ./build-single.yml
parameters:
artifactSource: 'false'
cache: $(parameters.cache)
version: $(parameters.version)

View file

@ -1,40 +0,0 @@
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later
parameters:
version: ''
jobs:
- job: build_test
displayName: 'testing'
pool:
vmImage: ubuntu-latest
strategy:
maxParallel: 5
matrix:
windows:
BuildSuffix: 'windows-testing'
ScriptFolder: 'windows'
steps:
- script: sudo apt-get update && sudo apt-get --only-upgrade -y install python3-pip && pip install requests urllib3
displayName: 'Prepare Environment'
- task: PythonScript@0
condition: eq(variables['Build.Reason'], 'PullRequest')
displayName: 'Determine Testing Status'
inputs:
scriptSource: 'filePath'
scriptPath: '.ci/scripts/merge/check-label-presence.py'
arguments: '$(System.PullRequest.PullRequestNumber) create-testing-build'
- ${{ if eq(variables.enabletesting, 'true') }}:
- template: ./sync-source.yml
parameters:
artifactSource: $(parameters.artifactSource)
needSubmodules: 'true'
- template: ./mergebot.yml
parameters:
matchLabel: 'testing-merge'
- template: ./build-single.yml
parameters:
artifactSource: 'false'
cache: 'false'
version: $(parameters.version)

View file

@ -1,17 +0,0 @@
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later
parameters:
artifactSource: 'true'
steps:
- template: ./sync-source.yml
parameters:
artifactSource: $(parameters.artifactSource)
needSubmodules: 'false'
- task: DockerInstaller@0
displayName: 'Prepare Environment'
inputs:
dockerVersion: '17.09.0-ce'
- script: chmod a+x ./.ci/scripts/format/exec.sh && ./.ci/scripts/format/exec.sh
displayName: 'Verify Formatting'

View file

@ -1,44 +0,0 @@
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later
jobs:
- job: merge
displayName: 'pull requests'
pool:
vmImage: 'ubuntu-latest'
steps:
- checkout: self
submodules: recursive
- template: ./mergebot-private.yml
parameters:
matchLabel: '$(BuildName)-merge'
matchLabelPublic: '$(PublicBuildName)-merge'
- task: ArchiveFiles@2
displayName: 'Package Source'
inputs:
rootFolderOrFile: '$(System.DefaultWorkingDirectory)'
includeRootFolder: false
archiveType: '7z'
archiveFile: '$(Build.ArtifactStagingDirectory)/yuzu-$(BuildName)-source.7z'
- task: PublishPipelineArtifact@1
displayName: 'Upload Artifacts'
inputs:
targetPath: '$(Build.ArtifactStagingDirectory)/yuzu-$(BuildName)-source.7z'
artifact: 'yuzu-$(BuildName)-source'
replaceExistingArchive: true
- job: upload_source
displayName: 'upload'
dependsOn: merge
pool:
vmImage: 'ubuntu-latest'
steps:
- template: ./sync-source.yml
parameters:
artifactSource: 'true'
needSubmodules: 'true'
- script: chmod a+x $(System.DefaultWorkingDirectory)/.ci/scripts/merge/yuzubot-git-config.sh && $(System.DefaultWorkingDirectory)/.ci/scripts/merge/yuzubot-git-config.sh
displayName: 'Apply Git Configuration'
- script: git remote add other $(GitRepoPushChangesURL)
displayName: 'Register Repository'
- script: git push --force other HEAD:$(GitPushBranch)
displayName: 'Update Code'

View file

@ -1,43 +0,0 @@
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later
jobs:
- job: merge
displayName: 'pull requests'
pool:
vmImage: 'ubuntu-latest'
steps:
- checkout: self
submodules: recursive
- template: ./mergebot.yml
parameters:
matchLabel: '$(BuildName)-merge'
- task: ArchiveFiles@2
displayName: 'Package Source'
inputs:
rootFolderOrFile: '$(System.DefaultWorkingDirectory)'
includeRootFolder: false
archiveType: '7z'
archiveFile: '$(Build.ArtifactStagingDirectory)/yuzu-$(BuildName)-source.7z'
- task: PublishPipelineArtifact@1
displayName: 'Upload Artifacts'
inputs:
targetPath: '$(Build.ArtifactStagingDirectory)/yuzu-$(BuildName)-source.7z'
artifact: 'yuzu-$(BuildName)-source'
replaceExistingArchive: true
- job: upload_source
displayName: 'upload'
dependsOn: merge
pool:
vmImage: 'ubuntu-latest'
steps:
- template: ./sync-source.yml
parameters:
artifactSource: 'true'
needSubmodules: 'true'
- script: chmod a+x $(System.DefaultWorkingDirectory)/.ci/scripts/merge/yuzubot-git-config.sh && $(System.DefaultWorkingDirectory)/.ci/scripts/merge/yuzubot-git-config.sh
displayName: 'Apply Git Configuration'
- script: git remote add other $(GitRepoPushChangesURL)
displayName: 'Register Repository'
- script: git push --force other HEAD:$(GitPushBranch)
displayName: 'Update Code'

View file

@ -1,33 +0,0 @@
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later
parameters:
matchLabel: 'dummy-merge'
matchLabelPublic: 'dummy-merge'
steps:
- script: mkdir $(System.DefaultWorkingDirectory)/patches && pip install requests urllib3
displayName: 'Prepare Environment'
- script: chmod a+x $(System.DefaultWorkingDirectory)/.ci/scripts/merge/yuzubot-git-config.sh && $(System.DefaultWorkingDirectory)/.ci/scripts/merge/yuzubot-git-config.sh
displayName: 'Apply Git Configuration'
- task: PythonScript@0
displayName: 'Discover, Download, and Apply Patches (Mainline)'
inputs:
scriptSource: 'filePath'
scriptPath: '.ci/scripts/merge/apply-patches-by-label.py'
arguments: '${{ parameters.matchLabelPublic }} $(MergeTaglinePublic) patches-public'
workingDirectory: '$(System.DefaultWorkingDirectory)'
- task: PythonScript@0
displayName: 'Discover, Download, and Apply Patches (Patreon Public)'
inputs:
scriptSource: 'filePath'
scriptPath: '.ci/scripts/merge/apply-patches-by-label.py'
arguments: '${{ parameters.matchLabel }} "$(MergeTaglinePrivate) Public" patches-mixed-public'
workingDirectory: '$(System.DefaultWorkingDirectory)'
- task: PythonScript@0
displayName: 'Discover, Download, and Apply Patches (Patreon Private)'
inputs:
scriptSource: 'filePath'
scriptPath: '.ci/scripts/merge/apply-patches-by-label-private.py'
arguments: '$(PrivateMergeUser) ${{ parameters.matchLabel }} "$(MergeTaglinePrivate) Private" patches-private'
workingDirectory: '$(System.DefaultWorkingDirectory)'

View file

@ -1,18 +0,0 @@
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later
parameters:
matchLabel: 'dummy-merge'
steps:
- script: mkdir $(System.DefaultWorkingDirectory)/patches && pip install requests urllib3
displayName: 'Prepare Environment'
- script: chmod a+x $(System.DefaultWorkingDirectory)/.ci/scripts/merge/yuzubot-git-config.sh && $(System.DefaultWorkingDirectory)/.ci/scripts/merge/yuzubot-git-config.sh
displayName: 'Apply Git Configuration'
- task: PythonScript@0
displayName: 'Discover, Download, and Apply Patches'
inputs:
scriptSource: 'filePath'
scriptPath: '.ci/scripts/merge/apply-patches-by-label.py'
arguments: '${{ parameters.matchLabel }} Tagged patches'
workingDirectory: '$(System.DefaultWorkingDirectory)'

View file

@ -1,16 +0,0 @@
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later
steps:
- task: DownloadPipelineArtifact@2
displayName: 'Download Windows Release'
inputs:
artifactName: 'yuzu-$(BuildName)-windows-msvc'
buildType: 'current'
targetPath: '$(Build.ArtifactStagingDirectory)'
- task: DownloadPipelineArtifact@2
displayName: 'Download Linux Release'
inputs:
artifactName: 'yuzu-$(BuildName)-linux'
buildType: 'current'
targetPath: '$(Build.ArtifactStagingDirectory)'

View file

@ -1,16 +0,0 @@
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later
steps:
- template: ./release-download.yml
- task: GitHubRelease@0
displayName: 'GitHub Release'
inputs:
action: 'create'
title: '$(ReleasePrefix) $(DisplayVersion)'
assets: '$(Build.ArtifactStagingDirectory)/*'
gitHubConnection: $(GitHubReleaseConnectionName)
repositoryName: '$(Build.Repository.Name)'
target: '$(Build.SourceVersion)'
tagSource: manual
tag: $(BuildName)-$(DisplayPrefix)-$(DisplayVersion)

View file

@ -1,12 +0,0 @@
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later
steps:
- script: chmod a+x $(System.DefaultWorkingDirectory)/.ci/scripts/merge/yuzubot-git-config.sh && $(System.DefaultWorkingDirectory)/.ci/scripts/merge/yuzubot-git-config.sh
displayName: 'Apply Git Configuration'
- script: git tag -a $(BuildName)-$(DisplayPrefix)-$(DisplayVersion) -m "yuzu $(BuildName) $(Build.BuildNumber) $(Build.DefinitionName) $(DisplayPrefix)-$(DisplayVersion)"
displayName: 'Tag Source'
- script: git remote add other $(GitRepoPushChangesURL)
displayName: 'Register Repository'
- script: git push other $(BuildName)-$(DisplayPrefix)-$(DisplayVersion)
displayName: 'Update Code'

View file

@ -1,13 +0,0 @@
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later
steps:
- template: ./release-download.yml
- task: UniversalPackages@0
displayName: Publish Artifacts
inputs:
command: publish
publishDirectory: '$(Build.ArtifactStagingDirectory)'
vstsFeedPublish: 'yuzu-$(BuildName)'
vstsFeedPackagePublish: 'main'
packagePublishDescription: 'Yuzu Windows and Linux Executable Packages'

View file

@ -1,19 +0,0 @@
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later
steps:
- checkout: none
- task: DownloadPipelineArtifact@2
displayName: 'Download Source'
inputs:
artifactName: 'yuzu-$(BuildName)-source'
buildType: 'current'
targetPath: '$(Build.ArtifactStagingDirectory)'
- script: rm -rf $(System.DefaultWorkingDirectory) && mkdir $(System.DefaultWorkingDirectory)
displayName: 'Clean Working Directory'
- task: ExtractFiles@1
displayName: 'Prepare Source'
inputs:
archiveFilePatterns: '$(Build.ArtifactStagingDirectory)/*.7z'
destinationFolder: '$(System.DefaultWorkingDirectory)'
cleanDestinationFolder: false

View file

@ -1,14 +0,0 @@
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later
parameters:
needSubmodules: 'true'
steps:
- checkout: self
displayName: 'Checkout Recursive'
submodules: recursive
# condition: eq(parameters.needSubmodules, 'true')
#- checkout: self
# displayName: 'Checkout Fast'
# condition: ne(parameters.needSubmodules, 'true')

View file

@ -1,10 +0,0 @@
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later
steps:
- ${{ if eq(parameters.artifactSource, 'true') }}:
- template: ./retrieve-artifact-source.yml
- ${{ if ne(parameters.artifactSource, 'true') }}:
- template: ./retrieve-master-source.yml
parameters:
needSubmodules: $(parameters.needSubmodules)

View file

@ -1,14 +0,0 @@
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later
trigger:
- master
pool:
vmImage: 'ubuntu-latest'
stages:
- stage: merge
displayName: 'merge'
jobs:
- template: ./templates/merge.yml

View file

@ -1,64 +0,0 @@
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later
trigger:
- master
variables:
DisplayVersion: $[counter(variables['DisplayPrefix'], 1)]
stages:
- stage: build
displayName: 'build'
jobs:
- job: build
timeoutInMinutes: 120
displayName: 'standard'
pool:
vmImage: ubuntu-latest
strategy:
maxParallel: 10
matrix:
linux:
BuildSuffix: 'linux'
ScriptFolder: 'linux'
steps:
- template: ./templates/sync-source.yml
parameters:
artifactSource: $(parameters.artifactSource)
needSubmodules: 'true'
- template: ./templates/build-single.yml
parameters:
artifactSource: 'false'
cache: 'true'
version: $(DisplayVersion)
- stage: build_win
displayName: 'build-windows'
jobs:
- job: build
timeoutInMinutes: 120
displayName: 'msvc'
pool:
vmImage: windows-2022
steps:
- template: ./templates/sync-source.yml
parameters:
artifactSource: $(parameters.artifactSource)
needSubmodules: 'true'
- template: ./templates/build-msvc.yml
parameters:
artifactSource: 'false'
cache: 'true'
version: $(DisplayVersion)
- stage: release
displayName: 'release'
dependsOn:
- build
- build_win
jobs:
- job: github
displayName: 'github'
pool:
vmImage: ubuntu-latest
steps:
- template: ./templates/release-github.yml

View file

@ -1,14 +0,0 @@
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later
trigger:
- master
pool:
vmImage: 'ubuntu-latest'
stages:
- stage: merge
displayName: 'merge'
jobs:
- template: ./templates/merge-private.yml

View file

@ -1,59 +0,0 @@
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later
trigger:
- master
variables:
DisplayVersion: $[counter(variables['DisplayPrefix'], 1)]
stages:
- stage: build
displayName: 'build'
jobs:
- job: linux
timeoutInMinutes: 120
displayName: 'linux'
pool:
vmImage: ubuntu-latest
strategy:
maxParallel: 10
matrix:
linux:
BuildSuffix: 'linux'
ScriptFolder: 'linux'
steps:
- template: ./templates/sync-source.yml
parameters:
artifactSource: $(parameters.artifactSource)
needSubmodules: 'true'
- template: ./templates/build-single.yml
parameters:
artifactSource: 'false'
cache: $(parameters.cache)
version: $(DisplayVersion)
- job: msvc
timeoutInMinutes: 120
displayName: 'windows'
pool:
vmImage: windows-2022
steps:
- template: ./templates/sync-source.yml
parameters:
artifactSource: $(parameters.artifactSource)
needSubmodules: 'true'
- template: ./templates/build-msvc.yml
parameters:
artifactSource: 'false'
cache: $(parameters.cache)
version: $(DisplayVersion)
- stage: release
displayName: 'release'
dependsOn: build
jobs:
- job: release
displayName: 'source'
pool:
vmImage: 'ubuntu-latest'
steps:
- template: ./templates/release-private-tag.yml

View file

@ -1,22 +0,0 @@
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later
trigger:
- master
jobs:
- job: copy
displayName: 'Sync Repository'
pool:
vmImage: 'ubuntu-latest'
steps:
- script: echo 'https://$(GitUsername):$(GitAccessToken)@dev.azure.com' > $HOME/.git-credentials
displayName: 'Load Credentials'
- script: git config --global credential.helper store
displayName: 'Register Credential Helper'
- script: git remote add other $(GitRepoPushChangesURL)
displayName: 'Register Repository'
- script: git push --force other HEAD:$(GitPushBranch)
displayName: 'Update Code'
- script: rm -rf $HOME/.git-credentials
displayName: 'Clear Cached Credentials'

View file

@ -1,23 +0,0 @@
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later
stages:
- stage: format
displayName: 'format'
jobs:
- job: format
displayName: 'clang'
pool:
vmImage: ubuntu-latest
steps:
- template: ./templates/format-check.yml
parameters:
artifactSource: 'false'
- stage: build
displayName: 'build'
dependsOn: format
jobs:
- template: ./templates/build-standard.yml
parameters:
cache: 'false'
- template: ./templates/build-testing.yml

6
.github/FUNDING.yml vendored
View file

@ -1,6 +0,0 @@
# SPDX-FileCopyrightText: 2019 yuzu Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later
# These are supported funding model platforms
patreon: yuzuteam

View file

@ -1,8 +1 @@
blank_issues_enabled: false
contact_links:
- name: yuzu Discord
url: https://discord.com/invite/u77vRWY
about: If you are experiencing an issue with yuzu, and you need tech support, or if you have a general question, try asking in the official yuzu Discord linked here. Piracy is not allowed.
- name: Community forums
url: https://community.citra-emu.org
about: This is an alternative place for tech support, however helpers there are not as active.

View file

@ -1,80 +0,0 @@
# SPDX-FileCopyrightText: 2022 yuzu Emulator Project
# SPDX-License-Identifier: GPL-3.0-or-later
name: 'yuzu-android-build'
on:
push:
tags: [ "*" ]
jobs:
android:
runs-on: ubuntu-latest
if: ${{ github.repository == 'yuzu-emu/yuzu-android' }}
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Set up cache
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
~/.ccache
key: ${{ runner.os }}-android-${{ github.sha }}
restore-keys: |
${{ runner.os }}-android-
- name: Query tag name
uses: olegtarasov/get-tag@v2.1.2
id: tagName
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y ccache apksigner glslang-dev glslang-tools
- name: Build
run: ./.ci/scripts/android/build.sh
env:
ANDROID_KEYSTORE_B64: ${{ secrets.ANDROID_KEYSTORE_B64 }}
ANDROID_KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }}
ANDROID_KEYSTORE_PASS: ${{ secrets.ANDROID_KEYSTORE_PASS }}
- name: Copy artifacts
run: ./.ci/scripts/android/upload.sh
- name: Upload
uses: actions/upload-artifact@v3
with:
name: android
path: artifacts/
# release steps
release-android:
runs-on: ubuntu-latest
needs: [android]
if: ${{ startsWith(github.ref, 'refs/tags/') }}
permissions:
contents: write
steps:
- uses: actions/download-artifact@v3
- name: Query tag name
uses: olegtarasov/get-tag@v2.1.2
id: tagName
- name: Create release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.tagName.outputs.tag }}
release_name: ${{ steps.tagName.outputs.tag }}
draft: false
prerelease: false
- name: Upload artifacts
uses: alexellis/upload-assets@0.2.3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
asset_paths: '["./**/*.apk","./**/*.aab"]'

View file

@ -1,66 +0,0 @@
# SPDX-FileCopyrightText: 2024 yuzu Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later
name: yuzu-android-ea-play-release
on:
workflow_dispatch:
inputs:
release-track:
description: 'Play store release track (internal/alpha/beta/production)'
required: true
default: 'alpha'
jobs:
android:
runs-on: ubuntu-latest
if: ${{ github.repository == 'yuzu-emu/yuzu' }}
steps:
- uses: actions/checkout@v3
name: Checkout
with:
fetch-depth: 0
submodules: true
token: ${{ secrets.ALT_GITHUB_TOKEN }}
- run: npm install execa@5
- uses: actions/github-script@v5
name: 'Merge and publish Android EA changes'
env:
ALT_GITHUB_TOKEN: ${{ secrets.ALT_GITHUB_TOKEN }}
BUILD_EA: true
with:
script: |
const execa = require("execa");
const mergebot = require('./.github/workflows/android-merge.js').mergebot;
process.chdir('${{ github.workspace }}');
mergebot(github, context, execa);
- name: Get tag name
run: echo "GIT_TAG_NAME=$(cat tag-name.txt)" >> $GITHUB_ENV
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y ccache apksigner glslang-dev glslang-tools
- name: Build
run: ./.ci/scripts/android/eabuild.sh
env:
EA_PLAY_ANDROID_KEYSTORE_B64: ${{ secrets.PLAY_ANDROID_KEYSTORE_B64 }}
PLAY_ANDROID_KEY_ALIAS: ${{ secrets.PLAY_ANDROID_KEY_ALIAS }}
PLAY_ANDROID_KEYSTORE_PASS: ${{ secrets.PLAY_ANDROID_KEYSTORE_PASS }}
EA_SERVICE_ACCOUNT_KEY_B64: ${{ secrets.EA_SERVICE_ACCOUNT_KEY_B64 }}
STORE_TRACK: ${{ github.event.inputs.release-track }}
AUTO_VERSIONED: true
BUILD_EA: true
- name: Create release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ env.EA_TAG_NAME }}
name: ${{ env.EA_TAG_NAME }}
draft: false
prerelease: false
repository: yuzu/yuzu-android
token: ${{ secrets.ALT_GITHUB_TOKEN }}

View file

@ -1,59 +0,0 @@
# SPDX-FileCopyrightText: 2024 yuzu Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later
name: yuzu-android-mainline-play-release
on:
workflow_dispatch:
inputs:
release-tag:
description: 'Tag # from yuzu-android that you want to build and publish'
required: true
default: '200'
release-track:
description: 'Play store release track (internal/alpha/beta/production)'
required: true
default: 'alpha'
jobs:
android:
runs-on: ubuntu-latest
if: ${{ github.repository == 'yuzu-emu/yuzu' }}
steps:
- uses: actions/checkout@v3
name: Checkout
with:
fetch-depth: 0
submodules: true
token: ${{ secrets.ALT_GITHUB_TOKEN }}
- run: npm install execa@5
- uses: actions/github-script@v5
name: 'Pull mainline tag'
env:
MAINLINE_TAG: ${{ github.event.inputs.release-tag }}
with:
script: |
const execa = require("execa");
const mergebot = require('./.github/workflows/android-merge.js').getMainlineTag;
process.chdir('${{ github.workspace }}');
mergebot(execa);
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y ccache apksigner glslang-dev glslang-tools
- name: Build
run: |
echo "GIT_TAG_NAME=android-${{ github.event.inputs.releast-tag }}" >> $GITHUB_ENV
./.ci/scripts/android/mainlinebuild.sh
env:
MAINLINE_PLAY_ANDROID_KEYSTORE_B64: ${{ secrets.PLAY_ANDROID_KEYSTORE_B64 }}
PLAY_ANDROID_KEY_ALIAS: ${{ secrets.PLAY_ANDROID_KEY_ALIAS }}
PLAY_ANDROID_KEYSTORE_PASS: ${{ secrets.PLAY_ANDROID_KEYSTORE_PASS }}
SERVICE_ACCOUNT_KEY_B64: ${{ secrets.MAINLINE_SERVICE_ACCOUNT_KEY_B64 }}
STORE_TRACK: ${{ github.event.inputs.release-track }}
AUTO_VERSIONED: true

View file

@ -1,318 +0,0 @@
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
// Note: This is a GitHub Actions script
// It is not meant to be executed directly on your machine without modifications
const fs = require("fs");
// which label to check for changes
const CHANGE_LABEL_MAINLINE = 'android-merge';
const CHANGE_LABEL_EA = 'android-ea-merge';
// how far back in time should we consider the changes are "recent"? (default: 24 hours)
const DETECTION_TIME_FRAME = (parseInt(process.env.DETECTION_TIME_FRAME)) || (24 * 3600 * 1000);
const BUILD_EA = process.env.BUILD_EA == 'true';
const MAINLINE_TAG = process.env.MAINLINE_TAG;
async function checkBaseChanges(github) {
// query the commit date of the latest commit on this branch
const query = `query($owner:String!, $name:String!, $ref:String!) {
repository(name:$name, owner:$owner) {
ref(qualifiedName:$ref) {
target {
... on Commit { id pushedDate oid }
}
}
}
}`;
const variables = {
owner: 'yuzu-emu',
name: 'yuzu',
ref: 'refs/heads/master',
};
const result = await github.graphql(query, variables);
const pushedAt = result.repository.ref.target.pushedDate;
console.log(`Last commit pushed at ${pushedAt}.`);
const delta = new Date() - new Date(pushedAt);
if (delta <= DETECTION_TIME_FRAME) {
console.info('New changes detected, triggering a new build.');
return true;
}
console.info('No new changes detected.');
return false;
}
async function checkAndroidChanges(github) {
if (checkBaseChanges(github)) return true;
const pulls = getPulls(github, false);
for (let i = 0; i < pulls.length; i++) {
let pull = pulls[i];
if (new Date() - new Date(pull.headRepository.pushedAt) <= DETECTION_TIME_FRAME) {
console.info(`${pull.number} updated at ${pull.headRepository.pushedAt}`);
return true;
}
}
console.info("No changes detected in any tagged pull requests.");
return false;
}
async function tagAndPush(github, owner, repo, execa, commit=false) {
let altToken = process.env.ALT_GITHUB_TOKEN;
if (!altToken) {
throw `Please set ALT_GITHUB_TOKEN environment variable. This token should have write access to ${owner}/${repo}.`;
}
const query = `query ($owner:String!, $name:String!) {
repository(name:$name, owner:$owner) {
refs(refPrefix: "refs/tags/", orderBy: {field: TAG_COMMIT_DATE, direction: DESC}, first: 10) {
nodes { name }
}
}
}`;
const variables = {
owner: owner,
name: repo,
};
const tags = await github.graphql(query, variables);
const tagList = tags.repository.refs.nodes;
let lastTag = 'android-1';
for (let i = 0; i < tagList.length; ++i) {
if (tagList[i].name.includes('android-')) {
lastTag = tagList[i].name;
break;
}
}
const tagNumber = /\w+-(\d+)/.exec(lastTag)[1] | 0;
const channel = repo.split('-')[1];
const newTag = `${channel}-${tagNumber + 1}`;
console.log(`New tag: ${newTag}`);
if (commit) {
let channelName = channel[0].toUpperCase() + channel.slice(1);
console.info(`Committing pending commit as ${channelName} ${tagNumber + 1}`);
await execa("git", ['commit', '-m', `${channelName} ${tagNumber + 1}`]);
}
console.info('Pushing tags to GitHub ...');
await execa("git", ['tag', newTag]);
await execa("git", ['remote', 'add', 'target', `https://${altToken}@github.com/${owner}/${repo}.git`]);
await execa("git", ['push', 'target', 'master', '-f']);
await execa("git", ['push', 'target', 'master', '--tags']);
console.info('Successfully pushed new changes.');
}
async function tagAndPushEA(github, owner, repo, execa) {
let altToken = process.env.ALT_GITHUB_TOKEN;
if (!altToken) {
throw `Please set ALT_GITHUB_TOKEN environment variable. This token should have write access to ${owner}/${repo}.`;
}
const query = `query ($owner:String!, $name:String!) {
repository(name:$name, owner:$owner) {
refs(refPrefix: "refs/tags/", orderBy: {field: TAG_COMMIT_DATE, direction: DESC}, first: 10) {
nodes { name }
}
}
}`;
const variables = {
owner: owner,
name: repo,
};
const tags = await github.graphql(query, variables);
const tagList = tags.repository.refs.nodes;
let lastTag = 'ea-1';
for (let i = 0; i < tagList.length; ++i) {
if (tagList[i].name.includes('ea-')) {
lastTag = tagList[i].name;
break;
}
}
const tagNumber = /\w+-(\d+)/.exec(lastTag)[1] | 0;
const newTag = `ea-${tagNumber + 1}`;
console.log(`New tag: ${newTag}`);
console.info('Pushing tags to GitHub ...');
await execa("git", ["remote", "add", "android", "https://github.com/yuzu-emu/yuzu-android.git"]);
await execa("git", ["fetch", "android"]);
await execa("git", ['tag', newTag]);
await execa("git", ['push', 'android', `${newTag}`]);
fs.writeFile('tag-name.txt', newTag, (err) => {
if (err) throw 'Could not write tag name to file!'
})
console.info('Successfully pushed new changes.');
}
async function generateReadme(pulls, context, mergeResults, execa) {
let baseUrl = `https://github.com/${context.repo.owner}/${context.repo.repo}/`;
let output =
"| Pull Request | Commit | Title | Author | Merged? |\n|----|----|----|----|----|\n";
for (let pull of pulls) {
let pr = pull.number;
let result = mergeResults[pr];
output += `| [${pr}](${baseUrl}/pull/${pr}) | [\`${result.rev || "N/A"}\`](${baseUrl}/pull/${pr}/files) | ${pull.title} | [${pull.author.login}](https://github.com/${pull.author.login}/) | ${result.success ? "Yes" : "No"} |\n`;
}
output +=
"\n\nEnd of merge log. You can find the original README.md below the break.\n\n-----\n\n";
output += fs.readFileSync("./README.md");
fs.writeFileSync("./README.md", output);
await execa("git", ["add", "README.md"]);
}
async function fetchPullRequests(pulls, repoUrl, execa) {
console.log("::group::Fetch pull requests");
for (let pull of pulls) {
let pr = pull.number;
console.info(`Fetching PR ${pr} ...`);
await execa("git", [
"fetch",
"-f",
"--no-recurse-submodules",
repoUrl,
`pull/${pr}/head:pr-${pr}`,
]);
}
console.log("::endgroup::");
}
async function mergePullRequests(pulls, execa) {
let mergeResults = {};
console.log("::group::Merge pull requests");
await execa("git", ["config", "--global", "user.name", "yuzubot"]);
await execa("git", [
"config",
"--global",
"user.email",
"yuzu\x40yuzu-emu\x2eorg", // prevent email harvesters from scraping the address
]);
let hasFailed = false;
for (let pull of pulls) {
let pr = pull.number;
console.info(`Merging PR ${pr} ...`);
try {
const process1 = execa("git", [
"merge",
"--squash",
"--no-edit",
`pr-${pr}`,
]);
process1.stdout.pipe(process.stdout);
await process1;
const process2 = execa("git", ["commit", "-m", `Merge yuzu-emu#${pr}`]);
process2.stdout.pipe(process.stdout);
await process2;
const process3 = await execa("git", ["rev-parse", "--short", `pr-${pr}`]);
mergeResults[pr] = {
success: true,
rev: process3.stdout,
};
} catch (err) {
console.log(
`::error title=#${pr} not merged::Failed to merge pull request: ${pr}: ${err}`
);
mergeResults[pr] = { success: false };
hasFailed = true;
await execa("git", ["reset", "--hard"]);
}
}
console.log("::endgroup::");
if (hasFailed) {
throw 'There are merge failures. Aborting!';
}
return mergeResults;
}
async function resetBranch(execa) {
console.log("::group::Reset master branch");
let hasFailed = false;
try {
await execa("git", ["remote", "add", "source", "https://github.com/yuzu-emu/yuzu.git"]);
await execa("git", ["fetch", "source"]);
const process1 = await execa("git", ["rev-parse", "source/master"]);
const headCommit = process1.stdout;
await execa("git", ["reset", "--hard", headCommit]);
} catch (err) {
console.log(`::error title=Failed to reset master branch`);
hasFailed = true;
}
console.log("::endgroup::");
if (hasFailed) {
throw 'Failed to reset the master branch. Aborting!';
}
}
async function getPulls(github) {
const query = `query ($owner:String!, $name:String!, $label:String!) {
repository(name:$name, owner:$owner) {
pullRequests(labels: [$label], states: OPEN, first: 100) {
nodes {
number title author { login }
}
}
}
}`;
const mainlineVariables = {
owner: 'yuzu-emu',
name: 'yuzu',
label: CHANGE_LABEL_MAINLINE,
};
const mainlineResult = await github.graphql(query, mainlineVariables);
const pulls = mainlineResult.repository.pullRequests.nodes;
if (BUILD_EA) {
const eaVariables = {
owner: 'yuzu-emu',
name: 'yuzu',
label: CHANGE_LABEL_EA,
};
const eaResult = await github.graphql(query, eaVariables);
const eaPulls = eaResult.repository.pullRequests.nodes;
return pulls.concat(eaPulls);
}
return pulls;
}
async function getMainlineTag(execa) {
console.log(`::group::Getting mainline tag android-${MAINLINE_TAG}`);
let hasFailed = false;
try {
await execa("git", ["remote", "add", "mainline", "https://github.com/yuzu-emu/yuzu-android.git"]);
await execa("git", ["fetch", "mainline", "--tags"]);
await execa("git", ["checkout", `tags/android-${MAINLINE_TAG}`]);
await execa("git", ["submodule", "update", "--init", "--recursive"]);
} catch (err) {
console.log('::error title=Failed pull tag');
hasFailed = true;
}
console.log("::endgroup::");
if (hasFailed) {
throw 'Failed pull mainline tag. Aborting!';
}
}
async function mergebot(github, context, execa) {
// Reset our local copy of master to what appears on yuzu-emu/yuzu - master
await resetBranch(execa);
const pulls = await getPulls(github);
let displayList = [];
for (let i = 0; i < pulls.length; i++) {
let pull = pulls[i];
displayList.push({ PR: pull.number, Title: pull.title });
}
console.info("The following pull requests will be merged:");
console.table(displayList);
await fetchPullRequests(pulls, "https://github.com/yuzu-emu/yuzu", execa);
const mergeResults = await mergePullRequests(pulls, execa);
if (BUILD_EA) {
await tagAndPushEA(github, 'yuzu-emu', `yuzu-android`, execa);
} else {
await generateReadme(pulls, context, mergeResults, execa);
await tagAndPush(github, 'yuzu-emu', `yuzu-android`, execa, true);
}
}
module.exports.mergebot = mergebot;
module.exports.checkAndroidChanges = checkAndroidChanges;
module.exports.tagAndPush = tagAndPush;
module.exports.checkBaseChanges = checkBaseChanges;
module.exports.getMainlineTag = getMainlineTag;

View file

@ -1,57 +0,0 @@
# SPDX-FileCopyrightText: 2024 yuzu Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later
name: yuzu-android-publish
on:
schedule:
- cron: '37 0 * * *'
workflow_dispatch:
inputs:
android:
description: 'Whether to trigger an Android build (true/false/auto)'
required: false
default: 'true'
jobs:
android:
runs-on: ubuntu-latest
if: ${{ github.event.inputs.android != 'false' && github.repository == 'yuzu-emu/yuzu' }}
steps:
# this checkout is required to make sure the GitHub Actions scripts are available
- uses: actions/checkout@v3
name: Pre-checkout
with:
submodules: false
- uses: actions/github-script@v6
id: check-changes
name: 'Check for new changes'
env:
# 24 hours
DETECTION_TIME_FRAME: 86400000
with:
script: |
if (context.payload.inputs && context.payload.inputs.android === 'true') return true;
const checkAndroidChanges = require('./.github/workflows/android-merge.js').checkAndroidChanges;
return checkAndroidChanges(github);
- run: npm install execa@5
if: ${{ steps.check-changes.outputs.result == 'true' }}
- uses: actions/checkout@v3
name: Checkout
if: ${{ steps.check-changes.outputs.result == 'true' }}
with:
path: 'yuzu-merge'
fetch-depth: 0
submodules: true
token: ${{ secrets.ALT_GITHUB_TOKEN }}
- uses: actions/github-script@v5
name: 'Check and merge Android changes'
if: ${{ steps.check-changes.outputs.result == 'true' }}
env:
ALT_GITHUB_TOKEN: ${{ secrets.ALT_GITHUB_TOKEN }}
with:
script: |
const execa = require("execa");
const mergebot = require('./.github/workflows/android-merge.js').mergebot;
process.chdir('${{ github.workspace }}/yuzu-merge');
mergebot(github, context, execa);

View file

@ -1,33 +0,0 @@
# SPDX-FileCopyrightText: 2021 yuzu Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later
name: yuzu-ci
on:
push:
branches: [ master ]
tags: [ "*" ]
pull_request:
branches: [ master ]
jobs:
transifex:
runs-on: ubuntu-latest
container: yuzuemu/build-environments:linux-transifex
if: ${{ github.repository == 'yuzu-emu/yuzu' && !github.head_ref }}
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- name: Update Translation
run: ./.ci/scripts/transifex/docker.sh
env:
TX_TOKEN: ${{ secrets.TRANSIFEX_API_TOKEN }}
reuse:
runs-on: ubuntu-latest
if: ${{ github.repository == 'yuzu-emu/yuzu' }}
steps:
- uses: actions/checkout@v3
- uses: fsfe/reuse-action@v1

View file

@ -1,17 +0,0 @@
# SPDX-FileCopyrightText: 2023 yuzu Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later
# GitHub Action to automate the identification of common misspellings in text files.
# https://github.com/codespell-project/actions-codespell
# https://github.com/codespell-project/codespell
name: codespell
on: pull_request
permissions: {}
jobs:
codespell:
name: Check for spelling errors
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
- uses: codespell-project/actions-codespell@master

View file

@ -1,192 +0,0 @@
# SPDX-FileCopyrightText: 2022 yuzu Emulator Project
# SPDX-License-Identifier: GPL-3.0-or-later
name: 'yuzu verify'
on:
pull_request:
branches: [ master ]
env:
PR_NUMBER: pr${{ github.event.number }}
jobs:
format:
name: 'verify format'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: false
- name: set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: 'Verify Formatting'
run: bash -ex ./.ci/scripts/format/script.sh
build:
name: 'test build'
needs: format
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- type: clang
image: linux-fresh
- type: linux
image: linux-fresh
- type: windows
image: linux-mingw
container:
image: yuzuemu/build-environments:${{ matrix.image }}
options: -u 1001
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- name: Set up cache
uses: actions/cache@v3
id: ccache-restore
with:
path: ~/.ccache
key: ${{ runner.os }}-${{ matrix.type }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-${{ matrix.type }}-
- name: Create ccache directory
if: steps.ccache-restore.outputs.cache-hit != 'true'
run: mkdir -p ~/.ccache
- name: Build
run: ./.ci/scripts/${{ matrix.type }}/docker.sh
env:
ENABLE_COMPATIBILITY_REPORTING: "ON"
- name: Pack
run: ./.ci/scripts/${{ matrix.type }}/upload.sh
env:
NO_SOURCE_PACK: "YES"
- name: Upload
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.type }}
path: artifacts/
build-mac:
name: 'test build (macos)'
needs: format
runs-on: macos-14
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- name: Install dependencies
run: |
brew install autoconf automake boost ccache ffmpeg fmt glslang hidapi libtool libusb lz4 ninja nlohmann-json openssl pkg-config qt@5 sdl2 speexdsp zlib zlib zstd
- name: Build
run: |
mkdir build
cd build
export Qt5_DIR="$(brew --prefix 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
build-msvc:
name: 'test build (windows, msvc)'
needs: format
runs-on: windows-2022
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- name: Set up cache
uses: actions/cache@v3
with:
path: ~/.buildcache
key: ${{ runner.os }}-msvc-${{ github.sha }}
restore-keys: |
${{ runner.os }}-msvc-
- name: Install dependencies
shell: pwsh
run: |
$ErrorActionPreference = "Stop"
$BuildCacheVer = "v0.28.4"
$File = "buildcache-windows.zip"
$Uri = "https://github.com/mbitsnbites/buildcache/releases/download/$BuildCacheVer/$File"
$WebClient = New-Object System.Net.WebClient
$WebClient.DownloadFile($Uri, $File)
7z x $File
$CurrentDir = Convert-Path .
echo "$CurrentDir/buildcache/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Install Vulkan SDK
shell: pwsh
run: .\.ci\scripts\windows\install-vulkan-sdk.ps1
- name: Set up MSVC
uses: ilammy/msvc-dev-cmd@v1
- name: Configure
env:
CC: cl.exe
CXX: cl.exe
run: |
glslangValidator --version
mkdir build
cmake . -B build -GNinja -DCMAKE_TOOLCHAIN_FILE="CMakeModules/MSVCCache.cmake" -DUSE_CCACHE=ON -DYUZU_USE_BUNDLED_QT=1 -DYUZU_USE_BUNDLED_SDL2=1 -DYUZU_USE_QT_WEB_ENGINE=ON -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DYUZU_ENABLE_COMPATIBILITY_REPORTING=ON -DUSE_DISCORD_PRESENCE=ON -DENABLE_QT_TRANSLATION=ON -DCMAKE_BUILD_TYPE=Release -DGIT_BRANCH=pr-verify -DYUZU_CRASH_DUMPS=ON
- name: Build
run: cmake --build build
- name: Cache Summary
run: buildcache -s
- name: Pack
shell: pwsh
run: .\.ci\scripts\windows\upload.ps1
- name: Upload
uses: actions/upload-artifact@v3
with:
name: msvc
path: artifacts/
- name: Upload EXE
uses: actions/upload-artifact@v3
with:
name: ${{ env.INDIVIDUAL_EXE }}
path: ${{ env.INDIVIDUAL_EXE }}
android:
runs-on: ubuntu-latest
needs: format
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- name: set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Set up cache
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
~/.ccache
key: ${{ runner.os }}-android-${{ github.sha }}
restore-keys: |
${{ runner.os }}-android-
- name: Query tag name
uses: olegtarasov/get-tag@v2.1.2
id: tagName
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y ccache apksigner glslang-dev glslang-tools
- name: Build
run: ./.ci/scripts/android/build.sh
- name: Copy and sign artifacts
env:
ANDROID_KEYSTORE_B64: ${{ secrets.ANDROID_KEYSTORE_B64 }}
ANDROID_KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }}
ANDROID_KEYSTORE_PASS: ${{ secrets.ANDROID_KEYSTORE_PASS }}
run: ./.ci/scripts/android/upload.sh
- name: Upload
uses: actions/upload-artifact@v3
with:
name: android
path: artifacts/

6
.gitignore vendored
View file

@ -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

47
.gitmodules vendored
View file

@ -7,33 +7,15 @@
[submodule "cubeb"]
path = externals/cubeb
url = https://github.com/mozilla/cubeb.git
[submodule "dynarmic"]
path = externals/dynarmic
url = https://github.com/merryhime/dynarmic.git
[submodule "libusb"]
path = externals/libusb/libusb
url = https://github.com/libusb/libusb.git
[submodule "discord-rpc"]
path = externals/discord-rpc
url = https://github.com/yuzu-emu/discord-rpc.git
[submodule "Vulkan-Headers"]
path = externals/Vulkan-Headers
url = https://github.com/KhronosGroup/Vulkan-Headers.git
[submodule "sirit"]
path = externals/sirit
url = https://github.com/yuzu-emu/sirit.git
[submodule "mbedtls"]
path = externals/mbedtls
url = https://github.com/yuzu-emu/mbedtls.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
@ -49,21 +31,30 @@
[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 "breakpad"]
path = externals/breakpad
url = https://github.com/yuzu-emu/breakpad.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"]
[submodule "externals/SPIRV-Headers"]
path = externals/SPIRV-Headers
url = https://github.com/KhronosGroup/SPIRV-Headers.git
[submodule "externals/SPIRV-Tools"]
path = externals/SPIRV-Tools
url = https://github.com/KhronosGroup/SPIRV-Tools.git
[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
View 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
View 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
View 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
View 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

View file

@ -0,0 +1,6 @@
[Desktop Entry]
Type=Application
Name=torzu
Icon=torzu
Exec=AppRun
Categories=Game;

View 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

View 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
View file

@ -0,0 +1,3 @@
#! /bin/sh
LD_LIBRARY_PATH=/usr/lib/$(uname -m)-linux-gnu:/usr/lib:. exec ./yuzu "$@"

View file

Binary file not shown.

View file

@ -0,0 +1 @@
This is a statically compiled bubblewrap 0.9.0 executable.

Binary file not shown.

View file

@ -0,0 +1 @@
This is a statically compiled bubblewrap 0.9.0 executable.

172
AppImageBuilder/build.sh Executable file
View 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

View file

@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2018 yuzu Emulator Project
# SPDX-FileCopyrightText: 2018 yuzu Emulator Project and 2024 torzu project
# SPDX-License-Identifier: GPL-2.0-or-later
cmake_minimum_required(VERSION 3.22)
@ -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_WEB_SERVICE "Enable web services (telemetry, etc.)" ON)
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_QT_MULTIMEDIA "Use QtMultimedia for Camera" OFF)
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_WEB_ENGINE "Use QtWebEngine for web applet implementation" OFF)
set(YUZU_USE_EXTERNAL_VULKAN_UTILITY_LIBRARIES 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)
@ -220,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)
@ -292,26 +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)
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)
@ -319,7 +566,7 @@ if (ENABLE_LIBUSB)
endif()
if (ARCHITECTURE_x86 OR ARCHITECTURE_x86_64)
find_package(xbyak 6 CONFIG)
find_package(xbyak 7 CONFIG)
endif()
if (ARCHITECTURE_arm64)
@ -340,7 +587,6 @@ endif()
if (ENABLE_WEB_SERVICE)
find_package(cpp-jwt 1.4 CONFIG)
find_package(httplib 0.12 MODULE COMPONENTS OpenSSL)
endif()
if (YUZU_TESTS)
@ -361,10 +607,13 @@ 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()
# QT6 searches for Vulkan::Headers, too, so we have to define it before QT6 has a chance to do it.
add_subdirectory(externals)
function(set_yuzu_qt_components)
# Best practice is to ask for all components at once, so they are from the same version
set(YUZU_QT_COMPONENTS2 Core Widgets Concurrent)
@ -388,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()
@ -620,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)
@ -675,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(
@ -685,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.
@ -692,15 +878,14 @@ 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()
add_subdirectory(externals)
add_subdirectory(src)
# Set yuzu project or yuzu-cmd project as default StartUp Project in Visual Studio depending on whether QT is enabled or not
@ -720,13 +905,13 @@ endif()
# https://specifications.freedesktop.org/shared-mime-info-spec/shared-mime-info-spec-latest.html
# https://www.freedesktop.org/software/appstream/docs/
if(ENABLE_QT AND UNIX AND NOT APPLE)
install(FILES "dist/org.yuzu_emu.yuzu.desktop"
install(FILES "dist/onion.torzu_emu.torzu.desktop"
DESTINATION "share/applications")
install(FILES "dist/yuzu.svg"
DESTINATION "share/icons/hicolor/scalable/apps"
RENAME "org.yuzu_emu.yuzu.svg")
install(FILES "dist/org.yuzu_emu.yuzu.xml"
RENAME "onion.torzu_emu.torzu.svg")
install(FILES "dist/onion.torzu_emu.torzu.xml"
DESTINATION "share/mime/packages")
install(FILES "dist/org.yuzu_emu.yuzu.metainfo.xml"
install(FILES "dist/onion.torzu_emu.torzu.metainfo.xml"
DESTINATION "share/metainfo")
endif()

1291
CMakeModules/CPM.cmake Normal file

File diff suppressed because it is too large Load diff

View file

@ -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()

View file

@ -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/yuzu-emu/")
set(package_base_url "https://github.com/litucks/")
set(package_repo "no_platform")
set(package_extension "no_platform")
if (WIN32)

View file

@ -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()

35
FAQ.md Normal file
View file

@ -0,0 +1,35 @@
# FAQ
**Q:** Will you fix game X?<br/>
**A:** I would love to! Unfortunately my resources are severely limited as I'm a one-man team. I will give it a try, but if you can link me to a commit in any other fork fixing the game I'd be glad to cherry-pick it.
**Q:** Will you add feature X?<br/>
**A:** Most likely, no. I hesitate from adding complex features that may jeopardize stability and introduce bugs. Such features would only be added behind a settings toggle.
**Q:** You're only doing this for fame/money/...<br/>
**A:** At the moment I am not considering to take any donations. I won't need them anyways in the foreseeable future.
About the fame thing, I kind of dislike the attention. It distracts me from doing actual work, and it makes me feel pressured. Read this if you'd like to know more: [https://www.reddit.com/r/EmulationOnAndroid/comments/1ckmdh7/comment/l36hru9/?utm\_source=share&utm\_medium=web3x&utm\_name=web3xcss&utm\_term=1&utm\_content=share\_button](https://www.reddit.com/r/EmulationOnAndroid/comments/1ckmdh7/comment/l36hru9/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button)
**Q:** What happens if Nintendo DMCAs the repo?<br/>
**A:** The main repository is on the Tor network. That means Nintendo can do no harm to it unless they manage to deanonymize me and send me a personal letter. I'm doing my best to avoid that.
Whenever a mirror repository gets taken down, I'll just move on to another git service. Yes, they are finite but I've got enough to hopefully make them give up before I've depleted my list.
**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 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. 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.
Finally, enjoy life, make the most of it, don't be a ~~couch~~ office chair potato like me. Tip, even if you are, a walk around the green city areas can be incredibly refreshing!

View file

@ -1,85 +1,71 @@
<!--
SPDX-FileCopyrightText: 2018 yuzu Emulator Project
SPDX-FileCopyrightText: 2018 yuzu Emulator Project - 2024 torzu Emulator Project
SPDX-License-Identifier: GPL-2.0-or-later
-->
<h1 align="center">
<br>
<a href="https://yuzu-emu.org/"><img src="https://raw.githubusercontent.com/yuzu-emu/yuzu-assets/master/icons/icon.png" alt="yuzu" 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>yuzu</b>
<b>torzu</b>
<br>
</h1>
<h4 align="center"><b>yuzu</b> is the world's most popular, open-source, Nintendo Switch emulator — started by the creators of <a href="https://citra-emu.org" target="_blank">Citra</a>.
<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 we actively maintain builds for Windows, Linux and Android.
It is written in C++ with portability in mind and runs on Linux, Windows and Android
</h4>
<p align="center">
<a href="https://dev.azure.com/yuzu-emu/yuzu/">
<img src="https://dev.azure.com/yuzu-emu/yuzu/_apis/build/status/yuzu%20mainline?branchName=master"
alt="Azure Mainline CI Build Status">
</a>
<a href="https://discord.com/invite/u77vRWY">
<img src="https://img.shields.io/discord/398318088170242053?color=5865F2&label=yuzu&logo=discord&logoColor=white"
alt="Discord">
</a>
</p>
## Fake websites
<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="#support">Support</a> |
<a href="#license">License</a>
</p>
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
The emulator is capable of running most commercial games at full speed, provided you meet the [necessary hardware requirements](https://yuzu-emu.org/help/quickstart/#hardware-requirements).
The emulator is capable of running most commercial games at full speed, provided you meet the [necessary hardware requirements](http://web.archive.org/web/20240130133811/https://yuzu-emu.org/help/quickstart/#hardware-requirements).
For a full list of games yuzu supports, please visit our [Compatibility page](https://yuzu-emu.org/game/).
It runs most Nintendo Switch games released until the date of the Yuzu takedown.
Check out our [website](https://yuzu-emu.org/) for the latest news on exciting features, monthly progress reports, and more!
## Goals
**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.
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.
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 GitHub. It's also where [our central repository](https://github.com/yuzu-emu/yuzu) is hosted. For development discussion, please join us on [Discord](https://discord.com/invite/u77vRWY).
All development happens on [Dark Git](http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/). It's also where [our central repository](http://vub63vv26q6v27xzv2dtcd25xumubshogm67yrpaz2rculqxs7jlfqad.onion/torzu-emu/torzu) is hosted.
If you want to contribute, please take a look at the [Contributor's Guide](https://github.com/yuzu-emu/yuzu/wiki/Contributing) and [Developer Information](https://github.com/yuzu-emu/yuzu/wiki/Developer-Information).
You can also contact any of the developers on Discord in order to know about the current state of the emulator.
To clone this git repository, use these commands (assuming tor is installed as a service and running):
If you want to contribute to the user interface translation project, please check out the [yuzu project on transifex](https://www.transifex.com/yuzu-emulator/yuzu). We centralize translation work there, and periodically upstream translations.
```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
```
Alternatively, you can clone from the [NotABug mirror repository](https://notabug.org/litucks/torzu):
```bash
git clone --depth 1 https://notabug.org/litucks/torzu.git
cd torzu
git submodule update --init --recursive
```
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.
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
* __Windows__: [Windows Build](https://github.com/yuzu-emu/yuzu/wiki/Building-For-Windows)
* __Linux__: [Linux Build](https://github.com/yuzu-emu/yuzu/wiki/Building-For-Linux)
## Download
You can download the latest releases automatically via the installer on our [downloads](https://yuzu-emu.org/downloads/) page.
## Support
If you enjoy the project and want to support us financially, check out our Patreon!
<a href="https://www.patreon.com/yuzuteam">
<img src="https://c5.patreon.com/external/logo/become_a_patron_button@2x.png" width="160">
</a>
Any donations received will go towards things like:
* Switch consoles to explore and reverse-engineer the hardware
* Switch games for testing, reverse-engineering, and implementing new features
* Web hosting and infrastructure setup
* Software licenses (e.g. Visual Studio, IDA Pro, etc.)
* Additional hardware (e.g. GPUs as-needed to improve rendering support, other peripherals to add support for, etc.)
If you wish to support us a different way, please join our [Discord](https://discord.gg/u77vRWY) and talk to bunnei. You may also contact: donations@yuzu-emu.org.
<!-- -->
* [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.

16
blog/000-intro.md Normal file
View file

@ -0,0 +1,16 @@
# Blog Entry 0: Intro
After a week of being unable to check on the project, I realized the onion site had gone down randomly and wouldn't get back up until I rebooted the server. Not ideal. But it's back up now.
Given the lack of innovation and time on my side, I thought it would be a good idea to at least write a short educational blog on the topic.
In this blog, I'll mostly talk about the ins and outs of this emulator, with the hope that someone with more skill than me will eventually be able to pick up where the Yuzu project left off. I might also write about personal things, but don't worry—I'll try to keep it low (I've got to keep my anonymity). I'm keeping this blog post short for the sake of it being an intro.
One thing to note is that on this blog, I'll refer to "Yuzu" as parts of the emulator written by the original Yuzu team and as "Torzu" to the changes I've made and the project itself.
Here's an overview of some of the next topics I'd like to cover on this blog next:
- How I manage a project like this (I'll explain how I operate this project anonymously and what changes I've made to the code to improve its longevity)
- The puzzle pieces (I'll explain the overall concept of the different components of Yuzu)
- ARM emulation (I'll explain how Yuzu emulates the ARM CPU)
Make sure to also read the [original Yuzu blog](https://yuzu-mirror.github.io/entry/) if you're interested in this topic!

BIN
blog/000-intro.md.sig Normal file

Binary file not shown.

203
blog/001-arm-emulation.md Normal file
View 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.

Binary file not shown.

99
blog/002-puzzle-pieces.md Normal file
View 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!

Binary file not shown.

24
boost-1.88.0-fix.patch Normal file
View 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
View 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
View 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
![](https://raw.githubusercontent.com/flathub/org.yuzu_emu.yuzu/master/assets/yuzu-settings-2.png)
2. Disable both Host MMU emulation options
![](https://raw.githubusercontent.com/flathub/org.yuzu_emu.yuzu/master/assets/yuzu-settings-1.png)
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
View 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
View 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)**
![](https://i.imgur.com/0jwV1hW.png)
* **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**.)
![](https://i.imgur.com/NtSnqjm.png)
![](https://i.imgur.com/YLr1Qw2.png)
* **[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.**
![](https://i.imgur.com/7pteS6d.png)
* **[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.**
![](https://i.imgur.com/aHCJxsR.png)
* **[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.**
![](https://i.imgur.com/xIEuM6R.png)
* **[Git for Windows](https://gitforwindows.org)** - (see next step)
![](https://i.imgur.com/UeSzkBw.png)
* When installing Git, include it in your system PATH by choosing the "**Git from the command line and also from 3rd-party software**" option.
![](https://i.imgur.com/x0rRs1t.png)
* **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`).
![](https://i.imgur.com/qOslIWv.png)
* Use a `/build` subdirectory inside the `torzu` directory or some other directory of your choice. (Tell CMake to create it.)
![](https://i.imgur.com/cNnhs22.png)
![](https://github.com/yuzu-emu/yuzu/assets/20753089/738efcab-0da6-44ce-889d-becf3712db10)
* Click the "Configure" button and choose `Visual Studio 17 2022`, with `x64` for the optional platform.
![](https://i.imgur.com/qJcUeIg.png)
* *(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.)*
![](https://user-images.githubusercontent.com/22451773/180585999-07316d6e-9751-4d11-b957-1cf57cd7cd58.png)
* **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.
![](https://i.imgur.com/5LKg92k.png)
* Open the solution file `yuzu.sln` in Visual Studio 2022, which is located in the `build` directory.
![](https://i.imgur.com/208yMml.png)
* 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.)
![](https://i.imgur.com/nPMajnn.png) ![](https://i.imgur.com/BDMLzRZ.png)
* Select the appropriate build type, Debug for debug purposes or Release for performance (in case of doubt choose Release).
![](https://i.imgur.com/qxg4roC.png)
* Right-click the project you want to build and press Build in the submenu or press F5.
![](https://i.imgur.com/CkQgOFW.png)
* After build completed you can find the Torzu program files in a directory specified in the output log (usually `build\bin\Release`.)
![](https://i.imgur.com/h78ugDN.png)
---
---
---
---
---
# 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
![](https://i.imgur.com/uZ33O7u.png)
* 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":
<!--![](https://i.imgur.com/CcxIAht.png)-->
**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:
![1](https://user-images.githubusercontent.com/42481638/216899046-0d41d7d6-8e4d-4ed2-9587-b57088af5214.png)
* using `https://notabug.org/litucks/torzu.git` (instead of the shown yuzu repo):
![2](https://user-images.githubusercontent.com/42481638/216899061-b2ea274a-e88c-40ae-bf0b-4450b46e9fea.png)
![3](https://user-images.githubusercontent.com/42481638/216899076-0e5988c4-d431-4284-a5ff-9ecff973db76.png)
## Building & Setup
* Once Cloned, You will be taken to a prompt like the image below:
![4](https://user-images.githubusercontent.com/42481638/216899092-3fe4cec6-a540-44e3-9e1e-3de9c2fffc2f.png)
* 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`
![5](https://user-images.githubusercontent.com/42481638/216899164-6cee8482-3d59-428f-b1bc-e6dc793c9b20.png)
* 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
![6](https://user-images.githubusercontent.com/42481638/216899226-975048e9-bc6d-4ec1-bc2d-bd8a1e15ed04.png)
* Now run by clicking the play button or pressing Shift+F10, and yuzu will auto-launch once built.
![7](https://user-images.githubusercontent.com/42481638/216899275-d514ec6a-e563-470e-81e2-3e04f0429b68.png)

View file

@ -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"

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

Some files were not shown because too many files have changed in this diff Show more