q3rally/engine/misc/nsis/Makefile
Zack Middleton 8bf79baf63 Fix and resync Windows installer
Fix wrong file paths.
Merge installer changes from ioquake3.
2023-08-21 13:20:16 -05:00

87 lines
1.6 KiB
Makefile

ifndef VERSION
VERSION=v0.0.1.0
endif
ifndef RELEASE
RELEASE=0
endif
ifndef PLATFORM
PLATFORM=mingw32
endif
ifndef ARCH
ARCH=x86
endif
ifndef INSTALLDIR
INSTALLDIR=.
endif
ifndef USE_RENDERER_DLOPEN
USE_RENDERER_DLOPEN=1
endif
ifndef USE_OPENAL_DLOPEN
USE_OPENAL_DLOPEN=1
endif
ifndef USE_CURL_DLOPEN
USE_CURL_DLOPEN=0
endif
ifndef USE_INTERNAL_ZLIB
USE_INTERNAL_ZLIB=1
endif
ifndef USE_INTERNAL_JPEG
USE_INTERNAL_JPEG=1
endif
ifndef SDLDLL
ifeq ($(ARCH),x86_64)
SDLDLL=SDL264.dll
else
SDLDLL=SDL2.dll
endif
endif
ifndef OPENALDLL
ifeq ($(ARCH),x86_64)
OPENALDLL=OpenAL64.dll
else
OPENALDLL=OpenAL32.dll
endif
endif
ifndef EXE_SUFFIX
ifeq ($(ARCH),x86_64)
EXE_SUFFIX=.x86_64
else
EXE_SUFFIX=
endif
endif
DEFINES=
ifeq ($(USE_RENDERER_DLOPEN),1)
DEFINES+= -DUSE_RENDERER_DLOPEN
endif
ifeq ($(USE_OPENAL_DLOPEN),1)
DEFINES+= -DUSE_OPENAL_DLOPEN
endif
ifeq ($(USE_CURL_DLOPEN),1)
DEFINES+= -DUSE_CURL_DLOPEN
endif
ifeq ($(USE_INTERNAL_ZLIB),1)
DEFINES+= -DUSE_INTERNAL_ZLIB
endif
ifeq ($(USE_INTERNAL_JPEG),1)
DEFINES+= -DUSE_INTERNAL_JPEG
endif
all: q3rally-$(VERSION)-$(RELEASE).$(ARCH).exe
q3rally.$(ARCH).nsi: q3rally.nsi.in
sed 's/XXXVERSIONXXX/$(VERSION)/;s/XXXRELEASEXXX/$(RELEASE)/;s/mingw32/$(PLATFORM)/g;s/x86/$(ARCH)/g;s/SDL2.dll/$(SDLDLL)/g;s/OpenAL32.dll/$(OPENALDLL)/g;s/XXXEXE_SUFFIXXXX/$(EXE_SUFFIX)/g' < $< > $@
q3rally-$(VERSION)-$(RELEASE).$(ARCH).exe: q3rally.$(ARCH).nsi
makensis $(DEFINES) q3rally.$(ARCH).nsi
clean:
rm -rf *.exe q3rally.$(ARCH).nsi
install:
mkdir -p $(INSTALLDIR)
mv q3rally-$(VERSION)-$(RELEASE).$(ARCH).exe $(INSTALLDIR)
.PHONY: all clean