From: TimePath Date: Wed, 9 Mar 2016 08:09:52 +0000 (+1100) Subject: Use 7za when available X-Git-Tag: xonotic-v0.8.2~1143 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=a14ce4a749d54514418edec14ac997fd1714a810;p=xonotic%2Fxonotic-data.pk3dir.git Use 7za when available --- diff --git a/qcsrc/Makefile b/qcsrc/Makefile index 9e94fb2e5..d73c52f21 100644 --- a/qcsrc/Makefile +++ b/qcsrc/Makefile @@ -5,6 +5,18 @@ NDEBUG ?= 1 PROGS_OUT ?= $(CURDIR)/.. BUILD_MOD ?= 0 +ifndef Zip + ifneq ($(shell which zip),) + Zip := zip -9 + endif + ifneq ($(shell which 7za),) + Zip := 7za a -tzip -mx=9 + endif + ifndef Zip + $(error "No zip in ($(PATH))") + endif +endif + QCCVERSIONFILE := qccversion.$(shell (cd server && $(QCC) --version) > qccversion.txt && git hash-object qccversion.txt) # We eventually need to get rid of these @@ -49,7 +61,7 @@ pk3: qc @ ln -f $(PROGS_OUT)/${PROG}.dat ${DAT} @ ln -f $(PROGS_OUT)/${PROG}.lno ${LNO} @ rm -f *.pk3 - zip -9 ${PK3} ${TXT} ${DAT} ${LNO} + $(Zip) ${PK3} ${TXT} ${DAT} ${LNO} @ rm ${TXT} ${DAT} ${LNO} dirtree: