Skip to content

Commit d0d974f

Browse files
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>
1 parent 0c61784 commit d0d974f

2 files changed

Lines changed: 13 additions & 8 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"tauri-bundler": "patch:bug"
3+
---
4+
5+
Fix NSIS installer deep links registration.

tooling/bundler/src/bundle/windows/templates/installer.nsi

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -570,11 +570,11 @@ Section Install
570570
{{/each}}
571571

572572
; Register deep links
573-
{{#each deep_link_protocol as |protocol| ~}}
574-
WriteRegStr SHCTX "Software\Classes\{{protocol}}" "URL Protocol" ""
575-
WriteRegStr SHCTX "Software\Classes\{{protocol}}" "" "URL:${BUNDLEID} protocol"
576-
WriteRegStr SHCTX "Software\Classes\{{protocol}}\DefaultIcon" "" "$\"$INSTDIR\${MAINBINARYNAME}.exe$\",0"
577-
WriteRegStr SHCTX "Software\Classes\{{protocol}}\shell\open\command" "" "$\"$INSTDIR\${MAINBINARYNAME}.exe$\" $\"%1$\""
573+
{{#each deep_link_protocols as |protocol| ~}}
574+
WriteRegStr SHCTX "Software\Classes\\{{protocol}}" "URL Protocol" ""
575+
WriteRegStr SHCTX "Software\Classes\\{{protocol}}" "" "URL:${BUNDLEID} protocol"
576+
WriteRegStr SHCTX "Software\Classes\\{{protocol}}\DefaultIcon" "" "$\"$INSTDIR\${MAINBINARYNAME}.exe$\",0"
577+
WriteRegStr SHCTX "Software\Classes\\{{protocol}}\shell\open\command" "" "$\"$INSTDIR\${MAINBINARYNAME}.exe$\" $\"%1$\""
578578
{{/each}}
579579

580580
; Create uninstaller
@@ -700,10 +700,10 @@ Section Uninstall
700700
{{/each}}
701701

702702
; Delete deep links
703-
{{#each deep_link_protocol as |protocol| ~}}
704-
ReadRegStr $R7 SHCTX "Software\Classes\{{protocol}}\shell\open\command" ""
703+
{{#each deep_link_protocols as |protocol| ~}}
704+
ReadRegStr $R7 SHCTX "Software\Classes\\{{protocol}}\shell\open\command" ""
705705
!if $R7 == "$\"$INSTDIR\${MAINBINARYNAME}.exe$\" $\"%1$\""
706-
DeleteRegKey SHCTX "Software\Classes\{{protocol}}"
706+
DeleteRegKey SHCTX "Software\Classes\\{{protocol}}"
707707
!endif
708708
{{/each}}
709709

0 commit comments

Comments
 (0)