mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2024-11-10 14:52:00 +00:00
add nsis installer target for mingw32
This commit is contained in:
parent
53fc214d00
commit
3327ce1ab3
3 changed files with 151 additions and 0 deletions
9
Makefile
9
Makefile
|
@ -149,6 +149,7 @@ Q3CPPDIR=$(MOUNT_DIR)/tools/lcc/cpp
|
|||
Q3LCCETCDIR=$(MOUNT_DIR)/tools/lcc/etc
|
||||
Q3LCCSRCDIR=$(MOUNT_DIR)/tools/lcc/src
|
||||
LOKISETUPDIR=misc/setup
|
||||
NSISDIR=misc/nsis
|
||||
SDLHDIR=$(MOUNT_DIR)/SDL12
|
||||
LIBSDIR=$(MOUNT_DIR)/libs
|
||||
TEMPDIR=/tmp
|
||||
|
@ -1947,7 +1948,11 @@ ifneq ($(BUILD_GAME_SO),0)
|
|||
endif
|
||||
|
||||
clean: clean-debug clean-release
|
||||
ifeq ($(PLATFORM),mingw32)
|
||||
@$(MAKE) -C $(NSISDIR) clean
|
||||
else
|
||||
@$(MAKE) -C $(LOKISETUPDIR) clean
|
||||
endif
|
||||
|
||||
clean-debug:
|
||||
@$(MAKE) clean2 B=$(BD)
|
||||
|
@ -1979,7 +1984,11 @@ distclean: clean toolsclean
|
|||
@rm -rf $(BUILD_DIR)
|
||||
|
||||
installer: release
|
||||
ifeq ($(PLATFORM),mingw32)
|
||||
@$(MAKE) VERSION=$(VERSION) -C $(NSISDIR) V=$(V)
|
||||
else
|
||||
@$(MAKE) VERSION=$(VERSION) -C $(LOKISETUPDIR) V=$(V)
|
||||
endif
|
||||
|
||||
dist:
|
||||
rm -rf ioquake3-$(SVN_VERSION)
|
||||
|
|
15
misc/nsis/Makefile
Normal file
15
misc/nsis/Makefile
Normal file
|
@ -0,0 +1,15 @@
|
|||
VERSION=1.35_SVN
|
||||
RELEASE=0
|
||||
|
||||
all: ioquake3-$(VERSION)-$(RELEASE).x86.exe
|
||||
|
||||
ioquake3.nsi: ioquake3.nsi.in
|
||||
sed 's/XXXVERSIONXXX/$(VERSION)/;s/XXXRELEASEXXX/$(RELEASE)/' < $< > $@
|
||||
|
||||
ioquake3-$(VERSION)-$(RELEASE).x86.exe: ioquake3.nsi
|
||||
makensis ioquake3.nsi
|
||||
|
||||
clean:
|
||||
rm -rf *.exe ioquake3.nsi
|
||||
|
||||
.PHONY: all clean
|
127
misc/nsis/ioquake3.nsi.in
Normal file
127
misc/nsis/ioquake3.nsi.in
Normal file
|
@ -0,0 +1,127 @@
|
|||
; NSIS description file for ioquake3 installer
|
||||
;
|
||||
; EDIT WITH CARE!
|
||||
;
|
||||
; This file is used to automatically build the installers in the
|
||||
; openSUSE build service, don't break this!
|
||||
;
|
||||
; you have to copy SDL.dll here manually
|
||||
|
||||
; The name of the installer
|
||||
Name "ioquake3"
|
||||
|
||||
; The file to write
|
||||
OutFile "ioquake3-XXXVERSIONXXX-XXXRELEASEXXX.x86.exe"
|
||||
|
||||
; The default installation directory
|
||||
InstallDir $PROGRAMFILES\ioquake3
|
||||
|
||||
; Registry key to check for directory (so if you install again, it will
|
||||
; overwrite the old one automatically)
|
||||
InstallDirRegKey HKLM "Software\ioquake3" "Install_Dir"
|
||||
|
||||
;--------------------------------
|
||||
|
||||
; Pages
|
||||
|
||||
Page components
|
||||
Page directory
|
||||
Page instfiles
|
||||
|
||||
UninstPage uninstConfirm
|
||||
UninstPage instfiles
|
||||
|
||||
;--------------------------------
|
||||
|
||||
; The stuff to install
|
||||
Section "ioquake3 (required)"
|
||||
|
||||
SectionIn RO
|
||||
|
||||
; Set output path to the installation directory.
|
||||
SetOutPath $INSTDIR
|
||||
|
||||
; Put file there
|
||||
File "../../build/release-mingw32-x86/ioq3ded.x86.exe"
|
||||
File "../../build/release-mingw32-x86/ioquake3.x86.exe"
|
||||
File "../../COPYING.txt"
|
||||
File "../../README.txt"
|
||||
File "../../id-readme.txt"
|
||||
|
||||
SetOutPath "$INSTDIR\baseq3"
|
||||
File "../../build/release-mingw32-x86/baseq3/cgamex86.dll"
|
||||
File "../../build/release-mingw32-x86/baseq3/qagamex86.dll"
|
||||
File "../../build/release-mingw32-x86/baseq3/uix86.dll"
|
||||
SetOutPath "$INSTDIR\missionpack"
|
||||
File "../../build/release-mingw32-x86/missionpack/cgamex86.dll"
|
||||
File "../../build/release-mingw32-x86/missionpack/qagamex86.dll"
|
||||
File "../../build/release-mingw32-x86/missionpack/uix86.dll"
|
||||
|
||||
; Write the installation path into the registry
|
||||
WriteRegStr HKLM SOFTWARE\ioquake3 "Install_Dir" "$INSTDIR"
|
||||
|
||||
; Write the uninstall keys for Windows
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ioquake3" "DisplayName" "ioquake3"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ioquake3" "UninstallString" '"$INSTDIR\uninstall.exe"'
|
||||
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ioquake3" "NoModify" 1
|
||||
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ioquake3" "NoRepair" 1
|
||||
WriteUninstaller "uninstall.exe"
|
||||
|
||||
SectionEnd
|
||||
|
||||
; Optional section (can be disabled by the user)
|
||||
Section "Start Menu Shortcuts"
|
||||
|
||||
CreateDirectory "$SMPROGRAMS\ioquake3"
|
||||
CreateShortCut "$SMPROGRAMS\ioquake3\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
|
||||
CreateShortCut "$SMPROGRAMS\ioquake3\ioquake3.lnk" "$INSTDIR\ioquake3.x86.exe" "" "$INSTDIR\ioquake3.x86.exe" 0
|
||||
|
||||
SectionEnd
|
||||
|
||||
Section "SDL.dll"
|
||||
|
||||
SetOutPath $INSTDIR
|
||||
|
||||
File "SDL.dll"
|
||||
|
||||
SectionEnd
|
||||
|
||||
|
||||
;--------------------------------
|
||||
|
||||
; Uninstaller
|
||||
|
||||
Section "Uninstall"
|
||||
|
||||
; Remove registry keys
|
||||
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ioquake3"
|
||||
DeleteRegKey HKLM SOFTWARE\ioquake3
|
||||
|
||||
; Remove files and uninstaller
|
||||
Delete $INSTDIR\baseq3\cgamex86.dll
|
||||
Delete $INSTDIR\baseq3\qagamex86.dll
|
||||
Delete $INSTDIR\baseq3\uix86.dll
|
||||
Delete $INSTDIR\missionpack\cgamex86.dll
|
||||
Delete $INSTDIR\missionpack\qagamex86.dll
|
||||
Delete $INSTDIR\missionpack\uix86.dll
|
||||
Delete $INSTDIR\ioquake3.x86.exe
|
||||
Delete $INSTDIR\ioq3ded.x86.exe
|
||||
|
||||
Delete $INSTDIR\COPYING.txt
|
||||
Delete $INSTDIR\README.txt
|
||||
Delete $INSTDIR\id-readme.txt
|
||||
|
||||
Delete $INSTDIR\SDL.dll
|
||||
|
||||
Delete $INSTDIR\uninstall.exe
|
||||
|
||||
; Remove shortcuts, if any
|
||||
Delete "$SMPROGRAMS\ioquake3\*.lnk"
|
||||
|
||||
; Remove directories used
|
||||
RMDir "$SMPROGRAMS\ioquake3"
|
||||
RMDir "$INSTDIR\baseq3"
|
||||
RMDir "$INSTDIR\missionpack"
|
||||
RMDir "$INSTDIR"
|
||||
|
||||
SectionEnd
|
Loading…
Reference in a new issue