From a14ce4a749d54514418edec14ac997fd1714a810 Mon Sep 17 00:00:00 2001 From: TimePath Date: Wed, 9 Mar 2016 19:09:52 +1100 Subject: [PATCH] Use 7za when available --- qcsrc/Makefile | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) 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: -- 2.39.2