mirror of
https://github.com/ioquake/ioq3.git
synced 2024-11-10 07:11:46 +00:00
Include extra dlls in NSIS installer if needed (renderer, curl, speex, zlib, jpeg).
This commit is contained in:
parent
56f5fedee9
commit
b3c9d55f50
3 changed files with 92 additions and 3 deletions
8
Makefile
8
Makefile
|
@ -2445,7 +2445,13 @@ distclean: clean toolsclean
|
|||
|
||||
installer: release
|
||||
ifeq ($(PLATFORM),mingw32)
|
||||
@$(MAKE) VERSION=$(VERSION) -C $(NSISDIR) V=$(V)
|
||||
@$(MAKE) VERSION=$(VERSION) -C $(NSISDIR) V=$(V) \
|
||||
USE_RENDERER_DLOPEN=$(USE_RENDERER_DLOPEN) \
|
||||
USE_OPENAL_DLOPEN=$(USE_OPENAL_DLOPEN) \
|
||||
USE_CURL_DLOPEN=$(USE_CURL_DLOPEN) \
|
||||
USE_INTERNAL_SPEEX=$(USE_INTERNAL_SPEEX) \
|
||||
USE_INTERNAL_ZLIB=$(USE_INTERNAL_ZLIB) \
|
||||
USE_INTERNAL_JPEG=$(USE_INTERNAL_JPEG)
|
||||
else
|
||||
@$(MAKE) VERSION=$(VERSION) -C $(LOKISETUPDIR) V=$(V)
|
||||
endif
|
||||
|
|
|
@ -10,6 +10,25 @@ 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_SPEEX
|
||||
USE_INTERNAL_SPEEX=1
|
||||
endif
|
||||
ifndef USE_INTERNAL_ZLIB
|
||||
USE_INTERNAL_ZLIB=1
|
||||
endif
|
||||
ifndef USE_INTERNAL_JPEG
|
||||
USE_INTERNAL_JPEG=1
|
||||
endif
|
||||
|
||||
|
||||
ifeq ($(ARCH),x64)
|
||||
SDLDLL=SDL64.dll
|
||||
|
@ -17,13 +36,34 @@ else
|
|||
SDLDLL=SDL.dll
|
||||
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_SPEEX),1)
|
||||
DEFINES+= -DUSE_INTERNAL_SPEEX
|
||||
endif
|
||||
ifeq ($(USE_INTERNAL_ZLIB),1)
|
||||
DEFINES+= -DUSE_INTERNAL_ZLIB
|
||||
endif
|
||||
ifeq ($(USE_INTERNAL_JPEG),1)
|
||||
DEFINES+= -DUSE_INTERNAL_JPEG
|
||||
endif
|
||||
|
||||
|
||||
all: ioquake3-$(VERSION)-$(RELEASE).$(ARCH).exe
|
||||
|
||||
ioquake3.$(ARCH).nsi: ioquake3.nsi.in
|
||||
sed 's/XXXVERSIONXXX/$(VERSION)/;s/XXXRELEASEXXX/$(RELEASE)/;s/x86/$(ARCH)/;s/SDL.dll/$(SDLDLL)/g' < $< > $@
|
||||
|
||||
ioquake3-$(VERSION)-$(RELEASE).$(ARCH).exe: ioquake3.$(ARCH).nsi
|
||||
makensis ioquake3.$(ARCH).nsi
|
||||
makensis $(DEFINES) ioquake3.$(ARCH).nsi
|
||||
|
||||
clean:
|
||||
rm -rf *.exe ioquake3.$(ARCH).nsi
|
||||
|
|
|
@ -78,9 +78,23 @@ Section "ioquake3 (required)"
|
|||
; Set output path to the installation directory.
|
||||
SetOutPath $INSTDIR
|
||||
|
||||
!ifndef USE_INTERNAL_SPEEX
|
||||
File "libspeex.dll"
|
||||
!endif
|
||||
!ifndef USE_INTERNAL_ZLIB
|
||||
File "zlib1.dll"
|
||||
!endif
|
||||
!ifndef USE_INTERNAL_JPEG
|
||||
File "jpeg8c.dll"
|
||||
!endif
|
||||
|
||||
; Put file there
|
||||
File "../../build/release-mingw32-x86/ioq3ded.x86.exe"
|
||||
File "../../build/release-mingw32-x86/ioquake3.x86.exe"
|
||||
!ifdef USE_RENDERER_DLOPEN
|
||||
File "../../build/release-mingw32-x86/renderer_opengl1_x86.dll"
|
||||
!endif
|
||||
|
||||
File "../../COPYING.txt"
|
||||
File "/oname=README.txt" "../../README"
|
||||
File "../../id-readme.txt"
|
||||
|
@ -125,6 +139,7 @@ Section "SDL.dll"
|
|||
|
||||
SectionEnd
|
||||
|
||||
!ifdef USE_OPENAL_DLOPEN
|
||||
Section "OpenAL-Soft library"
|
||||
|
||||
SetOutPath $INSTDIR
|
||||
|
@ -132,6 +147,17 @@ Section "OpenAL-Soft library"
|
|||
File "OpenAL32.dll"
|
||||
|
||||
SectionEnd
|
||||
!endif
|
||||
|
||||
!ifdef USE_CURL_DLOPEN
|
||||
Section "libcurl"
|
||||
|
||||
SetOutPath $INSTDIR
|
||||
|
||||
File "libcurl-4.dll"
|
||||
|
||||
SectionEnd
|
||||
!endif
|
||||
|
||||
;--------------------------------
|
||||
|
||||
|
@ -152,15 +178,32 @@ Section "Uninstall"
|
|||
Delete $INSTDIR\missionpack\uix86.dll
|
||||
Delete $INSTDIR\ioquake3.x86.exe
|
||||
Delete $INSTDIR\ioq3ded.x86.exe
|
||||
!ifdef USE_RENDERER_DLOPEN
|
||||
Delete $INSTDIR\renderer_opengl1_x86.dll
|
||||
!endif
|
||||
|
||||
Delete $INSTDIR\COPYING.txt
|
||||
Delete $INSTDIR\README.txt
|
||||
Delete $INSTDIR\id-readme.txt
|
||||
Delete $INSTDIR\voip-readme.txt
|
||||
|
||||
Delete $INSTDIR\SDL.dll
|
||||
!ifndef USE_INTERNAL_SPEEX
|
||||
Delete $INSTDIR\libspeex.dll
|
||||
!endif
|
||||
!ifndef USE_INTERNAL_ZLIB
|
||||
Delete $INSTDIR\zlib1.dll
|
||||
!endif
|
||||
!ifndef USE_INTERNAL_JPEG
|
||||
Delete $INSTDIR\jpeg8c.dll
|
||||
!endif
|
||||
|
||||
Delete $INSTDIR\SDL.dll
|
||||
!ifdef USE_OPENAL_DLOPEN
|
||||
Delete $INSTDIR\OpenAL32.dll
|
||||
!endif
|
||||
!ifdef USE_CURL_DLOPEN
|
||||
Delete $INSTDIR\libcurl-4.dll
|
||||
!endif
|
||||
|
||||
Delete $INSTDIR\uninstall.exe
|
||||
|
||||
|
|
Loading…
Reference in a new issue