Commit 4cef3985 authored by dylan grafmyre's avatar dylan grafmyre
Browse files

mount generated addons

parent 283f26c3
#
PROJECT_DIR?=C:\\hammer\ttt_terrorcon
PYTHON_BIN?=./env/scripts/python
SHLEX_BIN?=./contrib/shlex
SHLEX_FLAGS?=
SHELL=C:\\Program\ Files\\Git\\bin\\bash.exe
.SHELLFLAGS=-c
#SHELL=C:\\Program\ Files\\Git\\bin\\bash.exe
#.SHELLFLAGS=-c
GAME?=hl2.exe
GAME_DIR?=C:\\Program Files (x86)\\Steam\\steamapps\\common\\GarrysMod\\
......@@ -105,6 +106,8 @@ maps/%.bsp: %.bsp
# create gma files for publishing
# testing requirest then extracting the gma and mounting it via
# Garrysmod/garrysmod/cfg/mount.cfg
#
# todo: pack bsp-zip list with gma instead (non _p variants? only)
#
#$(J2_BIN) $(J2_FLAGS) <addons-src/512x512.vmt.j2 $(basename $^).vmt >addons-src/materials/vgui/maps/menu_thumb_$(basename $^).vmt
#$(J2_BIN) $(J2_FLAGS) <addons-src/maps/template.res.j2 $(basename $(word 1, $^)) >addons-src/maps/$(basename $(word 1, $^)).res
......@@ -130,6 +133,15 @@ addons/%/.d: addons/%.gma
addons/%: addons/%/.d
true
mount:
$(SHLEX_BIN) $(SHLEX_FLAGS) $(MOUNT_BIN) $(MOUNT_FLAGS)
mount-dev:
$(SHLEX_BIN) $(SHLEX_FLAGS) $(MOUNT_BIN) $(MOUNT_FLAGS) --mod-dir "'$(MOD_DIR)'" --set-mount ttt_terrorcon "'$(PROJECT_DIR)'" --normpath
addons/%/.mount: addons/%/.d
$(SHLEX_BIN) $(SHLEX_FLAGS) $(MOUNT_BIN) $(MOUNT_FLAGS) --mod-dir "'$(MOD_DIR)'" --set-mount ttt_terrorcon "'$(PROJECT_DIR)\\$(basename $@)'" --normpath
# garrysmod refuses to load gma files untill after thier published and live
# so no use trying to test them
#.PHONY: install-addons
......@@ -158,5 +170,3 @@ install-bsp: maps/ttt_terrorcon_v2_hdr_final.bsp maps/thumb/ttt_terrorcon_v2_hdr
lint: ttt_terrorcon_v2.bspzip-addlist
$(PYTHON_BIN) ./contrib/bspzip-lint $^ 2>&1 | tee $^.lint
mount:
$(SHLEX_BIN) $(SHLEX_FLAGS) $(MOUNT_BIN) $(MOUNT_FLAGS)
......@@ -135,7 +135,7 @@ def del_mount(buf, name):
if has_trailing_newline:
ret.write(buf[match_span[1]+1:])
else:
LOGGER.warning('did not find+remove expected trailing newline after mount spec'))
LOGGER.warning('did not find+remove expected trailing newline after mount spec')
ret.write(buf[match_span[1]:])
......
Supports Markdown
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