You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

89 lines
2.8KB

  1. !include "MUI2.nsh"
  2. Name "VCV Rack"
  3. OutFile "Rack-setup.exe"
  4. SetCompressor "bzip2"
  5. CRCCheck On
  6. ;Default installation folder
  7. InstallDir "$PROGRAMFILES\VCV"
  8. ;Get installation folder from registry if available
  9. InstallDirRegKey HKCU "Software\VCV Rack" ""
  10. ;Request application privileges for Windows Vista
  11. RequestExecutionLevel admin
  12. !define MUI_ICON "icon.ico"
  13. !define MUI_HEADERIMAGE
  14. !define MUI_HEADERIMAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Header\nsis.bmp" ; 150x57
  15. !define MUI_WELCOMEFINISHPAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Wizard\win.bmp" ; 164x314
  16. !define MUI_UNWELCOMEFINISHPAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Wizard\win.bmp" ; 164x314
  17. !define MUI_COMPONENTSPAGE_NODESC
  18. ; Pages
  19. ; !insertmacro MUI_PAGE_WELCOME
  20. !insertmacro MUI_PAGE_COMPONENTS
  21. !insertmacro MUI_PAGE_DIRECTORY
  22. ;second directory selection
  23. ; Var DbInstDir
  24. ; !define MUI_PAGE_HEADER_SUBTEXT "Choose the folder in which to install the database."
  25. ; !define MUI_DIRECTORYPAGE_TEXT_TOP "The installer will install the database(s) in the following folder. To install in a differenct folder, click Browse and select another folder. Click Next to continue."
  26. ; !define MUI_DIRECTORYPAGE_VARIABLE $DbInstDir ; <= the other directory will be stored into that variable
  27. ; !insertmacro MUI_PAGE_DIRECTORY
  28. !insertmacro MUI_PAGE_INSTFILES
  29. !insertmacro MUI_UNPAGE_CONFIRM
  30. !insertmacro MUI_UNPAGE_INSTFILES
  31. !insertmacro MUI_LANGUAGE "English"
  32. Section "!VCV Rack" VCVRACK
  33. SetOutPath "$INSTDIR"
  34. File /r "dist\Rack"
  35. ;Store installation folder
  36. WriteRegStr HKCU "Software\VCV Rack" "" $INSTDIR
  37. WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VCV Rack" "DisplayName" "VCV Rack"
  38. WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VCV Rack" "UninstallString" "$\"$INSTDIR\UninstallRack.exe$\""
  39. WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VCV Rack" "QuietUninstallString" "$\"$INSTDIR\UninstallRack.exe$\" /S"
  40. WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VCV Rack" "InstallLocation" "$\"$INSTDIR$\""
  41. WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VCV Rack" "Publisher" "VCV"
  42. ;Create uninstaller
  43. WriteUninstaller "$INSTDIR\UninstallRack.exe"
  44. ;Create shortcuts
  45. CreateDirectory "$SMPROGRAMS"
  46. ; Set working directory of shortcut
  47. SetOutPath "$INSTDIR\Rack"
  48. CreateShortcut "$SMPROGRAMS\VCV Rack.lnk" "$INSTDIR\Rack\Rack.exe"
  49. SectionEnd
  50. ; Section "VST Plugin" VST
  51. ; SectionEnd
  52. Section "Uninstall"
  53. RMDir /r "$INSTDIR\Rack"
  54. Delete "$INSTDIR\UninstallRack.exe"
  55. RMDir "$INSTDIR"
  56. Delete "$SMPROGRAMS\VCV Rack.lnk"
  57. DeleteRegKey /ifempty HKCU "Software\VCV Rack"
  58. DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VCV Rack"
  59. SectionEnd