-
Notifications
You must be signed in to change notification settings - Fork 3
/
Product.wxs
72 lines (69 loc) · 3.8 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
68
69
70
71
72
<?define Name = "Desktop_Notes"?>
<?define Manufacturer = "Webarcx"?>
<?define Guid = "E4D9B1E5-BE35-4CD8-8A81-983EDA7089B8"?>
<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="Images\main.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">
<ComponentGroupRef Id="ProductComponents" />
<ComponentRef Id="ApplicationShortcut" />
<ComponentRef Id="DesktopShortcutComponent" />
</Feature>
<StandardDirectory Id="LocalAppDataFolder">
<Directory Id="INSTALLFOLDER" Name="$(var.Name)" />
</StandardDirectory>
<StandardDirectory Id="ProgramMenuFolder">
<Directory Id="ApplicationProgramsFolder" Name="$(var.Name)" />
</StandardDirectory>
<StandardDirectory Id="DesktopFolder" />
<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.Name).exe" Execute="commit" Return="asyncNoWait" />
<InstallExecuteSequence>
<RemoveExistingProducts Before="InstallInitialize" />
<Custom Action="RunMainExe" Before="InstallFinalize" />
</InstallExecuteSequence>
</Package>
<Fragment>
<ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
<Component Id="MainExe" Guid="*">
<File Id="MainExe" Name="Desktop_Notes.exe" Source="Desktop Notes\Desktop Notes\bin\Release\Desktop_Notes.exe" />
</Component>
<Component Id="ConfigFile" Guid="*">
<File Id="ConfigFile" Source="Desktop Notes\Desktop Notes\bin\Release\Desktop_Notes.exe.config" />
</Component>
<Component Id="ManifestFile" Guid="*">
<File Id="ManifestFile" Source="Desktop Notes\Desktop Notes\bin\Release\Desktop_Notes.exe.manifest" />
</Component>
<Component Id="NewtonsoftJsonDll" Guid="*">
<File Id="NewtonsoftJsonDll" Source="Desktop Notes\Desktop Notes\bin\Release\Newtonsoft.Json.dll" />
</Component>
<Component Id="NewtonsoftJsonXml" Guid="*">
<File Id="NewtonsoftJsonXml" Source="Desktop Notes\Desktop Notes\bin\Release\Newtonsoft.Json.xml" />
</Component>
</ComponentGroup>
</Fragment>
<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>
<DirectoryRef Id="DesktopFolder">
<Component Id="DesktopShortcutComponent" Guid="*">
<Shortcut Id="DesktopShortcut" Name="$(var.Name)" Description="极简桌面便签" Target="[#MainExe]" Icon="Logo.ico" WorkingDirectory="INSTALLFOLDER" />
<RemoveFolder Id="DesktopFolder" On="uninstall" />
<RegistryValue Root="HKCU" Key="Software\Microsoft\$(var.Manufacturer)\$(var.Name)" Name="desktopShortcut" Type="integer" Value="1" KeyPath="yes" />
</Component>
</DirectoryRef>
</Fragment>
</Wix>