Commit d95df33f authored by dylan grafmyre's avatar dylan grafmyre
Browse files

idk, getting the hl2.exe pid in the makefile block doesn't seem to work

parent 769684b7
......@@ -57,6 +57,8 @@ GMAD_TAR_BIN?=$(PYTHON_BIN) ./contrib/gmad-tar
GMAD_TAR_FLAGS?=
MOUNT_BIN?=$(PYTHON_BIN) ./contrib/mount
MOUNT_FLAGS?=--mod-dir "'$(MOD_DIR)'"
WINPGREP_BIN?=./contrib/winpgrep
WINPGREP_FLAGS?=
%_p.bsp: %.bsp
$(BSPZIP_BIN) -addlist $^ $(^:.bsp=.bspzip-addlist) $@ $(BSPZIP_FLAGS)
......@@ -179,10 +181,10 @@ maps/%.bsp: %.bsp
$(SHLEX_BIN) $(SHLEX_FLAGS) $(SHLEX_HL2LOG_FLAGS) \
"'$(GAME_DIR)$(GAME)'" -allowdebug $(VBIN_FLAGS) $(GAME_FLAGS) $(GAME_TTT_FLAGS) \
+sv_cheats 1 +nav_edit 1 +map navgen &
sleep 30
sleep 2
$(SHLEX_BIN) $(SHLEX_FLAGS) $(EPOLL_THEN_BIN) $(EPOLL_THEN_FLAGS) \
--literal ng_f --file "'$(MOD_DIR)/data/runme.txt'" --timeout-sec 1800 -- \
kill $(shell tasklist | grep hl2.exe | sed -re 's,^hl2.exe *([0-9][0-9]*).*$$,\1,')
--literal "''" --file "'$(MOD_DIR)/data/runme.txt'" --timeout-sec 1800 -- \
taskkill -f -pid "$(shell $(WINPGREP_BIN) $(WINPGREP_FLAGS) hl2.exe )"
# ^ watch "$(MOD_DIR)/data/runme.txt" for content "ng_f", when match: kill hl2.exe
# timeout: 30min
cp -v "$(MOD_DIR)/maps/navgen.nav" $@
......@@ -216,7 +218,7 @@ maps/%.bsp: %.bsp
# addons-src/materials/vgui/maps/*.vtf
# addons-src/maps/*.res
# $(GMAD_BIN) $(GMAD_FLAGS) create -folder "addons-src" -out "$@"
addons/%.gma: %.bsp %.nav %.cubehdr addons-src/addon.json
addons/%.gma: %.bsp %.cubehdr addons-src/addon.json
rm -rv \
addons-src/maps/*.bsp \
addons-src/maps/thumb/*.png \
......@@ -275,3 +277,6 @@ fast: lint maps/ttt_terrorcon_v2_fast.bsp ttt_terrorcon_v2_fast.game
lint: ttt_terrorcon_v2.bspzip-addlist
$(PYTHON_BIN) ./contrib/bspzip-lint $^ 2>&1 | tee $^.lint
hl2pid:
$(WINPGREP_BIN) $(WINPGREP_FLAGS) hl2.exe
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment