Skip to content

Commit f0603fc

Browse files
authored
feat(bundler): desktop shortcut on Windows (#2052)
1 parent 70e0463 commit f0603fc

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

.changes/windows-shortcut.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"tauri-bundler": patch
3+
---
4+
5+
Configure app shortcut on the Windows Installer.

tooling/bundler/src/bundle/windows/templates/main.wxs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,13 @@
6363
<UIRef Id="WixUI_InstallDir" />
6464

6565
<Directory Id="TARGETDIR" Name="SourceDir">
66+
<Directory Id="DesktopFolder" Name="Desktop">
67+
<Component Id="ApplicationShortcutDesktop" Guid="*">
68+
<Shortcut Id="ApplicationDesktopShortcut" Name="{{{product_name}}}" Description="Runs {{{product_name}}}" Target="[!Path]" WorkingDirectory="INSTALLDIR" />
69+
<RemoveFolder Id="DesktopFolder" On="uninstall" />
70+
<RegistryValue Root="HKCU" Key="Software\{{{product_name}}}" Name="installed" Type="integer" Value="1" KeyPath="yes" />
71+
</Component>
72+
</Directory>
6673
<Directory Id="$(var.PlatformProgramFilesFolder)" Name="PFiles">
6774
<Directory Id="INSTALLDIR" Name="{{{product_name}}}"/>
6875
</Directory>
@@ -147,6 +154,7 @@
147154
<ComponentRef Id="Path"/>
148155
<ComponentRef Id="CMP_ReadFileShortcut" />
149156
<ComponentRef Id="ApplicationShortcut" />
157+
<ComponentRef Id="ApplicationShortcutDesktop" />
150158
</Feature>
151159

152160
<Feature

0 commit comments

Comments
 (0)