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

snap

parent 860372b6
......@@ -22,3 +22,4 @@ addons/*.gma
*.tar
*.tar-sha1sums
*.tar-index
addons/*/
......@@ -51,12 +51,11 @@ maps/%.bsp: %.bsp
cp $^ $@
# hammer default flags
%_default.bsp: %.vmf
%.bsp: %.vmf
# default
$(BSP_BIN) $(VBIN_FLAGS) $(basename $^)
$(VIS_BIN) $(VBIN_FLAGS) $(basename $^)
$(RAD_BIN) $(VBIN_FLAGS) $(basename $^)
mv $(@:_default.bsp=.bsp) $@
$(GEN_BSPZIP_ADDLIST_BIN) $(GEN_BSPZIP_ADDLIST_FLAGS) $^ > $(@:.bsp=.bspzip-addlist)
%_fast.bsp: %.vmf
......@@ -96,15 +95,14 @@ maps/%.bsp: %.bsp
# Garrysmod/garrysmod/cfg/mount.cfg
#
#$(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 $^) >addons-src/maps/$(basename $^).res
#$(J2_BIN) $(J2_FLAGS) <addons-src/maps/template.res.j2 $(basename $(word 1, $^)) >addons-src/maps/$(basename $(word 1, $^)).res
#cp addons-src/512x512.vtf addons-src/materials/vgui/maps/menu_thumb_$(basename $^).vtf
#cp addons-src/128x128.png addons-src/maps/thumb/$(basename $^).png
# addons-src/maps/*.res
# addons-src/materials/vgui/maps/*.vmt
# addons-src/materials/vgui/maps/*.vtf
# addons-src/maps/*.res
# $(GMAD_BIN) $(GMAD_FLAGS) create -folder "addons-src" -out "$@"
addons/%.gma: %.bsp addons-src/addon.json Makefile
addons/%.gma: %.bsp addons-src/addon.json
rm -rv \
addons-src/maps/*.bsp \
addons-src/maps/thumb/*.png \
......@@ -113,6 +111,13 @@ addons/%.gma: %.bsp addons-src/addon.json Makefile
cp thumbnail_map_128.png addons-src/maps/thumb/$(basename $(word 1, $^)).png
$(GMAD_TAR_BIN) addons-src/ --output-tar $(@:.gma=.tar) --tar-prefix $(basename $(word 1, $^)) --gmad-bin $(GMAD_BIN) --output-gma $@ --output-index $(@:.gma=.tar-index) --output-digest $(@:.gma=.tar-sha1sums)
addons/%/.d: addons/%.gma
tar -C addons -xvf $(^:.gma=.tar)
touch $@
addons/%: addons/%/.d
true
# garrysmod refuses to load gma files untill after thier published and live
# so no use trying to test them
#.PHONY: install-addons
......@@ -133,8 +138,9 @@ install-bsp: maps/ttt_terrorcon_v2_hdr_final_p.bsp maps/thumb/ttt_terrorcon_v2_h
cp -v $(word 1, $^) $(MOD_DIR)maps\\
cp -v $(word 2, $^) $(MOD_DIR)maps\\thumb\\
# gmod dosn't allow this
# gmod dosn't allow mounting gma files
# so instead, i've got a parallel artifact being built that can be installed to garrysmod
# tar files are produced, these can be extracted and added as a garrysmod mount to test
#install-gma: addons/ttt_terrocon_v2_hdr_final_p.gma
# cp -v $^ $(MOD_DIR)addons\\
......
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