mirror of
https://github.com/tauri-apps/tauri.git
synced 2024-10-05 20:48:58 +03:00
fix(bundler/nsis): fix registering deep-link protocols (#9833)
* fix(bundler/nsis): fix registering deep-link protocols * Update bundler-nsis-deep-links.md --------- Co-authored-by: Fabian-Lars <fabianlars@fabianlars.de>
This commit is contained in:
parent
0c61784efb
commit
d0d974fa5e
5
.changes/bundler-nsis-deep-links.md
Normal file
5
.changes/bundler-nsis-deep-links.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
"tauri-bundler": "patch:bug"
|
||||
---
|
||||
|
||||
Fix NSIS installer deep links registration.
|
@ -570,11 +570,11 @@ Section Install
|
||||
{{/each}}
|
||||
|
||||
; Register deep links
|
||||
{{#each deep_link_protocol as |protocol| ~}}
|
||||
WriteRegStr SHCTX "Software\Classes\{{protocol}}" "URL Protocol" ""
|
||||
WriteRegStr SHCTX "Software\Classes\{{protocol}}" "" "URL:${BUNDLEID} protocol"
|
||||
WriteRegStr SHCTX "Software\Classes\{{protocol}}\DefaultIcon" "" "$\"$INSTDIR\${MAINBINARYNAME}.exe$\",0"
|
||||
WriteRegStr SHCTX "Software\Classes\{{protocol}}\shell\open\command" "" "$\"$INSTDIR\${MAINBINARYNAME}.exe$\" $\"%1$\""
|
||||
{{#each deep_link_protocols as |protocol| ~}}
|
||||
WriteRegStr SHCTX "Software\Classes\\{{protocol}}" "URL Protocol" ""
|
||||
WriteRegStr SHCTX "Software\Classes\\{{protocol}}" "" "URL:${BUNDLEID} protocol"
|
||||
WriteRegStr SHCTX "Software\Classes\\{{protocol}}\DefaultIcon" "" "$\"$INSTDIR\${MAINBINARYNAME}.exe$\",0"
|
||||
WriteRegStr SHCTX "Software\Classes\\{{protocol}}\shell\open\command" "" "$\"$INSTDIR\${MAINBINARYNAME}.exe$\" $\"%1$\""
|
||||
{{/each}}
|
||||
|
||||
; Create uninstaller
|
||||
@ -700,10 +700,10 @@ Section Uninstall
|
||||
{{/each}}
|
||||
|
||||
; Delete deep links
|
||||
{{#each deep_link_protocol as |protocol| ~}}
|
||||
ReadRegStr $R7 SHCTX "Software\Classes\{{protocol}}\shell\open\command" ""
|
||||
{{#each deep_link_protocols as |protocol| ~}}
|
||||
ReadRegStr $R7 SHCTX "Software\Classes\\{{protocol}}\shell\open\command" ""
|
||||
!if $R7 == "$\"$INSTDIR\${MAINBINARYNAME}.exe$\" $\"%1$\""
|
||||
DeleteRegKey SHCTX "Software\Classes\{{protocol}}"
|
||||
DeleteRegKey SHCTX "Software\Classes\\{{protocol}}"
|
||||
!endif
|
||||
{{/each}}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user