diff options
| author | Jan Trencansky <jan.trencansky@protonmail.com> | 2026-11-24 20:59:12 -0500 |
|---|---|---|
| committer | Jan Trencansky <jan.trencansky@protonmail.com> | 2026-11-24 20:59:12 -0500 |
| commit | 46e078824d2b7a6ae8a8051d6adc7bf8011595cc (patch) | |
| tree | 7d1f3d8843baaeaea36bc44fb6eff7723ccffe08 /runtime/xma_decoder | |
| parent | d3741102e4760cdff7ebf9ca91510b5d8f5c96f7 (diff) | |
docs: build the prebuilt XMA2 decoder yourself, from this checkout
Configure checks only that the file passed with -DLEONIDA_XMA2_DECODER_LIB
exists, not which source, version or target it was built from. Say so, and
give the command that builds the library from this checkout's
runtime/xma_decoder for x86_64-pc-windows-msvc, where it lands, that it
needs only the Rust target (so it works on Linux), that the option stops
CMake from rebuilding the decoder after source changes, and that a
relative path given with -D is resolved against the directory CMake runs in.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/xma_decoder')
| -rw-r--r-- | runtime/xma_decoder/README.md | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/runtime/xma_decoder/README.md b/runtime/xma_decoder/README.md index e279057be..f02bdcb0c 100644 --- a/runtime/xma_decoder/README.md +++ b/runtime/xma_decoder/README.md | |||
| @@ -31,3 +31,19 @@ To link an already-built `leonida_xma2_decoder.lib` without invoking `cargo` dur | |||
| 31 | or Linux cross-builds whose distribution `rustc` omits the `x86_64-pc-windows-msvc` standard library), pass | 31 | or Linux cross-builds whose distribution `rustc` omits the `x86_64-pc-windows-msvc` standard library), pass |
| 32 | `-DLEONIDA_XMA2_DECODER_LIB=<path>`. A value that does not name an existing file fails configure instead of falling | 32 | `-DLEONIDA_XMA2_DECODER_LIB=<path>`. A value that does not name an existing file fails configure instead of falling |
| 33 | back silently to muted XMA voices. | 33 | back silently to muted XMA voices. |
| 34 | |||
| 35 | Build that library yourself, from this checkout's `runtime/xma_decoder`, so that it matches the C ABI the runtime is | ||
| 36 | compiled against. Configure checks only that the file exists, not which source, version or target it was built from, | ||
| 37 | so don't use a library from another checkout, another project or a download: | ||
| 38 | |||
| 39 | ```sh | ||
| 40 | rustup target add x86_64-pc-windows-msvc | ||
| 41 | cargo build --manifest-path runtime/xma_decoder/Cargo.toml --release --locked --target x86_64-pc-windows-msvc | ||
| 42 | ``` | ||
| 43 | |||
| 44 | The library is then `runtime/xma_decoder/target/x86_64-pc-windows-msvc/release/leonida_xma2_decoder.lib`. Building a | ||
| 45 | static library for that target needs only the Rust target, not the MSVC linker, so this also works on Linux. | ||
| 46 | |||
| 47 | With the option set, CMake no longer builds the decoder: after a change under `runtime/xma_decoder/`, run the command | ||
| 48 | again before building the runtime. A relative path given with `-D` on the command line is made absolute against the | ||
| 49 | directory CMake runs in, so passing an absolute path avoids surprises. | ||