[quake3-commits] r2154 - in trunk: . misc/nsis

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Mon Aug 29 11:17:48 EDT 2011


Author: ztm
Date: 2011-08-29 11:17:47 -0400 (Mon, 29 Aug 2011)
New Revision: 2154

Modified:
   trunk/Makefile
   trunk/misc/nsis/Makefile
   trunk/misc/nsis/ioquake3.nsi.in
Log:
Include extra dlls in NSIS installer if needed (renderer, curl, speex, zlib, jpeg).

Modified: trunk/Makefile
===================================================================
--- trunk/Makefile	2011-08-29 13:57:46 UTC (rev 2153)
+++ trunk/Makefile	2011-08-29 15:17:47 UTC (rev 2154)
@@ -2445,7 +2445,13 @@
 
 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

Modified: trunk/misc/nsis/Makefile
===================================================================
--- trunk/misc/nsis/Makefile	2011-08-29 13:57:46 UTC (rev 2153)
+++ trunk/misc/nsis/Makefile	2011-08-29 15:17:47 UTC (rev 2154)
@@ -10,20 +10,60 @@
 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
 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

Modified: trunk/misc/nsis/ioquake3.nsi.in
===================================================================
--- trunk/misc/nsis/ioquake3.nsi.in	2011-08-29 13:57:46 UTC (rev 2153)
+++ trunk/misc/nsis/ioquake3.nsi.in	2011-08-29 15:17:47 UTC (rev 2154)
@@ -78,9 +78,23 @@
   ; 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 @@
 
 SectionEnd
 
+!ifdef USE_OPENAL_DLOPEN
 Section "OpenAL-Soft library"
 
   SetOutPath $INSTDIR
@@ -132,7 +147,18 @@
   File "OpenAL32.dll"
 
 SectionEnd
+!endif
 
+!ifdef USE_CURL_DLOPEN
+Section "libcurl"
+
+  SetOutPath $INSTDIR
+
+  File "libcurl-4.dll"
+
+SectionEnd
+!endif
+
 ;--------------------------------
 
 ; Uninstaller
@@ -152,15 +178,32 @@
   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
 
+!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
 



More information about the quake3-commits mailing list