2008-04-15 14:19:03 +00:00
|
|
|
; 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!
|
|
|
|
;
|
2016-05-27 05:41:14 +00:00
|
|
|
; you have to copy OpenAL32.dll here manually
|
2008-04-15 14:19:03 +00:00
|
|
|
|
2023-06-11 18:26:00 +00:00
|
|
|
!define VERSION "XXXVERSIONXXX"
|
|
|
|
|
2009-04-12 12:31:00 +00:00
|
|
|
!define MULTIUSER_MUI
|
|
|
|
!define MULTIUSER_EXECUTIONLEVEL Highest
|
|
|
|
!define MULTIUSER_INSTALLMODE_COMMANDLINE
|
|
|
|
!define MULTIUSER_INSTALLMODE_DEFAULT_REGISTRY_KEY "Software\ioquake3"
|
|
|
|
!define MULTIUSER_INSTALLMODE_DEFAULT_REGISTRY_VALUENAME "Install_Mode"
|
|
|
|
!define MULTIUSER_INSTALLMODE_INSTDIR_REGISTRY_KEY "Software\ioquake3"
|
|
|
|
!define MULTIUSER_INSTALLMODE_INSTDIR_REGISTRY_VALUENAME "Install_Dir"
|
|
|
|
!define MULTIUSER_INSTALLMODE_INSTDIR "ioquake3"
|
|
|
|
!include MultiUser.nsh
|
|
|
|
|
2008-06-05 08:42:37 +00:00
|
|
|
!include "MUI2.nsh"
|
2009-04-12 07:57:25 +00:00
|
|
|
!define MUI_ICON "../quake3.ico"
|
2008-06-05 08:42:37 +00:00
|
|
|
|
2023-06-11 17:32:13 +00:00
|
|
|
!include LogicLib.nsh
|
|
|
|
|
2008-04-15 14:19:03 +00:00
|
|
|
; The name of the installer
|
|
|
|
Name "ioquake3"
|
|
|
|
|
|
|
|
; The file to write
|
2023-06-11 18:26:00 +00:00
|
|
|
OutFile "ioquake3-${VERSION}-XXXRELEASEXXX.x86.exe"
|
2008-04-15 14:19:03 +00:00
|
|
|
|
|
|
|
; The default installation directory
|
2009-04-12 12:31:00 +00:00
|
|
|
; set by Multiuser.nsh
|
|
|
|
;InstallDir $PROGRAMFILES\ioquake3
|
2008-04-15 14:19:03 +00:00
|
|
|
|
2008-06-25 07:59:57 +00:00
|
|
|
; Registry key to check for directory (so if you install again, it will
|
2008-04-15 14:19:03 +00:00
|
|
|
; overwrite the old one automatically)
|
2009-04-12 12:31:00 +00:00
|
|
|
; handled by Multiuser.nsh
|
|
|
|
;InstallDirRegKey HKLM "Software\ioquake3" "Install_Dir"
|
2008-04-15 14:19:03 +00:00
|
|
|
|
|
|
|
;--------------------------------
|
2008-06-05 08:42:37 +00:00
|
|
|
;Interface Settings
|
|
|
|
|
|
|
|
!define MUI_ABORTWARNING
|
2008-04-15 14:19:03 +00:00
|
|
|
|
2008-06-05 08:42:37 +00:00
|
|
|
;--------------------------------
|
|
|
|
;Pages
|
2008-04-15 14:19:03 +00:00
|
|
|
|
2009-04-12 12:31:00 +00:00
|
|
|
!insertmacro MULTIUSER_PAGE_INSTALLMODE
|
2010-10-12 06:27:27 +00:00
|
|
|
;!insertmacro MUI_PAGE_LICENSE "../../COPYING.txt"
|
2023-04-19 12:48:26 +00:00
|
|
|
!define MUI_COMPONENTSPAGE_SMALLDESC
|
2008-06-05 08:42:37 +00:00
|
|
|
!insertmacro MUI_PAGE_COMPONENTS
|
|
|
|
!insertmacro MUI_PAGE_DIRECTORY
|
|
|
|
!insertmacro MUI_PAGE_INSTFILES
|
2008-04-15 14:19:03 +00:00
|
|
|
|
2008-06-05 08:42:37 +00:00
|
|
|
!insertmacro MUI_UNPAGE_CONFIRM
|
|
|
|
!insertmacro MUI_UNPAGE_INSTFILES
|
2008-06-25 07:59:57 +00:00
|
|
|
|
2008-06-05 08:42:37 +00:00
|
|
|
;--------------------------------
|
|
|
|
;Languages
|
2008-06-25 07:59:57 +00:00
|
|
|
|
2008-06-05 08:42:37 +00:00
|
|
|
!insertmacro MUI_LANGUAGE "English"
|
2008-04-15 14:19:03 +00:00
|
|
|
|
|
|
|
;--------------------------------
|
|
|
|
|
2009-04-12 12:31:00 +00:00
|
|
|
;--------------------------------
|
|
|
|
;Multiuser stuff
|
|
|
|
Function .onInit
|
|
|
|
!insertmacro MULTIUSER_INIT
|
|
|
|
FunctionEnd
|
|
|
|
|
|
|
|
Function un.onInit
|
|
|
|
!insertmacro MULTIUSER_UNINIT
|
|
|
|
FunctionEnd
|
|
|
|
|
2008-04-15 14:19:03 +00:00
|
|
|
; The stuff to install
|
2023-06-11 18:26:00 +00:00
|
|
|
Section "ioquake3 ${VERSION} (required)" ioquake3
|
2008-04-15 14:19:03 +00:00
|
|
|
|
|
|
|
SectionIn RO
|
2008-06-25 07:59:57 +00:00
|
|
|
|
2008-04-15 14:19:03 +00:00
|
|
|
; Set output path to the installation directory.
|
|
|
|
SetOutPath $INSTDIR
|
2008-06-25 07:59:57 +00:00
|
|
|
|
2023-06-11 16:48:42 +00:00
|
|
|
File "../../build/release-mingw32-x86/SDL2.dll"
|
2011-08-29 15:17:47 +00:00
|
|
|
!ifndef USE_INTERNAL_ZLIB
|
|
|
|
File "zlib1.dll"
|
|
|
|
!endif
|
|
|
|
!ifndef USE_INTERNAL_JPEG
|
|
|
|
File "jpeg8c.dll"
|
|
|
|
!endif
|
|
|
|
|
2008-04-15 14:19:03 +00:00
|
|
|
; Put file there
|
|
|
|
File "../../build/release-mingw32-x86/ioq3ded.x86.exe"
|
|
|
|
File "../../build/release-mingw32-x86/ioquake3.x86.exe"
|
2011-08-29 15:17:47 +00:00
|
|
|
!ifdef USE_RENDERER_DLOPEN
|
|
|
|
File "../../build/release-mingw32-x86/renderer_opengl1_x86.dll"
|
2013-02-15 23:46:37 +00:00
|
|
|
File "../../build/release-mingw32-x86/renderer_opengl2_x86.dll"
|
2011-08-29 15:17:47 +00:00
|
|
|
!endif
|
|
|
|
|
2008-04-15 14:19:03 +00:00
|
|
|
File "../../COPYING.txt"
|
2016-05-27 05:41:14 +00:00
|
|
|
File "/oname=README.txt" "../../README.md"
|
2008-04-15 14:19:03 +00:00
|
|
|
File "../../id-readme.txt"
|
2008-06-25 07:59:50 +00:00
|
|
|
File "../../voip-readme.txt"
|
2008-04-15 14:19:03 +00:00
|
|
|
|
|
|
|
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"
|
2008-06-25 07:59:57 +00:00
|
|
|
|
2008-04-15 14:19:03 +00:00
|
|
|
; Write the installation path into the registry
|
2009-04-12 12:31:00 +00:00
|
|
|
WriteRegStr SHCTX "Software\ioquake3" ${MULTIUSER_INSTALLMODE_INSTDIR_REGISTRY_VALUENAME} "$INSTDIR"
|
|
|
|
WriteRegStr SHCTX "Software\ioquake3" ${MULTIUSER_INSTALLMODE_DEFAULT_REGISTRY_VALUENAME} "$MultiUser.InstallMode"
|
2008-06-25 07:59:57 +00:00
|
|
|
|
2008-04-15 14:19:03 +00:00
|
|
|
; Write the uninstall keys for Windows
|
2009-04-18 17:03:29 +00:00
|
|
|
WriteRegStr SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\ioquake3" "DisplayName" "ioquake3"
|
2023-06-11 18:26:00 +00:00
|
|
|
WriteRegStr SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\ioquake3" "DisplayVersion" "${VERSION}"
|
2009-04-18 17:03:29 +00:00
|
|
|
WriteRegStr SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\ioquake3" "UninstallString" '"$INSTDIR\uninstall.exe"'
|
|
|
|
WriteRegDWORD SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\ioquake3" "NoModify" 1
|
|
|
|
WriteRegDWORD SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\ioquake3" "NoRepair" 1
|
2008-04-15 14:19:03 +00:00
|
|
|
WriteUninstaller "uninstall.exe"
|
2008-06-25 07:59:57 +00:00
|
|
|
|
2008-04-15 14:19:03 +00:00
|
|
|
SectionEnd
|
|
|
|
|
|
|
|
; Optional section (can be disabled by the user)
|
2023-04-19 12:48:26 +00:00
|
|
|
Section "Start Menu Shortcuts" StartMenuShortcuts
|
2008-04-15 14:19:03 +00:00
|
|
|
|
|
|
|
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
|
2008-06-25 07:59:57 +00:00
|
|
|
|
2008-04-15 14:19:03 +00:00
|
|
|
SectionEnd
|
|
|
|
|
2023-04-19 12:48:26 +00:00
|
|
|
Section "Protocol Handler" ProtocolHandler
|
|
|
|
|
|
|
|
WriteRegStr SHCTX "Software\Classes\quake3" "CustomUrlApplication" "$INSTDIR\ioquake3.x86.exe"
|
2023-06-11 21:41:15 +00:00
|
|
|
WriteRegStr SHCTX "Software\Classes\quake3" "CustomUrlArguments" '--uri "%1"'
|
2023-04-19 12:48:26 +00:00
|
|
|
WriteRegStr SHCTX "Software\Classes\quake3" "URL Protocol" ""
|
|
|
|
WriteRegStr SHCTX "Software\Classes\quake3\DefaultIcon" "" "$INSTDIR\ioquake3.x86.exe,0"
|
|
|
|
WriteRegStr SHCTX "Software\Classes\quake3\shell\open\command" "" '"$INSTDIR\ioquake3.x86.exe" --uri "%1"'
|
|
|
|
|
|
|
|
SectionEnd
|
|
|
|
|
2011-08-29 15:17:47 +00:00
|
|
|
!ifdef USE_OPENAL_DLOPEN
|
2023-04-19 12:48:26 +00:00
|
|
|
Section "OpenAL-Soft library" OpenAL
|
2008-06-25 07:59:53 +00:00
|
|
|
|
|
|
|
SetOutPath $INSTDIR
|
2008-06-25 07:59:57 +00:00
|
|
|
|
2009-05-25 15:14:53 +00:00
|
|
|
File "OpenAL32.dll"
|
2008-06-25 07:59:53 +00:00
|
|
|
|
|
|
|
SectionEnd
|
2011-08-29 15:17:47 +00:00
|
|
|
!endif
|
|
|
|
|
|
|
|
!ifdef USE_CURL_DLOPEN
|
2023-04-19 12:48:26 +00:00
|
|
|
Section "libcurl" libcurl
|
2011-08-29 15:17:47 +00:00
|
|
|
|
|
|
|
SetOutPath $INSTDIR
|
|
|
|
|
|
|
|
File "libcurl-4.dll"
|
|
|
|
|
|
|
|
SectionEnd
|
|
|
|
!endif
|
2008-06-25 07:59:53 +00:00
|
|
|
|
2008-04-15 14:19:03 +00:00
|
|
|
;--------------------------------
|
|
|
|
|
|
|
|
; Uninstaller
|
|
|
|
|
|
|
|
Section "Uninstall"
|
2008-06-25 07:59:57 +00:00
|
|
|
|
2008-04-15 14:19:03 +00:00
|
|
|
; Remove registry keys
|
2009-04-18 17:03:29 +00:00
|
|
|
DeleteRegKey SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\ioquake3"
|
2009-04-12 12:31:00 +00:00
|
|
|
DeleteRegKey SHCTX "Software\ioquake3"
|
2023-06-11 17:32:13 +00:00
|
|
|
|
|
|
|
ReadRegStr $0 SHCTX "Software\Classes\quake3\shell\open\command" ""
|
|
|
|
${If} $0 == '"$INSTDIR\ioquake3.x86.exe" --uri "%1"'
|
|
|
|
DeleteRegKey SHCTX "Software\Classes\quake3"
|
|
|
|
${EndIf}
|
2008-04-15 14:19:03 +00:00
|
|
|
|
|
|
|
; 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
|
2011-08-29 15:17:47 +00:00
|
|
|
!ifdef USE_RENDERER_DLOPEN
|
|
|
|
Delete $INSTDIR\renderer_opengl1_x86.dll
|
2013-02-15 23:46:37 +00:00
|
|
|
Delete $INSTDIR\renderer_opengl2_x86.dll
|
2011-08-29 15:17:47 +00:00
|
|
|
!endif
|
2008-04-15 14:19:03 +00:00
|
|
|
|
|
|
|
Delete $INSTDIR\COPYING.txt
|
|
|
|
Delete $INSTDIR\README.txt
|
|
|
|
Delete $INSTDIR\id-readme.txt
|
2008-06-25 07:59:50 +00:00
|
|
|
Delete $INSTDIR\voip-readme.txt
|
2008-04-15 14:19:03 +00:00
|
|
|
|
2023-06-11 16:48:42 +00:00
|
|
|
Delete $INSTDIR\SDL2.dll
|
2011-08-29 15:17:47 +00:00
|
|
|
!ifndef USE_INTERNAL_ZLIB
|
|
|
|
Delete $INSTDIR\zlib1.dll
|
|
|
|
!endif
|
|
|
|
!ifndef USE_INTERNAL_JPEG
|
|
|
|
Delete $INSTDIR\jpeg8c.dll
|
|
|
|
!endif
|
2008-04-15 14:19:03 +00:00
|
|
|
|
2011-08-29 15:17:47 +00:00
|
|
|
!ifdef USE_OPENAL_DLOPEN
|
2009-05-25 15:14:53 +00:00
|
|
|
Delete $INSTDIR\OpenAL32.dll
|
2011-08-29 15:17:47 +00:00
|
|
|
!endif
|
|
|
|
!ifdef USE_CURL_DLOPEN
|
|
|
|
Delete $INSTDIR\libcurl-4.dll
|
|
|
|
!endif
|
2008-07-16 07:15:01 +00:00
|
|
|
|
2008-04-15 14:19:03 +00:00
|
|
|
Delete $INSTDIR\uninstall.exe
|
|
|
|
|
|
|
|
; Remove shortcuts, if any
|
2008-06-25 07:59:50 +00:00
|
|
|
Delete "$SMPROGRAMS\ioquake3\Uninstall.lnk"
|
|
|
|
Delete "$SMPROGRAMS\ioquake3\ioquake3.lnk"
|
2008-04-15 14:19:03 +00:00
|
|
|
|
|
|
|
; Remove directories used
|
|
|
|
RMDir "$SMPROGRAMS\ioquake3"
|
|
|
|
RMDir "$INSTDIR\baseq3"
|
|
|
|
RMDir "$INSTDIR\missionpack"
|
|
|
|
RMDir "$INSTDIR"
|
|
|
|
|
|
|
|
SectionEnd
|
2023-04-19 12:48:26 +00:00
|
|
|
|
|
|
|
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
|
|
|
|
!insertmacro MUI_DESCRIPTION_TEXT ${ioquake3} "The game executables."
|
|
|
|
!insertmacro MUI_DESCRIPTION_TEXT ${StartMenuShortcuts} "Create shortcuts in the start menu."
|
|
|
|
!insertmacro MUI_DESCRIPTION_TEXT ${ProtocolHandler} "The protocol handler lets you connect to a game by clicking a link in a web browser."
|
|
|
|
!ifdef USE_OPENAL_DLOPEN
|
2023-06-11 22:05:12 +00:00
|
|
|
!insertmacro MUI_DESCRIPTION_TEXT ${OpenAL} "Advanced audio mixer that supports surround sound."
|
2023-04-19 12:48:26 +00:00
|
|
|
!endif
|
|
|
|
!ifdef USE_CURL_DLOPEN
|
2023-06-11 22:05:12 +00:00
|
|
|
!insertmacro MUI_DESCRIPTION_TEXT ${libcurl} "Used for HTTP file downloads."
|
2023-04-19 12:48:26 +00:00
|
|
|
!endif
|
|
|
|
!insertmacro MUI_FUNCTION_DESCRIPTION_END
|