diff options
Diffstat (limited to 'docs/linux.md')
| -rw-r--r-- | docs/linux.md | 51 |
1 files changed, 47 insertions, 4 deletions
diff --git a/docs/linux.md b/docs/linux.md index 555cb3ed4..b6be52568 100644 --- a/docs/linux.md +++ b/docs/linux.md | |||
| @@ -11,8 +11,8 @@ names; the build lists anything it can't find before it starts. | |||
| 11 | 11 | ||
| 12 | | Piece | On Linux | How it is checked | | 12 | | Piece | On Linux | How it is checked | |
| 13 | |---|---|---| | 13 | |---|---|---| |
| 14 | | `make_game.py`: check, shaders, assets, pipelines | Native | CI (`stdlib-tests-linux`, `translator-tests`, `semantic-tests`) | | 14 | | `make_game.py`: check, shaders, assets, pipelines | Native | CI (`linux-python-and-viewer`, `semantic-tests`) | |
| 15 | | `Build.sh`, `Mods.sh` | Native (`/bin/sh`) | `tests/test_shell_launchers.py`, in the standard-library loop of `stdlib-tests-linux` | | 15 | | `Build.sh`, `Mods.sh` | Native (`/bin/sh`) | `tests/test_shell_launchers.py`, in the standard-library loop of `linux-python-and-viewer` | |
| 16 | | Shader translator, its tests and the GPU test tools (`vk_harness`, `vk_pipeline_check`, ...) | Native, GCC or Clang | CI (`linux-gpu-tools`: GCC, tests on llvmpipe); Clang builds them too, but no CI job uses it yet | | 16 | | Shader translator, its tests and the GPU test tools (`vk_harness`, `vk_pipeline_check`, ...) | Native, GCC or Clang | CI (`linux-gpu-tools`: GCC, tests on llvmpipe); Clang builds them too, but no CI job uses it yet | |
| 17 | | `rpf9dump` (asset export) | Native, .NET 8 or newer | CI builds it on Windows only (the `check` job) | | 17 | | `rpf9dump` (asset export) | Native, .NET 8 or newer | CI builds it on Windows only (the `check` job) | |
| 18 | | `gta6rt`, its shims and their tests | Windows program, under Wine or Proton | Cross-built with clang-cl and xwin; CI runs the Windows build under Wine on pushes to `main` | | 18 | | `gta6rt`, its shims and their tests | Windows program, under Wine or Proton | Cross-built with clang-cl and xwin; CI runs the Windows build under Wine on pushes to `main` | |
| @@ -40,8 +40,8 @@ sudo apt install git python3 \ | |||
| 40 | Then, with your own copy of the game already readable on disk: | 40 | Then, with your own copy of the game already readable on disk: |
| 41 | 41 | ||
| 42 | ```sh | 42 | ```sh |
| 43 | git clone --recursive https://github.com/ubiquitarianism/leonida | 43 | git clone --recursive https://github.com/ProjectLeonida/mandy |
| 44 | cd leonida | 44 | cd mandy |
| 45 | ./Build.sh --find # list the copies found: the home folder, Downloads, Documents, /mnt, /media/<user>, ... | 45 | ./Build.sh --find # list the copies found: the home folder, Downloads, Documents, /mnt, /media/<user>, ... |
| 46 | ./Build.sh --check # check your copy, build nothing | 46 | ./Build.sh --check # check your copy, build nothing |
| 47 | ./Build.sh # build into ~/Documents/Leonida | 47 | ./Build.sh # build into ~/Documents/Leonida |
| @@ -84,6 +84,16 @@ Runtime workflow. The stage writes `<out>/gta6rt.sh`, which starts `gta6rt.exe` | |||
| 84 | [testing.md](testing.md#the-windows-runtime-on-linux-under-wine-or-proton) has the test runs under Wine and Proton | 84 | [testing.md](testing.md#the-windows-runtime-on-linux-under-wine-or-proton) has the test runs under Wine and Proton |
| 85 | and what fails there. | 85 | and what fails there. |
| 86 | 86 | ||
| 87 | On Apple Silicon, set `LEONIDA_CX_BOTTLE` to the name of an existing CrossOver bottle to use the same launcher: | ||
| 88 | |||
| 89 | ```sh | ||
| 90 | LEONIDA_CX_BOTTLE=Leonida ./gta6rt.sh --dry-run | ||
| 91 | ``` | ||
| 92 | |||
| 93 | Run this from the packaged output directory. The launcher uses CrossOver in `/Applications` by default. Set `WINE` | ||
| 94 | to the CrossOver `bin/wine` path if the app is installed elsewhere. It enables Rosetta's AVX advertisement by default | ||
| 95 | for this mode and honours an explicit `ROSETTA_ADVERTISE_AVX` value. | ||
| 96 | |||
| 87 | For XMA2 audio, `runtime/CMakeLists.txt` builds `runtime/xma_decoder` for `x86_64-pc-windows-msvc` when `cargo` is on | 97 | For XMA2 audio, `runtime/CMakeLists.txt` builds `runtime/xma_decoder` for `x86_64-pc-windows-msvc` when `cargo` is on |
| 88 | `PATH`. Distribution Rust packages typically omit the Windows MSVC standard library, which leaves XMA voices silent | 98 | `PATH`. Distribution Rust packages typically omit the Windows MSVC standard library, which leaves XMA voices silent |
| 89 | unless you add the `x86_64-pc-windows-msvc` Rust target or pass a prebuilt static library with | 99 | unless you add the `x86_64-pc-windows-msvc` Rust target or pass a prebuilt static library with |
| @@ -119,3 +129,36 @@ python3 -I tests/test_<name>.py # one standard- | |||
| 119 | 129 | ||
| 120 | [testing.md](testing.md) covers the GPU tests (`scripts/run_gpu_tests.py`), running them on llvmpipe, and choosing | 130 | [testing.md](testing.md) covers the GPU tests (`scripts/run_gpu_tests.py`), running them on llvmpipe, and choosing |
| 121 | the GPU. | 131 | the GPU. |
| 132 | |||
| 133 | ### Without root (micromamba) | ||
| 134 | |||
| 135 | If you cannot install distribution packages (no `sudo`), you can install `llvm-tools` and `spirv-tools` into a | ||
| 136 | user-owned folder with [micromamba](https://mamba.readthedocs.io/en/latest/installation/micromamba-installation.html) | ||
| 137 | (x86-64 glibc; for ARM64 use `linux-aarch64` from the micromamba guide; musl/Alpine is not natively supported) and let | ||
| 138 | CMake fetch its pinned, hash-checked Vulkan headers if the system does not provide them: | ||
| 139 | |||
| 140 | ```bash | ||
| 141 | LEO=$HOME/leonida-tools | ||
| 142 | mkdir -p "$LEO/bin" "$LEO/mamba" | ||
| 143 | # Note: `latest` is unpinned and downloaded without signature verification; inspect or pin per the micromamba guide. | ||
| 144 | curl -fsSLo "$LEO/micromamba.tar.bz2" https://micro.mamba.pm/api/micromamba/linux-64/latest | ||
| 145 | tar -xjf "$LEO/micromamba.tar.bz2" -C "$LEO/bin" --strip-components=1 bin/micromamba | ||
| 146 | |||
| 147 | export MAMBA_ROOT_PREFIX="$LEO/mamba" | ||
| 148 | "$LEO/bin/micromamba" create -y -n leonida -c conda-forge --override-channels "llvm-tools>=21" spirv-tools | ||
| 149 | export PATH="$LEO/mamba/envs/leonida/bin:$PATH" | ||
| 150 | |||
| 151 | cmake -S runtime -B runtime/build/linux -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLEONIDA_VULKAN_HEADERS_FETCH=ON | ||
| 152 | cmake --build runtime/build/linux --parallel "$(nproc)" | ||
| 153 | LLVM_MC=llvm-mc LEONIDA_VK_DEVICE="<part of your GPU name>" \ | ||
| 154 | python3 -I scripts/run_gpu_tests.py --build runtime/build/linux --work "$LEO/run" --require-pass | tee "$LEO/run.log" | ||
| 155 | echo "runner exit: ${PIPESTATUS[0]}" | ||
| 156 | ``` | ||
| 157 | |||
| 158 | Notes: | ||
| 159 | - `LEONIDA_VK_DEVICE` selects the physical GPU by substring so the runner does not fall back to Mesa's `llvmpipe`. | ||
| 160 | - Keep `$LEO` on a filesystem without `noexec` (`findmnt -no OPTIONS "$LEO"`). | ||
| 161 | - System prerequisites still needed: a working Vulkan driver/loader (`vulkaninfo --summary`), `cmake`, `ninja`, `g++` | ||
| 162 | (or `clang++`), `python3`, `curl`, `tar`, and `bzip2`. | ||
| 163 | - Cleanup: delete `$LEO` and `runtime/build/linux`. micromamba also writes `~/.conda/environments.txt` and | ||
| 164 | `~/.mamba/pkgs/urls.txt` (delete only those files if you already use conda). | ||