|
|
|
|
@@ -1,58 +1,122 @@
|
|
|
|
|
## Method I: MSVC Build for Windows
|
|
|
|
|
# Method I: MSVC Build for Windows (MS Visual Studio)
|
|
|
|
|
|
|
|
|
|
### Minimal Dependencies
|
|
|
|
|
### MSVC: Overview
|
|
|
|
|
|
|
|
|
|
On Windows, all library dependencies are automatically included within the `externals` folder, or can be downloaded on-demand. To build yuzu, you need to install:
|
|
|
|
|
* 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)
|
|
|
|
|
|
|
|
|
|
* **[Visual Studio 2022 Community](https://visualstudio.microsoft.com/downloads/)** - **Make sure to select C++ support in the installer. Make sure to update to the latest version if already installed.**
|
|
|
|
|
|
|
|
|
|
### 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)**
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
* **[CMake](https://cmake.org/download/)** - Used to generate Visual Studio project files. Does not matter if either 32-bit or 64-bit version is installed.
|
|
|
|
|
* **Visual Studio 2022 Community (continued)**
|
|
|
|
|
* Be sure to select "Desktop development with C++"
|
|
|
|
|
* Select the MSVC components outlined in red below (**especially VS 2019 build tools**.)
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|

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

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

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

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

|
|
|
|
|
|
|
|
|
|
* While installing Git Bash, you should tell it to include Git in your system path. (Choose the "Git from the command line and also from 3rd-party software" option.) If you missed that, don't worry, you'll just have to manually tell CMake where your git.exe is, since it's used to include version info into the built executable.
|
|
|
|
|
* When installing Git, include it in your system PATH by choosing the "**Git from the command line and also from 3rd-party software**" option.
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
### Cloning yuzu with Git
|
|
|
|
|
* **REBOOT YOUR SYSTEM, to be sure all dependencies are registered before proceeding.**
|
|
|
|
|
|
|
|
|
|
**from Codeberg repo (the `--recursive` option automatically clones the required Git submodules):**
|
|
|
|
|
---
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
## 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 --recursive https://codeberg.org/litucks/torzu.git
|
|
|
|
|
cd torzu
|
|
|
|
|
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
|
|
|
|
|
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)*-->
|
|
|
|
|
|
|
|
|
|
* *(Note: yuzu by default downloads to `C:\Users\<user-name>\yuzu` (Master) or `C:\Users\<user-name>\yuzu-mainline` (Mainline)*
|
|
|
|
|
|
|
|
|
|
### Building
|
|
|
|
|
|
|
|
|
|
* Open the CMake GUI application and point it to the `torzu` directory.
|
|
|
|
|
* Open the CMake GUI application and point it to the `torzu` directory (instead of `yuzu-canary`).
|
|
|
|
|
|
|
|
|
|

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

|
|
|
|
|

|
|
|
|
|
@@ -63,27 +127,23 @@ git submodule update --init --recursive
|
|
|
|
|
|
|
|
|
|
* *(Note: If you used GitHub's own app to clone, run `git submodule update --init --recursive` to get the remaining dependencies)*
|
|
|
|
|
|
|
|
|
|
* If you get an error about missing packages, enable `YUZU_USE_BUNDLED_VCPKG`, and then click Configure again.
|
|
|
|
|
* **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.)*
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
* If you get an error "Unable to find a valid Visual Studio instance", make sure that you installed following MSVC components (**especially VS 2019 build tools**.) and then try again.
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|

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

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

|
|
|
|
|
|
|
|
|
|
* Depending if you want a graphical user interface or not (`yuzu` has the graphical user interface, while `yuzu-cmd` doesn't), select `yuzu` or `yuzu-cmd` in the Solution Explorer, right-click and `Set as StartUp Project`.
|
|
|
|
|
* 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.)
|
|
|
|
|
|
|
|
|
|
 
|
|
|
|
|
|
|
|
|
|
@@ -95,24 +155,32 @@ git submodule update --init --recursive
|
|
|
|
|
|
|
|
|
|

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

|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
---
|
|
|
|
|
---
|
|
|
|
|
---
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
## Method II: MinGW-w64 Build with MSYS2
|
|
|
|
|
# Method II: MinGW-w64 Build with MSYS2
|
|
|
|
|
|
|
|
|
|
### Prerequisites to install
|
|
|
|
|
## 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
|
|
|
|
|
## Install other dependencies
|
|
|
|
|
* Open the `MSYS2 MinGW 64-bit` (mingw64.exe) shell
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
* Download and install all dependencies using: `pacman -Syu git make mingw-w64-x86_64-SDL2 mingw-w64-x86_64-cmake mingw-w64-x86_64-qt5 mingw-w64-x86_64-toolchain`
|
|
|
|
|
|
|
|
|
|
### Setup environment variables
|
|
|
|
|
## Setup environment variables
|
|
|
|
|
```
|
|
|
|
|
export PATH="<Absolute path to the Bin folder in Vulkan SDK>:$PATH"
|
|
|
|
|
export VCPKG_DEFAULT_HOST_TRIPLET=x64-mingw-static
|
|
|
|
|
@@ -121,29 +189,34 @@ 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 yuzu repository with Git
|
|
|
|
|
## Clone the torzu repository with Git
|
|
|
|
|
|
|
|
|
|
**from NotABug repo (the `--recursive` option automatically clones the required Git submodules):**
|
|
|
|
|
Navigate to a directory where you want the repo, then use one option below to clone into a subdirectory named "torzu":
|
|
|
|
|
|
|
|
|
|
<!---->
|
|
|
|
|
|
|
|
|
|
**from NotABug repo:**
|
|
|
|
|
```
|
|
|
|
|
git clone --depth 1 --recursive https://notabug.org/litucks/torzu.git
|
|
|
|
|
cd torzu
|
|
|
|
|
git submodule update --init --recursive
|
|
|
|
|
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
|
|
|
|
|
git submodule update --init --recursive
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### Generating makefile
|
|
|
|
|
## 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 yuzu
|
|
|
|
|
## Build torzu
|
|
|
|
|
```
|
|
|
|
|
make -j$(nproc) yuzu
|
|
|
|
|
```
|
|
|
|
|
@@ -170,32 +243,41 @@ Please note that `-lw2_32` is already added, but the order is not correct and he
|
|
|
|
|
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)
|
|
|
|
|
## 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 III: CLion Environment Setup
|
|
|
|
|
---
|
|
|
|
|
---
|
|
|
|
|
---
|
|
|
|
|
---
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
### Minimal Dependencies
|
|
|
|
|
# Method III: 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
|
|
|
|
|
## Cloning yuzu with CLion
|
|
|
|
|
|
|
|
|
|
* Clone the Repository:
|
|
|
|
|
|
|
|
|
|

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

|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
### Building & Setup
|
|
|
|
|
## Building & Setup
|
|
|
|
|
|
|
|
|
|
* Once Cloned, You will be taken to a prompt like the image below:
|
|
|
|
|
|
|
|
|
|
@@ -220,23 +302,3 @@ To build yuzu, you need to install the following:
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
## Building from the command line with MSVC
|
|
|
|
|
|
|
|
|
|
**from Codeberg repo (the `--recursive` option automatically clones the required Git submodules):**
|
|
|
|
|
```
|
|
|
|
|
git clone --depth 1 --recursive https://codeberg.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
|
|
|
|
|
```
|
|
|
|
|
followed by:
|
|
|
|
|
```
|
|
|
|
|
mkdir build
|
|
|
|
|
cd build
|
|
|
|
|
cmake .. -G "Visual Studio 17 2022" -A x64
|
|
|
|
|
cmake --build . --config Release
|
|
|
|
|
```
|