- !include "MUI2.nsh"
- ;--------------------------------
- ;General
- Name "Spine"
- OutFile "SpineSetup.exe"
- InstallDir "$PROGRAMFILES\Spine"
- InstallDirRegKey HKCU "Software\Spine" ""
- RequestExecutionLevel user
- ;--------------------------------
- ;Interface Settings
- !define MUI_ABORTWARNING
- !define MUI_ICON "C:\Dev\spine\spine-launcher\build\win\launch4j\icon.ico"
- ;--------------------------------
- ;Pages
- !insertmacro MUI_PAGE_LICENSE "C:\Dev\spine\spine-launcher\build\license.rtf"
- !insertmacro MUI_PAGE_COMPONENTS
- !insertmacro MUI_PAGE_DIRECTORY
- !insertmacro MUI_PAGE_INSTFILES
- !insertmacro MUI_UNPAGE_CONFIRM
- !insertmacro MUI_UNPAGE_INSTFILES
- ;--------------------------------
- ;Languages
- !insertmacro MUI_LANGUAGE "English"
- ;--------------------------------
- ;Installer Sections
- Section "Spine" SecSpine
- SetOutPath "$INSTDIR"
- SectionIn RO
- ;ADD YOUR OWN FILES HERE...
- File /r "C:\Dev\spine\spine-launcher\build\openjdk\full\win\examples"
- File /r "C:\Dev\spine\spine-launcher\build\openjdk\full\win\launcher"
- File /r "C:\Dev\spine\spine-launcher\build\openjdk\full\win\runtimes"
- File /r "C:\Dev\spine\spine-launcher\build\openjdk\full\win\scripts"
- File "C:\Dev\spine\spine-launcher\build\openjdk\full\win\license.txt"
- File "C:\Dev\spine\spine-launcher\build\openjdk\full\win\Spine.exe"
- ;Store installation folder
- WriteRegStr HKCU "Software\Spine" "" $INSTDIR
- ;Create uninstaller
- WriteUninstaller "$INSTDIR\UninstallSpine.exe"
- SectionEnd
- Section "Start Menu shortcuts" SecStartMenu
- CreateDirectory "$SMPROGRAMS\Spine"
- CreateShortCut "$SMPROGRAMS\Spine\Spine.lnk" "$INSTDIR\Spine.exe"
- CreateShortCut "$SMPROGRAMS\Spine\Example Projects.lnk" "$INSTDIR\examples"
- CreateShortCut "$SMPROGRAMS\Spine\Uninstall Spine.lnk" "$INSTDIR\UninstallSpine.exe"
- SectionEnd
- Section "Desktop shortcuts" SecDesktop
- CreateShortCut "$DESKTOP\Spine.lnk" "$INSTDIR\Spine.exe"
- SectionEnd
- ;--------------------------------
- ;Descriptions
- !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
- !insertmacro MUI_DESCRIPTION_TEXT ${SecSpine} "Installs the Spine application."
- !insertmacro MUI_DESCRIPTION_TEXT ${SecStartMenu} "Places a Spine folder containing shortcuts in the start menu."
- !insertmacro MUI_DESCRIPTION_TEXT ${SecDesktop} "Places a Spine shortcut on the desktop."
- !insertmacro MUI_FUNCTION_DESCRIPTION_END
- ;--------------------------------
- ;Uninstaller Section
- Section "Uninstall"
- Delete "$INSTDIR\UninstallSpine.exe"
- Delete "$SMPROGRAMS\Spine\Uninstall Spine.lnk"
- Delete "$SMPROGRAMS\Spine\Spine.lnk"
- Delete "$SMPROGRAMS\Spine\Example Projects.lnk"
- Delete "$SMPROGRAMS\Spine\Uninstall Spine.lnk"
- RMDir /r "$SMPROGRAMS\Spine"
- Delete "$DESKTOP\Spine.lnk"
- RMDir /r "$INSTDIR\examples"
- RMDir /r "$INSTDIR\launcher"
- RMDir /r "$INSTDIR\runtimes"
- RMDir /r "$INSTDIR\scripts"
- Delete "$INSTDIR\license.txt"
- Delete "$INSTDIR\Spine.exe"
- Delete "$INSTDIR\spine.log"
- RMDir "$INSTDIR"
- DeleteRegKey /ifempty HKCU "Software\Spine"
- DeleteRegKey /ifempty HKCU "Software\JavaSoft\Prefs\com\esotericsoftware\spine"
- SectionEnd