123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186 |
- <?xml version="1.0" encoding="utf-8"?>
- <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
- xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
- <?ifdef JpIsSystemWide ?>
- <?define JpInstallScope="perMachine"?>
- <?else?>
- <?define JpInstallScope="perUser"?>
- <?endif?>
- <?define JpProductLanguage=1033 ?>
- <?define JpInstallerVersion=200 ?>
- <?define JpCompressedMsi=yes ?>
- <?ifdef JpAllowUpgrades ?>
- <?define JpUpgradeVersionOnlyDetectUpgrade="no"?>
- <?else?>
- <?define JpUpgradeVersionOnlyDetectUpgrade="yes"?>
- <?endif?>
- <?ifdef JpAllowDowngrades ?>
- <?define JpUpgradeVersionOnlyDetectDowngrade="no"?>
- <?else?>
- <?define JpUpgradeVersionOnlyDetectDowngrade="yes"?>
- <?endif?>
- <?include $(var.JpConfigDir)/overrides.wxi ?>
- <Product
- Id="$(var.JpProductCode)"
- Name="$(var.JpAppName)"
- Language="$(var.JpProductLanguage)"
- Version="$(var.JpAppVersion)"
- Manufacturer="$(var.JpAppVendor)"
- UpgradeCode="$(var.JpProductUpgradeCode)">
- <Package
- Description="$(var.JpAppDescription)"
- Manufacturer="$(var.JpAppVendor)"
- InstallerVersion="$(var.JpInstallerVersion)"
- Compressed="$(var.JpCompressedMsi)"
- InstallScope="$(var.JpInstallScope)" Platform="x64"
- />
- <Media Id="1" Cabinet="Data.cab" EmbedCab="yes" />
- <Upgrade Id="$(var.JpProductUpgradeCode)">
- <UpgradeVersion
- OnlyDetect="$(var.JpUpgradeVersionOnlyDetectUpgrade)"
- Property="JP_UPGRADABLE_FOUND"
- Maximum="$(var.JpAppVersion)"
- MigrateFeatures="yes"
- IncludeMaximum="$(var.JpUpgradeVersionOnlyDetectUpgrade)" />
- <UpgradeVersion
- OnlyDetect="$(var.JpUpgradeVersionOnlyDetectDowngrade)"
- Property="JP_DOWNGRADABLE_FOUND"
- Minimum="$(var.JpAppVersion)"
- MigrateFeatures="yes"
- IncludeMinimum="$(var.JpUpgradeVersionOnlyDetectDowngrade)" />
- </Upgrade>
- <?ifndef JpAllowUpgrades ?>
- <CustomAction Id="JpDisallowUpgrade" Error="!(loc.DisallowUpgradeErrorMessage)" />
- <?endif?>
- <?ifndef JpAllowDowngrades ?>
- <CustomAction Id="JpDisallowDowngrade" Error="!(loc.DowngradeErrorMessage)" />
- <?endif?>
- <!-- Looking for legacy Cryptomator versions-->
- <Property Id="OLDEXEINSTALLER">
- <RegistrySearch Id="InnoSetupInstallation" Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\Cryptomator_is1" Type="raw" Name="DisplayName" />
- </Property>
- <!-- Block installation if innosetup entry of Cryptomator is found -->
- <!-- TODO: localize -->
- <Condition Message="A lower version of [ProductName] is already installed. Uninstall it first and then start the setup again. Setup will now exit.">
- <![CDATA[Installed OR NOT OLDEXEINSTALLER]]>
- </Condition>
- <!-- Cryptomator uses UNIX Sockets, which are supported starting with Windows 10 v1803-->
- <Property Id="WINDOWSBUILDNUMBER" Secure="yes">
- <RegistrySearch Id="BuildNumberSearch" Root="HKLM" Key="SOFTWARE\Microsoft\Windows NT\CurrentVersion" Name="CurrentBuildNumber" Type="raw" />
- </Property>
- <Condition Message="This application requires Windows 10 version 1803 (build 17134) or newer.">
- <![CDATA[Installed OR (WINDOWSBUILDNUMBER >= 17134)]]>
- </Condition>
- <!-- Non-Opening ProgID -->
- <DirectoryRef Id="INSTALLDIR">
- <Component Win64="yes" Id="nonStartingProgID" >
- <File Id="IconFileForEncryptedData" KeyPath="yes" Source="$(env.JP_WIXWIZARD_RESOURCES)\$(var.IconFileC9rC9s)" Name="$(var.IconFileC9rC9s)"></File>
- <ProgId Id="$(var.JpAppName).Encrypted.1" Description="$(var.JpAppName) Encrypted Data" Icon="IconFileForEncryptedData" IconIndex="0">
- <Extension Id="c9r" Advertise="no" ContentType="$(var.ProgIdContentType)">
- <MIME ContentType="$(var.ProgIdContentType)" Default="yes"></MIME>
- </Extension>
- <Extension Id="c9s" Advertise="no" ContentType="$(var.ProgIdContentType)"/>
- </ProgId>
- </Component>
- </DirectoryRef>
- <!-- Standard required root -->
- <Directory Id="TARGETDIR" Name="SourceDir"/>
- <Feature Id="DefaultFeature" Title="!(loc.MainFeatureTitle)" Level="1">
- <ComponentGroupRef Id="Shortcuts"/>
- <ComponentGroupRef Id="Files"/>
- <ComponentGroupRef Id="FileAssociations"/>
- <!-- Ref to additional ProgIDs -->
- <ComponentRef Id="nonStartingProgID" />
- </Feature>
- <CustomAction Id="JpSetARPINSTALLLOCATION" Property="ARPINSTALLLOCATION" Value="[INSTALLDIR]" />
- <CustomAction Id="JpSetARPCOMMENTS" Property="ARPCOMMENTS" Value="$(var.JpAppDescription)" />
- <CustomAction Id="JpSetARPCONTACT" Property="ARPCONTACT" Value="$(var.JpAppVendor)" />
- <CustomAction Id="JpSetARPSIZE" Property="ARPSIZE" Value="$(var.JpAppSizeKb)" />
- <?ifdef JpHelpURL ?>
- <CustomAction Id="JpSetARPHELPLINK" Property="ARPHELPLINK" Value="$(var.JpHelpURL)" />
- <?endif?>
- <?ifdef JpAboutURL ?>
- <CustomAction Id="JpSetARPURLINFOABOUT" Property="ARPURLINFOABOUT" Value="$(var.JpAboutURL)" />
- <?endif?>
- <?ifdef JpUpdateURL ?>
- <CustomAction Id="JpSetARPURLUPDATEINFO" Property="ARPURLUPDATEINFO" Value="$(var.JpUpdateURL)" />
- <?endif?>
- <!-- WebDAV patches -->
- <CustomAction Id="PatchWebDAV" Impersonate="no" ExeCommand="[INSTALLDIR]patchWebDAV.bat" Directory="INSTALLDIR" Execute="deferred" Return="asyncWait" />
- <!-- Running App detection and exit -->
- <Property Id="FOUNDRUNNINGAPP" Admin="yes"/>
- <util:CloseApplication
- Target="$(var.CloseApplicationTarget)"
- Id="Close$(var.JpAppName)"
- CloseMessage="no"
- RebootPrompt="no"
- PromptToContinue="yes"
- Description="A running instance of $(var.JpAppName) is found. Please close it to continue."
- Property="FOUNDRUNNINGAPP"
- >
- </util:CloseApplication>
- <CustomAction Id="FailOnRunningApp" Impersonate="no" ExeCommand="[SystemFolder]\cmd.exe /c "exit 1"" Directory="INSTALLDIR" Execute="immediate" Return="check" />
- <?ifdef JpIcon ?>
- <Property Id="ARPPRODUCTICON" Value="JpARPPRODUCTICON"/>
- <Icon Id="JpARPPRODUCTICON" SourceFile="$(var.JpIcon)"/>
- <?endif?>
- <UIRef Id="JpUI"/>
- <InstallExecuteSequence>
- <Custom Action="JpSetARPINSTALLLOCATION" After="CostFinalize">Not Installed</Custom>
- <Custom Action="JpSetARPCOMMENTS" After="CostFinalize">Not Installed</Custom>
- <Custom Action="JpSetARPCONTACT" After="CostFinalize">Not Installed</Custom>
- <Custom Action="JpSetARPSIZE" After="CostFinalize">Not Installed</Custom>
- <?ifdef JpHelpURL ?>
- <Custom Action="JpSetARPHELPLINK" After="CostFinalize">Not Installed</Custom>
- <?endif?>
- <?ifdef JpAboutURL ?>
- <Custom Action="JpSetARPURLINFOABOUT" After="CostFinalize">Not Installed</Custom>
- <?endif?>
- <?ifdef JpUpdateURL ?>
- <Custom Action="JpSetARPURLUPDATEINFO" After="CostFinalize">Not Installed</Custom>
- <?endif?>
- <?ifndef JpAllowUpgrades ?>
- <Custom Action="JpDisallowUpgrade" After="FindRelatedProducts">JP_UPGRADABLE_FOUND</Custom>
- <?endif?>
- <?ifndef JpAllowDowngrades ?>
- <Custom Action="JpDisallowDowngrade" After="FindRelatedProducts">JP_DOWNGRADABLE_FOUND</Custom>
- <?endif?>
- <!-- Check and fail if Cryptomator is running -->
- <Custom Action="WixCloseApplications" Before="InstallValidate"></Custom>
- <Custom Action="FailOnRunningApp" After="WixCloseApplications" >FOUNDRUNNINGAPP</Custom>
- <RemoveExistingProducts After="InstallValidate"/>
- <Custom Action="PatchWebDAV" After="InstallFiles">NOT Installed OR REINSTALL</Custom>
- </InstallExecuteSequence>
- <WixVariable Id="WixUIBannerBmp" Value="$(env.JP_WIXWIZARD_RESOURCES)\banner.bmp" />
- <WixVariable Id="WixUIDialogBmp" Value="$(env.JP_WIXWIZARD_RESOURCES)\background.bmp" />
- </Product>
- </Wix>
|