-
Notifications
You must be signed in to change notification settings - Fork 13
/
Product.wxs
67 lines (53 loc) · 2.77 KB
/
Product.wxs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<?define Name = "Steam Account Switcher"?>
<?define AssemblyName = "SteamAccountSwitcher"?>
<?define Manufacturer = "Daniel Chalmers"?>
<?define Guid = "22E1FAEA-639E-400B-9DCB-F2D04EC126E1"?>
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
<Package Name="$(var.Name)" Manufacturer="$(var.Manufacturer)" Version="!(bind.FileVersion.MainExe)" UpgradeCode="$(var.Guid)" Language="1033" InstallerVersion="500" Scope="perUser">
<SummaryInformation Manufacturer="$(var.Manufacturer)" />
<Icon Id="Logo.ico" SourceFile="$(var.AssemblyName)\$(var.AssemblyName).ico" />
<Property Id="ARPPRODUCTICON" Value="Logo.ico" />
<Property Id="ARPNOREPAIR" Value="yes" Secure="yes" />
<Property Id="ARPNOMODIFY" Value="yes" Secure="yes" />
<Media Id="1" Cabinet="App.cab" EmbedCab="yes" />
<Feature Id="ProductFeature" Title="$(var.Name)" Level="1">
<!--Main executable-->
<ComponentGroupRef Id="ProductComponents" />
<!--Program Menu shortcut-->
<ComponentRef Id="ApplicationShortcut" />
</Feature>
<StandardDirectory Id="LocalAppDataFolder">
<Directory Id="INSTALLFOLDER" Name="$(var.AssemblyName)" />
</StandardDirectory>
<StandardDirectory Id="ProgramMenuFolder">
<Directory Id="ApplicationProgramsFolder" Name="$(var.Name)" />
</StandardDirectory>
<Property Id="PREVIOUSVERSIONSINSTALLED" Secure="yes" />
<Upgrade Id="$(var.Guid)">
<UpgradeVersion Minimum="0.0.0.0" Maximum="255.0.0.0" Property="PREVIOUSVERSIONSINSTALLED" IncludeMinimum="yes" IncludeMaximum="no" />
</Upgrade>
<CustomAction Id="RunMainExe" Directory="INSTALLFOLDER" ExeCommand="[INSTALLFOLDER]$(var.AssemblyName).exe" Execute="commit" Return="asyncNoWait" />
<InstallExecuteSequence>
<RemoveExistingProducts Before="InstallInitialize" />
<Custom Action="RunMainExe" Before="InstallFinalize" />
</InstallExecuteSequence>
</Package>
<!--Main executable-->
<Fragment>
<ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
<Component Id="MainExe" Guid="CB6B1983-3747-44E1-A1AF-11CB626BBB2F">
<File Id="MainExe" Name="$(var.AssemblyName).exe" Source="publish/$(var.AssemblyName).exe" />
</Component>
</ComponentGroup>
</Fragment>
<!--Program Menu shortcut-->
<Fragment>
<DirectoryRef Id="ApplicationProgramsFolder">
<Component Id="ApplicationShortcut">
<Shortcut Id="ApplicationStartMenuShortcut" Name="$(var.Name)" Icon="Logo.ico" Target="[#MainExe]" WorkingDirectory="INSTALLFOLDER" />
<RemoveFolder Id="ApplicationProgramsFolder" On="uninstall" />
<RegistryValue Root="HKCU" Key="Software\Microsoft\$(var.Manufacturer)\$(var.Name)" Name="installed" Type="integer" Value="1" KeyPath="yes" />
</Component>
</DirectoryRef>
</Fragment>
</Wix>