Allow overriding platform in NSIS installer

MSYS2 and some mingw builds use mingw64 instead of mingw32. If you run
`make installer` from the top-level, PLATFORM should be set correctly
when building the installer.
This commit is contained in:
Zack Middleton 2016-11-01 17:53:23 -05:00
parent 7a73646157
commit 1c1e1f61f1

View file

@ -4,6 +4,9 @@ endif
ifndef RELEASE ifndef RELEASE
RELEASE=0 RELEASE=0
endif endif
ifndef PLATFORM
PLATFORM=mingw32
endif
ifndef ARCH ifndef ARCH
ARCH=x86 ARCH=x86
endif endif
@ -60,7 +63,7 @@ endif
all: ioquake3-$(VERSION)-$(RELEASE).$(ARCH).exe all: ioquake3-$(VERSION)-$(RELEASE).$(ARCH).exe
ioquake3.$(ARCH).nsi: ioquake3.nsi.in ioquake3.$(ARCH).nsi: ioquake3.nsi.in
sed 's/XXXVERSIONXXX/$(VERSION)/;s/XXXRELEASEXXX/$(RELEASE)/;s/x86/$(ARCH)/g;s/SDL2.dll/$(SDLDLL)/' < $< > $@ sed 's/XXXVERSIONXXX/$(VERSION)/;s/XXXRELEASEXXX/$(RELEASE)/;s/mingw32/$(PLATFORM)/g;s/x86/$(ARCH)/g;s/SDL2.dll/$(SDLDLL)/g' < $< > $@
ioquake3-$(VERSION)-$(RELEASE).$(ARCH).exe: ioquake3.$(ARCH).nsi ioquake3-$(VERSION)-$(RELEASE).$(ARCH).exe: ioquake3.$(ARCH).nsi
makensis $(DEFINES) ioquake3.$(ARCH).nsi makensis $(DEFINES) ioquake3.$(ARCH).nsi