Update NSIS again, and add the wz2100header.bmp that NSIS uses.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7625 4a71c877-e1ca-e34f-864e-861f7616d084
master
Buginator 2009-06-01 05:06:47 +00:00 committed by Git SVN Gateway
parent a72fb9094d
commit 6d08939f11
2 changed files with 76 additions and 38 deletions

BIN
icons/wz2100header.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

View File

@ -28,6 +28,8 @@
;--------------------------------
;General
CRCCheck on ;make sure this isn't corrupted
SetCompressor /SOLID lzma
;Name and file
Name "${PACKAGE_NAME}"
@ -61,6 +63,10 @@ VIAddVersionKey "ProductVersion" "${PACKAGE_VERSION}"
;--------------------------------
;Interface Settings
!define MUI_HEADERIMAGE
!define MUI_HEADERIMAGE_BITMAP "${TOP_SRCDIR}\icons\wz2100header.bmp"
!define MUI_HEADERIMAGE_RIGHT
!define MUI_ICON "${TOP_SRCDIR}\icons\warzone2100.ico"
!define MUI_UNICON "${TOP_SRCDIR}\icons\warzone2100.uninstall.ico"
@ -124,8 +130,11 @@ VIAddVersionKey "ProductVersion" "${PACKAGE_VERSION}"
!insertmacro MUI_RESERVEFILE_LANGDLL
;-------------------------------
; for the message box
LangString DIALOG_MSG ${LANG_ENGLISH} "Do you want to play the game in Chinese?$\r$\n$\r$\n$\r$\nImportant: This requires a different font, which may cause Warzone 2100 to take a long time to start on Windows Vista and later."
LangString DIALOG_MSG ${LANG_GERMAN} "Möchten Sie das Spiel auf Chinesisch spielen?$\r$\n$\r$\n$\r$\nWichtig: Dies benötigt eine andere Schriftart, was dazu führen könnte, dass Warzone 2100 unter Windows Vista und später sehr viel Zeit zum Starten benötigt."
LangString DIALOG_MSG ${LANG_DUTCH} "Do you want to play the game in Chinese?$\r$\n$\r$\n$\r$\nImportant: This requires a different font, which may cause Warzone 2100 to take a long time to start on Windows Vista and later."
;--------------------------------
;Installer Sections
@ -176,8 +185,13 @@ Section $(TEXT_SecBase) SecBase
File "/oname=readme.screen.css" "${TOP_SRCDIR}\doc\styles\readme.screen.css"
SetOutPath "$INSTDIR\fonts"
File "${EXTDIR}\etc\fonts\fonts.conf"
MessageBox MB_YESNO|MB_ICONQUESTION|MB_DEFBUTTON2 $(DIALOG_MSG) IDYES WINDOWSFONT_ENABLED IDNO WINDOWSFONT_DISABLED
WINDOWSFONT_ENABLED:
File "/oname=fonts.conf" "${EXTDIR}\etc\fonts\fonts.conf.wd_enable"
goto FONT_DONE
WINDOWSFONT_DISABLED:
File "/oname=fonts.conf" "${EXTDIR}\etc\fonts\fonts.conf.wd_disable"
FONT_DONE:
File "${EXTDIR}\etc\fonts\DejaVuSans.ttf"
File "${EXTDIR}\etc\fonts\DejaVuSans-Bold.ttf"
@ -199,7 +213,7 @@ Section $(TEXT_SecBase) SecBase
WriteUninstaller "$INSTDIR\uninstall.exe"
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
SetOutPath "$INSTDIR"
;Create shortcuts
CreateDirectory "$SMPROGRAMS\$STARTMENU_FOLDER"
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Uninstall.lnk" "$INSTDIR\uninstall.exe"
@ -207,6 +221,8 @@ Section $(TEXT_SecBase) SecBase
!insertmacro MUI_STARTMENU_WRITE_END
SetOutPath "$INSTDIR"
CreateShortCut "$DESKTOP\${PACKAGE_NAME}.lnk" "$INSTDIR\${PACKAGE}.exe"
SectionEnd
@ -233,25 +249,27 @@ Section $(TEXT_SecAivolutionMod) SecAivolutionMod
SetOutPath "$INSTDIR"
!insertmacro MUI_STARTMENU_WRITE_BEGIN "Application"
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\${PACKAGE_NAME} - Aivolution.lnk" "$INSTDIR\${PACKAGE}.exe" "--mod aivolution.wz"
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\${PACKAGE_NAME} - Aivolution.lnk" "$INSTDIR\${PACKAGE}.exe" "--mod_mp aivolution.wz"
!insertmacro MUI_STARTMENU_WRITE_END
SectionEnd
Section $(TEXT_SecMusicMod) SecMusicMod
SetOutPath "$INSTDIR\mods\global\autoload"
IfFileExists "music_1.0.wz" +6
NSISdl::download "http://download.gna.org/warzone/releases/mods/community-music_1.0.AUTHORS" "music_1.0.AUTHORS.txt"
NSISdl::download "http://download.gna.org/warzone/releases/mods/community-music_1.0.wz" "music_1.0.wz"
Pop $R0 ; Get the return value
StrCmp $R0 "success" +2
MessageBox MB_OK|MB_ICONSTOP "Download of Music mod failed: $R0"
SetOutPath "$INSTDIR"
SectionEnd
; This is disabled for now
;
;Section $(TEXT_SecMusicMod) SecMusicMod
;
; SetOutPath "$INSTDIR\mods\music"
;
; IfFileExists "music_1.0.wz" +6
; NSISdl::download "http://download.gna.org/warzone/releases/mods/community-music_1.1.AUTHORS" "music_1.1.AUTHORS.txt"
; NSISdl::download "http://download.gna.org/warzone/releases/mods/community-music_1.1.wz" "music_1.1.wz"
; Pop $R0 ; Get the return value
; StrCmp $R0 "success" +2
; MessageBox MB_OK|MB_ICONSTOP "Download of Music mod failed: $R0"
;
; SetOutPath "$INSTDIR"
;
;SectionEnd
Section $(TEXT_SecNTWMod) SecNTWMod
@ -272,7 +290,7 @@ SectionGroupEnd
Section $(TEXT_SecFMVs) SecFMVs
IfFileExists "sequences.wz" +5
NSISdl::download "http://download.gna.org/warzone/videos/sequences.wz" "sequences.wz"
NSISdl::download "http://download.gna.org/warzone/videos/sequences-2.2.wz" "sequences.wz"
Pop $R0 ; Get the return value
StrCmp $R0 "success" +2
MessageBox MB_OK|MB_ICONSTOP "Download of videos failed: $R0"
@ -338,6 +356,12 @@ Section $(TEXT_SecNLS) SecNLS
SetOutPath "$INSTDIR\locale\ru\LC_MESSAGES"
File "/oname=${PACKAGE}.mo" "${TOP_BUILDDIR}\po\ru.gmo"
SetOutPath "$INSTDIR\locale\sl\LC_MESSAGES"
File "/oname=${PACKAGE}.mo" "${TOP_BUILDDIR}\po\sl.gmo"
SetOutPath "$INSTDIR\locale\zh_TW\LC_MESSAGES"
File "/oname=${PACKAGE}.mo" "${TOP_BUILDDIR}\po\zh_TW.gmo"
SetOutPath "$INSTDIR\locale\zh_CN\LC_MESSAGES"
File "/oname=${PACKAGE}.mo" "${TOP_BUILDDIR}\po\zh_CN.gmo"
@ -355,7 +379,7 @@ Function .onInit
FunctionEnd
Function LaunchLink
ExecShell "" "$SMPROGRAMS\$STARTMENU_FOLDER\${PACKAGE_NAME}.lnk"
Exec '$INSTDIR\${PACKAGE}.exe'
FunctionEnd
;--------------------------------
@ -374,8 +398,8 @@ FunctionEnd
LangString TEXT_SecAivolutionMod ${LANG_ENGLISH} "Aivolution"
LangString DESC_SecAivolutionMod ${LANG_ENGLISH} "Improved artificial intelligence that learns."
LangString TEXT_SecMusicMod ${LANG_ENGLISH} "Music"
LangString DESC_SecMusicMod ${LANG_ENGLISH} "Download and install music."
; LangString TEXT_SecMusicMod ${LANG_ENGLISH} "Music"
; LangString DESC_SecMusicMod ${LANG_ENGLISH} "Download and install music."
LangString TEXT_SecFMVs ${LANG_ENGLISH} "Videos"
LangString DESC_SecFMVs ${LANG_ENGLISH} "Download and install videos (in-game cutscenes)."
@ -400,8 +424,8 @@ FunctionEnd
LangString TEXT_SecAivolutionMod ${LANG_DUTCH} "Aivolution"
LangString DESC_SecAivolutionMod ${LANG_DUTCH} "Verbeterde kunstmatige intelligentie die leert."
LangString TEXT_SecMusicMod ${LANG_DUTCH} "Muziek"
LangString DESC_SecMusicMod ${LANG_DUTCH} "Muziek downloaden en installeren."
; LangString TEXT_SecMusicMod ${LANG_DUTCH} "Muziek"
; LangString DESC_SecMusicMod ${LANG_DUTCH} "Muziek downloaden en installeren."
LangString TEXT_SecFMVs ${LANG_DUTCH} "FMV"
LangString DESC_SecFMVs ${LANG_DUTCH} "FMV downloaden en installeren."
@ -426,8 +450,8 @@ FunctionEnd
LangString TEXT_SecAivolutionMod ${LANG_GERMAN} "Aivolution"
LangString DESC_SecAivolutionMod ${LANG_GERMAN} "Verbesserte künstliche Intelligenz, die dazulernt."
LangString TEXT_SecMusicMod ${LANG_GERMAN} "Musik"
LangString DESC_SecMusicMod ${LANG_GERMAN} "Musik herunterladen und installieren."
; LangString TEXT_SecMusicMod ${LANG_GERMAN} "Musik"
; LangString DESC_SecMusicMod ${LANG_GERMAN} "Musik herunterladen und installieren."
LangString TEXT_SecFMVs ${LANG_GERMAN} "FMV"
LangString DESC_SecFMVs ${LANG_GERMAN} "FMV herunterladen und installieren."
@ -458,7 +482,7 @@ FunctionEnd
!insertmacro MUI_DESCRIPTION_TEXT ${SecMods} $(DESC_SecMods)
!insertmacro MUI_DESCRIPTION_TEXT ${SecAivolutionMod} $(DESC_SecAivolutionMod)
!insertmacro MUI_DESCRIPTION_TEXT ${SecMusicMod} $(DESC_SecMusicMod)
; !insertmacro MUI_DESCRIPTION_TEXT ${SecMusicMod} $(DESC_SecMusicMod)
!insertmacro MUI_DESCRIPTION_TEXT ${SecFMVs} $(DESC_SecFMVs)
!insertmacro MUI_DESCRIPTION_TEXT ${SecNTWMod} $(DESC_SecNTWMod)
@ -516,9 +540,6 @@ Section "Uninstall"
Delete "$INSTDIR\fonts\DejaVuSans-Bold.ttf"
RMDir "$INSTDIR\fonts"
Delete "$INSTDIR\mods\global\autoload\music_1.0.AUTHORS.txt"
Delete "$INSTDIR\mods\global\autoload\music_1.0.wz"
RMDir "$INSTDIR\mods\global\autoload"
Delete "$INSTDIR\mods\music\music_1.0.AUTHORS.txt"
Delete "$INSTDIR\mods\music\music_1.0.wz"
@ -612,6 +633,14 @@ Section "Uninstall"
RMDir "$INSTDIR\locale\ru\LC_MESSAGES"
RMDir "$INSTDIR\locale\ru"
Delete "$INSTDIR\locale\sl\LC_MESSAGES\${PACKAGE}.mo"
RMDir "$INSTDIR\locale\sl\LC_MESSAGES"
RMDir "$INSTDIR\locale\sl"
Delete "$INSTDIR\locale\zh_TW\LC_MESSAGES\${PACKAGE}.mo"
RMDir "$INSTDIR\locale\zh_TW\LC_MESSAGES"
RMDir "$INSTDIR\locale\zh_TW"
Delete "$INSTDIR\locale\zh_CN\LC_MESSAGES\${PACKAGE}.mo"
RMDir "$INSTDIR\locale\zh_CN\LC_MESSAGES"
RMDir "$INSTDIR\locale\zh_CN"
@ -619,14 +648,22 @@ Section "Uninstall"
RMDir "$INSTDIR\locale"
RMDir "$INSTDIR"
Delete "$SMPROGRAMS\$STARTMENU_FOLDER\Uninstall.lnk"
Delete "$SMPROGRAMS\$STARTMENU_FOLDER\${PACKAGE_NAME}.lnk"
Delete "$SMPROGRAMS\$STARTMENU_FOLDER\${PACKAGE_NAME} - Aivolution.lnk"
Delete "$SMPROGRAMS\$STARTMENU_FOLDER\${PACKAGE_NAME} - NTW.lnk"
RMDir "$SMPROGRAMS\$STARTMENU_FOLDER"
; remove the desktop shortcut icon
Delete "$DESKTOP\${PACKAGE_NAME}.lnk"
; and now, lets really remove the startmenu entries...
!insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP
Delete "$SMPROGRAMS\$MUI_TEMP\Uninstall.lnk"
Delete "$SMPROGRAMS\$MUI_TEMP\${PACKAGE_NAME}.lnk"
Delete "$SMPROGRAMS\$MUI_TEMP\${PACKAGE_NAME} - Aivolution.lnk"
Delete "$SMPROGRAMS\$MUI_TEMP\${PACKAGE_NAME} - NTW.lnk"
; RMDir "$SMPROGRAMS\$STARTMENU_FOLDER"
;Delete empty start menu parent diretories
!insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP
; !insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP
StrCpy $MUI_TEMP "$SMPROGRAMS\$MUI_TEMP"
startMenuDeleteLoop:
@ -656,3 +693,4 @@ Function un.onInit
!insertmacro MUI_UNGETLANGUAGE
FunctionEnd