nuclide/nuclide-ds: Improvements to manifest loading. Read Documentation/Launching.md for details.

This commit is contained in:
Marco Cawthorne 2022-12-28 12:11:13 -08:00
parent 81ad389668
commit fcd72d259f
Signed by: eukara
GPG Key ID: CE2032F0A2882A22
4 changed files with 53 additions and 15 deletions

View File

@ -8,9 +8,9 @@ For development, use the `nuclide` launch script inside the root directory.
$ ./nuclide $ ./nuclide
``` ```
Running it on its own will mount the game dir `base/`. As that's the default defined inside the file `./default.fmf`. Running it on its own will mount only the directory `platform/`. As that's the default defined inside the file `./default.fmf`.
You can mount an additional mod over `base/` like so: You can mount an additional mod over it like so:
``` ```
$ ./nuclide -game some_other_mod $ ./nuclide -game some_other_mod
@ -22,10 +22,28 @@ 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 $ ./nuclide -game first_mod -game second_mod -game third_mod
``` ```
And it'll load those directories in order, on top of `base/`. And it'll load those directories in order.
However, if you'd like to be very specific in how a game is run/branded/launched
you should really use **FTE Manifest** files.
Simply plop one into your game directory with the name `manifest.fmf`, then launch
nuclide like so:
```
$ ./nuclide first_mod
```
and it will load `first_mod/manifest.fmf`. You can supply arguments to it by putting them into the second parameter with quotes like so:
```
$ ./nuclide first_mod "-window +set sv_cheats 1"
```
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. 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.
If you are running a dedicated server and have issues with multiple game directories, check the value of the cvar `sv_gamedir` on the server. It is meant to be a semicolon separated list of game directories, if multiple ones are supposed to be mounted.
## For release... ## For release...
You'll want to compile a custom build of the engine with your branding. You'll want to compile a custom build of the engine with your branding.

View File

@ -1,8 +1,6 @@
FTEMANIFEST 1 FTEMANIFEST 1
GAME base
NAME "Nuclide" NAME "Nuclide"
BASEGAME platform BASEGAME platform
BASEGAME base
// you don't really want to change these // you don't really want to change these
RTCBROKER master.frag-net.com:27950 RTCBROKER master.frag-net.com:27950

16
nuclide
View File

@ -9,12 +9,24 @@ fi
cd "$SRCPATH/bin" cd "$SRCPATH/bin"
if [ -f ../$1/manifest.fmf ]
then
MANIFEST="-manifest ../$1/manifest.fmf"
SVGAMEDIR=$(cat ../$1/manifest.fmf | grep BASEGAME | awk 'BEGIN { ORS="," } { print $2 } END { print "" }')
SVGAMEDIR=${SVGAMEDIR%,,}
ARGUMENTS="$2 +sv_gamedir \"${SVGAMEDIR}\""
echo "Arguments: $ARGUMENTS"
else
ARGUMENTS="$*"
fi
if [ -f "$SRCPATH/bin/fteqw" ]; then if [ -f "$SRCPATH/bin/fteqw" ]; then
if [ -z "$NUCLIDE_GDB" ]; then if [ -z "$NUCLIDE_GDB" ]; then
./fteqw ${ADDITIONAL_ARGS} -basedir ../ $* ./fteqw ${ADDITIONAL_ARGS} -basedir ../ ${MANIFEST} ${ARGUMENTS}
else else
gdb --args ./fteqw ${ADDITIONAL_ARGS} -basedir ../ $* gdb --args ./fteqw ${ADDITIONAL_ARGS} -basedir ../ $*
fi fi
else else
printf "Engine is not present, please run build_engine.sh\n" printf "Engine is not present, please run build_engine.sh\n"
fi fi

View File

@ -1,22 +1,32 @@
#!/bin/sh #!/bin/bash
set -e set -e
SCRPATH="$( cd "$( dirname $(readlink -nf $0) )" && pwd )" SRCPATH="$( cd "$( dirname $(readlink -nf $0) )" && pwd )"
# We want to keep our library separate
if [ -d "$HOME/Library/Games" ] if [ -d "$HOME/Library/Games" ]
then then
ADDITIONAL_ARGS="-usehome -homedir ${HOME}/Library/Games/Nuclide" ADDITIONAL_ARGS="-usehome -homedir ${HOME}/Library/Games/Nuclide"
fi fi
cd "$SRCPATH/bin" cd "$SRCPATH/bin"
if [ -f "$SRCPATH/bin/fteqw-sv" ]; then if [ -f ../$1/manifest.fmf ]
then
MANIFEST="-manifest ../$1/manifest.fmf"
SVGAMEDIR=$(cat ../$1/manifest.fmf | grep BASEGAME | awk 'BEGIN { ORS="," } { print $2 } END { print "" }')
SVGAMEDIR=${SVGAMEDIR%,,}
ARGUMENTS="$2 +sv_gamedir \"${SVGAMEDIR}\""
echo "Arguments: $ARGUMENTS"
else
ARGUMENTS="$*"
fi
if [ -f "$SRCPATH/bin/fteqw" ]; then
if [ -z "$NUCLIDE_GDB" ]; then if [ -z "$NUCLIDE_GDB" ]; then
./fteqw-sv ${ADDITIONAL_ARGS} -basedir ../ $* ./fteqw-sv ${ADDITIONAL_ARGS} -basedir ../ ${MANIFEST} ${ARGUMENTS}
else else
gdb --args ./fteqw ${ADDITIONAL_ARGS} -basedir ../ $* gdb --args ./fteqw-sv ${ADDITIONAL_ARGS} -basedir ../ $*
fi fi
else else
printf "Engine is not present, please run build_engine.sh\n" printf "Engine is not present, please run build_engine.sh\n"
f fi