Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix slippi protocol not registering when installing for current user #328

Merged
merged 1 commit into from
Jul 19, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 17 additions & 7 deletions .erb/scripts/installer.nsh
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,23 @@ var InstallType
!macro customInstall
; Add slippi URI Handling
DetailPrint "Register slippi URI Handler"
DeleteRegKey HKCR "slippi"
WriteRegStr HKCR "slippi" "" "URL:slippi"
WriteRegStr HKCR "slippi" "URL Protocol" ""
WriteRegStr HKCR "slippi\DefaultIcon" "" "$INSTDIR\${APP_EXECUTABLE_FILENAME}"
WriteRegStr HKCR "slippi\shell" "" ""
WriteRegStr HKCR "slippi\shell\Open" "" ""
WriteRegStr HKCR "slippi\shell\Open\command" "" "$\"$INSTDIR\${APP_EXECUTABLE_FILENAME}$\" $\"%1$\""
${If} $installMode == "all"
DeleteRegKey HKCR "slippi"
WriteRegStr HKCR "slippi" "" "URL:slippi"
WriteRegStr HKCR "slippi" "URL Protocol" ""
WriteRegStr HKCR "slippi\DefaultIcon" "" "$INSTDIR\${APP_EXECUTABLE_FILENAME}"
WriteRegStr HKCR "slippi\shell" "" ""
WriteRegStr HKCR "slippi\shell\Open" "" ""
WriteRegStr HKCR "slippi\shell\Open\command" "" "$\"$INSTDIR\${APP_EXECUTABLE_FILENAME}$\" $\"%1$\""
${Else}
DeleteRegKey HKCU "SOFTWARE\Classes\slippi"
WriteRegStr HKCU "SOFTWARE\Classes\slippi" "" "URL:slippi"
WriteRegStr HKCU "SOFTWARE\Classes\slippi" "URL Protocol" ""
WriteRegStr HKCU "SOFTWARE\Classes\slippi\DefaultIcon" "" "$INSTDIR\${APP_EXECUTABLE_FILENAME}"
WriteRegStr HKCU "SOFTWARE\Classes\slippi\shell" "" ""
WriteRegStr HKCU "SOFTWARE\Classes\slippi\shell\Open" "" ""
WriteRegStr HKCU "SOFTWARE\Classes\slippi\shell\Open\command" "" "$\"$INSTDIR\${APP_EXECUTABLE_FILENAME}$\" $\"%1$\""
${EndIf}

; Check if we should also install the GC drivers
${If} $InstallType == INSTALL
Expand Down