浏览代码

fix(windows): use random `Guid` for uninstaller (wix) (#2208)

* use random `Guid` for uninstaller

* add changefile

* better naming structure for the component
david 4 年之前
父节点
当前提交
caa8fcc93e
共有 2 个文件被更改,包括 8 次插入4 次删除
  1. 5 0
      .changes/bundler-windows-uninstaller.md
  2. 3 4
      tooling/bundler/src/bundle/windows/templates/main.wxs

+ 5 - 0
.changes/bundler-windows-uninstaller.md

@@ -0,0 +1,5 @@
+---
+"tauri-bundler": patch
+---
+
+Fix WIX uninstaller by using unique `GUID` shortcut.

+ 3 - 4
tooling/bundler/src/bundle/windows/templates/main.wxs

@@ -88,8 +88,7 @@
             </Component>
             </Component>
             {{/each~}}
             {{/each~}}
             {{{resources}}}
             {{{resources}}}
-            <Component Id="CMP_ReadFileShortcut"
-                Guid="1AF06B42-CD42-4AED-959F-36DB5E512046">
+            <Component Id="CMP_UninstallShortcut" Guid="*">
 
 
                 <Shortcut Id="UninstallShortcut"
                 <Shortcut Id="UninstallShortcut"
 						  Name="Uninstall {{{product_name}}}"
 						  Name="Uninstall {{{product_name}}}"
@@ -110,7 +109,7 @@
         </DirectoryRef>
         </DirectoryRef>
 
 
         <DirectoryRef Id="ApplicationProgramsFolder">
         <DirectoryRef Id="ApplicationProgramsFolder">
-            <Component Id="ApplicationShortcut" Guid="81ccebd8-b769-4bed-bdbd-0340f9f7cad1">
+            <Component Id="ApplicationShortcut" Guid="*">
                 <Shortcut Id="ApplicationStartMenuShortcut"
                 <Shortcut Id="ApplicationStartMenuShortcut"
                     Name="{{{product_name}}}"
                     Name="{{{product_name}}}"
                     Description="Runs {{{product_name}}}"
                     Description="Runs {{{product_name}}}"
@@ -152,7 +151,7 @@
                 Title="Shortcuts"
                 Title="Shortcuts"
                 Level="1">
                 Level="1">
                 <ComponentRef Id="Path"/>
                 <ComponentRef Id="Path"/>
-                <ComponentRef Id="CMP_ReadFileShortcut" />
+                <ComponentRef Id="CMP_UninstallShortcut" />
                 <ComponentRef Id="ApplicationShortcut" />
                 <ComponentRef Id="ApplicationShortcut" />
                 <ComponentRef Id="ApplicationShortcutDesktop" />
                 <ComponentRef Id="ApplicationShortcutDesktop" />
             </Feature>
             </Feature>