From 14951348bf13607fd05bb92e70b18e12d21109fe Mon Sep 17 00:00:00 2001 From: lizzie Date: Wed, 31 Dec 2025 21:30:31 +0100 Subject: [PATCH] [docs] update coding guidelines, freebsd+windows ARM caveats (#3209) Signed-off-by: lizzie lizzie@eden-emu.dev Co-authored-by: crueter Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3209 Reviewed-by: DraVee Reviewed-by: Maufeat Reviewed-by: crueter Co-authored-by: lizzie Co-committed-by: lizzie --- docs/Caveats.md | 70 +++++++++++++++++++++------------- docs/Coding.md | 58 +++++++++++++++++++++++++---- docs/CrossCompile.md | 6 ++- docs/Deps.md | 89 ++++++++++++++++++++++++++------------------ docs/README.md | 1 + 5 files changed, 153 insertions(+), 71 deletions(-) diff --git a/docs/Caveats.md b/docs/Caveats.md index 512985cd8a..ed98f602d8 100644 --- a/docs/Caveats.md +++ b/docs/Caveats.md @@ -1,17 +1,20 @@ # Caveats -- [Caveats](#caveats) - - [Arch Linux](#arch-linux) - - [Gentoo Linux](#gentoo-linux) - - [macOS](#macos) - - [Solaris](#solaris) - - [HaikuOS](#haikuos) - - [OpenBSD](#openbsd) - - [FreeBSD](#freebsd) - - [NetBSD](#netbsd) - - [MSYS2](#msys2) - - [Windows 8.1 and below](#windows-81-and-below) +- [Arch Linux](#arch-linux) +- [Gentoo Linux](#gentoo-linux) +- [macOS](#macos) +- [Solaris](#solaris) +- [HaikuOS](#haikuos) +- [OpenBSD](#openbsd) +- [FreeBSD](#freebsd) +- [NetBSD](#netbsd) +- [MSYS2](#msys2) +- [RedoxOS](#redoxos) +- [Windows](#windows) + - [Windows 7, Windows 8 and Windows 8.1](#windows-7-windows-8-and-windows-81) + - [Windows Vista and below](#windows-vista-and-below) + - [Windows on ARM](#windows-on-arm) ## Arch Linux @@ -49,6 +52,7 @@ export PATH="$PATH:$PWD" ``` Default MESA is a bit outdated, the following environment variables should be set for a smoother experience: + ```sh export MESA_GL_VERSION_OVERRIDE=4.6 export MESA_GLSL_VERSION_OVERRIDE=460 @@ -93,9 +97,16 @@ Eden is not currently available as a port on FreeBSD, though it is in the works. The available OpenSSL port (3.0.17) is out-of-date, and using a bundled static library instead is recommended; to do so, add `-DYUZU_USE_BUNDLED_OPENSSL=ON` to your CMake configure command. +Gamepad/controllers may not work on 15.0, this is due to an outdated SDL not responding well to the new `usbhid(2)` driver. To workaround this simply disable `usbhid(2)` (add the following to `/boot/loader.conf`): + +```sh +hw.usb.usbhid.enable="0" +``` + ## NetBSD -Install `pkgin` if not already `pkg_add pkgin`, see also the general [pkgsrc guide](https://www.netbsd.org/docs/pkgsrc/using.html). For NetBSD 10.1 provide `echo 'PKG_PATH="https://cdn.netbsd.org/pub/pkgsrc/packages/NetBSD/x86_64/10.0_2025Q3/All/"' >/etc/pkg_install.conf`. If `pkgin` is taking too much time consider adding the following to `/etc/rc.conf`: +Install `pkgin` if not already `pkg_add pkgin`, see also the general [pkgsrc guide](https://www.netbsd.org/docs/pkgsrc/using.html). For NetBSD 10.1 provide `echo 'PKG_PATH="https://cdn.netbsd.org/pub/pkgsrc/packages/NetBSD/amd64/10.1/All/"' >/etc/pkg_install.conf`. If `pkgin` is taking too much time consider adding the following to `/etc/rc.conf`: + ```sh ip6addrctl=YES ip6addrctl_policy=ipv4_prefer @@ -109,9 +120,10 @@ System provides a default `g++-10` which doesn't support the current C++ codebas Make may error out when generating C++ headers of SPIRV shaders, hence it's recommended to use `gmake` over the default system one. -[parallel/spirv-tools](https://iso.us.netbsd.org/pub/pkgsrc/current/pkgsrc/parallel/spirv-tools/index.html) isn't available in binary form and must be build from source. +[parallel/spirv-tools](https://iso.us.netbsd.org/pub/pkgsrc/current/pkgsrc/parallel/spirv-tools/index.html) isn't available in binary form and must be built from source. + +glslang is not available on NetBSD, to circumvent this simply build glslang by yourself: -Such that glslang is not available on NetBSD, to circumvent this simply build glslang by yourself: ```sh pkgin python313 git clone --depth=1 https://github.com/KhronosGroup/glslang.git @@ -124,13 +136,15 @@ cmake --install build However, pkgsrc is highly recommended, see [getting pkgsrc](https://iso.us.netbsd.org/pub/pkgsrc/current/pkgsrc/doc/pkgsrc.html#getting). You must get `current` not the `2025Q2` version. -# DragonFlyBSD +## DragonFlyBSD If `libstdc++.so.6` is not found (`GLIBCXX_3.4.30`) then attempt: + ```sh rm /usr/local/lib/gcc11/libstdc++.so.6 ln -s /usr/local/lib/gcc14/libstdc++.so /usr/local/lib/gcc11/libstdc++.so.6 ``` + This may have unforeseen consequences of which we don't need to worry about for now. Default `g++` (and the libstdc++) is too outdated - so install `gcc14` and redirect CMake to the new compiler toolchain `-DCMAKE_CXX_COMPILER=gcc14 -DCMAKE_C_COMPILER=g++14`. @@ -141,13 +155,9 @@ If build hangs, use `hammer2 bulkfree`. ## MSYS2 -`qt6-static` isn't supported yet. - -Only the `MINGW64` environment is tested; however, all of the others should work (in theory) sans `MINGW32`. - -Currently, only FFmpeg can be used as a system dependency; the others will result in linker errors. +Only the `MINGW64` environment is tested (or `CLANGARM64` on ARM); however, all of the others should work (in theory) sans `MINGW32`. -When packaging an MSYS2 build, you will need to copy all dependent DLLs recursively alongside the `windeployqt6`; for example: +When packaging an MSYS2 build that is NOT fully static, you will need to copy all dependent DLLs recursively alongside the `windeployqt6`; for example: ```sh # MSYS_TOOLCHAIN is typically just mingw64 @@ -196,14 +206,24 @@ windeployqt6 --no-compiler-runtime --no-opengl-sw --no-system-dxc-compiler \ find ./*/ -name "*.dll" | while read -r dll; do deps "$dll"; done ``` -## Windows 8.1 and below +## RedoxOS + +The package install may randomly hang at times, in which case it has to be restarted. ALWAYS do a `sudo pkg update` or the chances of it hanging will be close to 90%. If "multiple" installs fail at once, try installing 1 by 1 the packages. + +When CMake invokes certain file syscalls - it may sometimes cause crashes or corruptions on the (kernel?) address space - so reboot the system if there is a "hang" in CMake. + +## Windows + +### Windows 7, Windows 8 and Windows 8.1 DirectX 12 is not available - simply copy and paste a random DLL and name it `d3d12.dll`. Install [Qt6 compatibility libraries](github.com/ANightly/qt6windows7) specifically Qt 6.9.5. -## RedoxOS +### Windows Vista and below -The package install may randomly hang at times, in which case it has to be restarted. ALWAYS do a `sudo pkg update` or the chances of it hanging will be close to 90%. If "multiple" installs fail at once, try installing 1 by 1 the packages. +No support for Windows Vista (or below) is present at the moment. Check back later. -When CMake invokes certain file syscalls - it may sometimes cause crashes or corruptions on the (kernel?) address space - so reboot the system if there is a "hang" in CMake. +### Windows on ARM + +If you're using Snapdragon X or 8CX, use the [the Vulkan translation layer](https://apps.microsoft.com/detail/9nqpsl29bfff?hl=en-us&gl=USE) only if the stock drivers do not work. And of course always keep your system up-to-date. diff --git a/docs/Coding.md b/docs/Coding.md index 8d02df4088..4dad9d7d5a 100644 --- a/docs/Coding.md +++ b/docs/Coding.md @@ -10,7 +10,13 @@ Simply put, types/classes are named as `PascalCase`, same for methods and functi Except for Qt MOC where `functionName` is preferred. -Template typenames prefer short names like `T`, `I`, `U`, if a longer name is required either `Iterator` or `perform_action` are fine as well. +Template typenames prefer short names like `T`, `I`, `U`, if a longer name is required either `Iterator` or `perform_action` are fine as well. Do not use names like `SS` as systems like solaris define it for registers, in general do not use any of the following for short names: +- `SS`, `DS`, `GS`, `FS`: Segment registers, defined by Solaris `` +- `EAX`, `EBX`, `ECX`, `EDX`, `ESI`, `EDI`, `ESP`, `EBP`, `EIP`: Registers, defined by Solaris. +- `X`: Defined by some utility headers, avoid. +- `_`: Defined by gettext, avoid. +- `N`, `M`, `S`: Preferably don't use this for types, use it for numeric constants. +- `TR`: Used by some weird `` whom define the Task Register as a logical register to provide to the user... (Need to remember which OS in specific). Macros must always be in `SCREAMING_CASE`. Do not use short letter macros as systems like Solaris will conflict with them; a good rule of thumb is >5 characters per macro - i.e `THIS_MACRO_IS_GOOD`, `AND_ALSO_THIS_ONE`. @@ -18,25 +24,45 @@ Try not using hungarian notation, if you're able. ## Formatting +Formatting is extremelly lax, the general rule of thumb is: Don't add new lines just to increase line count. The less lines we have to look at, the better. This means also packing densely your code while not making it a clusterfuck. Strike a balance of "this is a short and comprehensible piece of code" and "my eyes are actually happy to see this!". Don't just drop the entire thing in a single line and call it "dense code", that's just spaghetti posing as code. In general, be mindful of what other devs need to look at. + Do not put if/while/etc braces after lines: ```c++ // no dont do this +// this is more lines of code for no good reason (why braces need their separate lines?) +// and those take space in someone's screen, cumulatively if (thing) -{ +{ //<-- some(); // ... -} +} //<-- 2 lines of code for basically "opening" and "closing" an statment // do this -if (thing) { +if (thing) { //<-- [...] and with your brain you can deduce it's this piece of code + // that's being closed some(); // ... -} +} //<-- only one line, and it's clearer since you know its closing something [...] -// or this +// or this, albeit the extra line isn't needed (at your discretion of course) if (thing) some(); // ... -// this is also ok +// this is also ok, keeps things in one line and makes it extremely clear if (thing) some(); + +// NOT ok, don't be "clever" and use the comma operator to stash a bunch of statments +// in a single line, doing this will definitely ruin someone's day - just do the thing below +// vvv +if (thing) some(), thing(), a2(a1(), y1(), j1()), do_complex_shit(wa(), wo(), ploo()); +// ... and in general don't use the comma operator for "multiple statments", EXCEPT if you think +// that it makes the code more readable (the situation may be rare however) + +// Wow so much clearer! Now I can actually see what each statment is meant to do! +if (thing) { + some(); + thing(); + a2(a1(), y1(), j1()); + do_complex_shit(wa(), wo(), ploo()); +} ``` Brace rules are lax, if you can get the point across, do it: @@ -77,3 +103,21 @@ if (device_name.empty()) { SDL_AudioSpec obtained; device = SDL_OpenAudioDevice(device_name.empty() ? nullptr : device_name.c_str(), capture, &spec, &obtained, false); ``` + +A note about operators: Use them sparingly, yes, the language is lax on them, but some usages can be... tripping to say the least. +```c++ +a, b, c; //<-- NOT OK multiple statments with comma operator is definitely a recipe for disaster +return c ? a : b; //<-- OK ternaries at end of return statments are clear and fine +return a, b; //<-- NOT OK return will take value of `b` but also evaluate `a`, just use a separate statment +void f(int a[]) //<-- OK? if you intend to use the pointer as an array, otherwise just mark it as * +``` + +And about templates, use them sparingly, don't just do meta-templating for the sake of it, do it when you actually need it. This isn't a competition to see who can make the most complicated and robust meta-templating system. Just use what works, and preferably stick to the standard libary instead of reinventing the wheel. Additionally: + +```c++ +// NOT OK This will create (T * N * C * P) versions of the same function. DO. NOT. DO. THIS. +template inline void what() const noexcept; + +// OK use parameters like a normal person, don't be afraid to use them :) +template inline void what(size_t n, size_t c, size_t p) const noexcept; +``` diff --git a/docs/CrossCompile.md b/docs/CrossCompile.md index 49a2774b04..1f6ef447e6 100644 --- a/docs/CrossCompile.md +++ b/docs/CrossCompile.md @@ -1,6 +1,8 @@ -# Cross Compile +# Cross compiling -## ARM64 +General guide for cross compiling. + +## Debian ARM64 A painless guide for cross compilation (or to test NCE) from a x86_64 system without polluting your main. diff --git a/docs/Deps.md b/docs/Deps.md index 28e5d61649..689d12800a 100644 --- a/docs/Deps.md +++ b/docs/Deps.md @@ -1,42 +1,44 @@ # Dependencies To build Eden, you MUST have a C++ compiler. + * On Linux, this is usually [GCC](https://gcc.gnu.org/) 11+ or [Clang](https://clang.llvm.org/) v14+ - - GCC 12 also requires Clang 14+ + * GCC 12 also requires Clang 14+ * On Windows, we support: - - **[MSVC](https://visualstudio.microsoft.com/downloads/)** (default) - - It's STRONGLY RECOMMENDED to use the **Community** option and **Visual Studio 2022** - - You need to install: **[Desktop development with C++](https://learn.microsoft.com/en-us/cpp/build/vscpp-step-0-installation?view=msvc-170)** - - **[clang-cl](https://learn.microsoft.com/en-us/cpp/build/clang-support-msbuild?view=msvc-180)** - - You need to install: **C++ Clang tools for Windows** - - **[MSYS2](https://www.msys2.org)** (experimental) + * **[MSVC](https://visualstudio.microsoft.com/downloads/)** (default) + * It's STRONGLY RECOMMENDED to use the **Community** option and **Visual Studio 2022** + * You need to install: **[Desktop development with C++](https://learn.microsoft.com/en-us/cpp/build/vscpp-step-0-installation?view=msvc-170)** + * **[clang-cl](https://learn.microsoft.com/en-us/cpp/build/clang-support-msbuild?view=msvc-180)** + * You need to install: **C++ Clang tools for Windows** + * **[MSYS2](https://www.msys2.org)** * On macOS, this is Apple Clang - - This can be installed with `xcode-select --install` + * This can be installed with `xcode-select --install` The following additional tools are also required: * **[CMake](https://www.cmake.org/)** 3.22+ - already included with the Android SDK * **[Git](https://git-scm.com/)** for version control - - **[Windows installer](https://gitforwindows.org)** + * **[Windows installer](https://gitforwindows.org)** * **[Python3](https://www.python.org/downloads/)** 3.10+ - necessary to download external repositories * On Windows, you must install the **[Vulkan SDK](https://vulkan.lunarg.com/sdk/home#windows)** as well - - *A convenience script to install the latest SDK is provided in:* - - `tools/windows/install-vulkan-sdk.ps1` (for PowerShell 5+) - - `tools/windows/install-vulkan-sdk.sh` (for MSYS2, Git Bash, etc) + * *A convenience script to install the latest SDK is provided in:* + * `tools/windows/install-vulkan-sdk.ps1` (for PowerShell 5+) + * `tools/windows/install-vulkan-sdk.sh` (for Git Bash, etc) If you are on desktop and plan to use the Qt frontend, you *must* install Qt 6, and optionally Qt Creator (the **RECOMMENDED** IDE for building) + * On Linux, *BSD and macOS, this can be done by the package manager - - If you wish to use Qt Creator, append `qtcreator` or `qt-creator` to the commands seen below. + * If you wish to use Qt Creator, append `qtcreator` or `qt-creator` to the commands seen below. * MSVC/clang-cl users on Windows must install through the official [Qt](https://www.qt.io/download-qt-installer-oss) installer * Linux and macOS users may choose to use the installer as well. * MSYS2 can also install Qt 6 via the package manager -If you are on Windows, a convenience script to install MSVC, MSYS2, Qt, all necessary packages for MSYS2, and set up a zsh environment with useful keybinds and aliases can be found [here](https://git.crueter.xyz/scripts/windev). -- For help setting up Qt Creator, run `./install.sh -h qtcreator` +* For help setting up Qt Creator, run `./install.sh -h qtcreator` If you are on **Windows** and building with **MSVC** or **clang-cl**, you may go [back home](Build.md) and continue. ## Externals + The following are handled by Eden's externals: * [FFmpeg](https://ffmpeg.org/) (should use `-DYUZU_USE_EXTERNAL_FFMPEG=ON`) @@ -57,6 +59,7 @@ All other dependencies will be downloaded and built by [CPM](https://github.com/ * [MbedTLS](https://github.com/Mbed-TLS/mbedtls) 3+ Vulkan 1.3.274+ is also needed: + * [VulkanUtilityLibraries](https://github.com/KhronosGroup/Vulkan-Utility-Libraries) * [VulkanHeaders](https://github.com/KhronosGroup/Vulkan-Headers) * [SPIRV-Tools](https://github.com/KhronosGroup/SPIRV-Tools) @@ -71,18 +74,21 @@ Certain other dependencies will be fetched by CPM regardless. System packages *c * [VulkanMemoryAllocator](https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator) * [sirit](https://github.com/eden-emulator/sirit) * [httplib](https://github.com/yhirose/cpp-httplib) - if `ENABLE_UPDATE_CHECKER` or `ENABLE_WEB_SERVICE` are on - - This package is known to be broken on the AUR. + * This package is known to be broken on the AUR. * [cpp-jwt](https://github.com/arun11299/cpp-jwt) 1.4+ - if `ENABLE_WEB_SERVICE` is on * [unordered-dense](https://github.com/martinus/unordered_dense) * [mcl](https://github.com/azahar-emu/mcl) - subject to removal On amd64: + * [xbyak](https://github.com/herumi/xbyak) - 7.22 or earlier is recommended On aarch64 OR if `DYNARMIC_TESTS` is on: + * [oaknut](https://github.com/merryhime/oaknut) 2.0.1+ On riscv64: + * [biscuit](https://github.com/lioncash/biscuit) 0.9.1+ ## Commands @@ -98,7 +104,7 @@ Click on the arrows to expand. GURU must be enabled: -``` +```sh sudo emerge -a app-eselect/eselect-repository sudo eselect repository enable guru sudo emaint sync -r guru @@ -124,17 +130,18 @@ sudo emerge -a \ virtual/pkgconfig ``` -- On `amd64`, also add `dev-libs/xbyak` -- On `riscv64`, also add `dev-libs/biscuit` (currently unavailable) -- On `aarch64`, also add `dev-libs/oaknut` -- If tests are enabled, also add `dev-libs/oaknut` and `dev-cpp/catch` +* On `amd64`, also add `dev-libs/xbyak` +* On `riscv64`, also add `dev-libs/biscuit` (currently unavailable) +* On `aarch64`, also add `dev-libs/oaknut` +* If tests are enabled, also add `dev-libs/oaknut` and `dev-cpp/catch` Required USE flags: -- `dev-qt/qtbase network concurrent dbus gui widgets` -- `dev-libs/quazip qt6` -- `net-libs/mbedtls cmac` -- `media-libs/libsdl2 haptic joystick sound video` -- `dev-cpp/cpp-httplib ssl` + +* `dev-qt/qtbase network concurrent dbus gui widgets` +* `dev-libs/quazip qt6` +* `net-libs/mbedtls cmac` +* `media-libs/libsdl2 haptic joystick sound video` +* `dev-cpp/cpp-httplib ssl` [Caveats](./Caveats.md#gentoo-linux) @@ -150,6 +157,7 @@ sudo pacman -Syu --needed base-devel boost catch2 cmake enet ffmpeg fmt git glsl * Building with QT Web Engine requires `qt6-webengine` as well. * Proper Wayland support requires `qt6-wayland` * GCC 11 or later is required. +
@@ -161,17 +169,20 @@ sudo apt-get install autoconf cmake g++ gcc git glslang-tools libglu1-mesa-dev l * Ubuntu 22.04, Linux Mint 20, or Debian 12 or later is required. * To enable QT Web Engine, add `-DYUZU_USE_QT_WEB_ENGINE=ON` when running CMake. +
AlmaLinux, Fedora, Red Hat Linux Fedora: + ```sh sudo dnf install autoconf cmake fmt-devel gcc{,-c++} glslang hidapi-devel json-devel libtool libusb1-devel libzstd-devel lz4-devel nasm ninja-build openssl-devel pulseaudio-libs-devel qt6-linguist qt6-qtbase{-private,}-devel qt6-qtwebengine-devel qt6-qtmultimedia-devel speexdsp-devel wayland-devel zlib-devel ffmpeg-devel libXext-devel boost jq ``` AlmaLinux (use `YUZU_USE_CPM=ON`): + ```sh # vvv - Only if RPMfusion is not installed or EPEL isn't either sudo dnf install epel-release dnf-utils @@ -188,12 +199,14 @@ For systems like OpenEuler or derivates, don't forget to also install: `SDL2-dev * [RPM Fusion](https://rpmfusion.org/Configuration) is required for `ffmpeg-devel` * Fedora 32 or later is required. * Fedora 36+ users with GCC 12 need Clang and should configure CMake with: `cmake -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -B build` +
Alpine Linux First, enable the community repository; [see here](https://wiki.alpinelinux.org/wiki/Repositories#Enabling_the_community_repository). + ```sh # Enable the community repository setup-apkrepos -c @@ -233,8 +246,9 @@ brew install autoconf automake boost ffmpeg fmt glslang hidapi libtool libusb lz If you are compiling on Intel Mac, or are using a Rosetta Homebrew installation, you must replace all references of `/opt/homebrew` with `/usr/local`. To run with MoltenVK, install additional dependencies: + ```sh -brew install molten-vk vulkan-loader +brew install molten-vk ``` [Caveats](./Caveats.md#macos). @@ -253,7 +267,7 @@ If using FreeBSD 12 or prior, use `devel/pkg-config` instead.
NetBSD -For NetBSD +10.1: `pkgin install git cmake boost fmtlib SDL2 catch2 libjwt spirv-headers ffmpeg7 libva nlohmann-json jq libopus qt6 mbedtls3 cpp-httplib lz4 vulkan-headers nasm autoconf enet pkg-config libusb1 libcxx`. +For NetBSD +10.1: `pkgin install git cmake boost fmtlib SDL2 catch2 libjwt spirv-headers spirv-tools ffmpeg7 libva nlohmann-json jq libopus qt6 mbedtls3 cpp-httplib lz4 vulkan-headers nasm autoconf enet pkg-config libusb1 libcxx`. [Caveats](./Caveats.md#netbsd). @@ -294,23 +308,24 @@ sudo pkg install qt6 boost glslang libzip library/lz4 libusb-1 nlohmann-json ope * Open the `MSYS2 MinGW 64-bit` shell (`mingw64.exe`) * Download and install all dependencies: -``` -BASE="git make autoconf libtool automake-wrapper jq patch" - -MINGW="qt6-base qt6-tools qt6-translations qt6-svg cmake toolchain clang python-pip openssl vulkan-memory-allocator vulkan-devel glslang boost fmt lz4 nlohmann-json zlib zstd enet opus mbedtls libusb unordered_dense" +```sh +BASE="git make autoconf libtool automake-wrapper jq patch" +MINGW="qt6-base qt6-tools qt6-translations qt6-svg cmake toolchain clang python-pip openssl vulkan-memory-allocator vulkan-devel glslang boost fmt lz4 nlohmann-json zlib zstd enet opus mbedtls libusb unordered_dense openssl SDL2" +# Either x86_64 or clang-aarch64 (Windows on ARM) packages="$BASE" for pkg in $MINGW; do packages="$packages mingw-w64-x86_64-$pkg" + #packages="$packages mingw-w64-clang-aarch64-$pkg" done - pacman -Syuu --needed --noconfirm $packages ``` + * Notes: - - Using `qt6-static` is possible but currently untested. - - Other environments are entirely untested, but should theoretically work provided you install all the necessary packages. - - GCC is proven to work better with the MinGW environment. If you choose to use Clang, you *may* be better off using the clang64 environment. - - Add `qt-creator` to the `MINGW` variable to install Qt Creator. You can then create a Start Menu shortcut to the MinGW Qt Creator by running `powershell "\$s=(New-Object -COM WScript.Shell).CreateShortcut('C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\Qt Creator.lnk');\$s.TargetPath='C:\\msys64\\mingw64\\bin\\qtcreator.exe';\$s.Save()"` in Git Bash or MSYS2. + * Using `qt6-static` is possible as well, provided you build with `-DYUZU_STATIC_BUILD=ON`. + * Other environments are entirely untested, but should theoretically work provided you install all the necessary packages. + * GCC is proven to work better with the MinGW environment. On ARM, only Clang is available through the CLANGARM64 environment, so use that until a GNU ARM environment is available. + * Add `qt-creator` to the `MINGW` variable to install Qt Creator. You can then create a Start Menu shortcut to the MinGW Qt Creator by running `powershell "\$s=(New-Object -COM WScript.Shell).CreateShortcut('C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\Qt Creator.lnk');\$s.TargetPath='C:\\msys64\\mingw64\\bin\\qtcreator.exe';\$s.Save()"` in Git Bash or MSYS2. * Add MinGW binaries to the PATH if they aren't already: * `echo 'PATH=/mingw64/bin:$PATH' >> ~/.bashrc` * or `echo 'PATH=/mingw64/bin:$PATH' >> ~/.zshrc` diff --git a/docs/README.md b/docs/README.md index eb9d90196e..1fa0344828 100644 --- a/docs/README.md +++ b/docs/README.md @@ -14,3 +14,4 @@ This contains documentation created by developers. This contains build instructi - **[User Handbook](./user)** - **[Release Policy](./ReleasePolicy.md)** - **[Dynarmic](./dynarmic)** +- **[Cross compilation](./CrossCompile.md)**