2009-01-09 09:04:28 -07:00
|
|
|
!system "GetSVNRev.exe" ; ATTENTION: This MUST be run before this script
|
|
|
|
!include "svnrev.txt" ; !defines PRODUCT_VERSION
|
|
|
|
!define BASE_DIR "..\Binary\win32"
|
2008-07-12 11:40:22 -06:00
|
|
|
|
|
|
|
; HM NIS Edit Wizard helper defines
|
|
|
|
!define PRODUCT_NAME "Dolphin"
|
2009-01-09 09:04:28 -07:00
|
|
|
!define PRODUCT_PUBLISHER "Dolphin Team"
|
2008-07-12 11:40:22 -06:00
|
|
|
!define PRODUCT_WEB_SITE "http://www.dolphin-emu.com"
|
2009-05-31 21:54:29 -06:00
|
|
|
!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\Dolphin.exe"
|
2008-07-12 11:40:22 -06:00
|
|
|
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
|
|
|
|
!define PRODUCT_UNINST_ROOT_KEY "HKLM"
|
|
|
|
|
2009-01-09 09:04:28 -07:00
|
|
|
SetCompressor lzma
|
|
|
|
|
2008-07-12 11:40:22 -06:00
|
|
|
; MUI 1.67 compatible ------
|
|
|
|
!include "MUI.nsh"
|
|
|
|
|
|
|
|
; MUI Settings
|
|
|
|
!define MUI_ABORTWARNING
|
2009-01-09 09:04:28 -07:00
|
|
|
!define MUI_ICON "Dolphin.ico"
|
2008-07-12 11:40:22 -06:00
|
|
|
!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"
|
|
|
|
|
2009-01-09 09:04:28 -07:00
|
|
|
; Language Selection Dialog Settings
|
|
|
|
!define MUI_LANGDLL_REGISTRY_ROOT "${PRODUCT_UNINST_ROOT_KEY}"
|
|
|
|
!define MUI_LANGDLL_REGISTRY_KEY "${PRODUCT_UNINST_KEY}"
|
|
|
|
!define MUI_LANGDLL_REGISTRY_VALUENAME "NSIS:Language"
|
|
|
|
|
2008-07-12 11:40:22 -06:00
|
|
|
; License page
|
|
|
|
!insertmacro MUI_PAGE_LICENSE "Licence.txt"
|
2009-01-09 09:04:28 -07:00
|
|
|
; Components page
|
|
|
|
!insertmacro MUI_PAGE_COMPONENTS
|
2008-07-12 11:40:22 -06:00
|
|
|
; Directory page
|
|
|
|
!insertmacro MUI_PAGE_DIRECTORY
|
|
|
|
; Instfiles page
|
|
|
|
!insertmacro MUI_PAGE_INSTFILES
|
|
|
|
; Finish page
|
2009-01-09 09:04:28 -07:00
|
|
|
; We launch the desktop shortcut to set the working dir
|
|
|
|
!define MUI_FINISHPAGE_RUN
|
|
|
|
!define MUI_FINISHPAGE_RUN_TEXT "Start $(^Name)"
|
|
|
|
!define MUI_FINISHPAGE_RUN_FUNCTION "LaunchDolphin"
|
2008-07-12 11:40:22 -06:00
|
|
|
!insertmacro MUI_PAGE_FINISH
|
|
|
|
|
|
|
|
; Uninstaller pages
|
|
|
|
!insertmacro MUI_UNPAGE_INSTFILES
|
|
|
|
|
|
|
|
; Language files
|
2009-01-09 09:04:28 -07:00
|
|
|
!insertmacro MUI_LANGUAGE "Afrikaans"
|
|
|
|
!insertmacro MUI_LANGUAGE "Albanian"
|
|
|
|
!insertmacro MUI_LANGUAGE "Arabic"
|
|
|
|
!insertmacro MUI_LANGUAGE "Basque"
|
|
|
|
!insertmacro MUI_LANGUAGE "Belarusian"
|
|
|
|
!insertmacro MUI_LANGUAGE "Bosnian"
|
|
|
|
!insertmacro MUI_LANGUAGE "Breton"
|
|
|
|
!insertmacro MUI_LANGUAGE "Bulgarian"
|
|
|
|
!insertmacro MUI_LANGUAGE "Catalan"
|
|
|
|
!insertmacro MUI_LANGUAGE "Croatian"
|
|
|
|
!insertmacro MUI_LANGUAGE "Czech"
|
|
|
|
!insertmacro MUI_LANGUAGE "Danish"
|
|
|
|
!insertmacro MUI_LANGUAGE "Dutch"
|
2008-07-12 11:40:22 -06:00
|
|
|
!insertmacro MUI_LANGUAGE "English"
|
2009-01-09 09:04:28 -07:00
|
|
|
!insertmacro MUI_LANGUAGE "Estonian"
|
|
|
|
!insertmacro MUI_LANGUAGE "Farsi"
|
|
|
|
!insertmacro MUI_LANGUAGE "Finnish"
|
|
|
|
!insertmacro MUI_LANGUAGE "French"
|
|
|
|
!insertmacro MUI_LANGUAGE "Galician"
|
|
|
|
!insertmacro MUI_LANGUAGE "German"
|
|
|
|
!insertmacro MUI_LANGUAGE "Greek"
|
|
|
|
!insertmacro MUI_LANGUAGE "Hebrew"
|
|
|
|
!insertmacro MUI_LANGUAGE "Hungarian"
|
|
|
|
!insertmacro MUI_LANGUAGE "Icelandic"
|
|
|
|
!insertmacro MUI_LANGUAGE "Indonesian"
|
|
|
|
!insertmacro MUI_LANGUAGE "Irish"
|
|
|
|
!insertmacro MUI_LANGUAGE "Italian"
|
|
|
|
!insertmacro MUI_LANGUAGE "Japanese"
|
|
|
|
!insertmacro MUI_LANGUAGE "Korean"
|
|
|
|
!insertmacro MUI_LANGUAGE "Kurdish"
|
|
|
|
!insertmacro MUI_LANGUAGE "Latvian"
|
|
|
|
!insertmacro MUI_LANGUAGE "Lithuanian"
|
|
|
|
!insertmacro MUI_LANGUAGE "Luxembourgish"
|
|
|
|
!insertmacro MUI_LANGUAGE "Macedonian"
|
|
|
|
!insertmacro MUI_LANGUAGE "Malay"
|
|
|
|
!insertmacro MUI_LANGUAGE "Mongolian"
|
|
|
|
!insertmacro MUI_LANGUAGE "Norwegian"
|
|
|
|
!insertmacro MUI_LANGUAGE "NorwegianNynorsk"
|
|
|
|
!insertmacro MUI_LANGUAGE "Polish"
|
|
|
|
!insertmacro MUI_LANGUAGE "Portuguese"
|
|
|
|
!insertmacro MUI_LANGUAGE "PortugueseBR"
|
|
|
|
!insertmacro MUI_LANGUAGE "Romanian"
|
|
|
|
!insertmacro MUI_LANGUAGE "Russian"
|
|
|
|
!insertmacro MUI_LANGUAGE "Serbian"
|
|
|
|
!insertmacro MUI_LANGUAGE "SerbianLatin"
|
|
|
|
!insertmacro MUI_LANGUAGE "SimpChinese"
|
|
|
|
!insertmacro MUI_LANGUAGE "Slovak"
|
|
|
|
!insertmacro MUI_LANGUAGE "Slovenian"
|
|
|
|
!insertmacro MUI_LANGUAGE "Spanish"
|
|
|
|
!insertmacro MUI_LANGUAGE "SpanishInternational"
|
|
|
|
!insertmacro MUI_LANGUAGE "Swedish"
|
|
|
|
!insertmacro MUI_LANGUAGE "Thai"
|
|
|
|
!insertmacro MUI_LANGUAGE "TradChinese"
|
|
|
|
!insertmacro MUI_LANGUAGE "Turkish"
|
|
|
|
!insertmacro MUI_LANGUAGE "Ukrainian"
|
|
|
|
!insertmacro MUI_LANGUAGE "Uzbek"
|
|
|
|
!insertmacro MUI_LANGUAGE "Welsh"
|
|
|
|
|
|
|
|
; Reserve files
|
|
|
|
!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
|
2008-07-12 11:40:22 -06:00
|
|
|
|
|
|
|
; MUI end ------
|
|
|
|
|
|
|
|
Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
|
2009-01-09 09:04:28 -07:00
|
|
|
!define UN_NAME "Uninstall $(^Name)"
|
|
|
|
OutFile "Dolphin_Installer_win32.exe"
|
|
|
|
InstallDir "$PROGRAMFILES\$(^Name)"
|
2008-07-12 11:40:22 -06:00
|
|
|
InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
|
|
|
|
ShowInstDetails show
|
|
|
|
ShowUnInstDetails show
|
|
|
|
|
2009-01-09 09:04:28 -07:00
|
|
|
Function .onInit
|
|
|
|
!insertmacro MUI_LANGDLL_DISPLAY
|
|
|
|
FunctionEnd
|
2008-07-12 11:40:22 -06:00
|
|
|
|
2009-01-09 09:04:28 -07:00
|
|
|
Section "Base" SEC01
|
|
|
|
SetShellVarContext all
|
|
|
|
; Dolphin exe and dlls
|
|
|
|
; TODO: cg is only for OGL, SDL is only for nJoy
|
|
|
|
; TODO: Make a nice subsection-ized display
|
2008-07-12 11:40:22 -06:00
|
|
|
SetOutPath "$INSTDIR"
|
2009-01-09 09:04:28 -07:00
|
|
|
SetOverwrite ifnewer
|
2009-05-31 21:54:29 -06:00
|
|
|
File "${BASE_DIR}\Dolphin.exe"
|
2009-01-09 09:04:28 -07:00
|
|
|
File "..\Externals\Cg\cg.dll"
|
|
|
|
File "..\Externals\Cg\cgGL.dll"
|
|
|
|
File "..\Externals\WiiUse\Win32\wiiuse.dll"
|
|
|
|
File "..\Externals\SDL\win32\SDL.dll"
|
2009-05-31 21:54:29 -06:00
|
|
|
; This needs to be done after Dolphin.exe is copied
|
2008-07-12 11:40:22 -06:00
|
|
|
CreateDirectory "$SMPROGRAMS\${PRODUCT_NAME}"
|
2009-05-31 21:54:29 -06:00
|
|
|
CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\$(^Name).lnk" "$INSTDIR\Dolphin.exe"
|
|
|
|
CreateShortCut "$DESKTOP\$(^Name).lnk" "$INSTDIR\Dolphin.exe"
|
2008-07-12 11:40:22 -06:00
|
|
|
|
2009-01-09 09:04:28 -07:00
|
|
|
; Plugins
|
|
|
|
SetOutPath "$INSTDIR\Plugins"
|
|
|
|
SetOverwrite ifnewer
|
|
|
|
File "${BASE_DIR}\Plugins\Plugin_DSP_HLE.dll"
|
|
|
|
File "${BASE_DIR}\Plugins\Plugin_DSP_LLE.dll"
|
|
|
|
File "${BASE_DIR}\Plugins\Plugin_nJoy_SDL.dll"
|
|
|
|
File "${BASE_DIR}\Plugins\Plugin_nJoy_SDL_Test.dll"
|
|
|
|
File "${BASE_DIR}\Plugins\Plugin_PadSimple.dll"
|
|
|
|
File "${BASE_DIR}\Plugins\Plugin_VideoDX9.dll"
|
|
|
|
File "${BASE_DIR}\Plugins\Plugin_VideoOGL.dll"
|
|
|
|
File "${BASE_DIR}\Plugins\Plugin_Wiimote.dll"
|
|
|
|
|
|
|
|
; GC/Wii static settings
|
|
|
|
SetOutPath "$INSTDIR\Sys\GC"
|
|
|
|
SetOverwrite ifnewer
|
|
|
|
File "..\Data\Sys\GC\font_ansi.bin"
|
|
|
|
File "..\Data\Sys\GC\font_sjis.bin"
|
|
|
|
SetOutPath "$INSTDIR\Sys\Wii"
|
|
|
|
SetOverwrite ifnewer
|
|
|
|
File "..\Data\Sys\Wii\setting-eur.txt"
|
|
|
|
File "..\Data\Sys\Wii\setting-jpn.txt"
|
|
|
|
File "..\Data\Sys\Wii\setting-usa.txt"
|
|
|
|
|
|
|
|
; GC/Wii User settings
|
|
|
|
SetOutPath "$INSTDIR\User\GC"
|
|
|
|
SetOutPath "$INSTDIR\User\Wii\shared2\sys"
|
|
|
|
SetOverwrite ifnewer
|
|
|
|
File "..\Data\User\Wii\shared2\sys\readme.txt"
|
|
|
|
File "..\Data\User\Wii\shared2\sys\SYSCONF"
|
|
|
|
|
|
|
|
; GameConfigs
|
|
|
|
SetOutPath "$INSTDIR\User\GameConfig"
|
|
|
|
SetOverwrite ifnewer
|
|
|
|
File "..\Data\User\GameConfig\*.*"
|
2008-07-12 11:40:22 -06:00
|
|
|
SectionEnd
|
|
|
|
|
|
|
|
Section -AdditionalIcons
|
2009-01-09 09:04:28 -07:00
|
|
|
CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\${UN_NAME}.lnk" "$INSTDIR\uninst.exe"
|
2008-07-12 11:40:22 -06:00
|
|
|
SectionEnd
|
|
|
|
|
|
|
|
Section -Post
|
|
|
|
WriteUninstaller "$INSTDIR\uninst.exe"
|
2009-05-31 21:54:29 -06:00
|
|
|
WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\Dolphin.exe"
|
2008-07-12 11:40:22 -06:00
|
|
|
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)"
|
|
|
|
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe"
|
2009-05-31 21:54:29 -06:00
|
|
|
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$INSTDIR\Dolphin.exe"
|
2008-07-12 11:40:22 -06:00
|
|
|
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}"
|
|
|
|
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}"
|
|
|
|
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}"
|
|
|
|
SectionEnd
|
|
|
|
|
2009-01-09 09:04:28 -07:00
|
|
|
; Section descriptions
|
|
|
|
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
|
|
|
|
!insertmacro MUI_DESCRIPTION_TEXT ${SEC01} "It is recommended that you install all of the included files."
|
|
|
|
!insertmacro MUI_FUNCTION_DESCRIPTION_END
|
|
|
|
|
2008-07-12 11:40:22 -06:00
|
|
|
|
|
|
|
Function un.onUninstSuccess
|
|
|
|
HideWindow
|
2009-01-09 09:04:28 -07:00
|
|
|
MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was uninstalled successfully.$\r$\n\
|
|
|
|
ATTENTION: You must manually delete$\r$\n$INSTDIR"
|
2008-07-12 11:40:22 -06:00
|
|
|
FunctionEnd
|
|
|
|
|
|
|
|
Function un.onInit
|
2009-01-09 09:04:28 -07:00
|
|
|
!insertmacro MUI_UNGETLANGUAGE
|
|
|
|
MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to remove $(^Name)?" IDYES +2
|
2008-07-12 11:40:22 -06:00
|
|
|
Abort
|
|
|
|
FunctionEnd
|
|
|
|
|
|
|
|
Section Uninstall
|
2009-01-09 09:04:28 -07:00
|
|
|
SetShellVarContext all
|
|
|
|
; Only uninstall what we put there; all $INSTDIR\User is left as is
|
|
|
|
Delete "$INSTDIR\uninst.exe"
|
|
|
|
Delete "$INSTDIR\*.dll"
|
|
|
|
Delete "$INSTDIR\Plugins\*.dll"
|
|
|
|
Delete "$INSTDIR\Sys\Wii\setting-usa.txt"
|
|
|
|
Delete "$INSTDIR\Sys\Wii\setting-jpn.txt"
|
|
|
|
Delete "$INSTDIR\Sys\Wii\setting-eur.txt"
|
|
|
|
Delete "$INSTDIR\Sys\GC\font_sjis.bin"
|
|
|
|
Delete "$INSTDIR\Sys\GC\font_ansi.bin"
|
2009-05-31 21:54:29 -06:00
|
|
|
Delete "$INSTDIR\Dolphin.exe"
|
2009-01-09 09:04:28 -07:00
|
|
|
|
|
|
|
Delete "$SMPROGRAMS\${PRODUCT_NAME}\${UN_NAME}.lnk"
|
|
|
|
Delete "$DESKTOP\$(^Name).lnk"
|
|
|
|
Delete "$SMPROGRAMS\${PRODUCT_NAME}\$(^Name).lnk"
|
|
|
|
|
|
|
|
RMDir "$SMPROGRAMS\${PRODUCT_NAME}"
|
|
|
|
RMDir "$INSTDIR\Sys\GC"
|
|
|
|
RMDir "$INSTDIR\Sys\Wii"
|
|
|
|
RMDir "$INSTDIR\Sys"
|
2008-07-12 11:40:22 -06:00
|
|
|
RMDir "$INSTDIR\Plugins"
|
|
|
|
RMDir "$INSTDIR"
|
|
|
|
|
|
|
|
DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
|
|
|
|
DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"
|
2009-01-09 09:04:28 -07:00
|
|
|
SetAutoClose true
|
|
|
|
SectionEnd
|
|
|
|
|
|
|
|
Function LaunchDolphin
|
|
|
|
ExecShell "" "$DESKTOP\$(^Name).lnk"
|
|
|
|
FunctionEnd
|