Explorar o código

fix: add working directory to wix's shortcut (#1021)

* fix: add working directory to wix's shortcut

* chore: add change file

Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
Amr Bashir %!s(int64=4) %!d(string=hai) anos
pai
achega
5cf3402735

+ 5 - 0
.changes/wix-working-directory.md

@@ -0,0 +1,5 @@
+---
+"tauri-bundler": patch
+---
+
+Set the Windows installer (WiX) `WorkingDirectory` field to `INSTALLDIR` so the app can read paths relatively (previously resolving to `C:\Windows\System32`).

+ 2 - 1
cli/tauri-bundler/src/bundle/templates/main.wxs

@@ -103,7 +103,8 @@
                     Name="{{{product_name}}}"
                     Description="Runs {{{product_name}}}"
                     Target="[!Path]"
-                    Icon="ProductIcon">
+                    Icon="ProductIcon"
+                    WorkingDirectory="INSTALLDIR">
                     <ShortcutProperty Key="System.AppUserModel.ID" Value="{{{manufacturer}}}"/>
                 </Shortcut>
                 <RemoveFolder Id="ApplicationProgramsFolder" On="uninstall"/>