doc: Document cross compilation setup
This commit is contained in:
parent
fa9ffd9002
commit
2da2056cac
2 changed files with 26 additions and 2 deletions
2
Justfile
2
Justfile
|
@ -47,8 +47,6 @@ start-wineserver:
|
||||||
fi
|
fi
|
||||||
|
|
||||||
setup-msvc:
|
setup-msvc:
|
||||||
rustup target add x86_64-pc-windows-msvc
|
|
||||||
rustup component add rust-src
|
|
||||||
mkdir -p ./tools
|
mkdir -p ./tools
|
||||||
curl --fail -L https://github.com/Jake-Shadle/xwin/releases/download/{{ xwin_version }}/{{ xwin_prefix }}.tar.gz | tar -xzv -C ./tools --strip-components=1 {{ xwin_prefix }}/xwin
|
curl --fail -L https://github.com/Jake-Shadle/xwin/releases/download/{{ xwin_version }}/{{ xwin_prefix }}.tar.gz | tar -xzv -C ./tools --strip-components=1 {{ xwin_prefix }}/xwin
|
||||||
./tools/xwin --accept-license splat --include-debug-libs --output ./msvc
|
./tools/xwin --accept-license splat --include-debug-libs --output ./msvc
|
||||||
|
|
26
README.adoc
26
README.adoc
|
@ -11,3 +11,29 @@
|
||||||
:warning-caption: :warning:
|
:warning-caption: :warning:
|
||||||
|
|
||||||
An engine plugin for Warhammer 40,000 Darktide that implements peer-to-peer networking.
|
An engine plugin for Warhammer 40,000 Darktide that implements peer-to-peer networking.
|
||||||
|
|
||||||
|
== Building
|
||||||
|
|
||||||
|
> This assumes cross-compiling on a Linux build machine.
|
||||||
|
> If you're on Windows, you're on your own. Shouldn't be too difficult, you're on native build anyways.
|
||||||
|
|
||||||
|
=== Prerequisites
|
||||||
|
|
||||||
|
* A reasonably recent version of LLVM, lld & Clang
|
||||||
|
** A symlink `clang-cl` -> `clang` in `PATH`
|
||||||
|
* cURL
|
||||||
|
* Wine
|
||||||
|
* Rust nightly toolchain, MSVC target and `rust-src`:
|
||||||
|
** `rustup toolchain install nightly`
|
||||||
|
** `rustup target add x86_64-pc-windows-msvc`
|
||||||
|
** `rustup component add rust-src`
|
||||||
|
|
||||||
|
=== Build
|
||||||
|
|
||||||
|
You'll need to download the MSVC libraries once (their license forbids redistribution, even in something like a Docker image).
|
||||||
|
|
||||||
|
With https://github.com/casey/just[just], simply run `just setup-msvc`, otherwise run the corresponding commands from `Justfile` manually. This will download the current Visual Studio Build Tools and corresponding libraries and headers into `./msvc`.
|
||||||
|
|
||||||
|
Then run `just build`, which runs `cargo build` with the necessary toolchain variables set (see top of `Justfile`).
|
||||||
|
|
||||||
|
The `.dll` in `target/x86_64-pc-windows-msvc/debug` can then be copied to the game's `binaries/plugins` folder. Remember to rename it so it has the required `_pluginw64_release.dll` suffix.
|
||||||
|
|
Loading…
Add table
Reference in a new issue