1. !include "MUI2.nsh"
  2. ;--------------------------------
  3. ;General
  4. Name "Spine"
  5. OutFile "SpineSetup.exe"
  6. InstallDir "$PROGRAMFILES\Spine"
  7. InstallDirRegKey HKCU "Software\Spine" ""
  8. RequestExecutionLevel user
  9. ;--------------------------------
  10. ;Interface Settings
  11. !define MUI_ABORTWARNING
  12. !define MUI_ICON "C:\Dev\spine\spine-launcher\build\win\launch4j\icon.ico"
  13. ;--------------------------------
  14. ;Pages
  15. !insertmacro MUI_PAGE_LICENSE "C:\Dev\spine\spine-launcher\build\license.rtf"
  16. !insertmacro MUI_PAGE_COMPONENTS
  17. !insertmacro MUI_PAGE_DIRECTORY
  18. !insertmacro MUI_PAGE_INSTFILES
  19. !insertmacro MUI_UNPAGE_CONFIRM
  20. !insertmacro MUI_UNPAGE_INSTFILES
  21. ;--------------------------------
  22. ;Languages
  23. !insertmacro MUI_LANGUAGE "English"
  24. ;--------------------------------
  25. ;Installer Sections
  26. Section "Spine" SecSpine
  27. SetOutPath "$INSTDIR"
  28. SectionIn RO
  29. ;ADD YOUR OWN FILES HERE...
  30. File /r "C:\Dev\spine\spine-launcher\build\openjdk\full\win\examples"
  31. File /r "C:\Dev\spine\spine-launcher\build\openjdk\full\win\launcher"
  32. File /r "C:\Dev\spine\spine-launcher\build\openjdk\full\win\runtimes"
  33. File /r "C:\Dev\spine\spine-launcher\build\openjdk\full\win\scripts"
  34. File "C:\Dev\spine\spine-launcher\build\openjdk\full\win\license.txt"
  35. File "C:\Dev\spine\spine-launcher\build\openjdk\full\win\Spine.exe"
  36. ;Store installation folder
  37. WriteRegStr HKCU "Software\Spine" "" $INSTDIR
  38. ;Create uninstaller
  39. WriteUninstaller "$INSTDIR\UninstallSpine.exe"
  40. SectionEnd
  41. Section "Start Menu shortcuts" SecStartMenu
  42. CreateDirectory "$SMPROGRAMS\Spine"
  43. CreateShortCut "$SMPROGRAMS\Spine\Spine.lnk" "$INSTDIR\Spine.exe"
  44. CreateShortCut "$SMPROGRAMS\Spine\Example Projects.lnk" "$INSTDIR\examples"
  45. CreateShortCut "$SMPROGRAMS\Spine\Uninstall Spine.lnk" "$INSTDIR\UninstallSpine.exe"
  46. SectionEnd
  47. Section "Desktop shortcuts" SecDesktop
  48. CreateShortCut "$DESKTOP\Spine.lnk" "$INSTDIR\Spine.exe"
  49. SectionEnd
  50. ;--------------------------------
  51. ;Descriptions
  52. !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
  53. !insertmacro MUI_DESCRIPTION_TEXT ${SecSpine} "Installs the Spine application."
  54. !insertmacro MUI_DESCRIPTION_TEXT ${SecStartMenu} "Places a Spine folder containing shortcuts in the start menu."
  55. !insertmacro MUI_DESCRIPTION_TEXT ${SecDesktop} "Places a Spine shortcut on the desktop."
  56. !insertmacro MUI_FUNCTION_DESCRIPTION_END
  57. ;--------------------------------
  58. ;Uninstaller Section
  59. Section "Uninstall"
  60. Delete "$INSTDIR\UninstallSpine.exe"
  61. Delete "$SMPROGRAMS\Spine\Uninstall Spine.lnk"
  62. Delete "$SMPROGRAMS\Spine\Spine.lnk"
  63. Delete "$SMPROGRAMS\Spine\Example Projects.lnk"
  64. Delete "$SMPROGRAMS\Spine\Uninstall Spine.lnk"
  65. RMDir /r "$SMPROGRAMS\Spine"
  66. Delete "$DESKTOP\Spine.lnk"
  67. RMDir /r "$INSTDIR\examples"
  68. RMDir /r "$INSTDIR\launcher"
  69. RMDir /r "$INSTDIR\runtimes"
  70. RMDir /r "$INSTDIR\scripts"
  71. Delete "$INSTDIR\license.txt"
  72. Delete "$INSTDIR\Spine.exe"
  73. Delete "$INSTDIR\spine.log"
  74. RMDir "$INSTDIR"
  75. DeleteRegKey /ifempty HKCU "Software\Spine"
  76. DeleteRegKey /ifempty HKCU "Software\JavaSoft\Prefs\com\esotericsoftware\spine"
  77. SectionEnd