1
0
mirror of https://github.com/winfsp/sshfs-win.git synced 2025-04-18 23:04:01 +03:00
sshfs-win/sshfs-win.wxs
2021-05-08 11:36:41 -07:00

245 lines
10 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<?define UpgradeCode64="3576E993-BFE0-4707-B6F6-7F26BF88300B"?>
<?define UpgradeCode32="DC1B144B-4B64-4245-BC57-959267714315"?>
<?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) ($(var.MyArch))"
Manufacturer="$(var.MyCompanyName)"
Version="$(var.MyVersion)"
Language="1033"
UpgradeCode="$(var.UpgradeCode)">
<Package
Description="$(var.MyProductName) $(var.MyProductVersion) ($(var.MyArch)) - $(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="sshfs_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>
<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>
<DirectoryRef Id="INSTALLDIR">
<Component Id="C.INSTALLDIR" Guid="{34645C63-B237-4B2B-B702-8EBBA626D604}">
<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.sshfs.reg" Guid="{3EF97966-E49E-4A0B-B68D-5EB2BDA61C21}">
<RegistryKey
Root="HKLM"
Key="[P.LauncherRegistryKey]">
<RegistryKey
Key="sshfs">
<RegistryValue
Type="string"
Name="Executable"
Value="[INSTALLDIR]bin\sshfs-win.exe"
KeyPath="yes" />
<RegistryValue
Type="string"
Name="CommandLine"
Value="svc %1 %2 %U" />
<RegistryValue
Type="string"
Name="Security"
Value="D:P(A;;RPWPLC;;;WD)" />
<RegistryValue
Type="integer"
Name="JobControl"
Value="1" />
<RegistryValue
Type="integer"
Name="Credentials"
Value="1" />
</RegistryKey>
</RegistryKey>
</Component>
<Component Id="C.sshfs.r.reg" Guid="{F8E1A2DE-2061-42AD-805F-33BF0F75DC35}">
<RegistryKey
Root="HKLM"
Key="[P.LauncherRegistryKey]">
<RegistryKey
Key="sshfs.r">
<RegistryValue
Type="string"
Name="Executable"
Value="[INSTALLDIR]bin\sshfs-win.exe"
KeyPath="yes" />
<RegistryValue
Type="string"
Name="CommandLine"
Value="svc %1 %2 %U" />
<RegistryValue
Type="string"
Name="Security"
Value="D:P(A;;RPWPLC;;;WD)" />
<RegistryValue
Type="integer"
Name="JobControl"
Value="1" />
<RegistryValue
Type="integer"
Name="Credentials"
Value="1" />
<RegistryValue
Type="integer"
Name="sshfs.rootdir"
Value="1" />
</RegistryKey>
</RegistryKey>
</Component>
<Component Id="C.sshfs.k.reg" Guid="{F8E1A2DE-2061-42AD-805F-33BF0F75DC36}">
<RegistryKey
Root="HKLM"
Key="[P.LauncherRegistryKey]">
<RegistryKey
Key="sshfs.k">
<RegistryValue
Type="string"
Name="Executable"
Value="[INSTALLDIR]bin\sshfs-win.exe"
KeyPath="yes" />
<RegistryValue
Type="string"
Name="CommandLine"
Value="svc %1 %2 %U" />
<RegistryValue
Type="string"
Name="Security"
Value="D:P(A;;RPWPLC;;;WD)" />
<RegistryValue
Type="integer"
Name="JobControl"
Value="1" />
<RegistryValue
Type="integer"
Name="Credentials"
Value="0" />
</RegistryKey>
</RegistryKey>
</Component>
<Component Id="C.sshfs.kr.reg" Guid="{44B70FC4-B8C5-4B33-96EF-73D20C517702}">
<RegistryKey
Root="HKLM"
Key="[P.LauncherRegistryKey]">
<RegistryKey
Key="sshfs.kr">
<RegistryValue
Type="string"
Name="Executable"
Value="[INSTALLDIR]bin\sshfs-win.exe"
KeyPath="yes" />
<RegistryValue
Type="string"
Name="CommandLine"
Value="svc %1 %2 %U" />
<RegistryValue
Type="string"
Name="Security"
Value="D:P(A;;RPWPLC;;;WD)" />
<RegistryValue
Type="integer"
Name="JobControl"
Value="1" />
<RegistryValue
Type="integer"
Name="Credentials"
Value="0" />
<RegistryValue
Type="integer"
Name="sshfs.rootdir"
Value="1" />
</RegistryKey>
</RegistryKey>
</Component>
</DirectoryRef>
<Feature
Id="F.Main"
Level="1"
Title="$(var.MyProductName) $(var.MyProductVersion) ($(var.MyArch))"
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.sshfs.reg" />
<ComponentRef Id="C.sshfs.r.reg" />
<ComponentRef Id="C.sshfs.k.reg" />
<ComponentRef Id="C.sshfs.kr.reg" />
<ComponentGroupRef Id="C.Main" />
</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>