forked from winfsp/hubfs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhubfs.wxs
161 lines (150 loc) · 6.77 KB
/
hubfs.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
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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
<?xml version="1.0" encoding="utf-8"?>
<?define UpgradeCode64="8EB70D4C-56EE-488F-9574-3547894A9C2F"?>
<?define UpgradeCode32="C394327C-2DE3-4863-9125-22124929CABF"?>
<?if $(var.MyArch) = x64?>
<?define UpgradeCode="$(var.UpgradeCode64)"?>
<?define OtherUpgradeCode="$(var.UpgradeCode32)"?>
<?define ProgramFilesFolder="ProgramFiles64Folder"?>
<?define LauncherRegistryKey="Software\WOW6432Node\WinFsp\Services"?>
<?else?>
<?define UpgradeCode="$(var.UpgradeCode32)"?>
<?define OtherUpgradeCode="$(var.UpgradeCode64)"?>
<?define ProgramFilesFolder="ProgramFilesFolder"?>
<?define LauncherRegistryKey="Software\WinFsp\Services"?>
<?endif?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product
Id="*"
Name="$(var.MyProductName) $(var.MyProductVersion)"
Manufacturer="$(var.MyCompanyName)"
Version="$(var.MyVersion)"
Language="1033"
UpgradeCode="$(var.UpgradeCode)">
<Package
Description="$(var.MyProductName) $(var.MyProductVersion) - $(var.MyDescription)"
InstallerVersion="200"
Compressed="yes"
InstallScope="perMachine" />
<MajorUpgrade
Disallow="yes"
AllowDowngrades="no"
AllowSameVersionUpgrades="no"
DisallowUpgradeErrorMessage="An older version of $(var.MyProductName) is already installed. You must uninstall it before you can install this version."
DowngradeErrorMessage="A newer version of $(var.MyProductName) is already installed." />
<Media Id="1" Cabinet="hubfs_win.cab" EmbedCab="yes" />
<Property Id="OTHERINSTALLED">
<ProductSearch UpgradeCode="$(var.OtherUpgradeCode)" Minimum="0.0.0.0" />
</Property>
<Condition Message="A version of $(var.MyProductName) with a different computer architecture is already installed. You must uninstall it before you can install this version.">
NOT OTHERINSTALLED
</Condition>
<!-- For explanation see https://stackoverflow.com/a/3824949 -->
<Property Id="DISABLEADVTSHORTCUTS" Value="1" />
<Property Id="P.LauncherRegistryKey">$(var.LauncherRegistryKey)</Property>
<Property Id="P.RegistryKey">Software\$(var.MyProductName)</Property>
<Property Id="INSTALLDIR">
<RegistrySearch
Id="R.INSTALLDIR"
Root="HKLM"
Key="[P.RegistryKey]"
Name="InstallDir"
Type="raw" />
</Property>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="$(var.ProgramFilesFolder)">
<Directory Id="INSTALLDIR" Name="$(var.MyProductName)" />
</Directory>
<Directory Id="ProgramMenuFolder">
<Directory Id="ProductMenu" Name="$(var.MyProductName)"/>
</Directory>
</Directory>
<DirectoryRef Id="INSTALLDIR">
<Component Id="C.INSTALLDIR" Guid="{B9782B67-BCCF-47BB-82C2-B4C1F222113F}">
<RegistryValue
Root="HKLM"
Key="[P.RegistryKey]"
Name="InstallDir"
Type="string"
Value="[INSTALLDIR]"
KeyPath="yes" />
</Component>
<Component Id="C.License.txt">
<File Name="License.txt" Source="License.txt" KeyPath="yes" />
</Component>
<Component Id="C.hubfs.exe">
<File Name="hubfs.exe" Source="hubfs.exe" KeyPath="yes" />
<Shortcut
Id="S.GitHub.lnk"
Directory="ProductMenu"
Name="HUBFS - Perform GitHub Auth"
Arguments="-auth=force -authkey=https://github.com -authonly"
WorkingDirectory="INSTALLDIR"
Advertise="yes" />
<RemoveFolder Id="ProductMenu" Directory="ProductMenu" On="uninstall" />
</Component>
<Component Id="C.hubfs.reg" Guid="{3DA8A8D0-1BAD-4A28-B742-245616194230}">
<RegistryKey
Root="HKLM"
Key="[P.LauncherRegistryKey]">
<RegistryKey
Key="hubfs">
<RegistryValue
Type="string"
Name="Executable"
Value="[INSTALLDIR]hubfs.exe"
KeyPath="yes" />
<RegistryValue
Type="string"
Name="CommandLine"
Value="-auth optional -o VolumePrefix=%\/_1 -o uid=-1,rellinks,FileInfoTimeout=-1 %\/b/_1 %2" />
<RegistryValue
Type="string"
Name="Security"
Value="D:P(A;;RPWPLC;;;WD)" />
<RegistryValue
Type="integer"
Name="JobControl"
Value="1" />
<RegistryValue
Type="string"
Name="RunAs"
Value="." />
</RegistryKey>
</RegistryKey>
</Component>
</DirectoryRef>
<Feature
Id="F.Main"
Level="1"
Title="$(var.MyProductName) $(var.MyProductVersion)"
Description="$(var.MyDescription)"
Display="expand"
ConfigurableDirectory="INSTALLDIR"
AllowAdvertise="no"
InstallDefault="local"
Absent="disallow">
<ComponentRef Id="C.INSTALLDIR" />
<ComponentRef Id="C.License.txt" />
<ComponentRef Id="C.hubfs.exe" />
<ComponentRef Id="C.hubfs.reg" />
</Feature>
<WixVariable Id="WixUIBannerBmp" Value="art/wixbanner.bmp" />
<WixVariable Id="WixUIDialogBmp" Value="art/wixdialog-$(var.MyProductStage).bmp" />
<UI Id="FeatureTree">
<UIRef Id="WixUI_FeatureTree" />
<!-- skip the license agreement dialog; higher Order takes priority (weird) -->
<Publish
Dialog="WelcomeDlg"
Control="Next"
Event="NewDialog"
Value="CustomizeDlg"
Order="10">NOT Installed</Publish>
<Publish
Dialog="CustomizeDlg"
Control="Back"
Event="NewDialog"
Value="WelcomeDlg"
Order="10">NOT Installed</Publish>
</UI>
</Product>
</Wix>