From 5ce1dba61bc80220cb84dda7a94aba3c87db4586 Mon Sep 17 00:00:00 2001 From: Marco Cawthorne Date: Sun, 2 Oct 2022 17:49:35 -0700 Subject: [PATCH] Documentation: Add notes on launching games, building and distributing binaries. --- Documentation/Building.md | 20 +++++++++++++ Documentation/{Mods.md => Launching.md} | 39 ++++++++++++++++++++++++- Doxyfile | 2 +- 3 files changed, 59 insertions(+), 2 deletions(-) rename Documentation/{Mods.md => Launching.md} (53%) diff --git a/Documentation/Building.md b/Documentation/Building.md index 623e040f..92020f64 100644 --- a/Documentation/Building.md +++ b/Documentation/Building.md @@ -17,6 +17,26 @@ headers for your platform. * libXrandr-devel * libSDL2-devel (only if you pass BUILD_SDL2=1 in build.cfg) +### Optional: Building release binaries + +You'll have to manually go into `src/engine/engine` and issue: + +``` +$ make m-rel FTE_CONFIG=yourgameconfig +``` + +If you want to cross-compile to different platforms, you can pass the `FTE_TARGET` variable and select from **win32**, **win64**, **linux32**, **linux64** or **SDL2**. + +For example, this will build a release binary of **The Wastes** for Win32, using the configuration specified inside `src/engine/engine/common/config_wastes.h`: + +``` +$ make m-rel FTE_CONFIG=wastes FTE_TARGET=win32 +``` + +The resulting binary can be found inside the `src/engine/engine/release` directory. + +**Note**: The **SDL2** target will require you to set the **ARCH** environment to the target of your choosing. + ## Building the Level Editor {#editor} Handled by **build_editor.sh**. diff --git a/Documentation/Mods.md b/Documentation/Launching.md similarity index 53% rename from Documentation/Mods.md rename to Documentation/Launching.md index be755bc1..9682c791 100644 --- a/Documentation/Mods.md +++ b/Documentation/Launching.md @@ -1,4 +1,41 @@ -# Mod/Game Setup +# Launching + +## For development... +For development, use the `nuclide` launch script inside the root directory. + +``` +$ ./nuclide +``` + +Running it on its own will mount the game dir `base/`. As that's the default defined inside the file `./default.fmf`. + +You can mount an additional mod over `base/` like so: + +``` +$ ./nuclide -game some_other_mod +``` + +If you wanted to mount multiple game dirs, you could in theory do it like so: + +``` +$ ./nuclide -game first_mod -game second_mod -game third_mod +``` + +And it'll load those directories in order, on top of `base/`. + +However, we advise you only do this for development. If you want proper multiplayer compatibility (slightly different filesystem mount setups can confuse client <> server negotation) please use the built-in **Custom game** menu to ensure maximum compatibility to other clients. + +## For release... + +You'll want to compile a custom build of the engine with your branding. +Inside `src/engine/engine/common/` you can find a config file named `config_wastes.h`, +which is a good example of how you can customize your engine binaries and filesystem mount-points. + +That way you **avoid** shipping a default.fmf file. + +**How to compile a custom config build**: You pass `FTE_CONFIG=wastes` to the make environment when building an engine binary - if you wanted to build with the `config_wastes.h` file. [For more information check out the building section](Building.md) + +## Mod/Game Setup For mods to show up in the "Custom Game" menu, we have to either find a manifest file, or a liblist.gam, or a gameinfo.txt inside the respective mod directory. diff --git a/Doxyfile b/Doxyfile index cbdac6d6..90940e3b 100644 --- a/Doxyfile +++ b/Doxyfile @@ -877,8 +877,8 @@ WARN_LOGFILE = INPUT = src/ \ Documentation/Main.md \ Documentation/Building.md \ + Documentation/Launching.md \ Documentation/Filesystem.md \ - Documentation/Mods.md \ Documentation/Materials/mat_overview.md \ Documentation/Materials/mat_commands.md \ Documentation/Materials/mat_vmap.md \