Skip to content

Commit 2be1abd

Browse files
ioneyedlucasfernog
andauthored
fix(bundler) wix template escape character (#2608)
Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
1 parent d5f07d1 commit 2be1abd

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

.changes/wix-registry-keys.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"tauri-bundler": patch
3+
---
4+
5+
Fix registry keys on the WiX template.

tooling/bundler/src/bundle/path_utils.rs

+1-7
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use std::{
88
};
99

1010
/// Directory options.
11-
#[derive(Clone)]
11+
#[derive(Default, Clone)]
1212
pub struct DirOpts {
1313
pub depth: u64,
1414
}
@@ -51,12 +51,6 @@ impl Default for Options {
5151
}
5252
}
5353

54-
impl Default for DirOpts {
55-
fn default() -> DirOpts {
56-
DirOpts { depth: 0 }
57-
}
58-
}
59-
6054
impl Default for FileOpts {
6155
fn default() -> FileOpts {
6256
FileOpts {

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
<Component Id="ApplicationShortcutDesktop" Guid="*">
7272
<Shortcut Id="ApplicationDesktopShortcut" Name="{{{product_name}}}" Description="Runs {{{product_name}}}" Target="[!Path]" WorkingDirectory="INSTALLDIR" />
7373
<RemoveFolder Id="DesktopFolder" On="uninstall" />
74-
<RegistryValue Root="HKCU" Key="Software\{{{product_name}}}" Name="installed" Type="integer" Value="1" KeyPath="yes" />
74+
<RegistryValue Root="HKCU" Key="Software\\{{{product_name}}}" Name="installed" Type="integer" Value="1" KeyPath="yes" />
7575
</Component>
7676
</Directory>
7777
<Directory Id="$(var.PlatformProgramFilesFolder)" Name="PFiles">
@@ -115,7 +115,7 @@
115115
On="uninstall" />
116116

117117
<RegistryValue Root="HKCR"
118-
Key="Software\{{{manufacturer}}}\{{{product_name}}}"
118+
Key="Software\\{{{manufacturer}}}\\{{{product_name}}}"
119119
Name="installed"
120120
Type="integer"
121121
Value="1"
@@ -134,7 +134,7 @@
134134
<ShortcutProperty Key="System.AppUserModel.ID" Value="{{{manufacturer}}}"/>
135135
</Shortcut>
136136
<RemoveFolder Id="ApplicationProgramsFolder" On="uninstall"/>
137-
<RegistryValue Root="HKCU" Key="Software\{{{manufacturer}}}\{{{product_name}}}" Name="installed" Type="integer" Value="1" KeyPath="yes"/>
137+
<RegistryValue Root="HKCU" Key="Software\\{{{manufacturer}}}\\{{{product_name}}}" Name="installed" Type="integer" Value="1" KeyPath="yes"/>
138138
</Component>
139139
</DirectoryRef>
140140

0 commit comments

Comments
 (0)