upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/docs/linux.md
diff options
context:
space:
mode:
authorJan Trencansky <jan.trencansky@protonmail.com>2026-11-25 16:38:20 -0500
committerJan Trencansky <jan.trencansky@protonmail.com>2026-11-25 16:38:20 -0500
commitc116c3fa28983444cd47feea0461e1e7eaac83b5 (patch)
treef2f4821b744b678f0cf1ce98638e981ea737b0c6 /docs/linux.md
parent5866d6974e86fc2d39e6ce0691af63b354f6c8b9 (diff)
parent24d8af66af151f024b0b520fb397d899924f5486 (diff)
Merge main into t-drive-overlay
docs/boot.md: main added LEONIDA_WRITE_DIR / LEONIDA_SAVE_DIR to the --overlay bullet and a new "Under Wine on Linux" section; keep both and the T: paragraph of this branch after main's sentences. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'docs/linux.md')
-rw-r--r--docs/linux.md40
1 files changed, 40 insertions, 0 deletions
diff --git a/docs/linux.md b/docs/linux.md
index e7ca27455..c9ea03b84 100644
--- a/docs/linux.md
+++ b/docs/linux.md
@@ -16,6 +16,7 @@ names; the build lists anything it can't find before it starts.
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` |
19| `scripts/run_game_wine.sh`: one retail run under Wine, headless or visible, counts only ([linux_proton.md](linux_proton.md#running-the-game-under-wine-with-one-command)) | Native (`bash`) around the Windows `gta6rt` | `tests/test_run_game_wine.py` and `tests/test_game_run_summary.py`, without the game |
19 20
20## Build the port 21## Build the port
21 22
@@ -83,6 +84,12 @@ Runtime workflow. The stage writes `<out>/gta6rt.sh`, which starts `gta6rt.exe`
83[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
84and what fails there. 85and what fails there.
85 86
87For 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
89unless you add the `x86_64-pc-windows-msvc` Rust target or pass a prebuilt static library with
90`-DLEONIDA_XMA2_DECODER_LIB=<path>`, built yourself from this checkout's `runtime/xma_decoder` with the command in
91[runtime/xma_decoder/README.md](../runtime/xma_decoder/README.md).
92
86### Why there is no native Linux `gta6rt` 93### Why there is no native Linux `gta6rt`
87 94
88A native (ELF) loader is not a matter of build flags: 95A native (ELF) loader is not a matter of build flags:
@@ -112,3 +119,36 @@ python3 -I tests/test_<name>.py # one standard-
112 119
113[testing.md](testing.md) covers the GPU tests (`scripts/run_gpu_tests.py`), running them on llvmpipe, and choosing 120[testing.md](testing.md) covers the GPU tests (`scripts/run_gpu_tests.py`), running them on llvmpipe, and choosing
114the GPU. 121the GPU.
122
123### Without root (micromamba)
124
125If you cannot install distribution packages (no `sudo`), you can install `llvm-tools` and `spirv-tools` into a
126user-owned folder with [micromamba](https://mamba.readthedocs.io/en/latest/installation/micromamba-installation.html)
127(x86-64 glibc; for ARM64 use `linux-aarch64` from the micromamba guide; musl/Alpine is not natively supported) and let
128CMake fetch its pinned, hash-checked Vulkan headers if the system does not provide them:
129
130```bash
131LEO=$HOME/leonida-tools
132mkdir -p "$LEO/bin" "$LEO/mamba"
133# Note: `latest` is unpinned and downloaded without signature verification; inspect or pin per the micromamba guide.
134curl -fsSLo "$LEO/micromamba.tar.bz2" https://micro.mamba.pm/api/micromamba/linux-64/latest
135tar -xjf "$LEO/micromamba.tar.bz2" -C "$LEO/bin" --strip-components=1 bin/micromamba
136
137export MAMBA_ROOT_PREFIX="$LEO/mamba"
138"$LEO/bin/micromamba" create -y -n leonida -c conda-forge --override-channels "llvm-tools>=21" spirv-tools
139export PATH="$LEO/mamba/envs/leonida/bin:$PATH"
140
141cmake -S runtime -B runtime/build/linux -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLEONIDA_VULKAN_HEADERS_FETCH=ON
142cmake --build runtime/build/linux --parallel "$(nproc)"
143LLVM_MC=llvm-mc LEONIDA_VK_DEVICE="<part of your GPU name>" \
144 python3 -I scripts/run_gpu_tests.py --build runtime/build/linux --work "$LEO/run" --require-pass | tee "$LEO/run.log"
145echo "runner exit: ${PIPESTATUS[0]}"
146```
147
148Notes:
149- `LEONIDA_VK_DEVICE` selects the physical GPU by substring so the runner does not fall back to Mesa's `llvmpipe`.
150- Keep `$LEO` on a filesystem without `noexec` (`findmnt -no OPTIONS "$LEO"`).
151- System prerequisites still needed: a working Vulkan driver/loader (`vulkaninfo --summary`), `cmake`, `ninja`, `g++`
152 (or `clang++`), `python3`, `curl`, `tar`, and `bzip2`.
153- Cleanup: delete `$LEO` and `runtime/build/linux`. micromamba also writes `~/.conda/environments.txt` and
154 `~/.mamba/pkgs/urls.txt` (delete only those files if you already use conda).