mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-30 01:29:42 -06:00
Update nsis installer and some cleanup. Note: I'm not sure if the installer yet allows for mutliple revisions installed side-by-side, but that is the intention. Also, I need to figure out how to do subsections and some trickies in nsis.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1842 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -1,105 +1,180 @@
|
||||
!define BASE_PATH "..\Binary\win32"
|
||||
!define SETUP_NAME "DolphinSetup_32bit_14b"
|
||||
|
||||
; Script generated by the HM NIS Edit Script Wizard.
|
||||
!system "GetSVNRev.exe" ; ATTENTION: This MUST be run before this script
|
||||
!include "svnrev.txt" ; !defines PRODUCT_VERSION
|
||||
!define BASE_DIR "..\Binary\win32"
|
||||
|
||||
; HM NIS Edit Wizard helper defines
|
||||
!define PRODUCT_NAME "Dolphin"
|
||||
!define PRODUCT_VERSION "1.4b"
|
||||
!define PRODUCT_PUBLISHER "Dolphin DevTeam"
|
||||
!define PRODUCT_PUBLISHER "Dolphin Team"
|
||||
!define PRODUCT_WEB_SITE "http://www.dolphin-emu.com"
|
||||
!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\${PRODUCT_NAME}"
|
||||
!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\DolphinWx.exe"
|
||||
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
|
||||
!define PRODUCT_UNINST_ROOT_KEY "HKLM"
|
||||
|
||||
SetCompressor lzma
|
||||
|
||||
; MUI 1.67 compatible ------
|
||||
!include "MUI.nsh"
|
||||
|
||||
; MUI Settings
|
||||
!define MUI_ABORTWARNING
|
||||
!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico"
|
||||
!define MUI_ICON "Dolphin.ico"
|
||||
!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"
|
||||
!define MUI_WELCOMEFINISHPAGE_BITMAP "wizard.bmp"
|
||||
|
||||
|
||||
; Welcome page
|
||||
!insertmacro MUI_PAGE_WELCOME
|
||||
; 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"
|
||||
|
||||
; License page
|
||||
!insertmacro MUI_PAGE_LICENSE "Licence.txt"
|
||||
; Components page
|
||||
!insertmacro MUI_PAGE_COMPONENTS
|
||||
; Directory page
|
||||
!insertmacro MUI_PAGE_DIRECTORY
|
||||
; Instfiles page
|
||||
!insertmacro MUI_PAGE_INSTFILES
|
||||
; Finish page
|
||||
!define MUI_FINISHPAGE_RUN "$INSTDIR\DolphinWx.exe"
|
||||
; 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"
|
||||
!insertmacro MUI_PAGE_FINISH
|
||||
|
||||
; Uninstaller pages
|
||||
!insertmacro MUI_UNPAGE_INSTFILES
|
||||
|
||||
; Language files
|
||||
!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"
|
||||
!insertmacro MUI_LANGUAGE "English"
|
||||
!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
|
||||
|
||||
; MUI end ------
|
||||
|
||||
Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
|
||||
OutFile "${SETUP_NAME}.exe"
|
||||
InstallDir "$PROGRAMFILES32\Dolphin"
|
||||
!define UN_NAME "Uninstall $(^Name)"
|
||||
OutFile "Dolphin_Installer_win32.exe"
|
||||
InstallDir "$PROGRAMFILES\$(^Name)"
|
||||
InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
|
||||
ShowInstDetails show
|
||||
ShowUnInstDetails show
|
||||
|
||||
Section "Hauptgruppe" SEC01
|
||||
SetOverwrite try
|
||||
|
||||
; --- copy executable
|
||||
SetOutPath "$INSTDIR"
|
||||
File "${BASE_PATH}\cg.dll"
|
||||
File "${BASE_PATH}\cgGL.dll"
|
||||
File "${BASE_PATH}\DolphinWx.exe"
|
||||
File "Dolphin.ini"
|
||||
|
||||
; --- copy plugins
|
||||
SetOutPath "$INSTDIR\Plugins"
|
||||
File "${BASE_PATH}\Plugins\Plugin_DSP.dll"
|
||||
File "${BASE_PATH}\Plugins\Plugin_PadDX9.dll"
|
||||
File "${BASE_PATH}\Plugins\Plugin_PadSimple.dll"
|
||||
File "${BASE_PATH}\Plugins\Plugin_VideoDX9.dll"
|
||||
File "${BASE_PATH}\Plugins\Plugin_VideoOGL.dll"
|
||||
|
||||
; --- copy help
|
||||
; SetOutPath "$INSTDIR\Help"
|
||||
; File "${BASE_PATH}\Help\Dolphin.chm"
|
||||
|
||||
; --- copy data directory
|
||||
SetOutPath "$INSTDIR\Data"
|
||||
File "${BASE_PATH}\Data\*.*"
|
||||
|
||||
; --- create data directories and copy IPLs
|
||||
SetOutPath "$INSTDIR\Data_EUR"
|
||||
File "${BASE_PATH}\Data_EUR\SRAM.raw"
|
||||
SetOutPath "$INSTDIR\Data_JAP"
|
||||
File "${BASE_PATH}\Data_JAP\SRAM.raw"
|
||||
SetOutPath "$INSTDIR\Data_USA"
|
||||
File "${BASE_PATH}\Data_USA\SRAM.raw"
|
||||
|
||||
; --- copy patches directory
|
||||
SetOutPath "$INSTDIR\Patches"
|
||||
File "${BASE_PATH}\Patches\*.*"
|
||||
|
||||
; -- create shortcuts
|
||||
Function .onInit
|
||||
!insertmacro MUI_LANGDLL_DISPLAY
|
||||
FunctionEnd
|
||||
|
||||
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
|
||||
SetOutPath "$INSTDIR"
|
||||
SetOverwrite ifnewer
|
||||
File "${BASE_DIR}\DolphinWx.exe"
|
||||
File "..\Externals\Cg\cg.dll"
|
||||
File "..\Externals\Cg\cgGL.dll"
|
||||
File "..\Externals\WiiUse\Win32\wiiuse.dll"
|
||||
File "..\Externals\SDL\win32\SDL.dll"
|
||||
; This needs to be done after DolphinWx.exe is copied
|
||||
CreateDirectory "$SMPROGRAMS\${PRODUCT_NAME}"
|
||||
CreateShortCut "$SMPROGRAMS\Dolphin\${PRODUCT_NAME}.lnk" "$INSTDIR\DolphinWx.exe"
|
||||
CreateShortCut "$DESKTOP\${PRODUCT_NAME}.lnk" "$INSTDIR\DolphinWx.exe"
|
||||
CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\$(^Name).lnk" "$INSTDIR\DolphinWx.exe"
|
||||
CreateShortCut "$DESKTOP\$(^Name).lnk" "$INSTDIR\DolphinWx.exe"
|
||||
|
||||
; 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_DSP_NULL.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\*.*"
|
||||
SectionEnd
|
||||
|
||||
Section -AdditionalIcons
|
||||
SetOutPath $INSTDIR
|
||||
WriteIniStr "$INSTDIR\${PRODUCT_NAME}.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}"
|
||||
CreateShortCut "$SMPROGRAMS\Dolphin\Website.lnk" "$INSTDIR\${PRODUCT_NAME}.url"
|
||||
CreateShortCut "$SMPROGRAMS\Dolphin\Uninstall.lnk" "$INSTDIR\uninst.exe"
|
||||
CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\${UN_NAME}.lnk" "$INSTDIR\uninst.exe"
|
||||
SectionEnd
|
||||
|
||||
Section -Post
|
||||
@ -113,48 +188,53 @@ Section -Post
|
||||
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}"
|
||||
SectionEnd
|
||||
|
||||
; 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
|
||||
|
||||
|
||||
Function un.onUninstSuccess
|
||||
HideWindow
|
||||
MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer."
|
||||
MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was uninstalled successfully.$\r$\n\
|
||||
ATTENTION: You must manually delete$\r$\n$INSTDIR"
|
||||
FunctionEnd
|
||||
|
||||
Function un.onInit
|
||||
MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" IDYES +2
|
||||
!insertmacro MUI_UNGETLANGUAGE
|
||||
MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to remove $(^Name)?" IDYES +2
|
||||
Abort
|
||||
FunctionEnd
|
||||
|
||||
Section Uninstall
|
||||
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"
|
||||
Delete "$INSTDIR\DolphinWx.exe"
|
||||
|
||||
Delete "$INSTDIR\Plugins\*.*"
|
||||
Delete "$INSTDIR\Data\*.*"
|
||||
Delete "$INSTDIR\Data_USA\*.*"
|
||||
Delete "$INSTDIR\Data_EUR\*.*"
|
||||
Delete "$INSTDIR\Data_JAP\*.*"
|
||||
Delete "$INSTDIR\Help\*.*"
|
||||
Delete "$INSTDIR\Patches\*.*"
|
||||
Delete "$INSTDIR\*.*"
|
||||
Delete "$SMPROGRAMS\${PRODUCT_NAME}\${UN_NAME}.lnk"
|
||||
Delete "$DESKTOP\$(^Name).lnk"
|
||||
Delete "$SMPROGRAMS\${PRODUCT_NAME}\$(^Name).lnk"
|
||||
|
||||
Delete "$SMPROGRAMS\Dolphin\Uninstall.lnk"
|
||||
Delete "$SMPROGRAMS\Dolphin\Website.lnk"
|
||||
Delete "$DESKTOP\${PRODUCT_NAME}.lnk"
|
||||
Delete "$SMPROGRAMS\Dolphin\${PRODUCT_NAME}.lnk"
|
||||
|
||||
RMDir "$SMPROGRAMS\Dolphin"
|
||||
RMDir "$SMPROGRAMS\${PRODUCT_NAME}"
|
||||
RMDir "$INSTDIR\Sys\GC"
|
||||
RMDir "$INSTDIR\Sys\Wii"
|
||||
RMDir "$INSTDIR\Sys"
|
||||
RMDir "$INSTDIR\Plugins"
|
||||
RMDir "$INSTDIR\Help"
|
||||
RMDir "$INSTDIR\Data_USA"
|
||||
RMDir "$INSTDIR\Data_EUR"
|
||||
RMDir "$INSTDIR\Data_JAP"
|
||||
RMDir "$INSTDIR\Data"
|
||||
RMDir "$INSTDIR\Patches"
|
||||
RMDir "$INSTDIR"
|
||||
|
||||
DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
|
||||
DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"
|
||||
|
||||
; Delete old registry keys
|
||||
DeleteRegKey HKCU "Software\\${PRODUCT_NAME}"
|
||||
|
||||
; SetAutoClose true
|
||||
SectionEnd
|
||||
SetAutoClose true
|
||||
SectionEnd
|
||||
|
||||
Function LaunchDolphin
|
||||
ExecShell "" "$DESKTOP\$(^Name).lnk"
|
||||
FunctionEnd
|
Reference in New Issue
Block a user