Browse Source

Associate .vcv file type on Windows

tags/v1.0.0
Andrew Belt 5 years ago
parent
commit
ba9f945d27
2 changed files with 12 additions and 5 deletions
  1. +11
    -4
      installer.nsi
  2. +1
    -1
      src/main.cpp

+ 11
- 4
installer.nsi View File

@@ -54,10 +54,10 @@ Section "VCV Rack" VCV_RACK_SECTION


; Write uninstaller info ; Write uninstaller info
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VCV Rack" "DisplayName" "VCV Rack" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VCV Rack" "DisplayName" "VCV Rack"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VCV Rack" "DisplayIcon" "$\"$INSTDIR\Rack.exe$\""
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VCV Rack" "UninstallString" "$\"$INSTDIR\Uninstall.exe$\""
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VCV Rack" "QuietUninstallString" "$\"$INSTDIR\Uninstall.exe$\" \S"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VCV Rack" "InstallLocation" "$\"$INSTDIR$\""
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VCV Rack" "DisplayIcon" '"$INSTDIR\Rack.exe"'
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VCV Rack" "UninstallString" '"$INSTDIR\Uninstall.exe"'
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VCV Rack" "QuietUninstallString" '"$INSTDIR\Uninstall.exe" /S'
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VCV Rack" "InstallLocation" '"$INSTDIR"'
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VCV Rack" "Publisher" "VCV" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VCV Rack" "Publisher" "VCV"
SectionGetSize ${VCV_RACK_SECTION} $0 SectionGetSize ${VCV_RACK_SECTION} $0
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VCV Rack" "EstimatedSize" $0 WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VCV Rack" "EstimatedSize" $0
@@ -65,6 +65,11 @@ Section "VCV Rack" VCV_RACK_SECTION
; Create uninstaller ; Create uninstaller
WriteUninstaller "$INSTDIR\Uninstall.exe" WriteUninstaller "$INSTDIR\Uninstall.exe"


; Associate file type
WriteRegStr HKLM "Software\Classes\.vcv" "" "VCVRack.Patch"
WriteRegStr HKLM "Software\Classes\VCVRack.Patch" "" "VCV Rack Patch"
WriteRegStr HKLM "Software\Classes\VCVRack.Patch\shell\open\command" "" '"$INSTDIR\Rack.exe" "%1"'

; Create shortcuts ; Create shortcuts
CreateDirectory "$SMPROGRAMS" CreateDirectory "$SMPROGRAMS"
CreateShortcut "$SMPROGRAMS\VCV Rack.lnk" "$INSTDIR\Rack.exe" CreateShortcut "$SMPROGRAMS\VCV Rack.lnk" "$INSTDIR\Rack.exe"
@@ -83,6 +88,8 @@ Section "Uninstall"
DeleteRegKey HKLM "Software\VCV\Rack" DeleteRegKey HKLM "Software\VCV\Rack"
DeleteRegKey /ifempty HKLM "Software\VCV" DeleteRegKey /ifempty HKLM "Software\VCV"
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VCV Rack" DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VCV Rack"
DeleteRegKey HKLM "Software\Classes\.vcv"
DeleteRegKey HKLM "Software\Classes\VCVRack.Patch"
SectionEnd SectionEnd






+ 1
- 1
src/main.cpp View File

@@ -90,7 +90,7 @@ int main(int argc, char *argv[]) {


// We can now install a signal handler and log the output // We can now install a signal handler and log the output
// Mac has its own decent crash handler // Mac has its own decent crash handler
#if defined ARCH_LIN || defined ARCH_WIN
#if 0
if (!devMode) { if (!devMode) {
signal(SIGABRT, fatalSignalHandler); signal(SIGABRT, fatalSignalHandler);
signal(SIGFPE, fatalSignalHandler); signal(SIGFPE, fatalSignalHandler);


Loading…
Cancel
Save