From 568121d05fd478e89c40b7d754e0128d934d1ec0 Mon Sep 17 00:00:00 2001 From: Marco Hladik Date: Thu, 4 Mar 2021 05:04:14 +0100 Subject: [PATCH] Update build_editor.sh, build_game.sh and make_mapdef.sh to generate individual eclass .def files for Radiant --- build_editor.sh | 10 ---------- build_game.sh | 3 +++ make_mapdef.sh | 12 +++++++----- 3 files changed, 10 insertions(+), 15 deletions(-) diff --git a/build_editor.sh b/build_editor.sh index cd4ed3fe..1545f994 100755 --- a/build_editor.sh +++ b/build_editor.sh @@ -171,13 +171,3 @@ mv_wsfile WorldSpawn_MINOR mv_wsfile WorldSpawn_PATCH mv_wsfile worldspawn mv_wsfile vmap - -cd ../../ -./make_mapdef.sh valve -./make_mapdef.sh cstrike -./make_mapdef.sh gearbox -./make_mapdef.sh hunger -./make_mapdef.sh poke646 -./make_mapdef.sh rewolf -./make_mapdef.sh scihunt -./make_mapdef.sh tfc diff --git a/build_game.sh b/build_game.sh index ae8c66d1..ec6f215a 100755 --- a/build_game.sh +++ b/build_game.sh @@ -8,7 +8,10 @@ if [ -f "$SCRPATH"/bin/fteqcc ]; then find "$SCRPATH" -name Makefile | grep 'src\/Makefile' | grep -v engine | while read MFILE_N; do cd $(dirname $MFILE_N) make + cd .. + export GAMEDIR=$(basename $PWD) cd $OLDDIR + ./make_mapdef.sh $GAMEDIR done; else printf "FTEQCC compiler is not present, please run build_engine.sh\n" diff --git a/make_mapdef.sh b/make_mapdef.sh index 2a0d22b0..f1a1acba 100755 --- a/make_mapdef.sh +++ b/make_mapdef.sh @@ -2,20 +2,22 @@ ent_for_mod() { - mkdir -p ./bin/$1.game/$1/ - ENT_OUTFILE="./bin/$1.game/$1/entities.def" + mkdir -p ./bin/platform.game/$1/ + ENT_OUTFILE="./bin/platform.game/$1/entities.def" rm "$ENT_OUTFILE" - find ./$1/src/ -type f \( -iname \*.cpp -o -iname \*.c \) | while read EDEF_N; do + find ./$1/src/ -type f \( -iname \*.qc \) | while read EDEF_N; do echo "Scanning for definitions inside $EDEF_N" sed -n '/\/*QUAKED/,/*\//p' $EDEF_N >> "$ENT_OUTFILE" done; + + cat ./bin/platform.game/platform/entities.def >> $ENT_OUTFILE } -BASE_ENT=./bin/platform.game/platform/entities_base.def +BASE_ENT=./bin/platform.game/platform/entities.def rm "$BASE_ENT" -find ./src/gs-entbase/ -type f \( -iname \*.cpp -o -iname \*.c \) | while read EDEF_N; do +find ./src/gs-entbase/ -type f \( -iname \*.qc \) | while read EDEF_N; do echo "Scanning for definitions inside $EDEF_N" sed -n '/\/*QUAKED/,/*\//p' $EDEF_N >> "$BASE_ENT" done;