main.wxs 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
  3. xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
  4. <?ifdef JpIsSystemWide ?>
  5. <?define JpInstallScope="perMachine"?>
  6. <?else?>
  7. <?define JpInstallScope="perUser"?>
  8. <?endif?>
  9. <?define JpProductLanguage=1033 ?>
  10. <?define JpInstallerVersion=200 ?>
  11. <?define JpCompressedMsi=yes ?>
  12. <?ifdef JpAllowUpgrades ?>
  13. <?define JpUpgradeVersionOnlyDetectUpgrade="no"?>
  14. <?else?>
  15. <?define JpUpgradeVersionOnlyDetectUpgrade="yes"?>
  16. <?endif?>
  17. <?ifdef JpAllowDowngrades ?>
  18. <?define JpUpgradeVersionOnlyDetectDowngrade="no"?>
  19. <?else?>
  20. <?define JpUpgradeVersionOnlyDetectDowngrade="yes"?>
  21. <?endif?>
  22. <?include $(var.JpConfigDir)/overrides.wxi ?>
  23. <Product
  24. Id="$(var.JpProductCode)"
  25. Name="$(var.JpAppName)"
  26. Language="$(var.JpProductLanguage)"
  27. Version="$(var.JpAppVersion)"
  28. Manufacturer="$(var.JpAppVendor)"
  29. UpgradeCode="$(var.JpProductUpgradeCode)">
  30. <Package
  31. Description="$(var.JpAppDescription)"
  32. Manufacturer="$(var.JpAppVendor)"
  33. InstallerVersion="$(var.JpInstallerVersion)"
  34. Compressed="$(var.JpCompressedMsi)"
  35. InstallScope="$(var.JpInstallScope)" Platform="x64"
  36. />
  37. <Media Id="1" Cabinet="Data.cab" EmbedCab="yes" />
  38. <Upgrade Id="$(var.JpProductUpgradeCode)">
  39. <UpgradeVersion
  40. OnlyDetect="$(var.JpUpgradeVersionOnlyDetectUpgrade)"
  41. Property="JP_UPGRADABLE_FOUND"
  42. Maximum="$(var.JpAppVersion)"
  43. MigrateFeatures="yes"
  44. IncludeMaximum="$(var.JpUpgradeVersionOnlyDetectUpgrade)" />
  45. <UpgradeVersion
  46. OnlyDetect="$(var.JpUpgradeVersionOnlyDetectDowngrade)"
  47. Property="JP_DOWNGRADABLE_FOUND"
  48. Minimum="$(var.JpAppVersion)"
  49. MigrateFeatures="yes"
  50. IncludeMinimum="$(var.JpUpgradeVersionOnlyDetectDowngrade)" />
  51. </Upgrade>
  52. <?ifndef JpAllowUpgrades ?>
  53. <CustomAction Id="JpDisallowUpgrade" Error="!(loc.DisallowUpgradeErrorMessage)" />
  54. <?endif?>
  55. <?ifndef JpAllowDowngrades ?>
  56. <CustomAction Id="JpDisallowDowngrade" Error="!(loc.DowngradeErrorMessage)" />
  57. <?endif?>
  58. <!-- Looking for legacy Cryptomator versions-->
  59. <Property Id="OLDEXEINSTALLER">
  60. <RegistrySearch Id="InnoSetupInstallation" Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\Cryptomator_is1" Type="raw" Name="DisplayName" />
  61. </Property>
  62. <!-- Block installation if innosetup entry of Cryptomator is found -->
  63. <!-- TODO: localize -->
  64. <Condition Message="A lower version of [ProductName] is already installed. Uninstall it first and then start the setup again. Setup will now exit.">
  65. <![CDATA[Installed OR NOT OLDEXEINSTALLER]]>
  66. </Condition>
  67. <!-- Cryptomator uses UNIX Sockets, which are supported starting with Windows 10 v1803-->
  68. <Property Id="WINDOWSBUILDNUMBER" Secure="yes">
  69. <RegistrySearch Id="BuildNumberSearch" Root="HKLM" Key="SOFTWARE\Microsoft\Windows NT\CurrentVersion" Name="CurrentBuildNumber" Type="raw" />
  70. </Property>
  71. <Condition Message="This application requires Windows 10 version 1803 (build 17134) or newer.">
  72. <![CDATA[Installed OR (WINDOWSBUILDNUMBER >= 17134)]]>
  73. </Condition>
  74. <!-- Non-Opening ProgID -->
  75. <DirectoryRef Id="INSTALLDIR">
  76. <Component Win64="yes" Id="nonStartingProgID" >
  77. <File Id="IconFileForEncryptedData" KeyPath="yes" Source="$(env.JP_WIXWIZARD_RESOURCES)\Cryptomator-Vault.ico" Name="Cryptomator-Vault.ico"></File>
  78. <ProgId Id="Cryptomator.Encrypted.1" Description="Cryptomator Encrypted Data" Icon="IconFileForEncryptedData" IconIndex="0">
  79. <Extension Id="c9r" Advertise="no" ContentType="application/vnd.cryptomator.encrypted">
  80. <MIME ContentType="application/vnd.cryptomator.encrypted" Default="yes"></MIME>
  81. </Extension>
  82. <Extension Id="c9s" Advertise="no" ContentType="application/vnd.cryptomator.encrypted"/>
  83. </ProgId>
  84. </Component>
  85. </DirectoryRef>
  86. <!-- Standard required root -->
  87. <Directory Id="TARGETDIR" Name="SourceDir"/>
  88. <Feature Id="DefaultFeature" Title="!(loc.MainFeatureTitle)" Level="1">
  89. <ComponentGroupRef Id="Shortcuts"/>
  90. <ComponentGroupRef Id="Files"/>
  91. <ComponentGroupRef Id="FileAssociations"/>
  92. <!-- Ref to additional ProgIDs -->
  93. <ComponentRef Id="nonStartingProgID" />
  94. </Feature>
  95. <CustomAction Id="JpSetARPINSTALLLOCATION" Property="ARPINSTALLLOCATION" Value="[INSTALLDIR]" />
  96. <CustomAction Id="JpSetARPCOMMENTS" Property="ARPCOMMENTS" Value="$(var.JpAppDescription)" />
  97. <CustomAction Id="JpSetARPCONTACT" Property="ARPCONTACT" Value="$(var.JpAppVendor)" />
  98. <CustomAction Id="JpSetARPSIZE" Property="ARPSIZE" Value="$(var.JpAppSizeKb)" />
  99. <?ifdef JpHelpURL ?>
  100. <CustomAction Id="JpSetARPHELPLINK" Property="ARPHELPLINK" Value="$(var.JpHelpURL)" />
  101. <?endif?>
  102. <?ifdef JpAboutURL ?>
  103. <CustomAction Id="JpSetARPURLINFOABOUT" Property="ARPURLINFOABOUT" Value="$(var.JpAboutURL)" />
  104. <?endif?>
  105. <?ifdef JpUpdateURL ?>
  106. <CustomAction Id="JpSetARPURLUPDATEINFO" Property="ARPURLUPDATEINFO" Value="$(var.JpUpdateURL)" />
  107. <?endif?>
  108. <?ifdef JpIcon ?>
  109. <Property Id="ARPPRODUCTICON" Value="JpARPPRODUCTICON"/>
  110. <Icon Id="JpARPPRODUCTICON" SourceFile="$(var.JpIcon)"/>
  111. <?endif?>
  112. <UIRef Id="JpUI"/>
  113. <InstallExecuteSequence>
  114. <Custom Action="JpSetARPINSTALLLOCATION" After="CostFinalize">Not Installed</Custom>
  115. <Custom Action="JpSetARPCOMMENTS" After="CostFinalize">Not Installed</Custom>
  116. <Custom Action="JpSetARPCONTACT" After="CostFinalize">Not Installed</Custom>
  117. <Custom Action="JpSetARPSIZE" After="CostFinalize">Not Installed</Custom>
  118. <?ifdef JpHelpURL ?>
  119. <Custom Action="JpSetARPHELPLINK" After="CostFinalize">Not Installed</Custom>
  120. <?endif?>
  121. <?ifdef JpAboutURL ?>
  122. <Custom Action="JpSetARPURLINFOABOUT" After="CostFinalize">Not Installed</Custom>
  123. <?endif?>
  124. <?ifdef JpUpdateURL ?>
  125. <Custom Action="JpSetARPURLUPDATEINFO" After="CostFinalize">Not Installed</Custom>
  126. <?endif?>
  127. <?ifndef JpAllowUpgrades ?>
  128. <Custom Action="JpDisallowUpgrade" After="FindRelatedProducts">JP_UPGRADABLE_FOUND</Custom>
  129. <?endif?>
  130. <?ifndef JpAllowDowngrades ?>
  131. <Custom Action="JpDisallowDowngrade" After="FindRelatedProducts">JP_DOWNGRADABLE_FOUND</Custom>
  132. <?endif?>
  133. <RemoveExistingProducts Before="CostInitialize"/>
  134. </InstallExecuteSequence>
  135. <WixVariable Id="WixUIBannerBmp" Value="$(env.JP_WIXWIZARD_RESOURCES)\banner.bmp" />
  136. <WixVariable Id="WixUIDialogBmp" Value="$(env.JP_WIXWIZARD_RESOURCES)\background.bmp" />
  137. </Product>
  138. </Wix>