-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathpangolin.wxs
More file actions
141 lines (132 loc) · 6.07 KB
/
Copy pathpangolin.wxs
File metadata and controls
141 lines (132 loc) · 6.07 KB
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
<Package Name="Pangolin"
Language="1033"
Version="0.12.0"
Manufacturer="Fossorial"
UpgradeCode="165F13D3-9A2F-4AF7-9C68-474A8256B274"
Compressed="yes">
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
<MediaTemplate EmbedCab="yes" />
<!-- Define the directory structure using StandardDirectory for WiX v4 -->
<!-- Use ProgramFiles64Folder to ensure 64-bit Program Files directory -->
<StandardDirectory Id="ProgramFiles64Folder">
<Directory Id="INSTALLFOLDER" Name="Pangolin">
<Component Id="PangolinExe" Guid="4FE37947-1773-42EB-8BDE-6B46CE0E8ECC">
<File Id="PangolinExe"
Source="$(var.BuildDir)/Pangolin.exe"
KeyPath="yes" />
<ServiceInstall Id="PangolinManagerInstall"
Name="PangolinManager"
DisplayName="Pangolin Manager"
Description="Pangolin Manager Service"
Type="ownProcess"
Start="auto"
ErrorControl="normal"
Arguments="/managerservice"
Vital="yes" />
<ServiceControl Id="PangolinManagerControl"
Name="PangolinManager"
Start="install"
Stop="both"
Remove="uninstall"
Wait="yes" />
</Component>
<Component Id="WintunDll" Guid="A8B9C0D1-E2F3-4A5B-8C9D-0E1F2A3B4C5D">
<File Id="WintunDll"
Source="$(var.ProjectDir)/dll/wintun.dll"
KeyPath="yes" />
</Component>
<!-- Icons in the same directory as the executable -->
<Directory Id="IconsFolder" Name="icons">
<Component Id="IconOrange" Guid="DBF8097D-9CBE-434A-AC8D-E1A3CF62022C">
<File Id="IconOrange"
Source="$(var.ProjectDir)/icons/icon-orange.ico"
KeyPath="yes" />
<RemoveFolder Id="IconsFolder" On="uninstall" />
</Component>
<Component Id="IconGray" Guid="BFA27572-3602-469B-A8B3-90B5C0AA833E">
<File Id="IconGray"
Source="$(var.ProjectDir)/icons/icon-gray.ico"
KeyPath="yes" />
</Component>
<Component Id="WordMarkBlack" Guid="C3D4E5F6-A7B8-5C6D-9E0F-1A2B3C4D5E6F">
<File Id="WordMarkBlack"
Source="$(var.ProjectDir)/icons/word_mark_black.png"
KeyPath="yes" />
</Component>
<Component Id="WordMarkWhite" Guid="D4E5F6A7-B8C9-6D7E-0F1A-2B3C4D5E6F7A">
<File Id="WordMarkWhite"
Source="$(var.ProjectDir)/icons/word_mark_white.png"
KeyPath="yes" />
</Component>
</Directory>
</Directory>
</StandardDirectory>
<!-- Desktop shortcut -->
<StandardDirectory Id="DesktopFolder">
<Component Id="DesktopShortcut" Guid="A1B2C3D4-E5F6-4A5B-8C9D-0E1F2A3B4C5D">
<Shortcut Id="DesktopShortcut"
Name="Pangolin"
Description="Pangolin Application"
Target="[INSTALLFOLDER]Pangolin.exe"
Icon="ProductIcon" />
<RegistryValue Root="HKCU"
Key="Software\Fossorial\Pangolin"
Name="DesktopShortcut"
Type="integer"
Value="1"
KeyPath="yes" />
</Component>
</StandardDirectory>
<!-- Start Menu shortcut -->
<StandardDirectory Id="ProgramMenuFolder">
<Directory Id="ProgramMenuDir" Name="Pangolin">
<Component Id="StartMenuShortcut" Guid="B2C3D4E5-F6A7-5B6C-9D0E-1F2A3B4C5D6E">
<Shortcut Id="StartMenuShortcut"
Name="Pangolin"
Description="Pangolin Application"
Target="[INSTALLFOLDER]Pangolin.exe"
Icon="ProductIcon" />
<RemoveFolder Id="ProgramMenuDir" On="uninstall" />
<RegistryValue Root="HKCU"
Key="Software\Fossorial\Pangolin"
Name="StartMenuShortcut"
Type="integer"
Value="1"
KeyPath="yes" />
</Component>
</Directory>
</StandardDirectory>
<!-- Feature required by WiX - all components must be referenced by a feature -->
<Feature Id="ProductFeature" Title="Pangolin" Level="1">
<ComponentRef Id="PangolinExe" />
<ComponentRef Id="WintunDll" />
<ComponentRef Id="IconOrange" />
<ComponentRef Id="IconGray" />
<ComponentRef Id="WordMarkBlack" />
<ComponentRef Id="WordMarkWhite" />
<ComponentRef Id="DesktopShortcut" />
<ComponentRef Id="StartMenuShortcut" />
</Feature>
<!-- Icon for the installer -->
<Icon Id="ProductIcon" SourceFile="$(var.ProjectDir)/icons/icon-orange.ico" />
<Property Id="ARPPRODUCTICON" Value="ProductIcon" />
<!-- Remove runtime-registered PangolinManager before MSI-owned ServiceInstall (upgrade from legacy MSI). -->
<SetProperty Id="CleanupOrphanedManagerService"
Value=""[%ComSpec]" /c "[System64Folder]sc.exe" stop PangolinManager & "[System64Folder]sc.exe" delete PangolinManager"
Sequence="execute"
Before="CleanupOrphanedManagerService" />
<CustomAction Id="CleanupOrphanedManagerService"
BinaryRef="Wix4UtilCA_$(sys.BUILDARCHSHORT)"
DllEntry="WixQuietExec"
Execute="deferred"
Impersonate="no"
Return="ignore" />
<InstallExecuteSequence>
<Custom Action="CleanupOrphanedManagerService"
Before="InstallServices"
Condition="NOT REMOVE~="ALL"" />
</InstallExecuteSequence>
</Package>
</Wix>