main.wxs 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  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. <!-- Non-Opening ProgID -->
  68. <DirectoryRef Id="INSTALLDIR">
  69. <Component Win64="yes" Id="nonStartingProgID" >
  70. <File Id="IconFileForEncryptedData" KeyPath="yes" Source="$(env.JP_WIXWIZARD_RESOURCES)\Cryptomator-Vault.ico" Name="Cryptomator-Vault.ico"></File>
  71. <ProgId Id="Cryptomator.Encrypted.1" Description="Cryptomator Encrypted Data" Icon="IconFileForEncryptedData" IconIndex="0">
  72. <Extension Id="c9r" Advertise="no" ContentType="application/vnd.cryptomator.encrypted">
  73. <MIME ContentType="application/vnd.cryptomator.encrypted" Default="yes"></MIME>
  74. </Extension>
  75. <Extension Id="c9s" Advertise="no" ContentType="application/vnd.cryptomator.encrypted"/>
  76. </ProgId>
  77. </Component>
  78. </DirectoryRef>
  79. <!-- Standard required root -->
  80. <Directory Id="TARGETDIR" Name="SourceDir"/>
  81. <Feature Id="DefaultFeature" Title="!(loc.MainFeatureTitle)" Level="1">
  82. <ComponentGroupRef Id="Shortcuts"/>
  83. <ComponentGroupRef Id="Files"/>
  84. <ComponentGroupRef Id="FileAssociations"/>
  85. <!-- Ref to additional ProgIDs -->
  86. <ComponentRef Id="nonStartingProgID" />
  87. </Feature>
  88. <CustomAction Id="JpSetARPINSTALLLOCATION" Property="ARPINSTALLLOCATION" Value="[INSTALLDIR]" />
  89. <CustomAction Id="JpSetARPCOMMENTS" Property="ARPCOMMENTS" Value="$(var.JpAppDescription)" />
  90. <CustomAction Id="JpSetARPCONTACT" Property="ARPCONTACT" Value="$(var.JpAppVendor)" />
  91. <CustomAction Id="JpSetARPSIZE" Property="ARPSIZE" Value="$(var.JpAppSizeKb)" />
  92. <?ifdef JpHelpURL ?>
  93. <CustomAction Id="JpSetARPHELPLINK" Property="ARPHELPLINK" Value="$(var.JpHelpURL)" />
  94. <?endif?>
  95. <?ifdef JpAboutURL ?>
  96. <CustomAction Id="JpSetARPURLINFOABOUT" Property="ARPURLINFOABOUT" Value="$(var.JpAboutURL)" />
  97. <?endif?>
  98. <?ifdef JpUpdateURL ?>
  99. <CustomAction Id="JpSetARPURLUPDATEINFO" Property="ARPURLUPDATEINFO" Value="$(var.JpUpdateURL)" />
  100. <?endif?>
  101. <?ifdef JpIcon ?>
  102. <Property Id="ARPPRODUCTICON" Value="JpARPPRODUCTICON"/>
  103. <Icon Id="JpARPPRODUCTICON" SourceFile="$(var.JpIcon)"/>
  104. <?endif?>
  105. <UIRef Id="JpUI"/>
  106. <InstallExecuteSequence>
  107. <Custom Action="JpSetARPINSTALLLOCATION" After="CostFinalize">Not Installed</Custom>
  108. <Custom Action="JpSetARPCOMMENTS" After="CostFinalize">Not Installed</Custom>
  109. <Custom Action="JpSetARPCONTACT" After="CostFinalize">Not Installed</Custom>
  110. <Custom Action="JpSetARPSIZE" After="CostFinalize">Not Installed</Custom>
  111. <?ifdef JpHelpURL ?>
  112. <Custom Action="JpSetARPHELPLINK" After="CostFinalize">Not Installed</Custom>
  113. <?endif?>
  114. <?ifdef JpAboutURL ?>
  115. <Custom Action="JpSetARPURLINFOABOUT" After="CostFinalize">Not Installed</Custom>
  116. <?endif?>
  117. <?ifdef JpUpdateURL ?>
  118. <Custom Action="JpSetARPURLUPDATEINFO" After="CostFinalize">Not Installed</Custom>
  119. <?endif?>
  120. <?ifndef JpAllowUpgrades ?>
  121. <Custom Action="JpDisallowUpgrade" After="FindRelatedProducts">JP_UPGRADABLE_FOUND</Custom>
  122. <?endif?>
  123. <?ifndef JpAllowDowngrades ?>
  124. <Custom Action="JpDisallowDowngrade" After="FindRelatedProducts">JP_DOWNGRADABLE_FOUND</Custom>
  125. <?endif?>
  126. <RemoveExistingProducts Before="CostInitialize"/>
  127. </InstallExecuteSequence>
  128. <WixVariable Id="WixUIBannerBmp" Value="$(env.JP_WIXWIZARD_RESOURCES)\banner.bmp" />
  129. <WixVariable Id="WixUIDialogBmp" Value="$(env.JP_WIXWIZARD_RESOURCES)\background.bmp" />
  130. </Product>
  131. </Wix>