UltiMaker-Cura.wxs.jinja 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:fw="http://schemas.microsoft.com/wix/FirewallExtension">
  3. <Product
  4. Id="*"
  5. Name="{{ app_name }}"
  6. Language="1033"
  7. Version="{{ version_major }}.{{ version_minor }}.{{ version_patch }}"
  8. Manufacturer="{{ company }}"
  9. UpgradeCode="{{ upgrade_code }}"
  10. >
  11. <Package
  12. Id="*"
  13. InstallerVersion="500"
  14. Compressed="yes"
  15. InstallScope="perMachine"
  16. Manufacturer="{{ company }}"
  17. Description="UltiMaker Cura the most popular 3D printing slicer"
  18. Keywords="UltiMaker,Cura,3D,printing,slicer"
  19. Comments="Copyright (c) {{ year }} {{ company }}" />
  20. <InstallExecuteSequence>
  21. <RemoveExistingProducts After="InstallFinalize">
  22. <![CDATA[&UninstallOlderVersionFeature=3]]>
  23. </RemoveExistingProducts>
  24. </InstallExecuteSequence>
  25. <Property Id="PREVIOUS_VERSIONS_INSTALLED" Secure="yes" />
  26. <Upgrade Id="{{ upgrade_code }}">
  27. <UpgradeVersion
  28. Minimum="4.13.2" Maximum="{{ version_major }}.{{ version_minor }}.{{ version_patch }}"
  29. Property="PREVIOUS_VERSIONS_INSTALLED"
  30. IncludeMinimum="no" IncludeMaximum="yes"
  31. />
  32. </Upgrade>
  33. {% if "Enterprise" in app_name %}
  34. <Property Id="PREVIOUS_413_INSTALLED" Secure="yes" />
  35. <Upgrade Id="53C603BB-2B17-4206-A609-29C2E0D0B0AE">
  36. <UpgradeVersion
  37. Minimum="1.0.0" Maximum="4.13.2"
  38. Property="PREVIOUS_VERSIONS_INSTALLED"
  39. IncludeMinimum="yes" IncludeMaximum="yes"
  40. />
  41. </Upgrade>
  42. {% endif %}
  43. <Condition Message= "OS must be Windows 8.1 64bit or higher.">
  44. <![CDATA[Installed OR VersionNT64 >= 600]]>
  45. </Condition>
  46. <MediaTemplate EmbedCab="yes" CompressionLevel="high" />
  47. <UIRef Id="WixUI_Mondo" />
  48. <WixVariable Id="WixUILicenseRtf" Value="{{ cura_license_file }}" />
  49. <WixVariable Id="WixUIDialogBmp" Value="{{ cura_banner_side }}" />
  50. <WixVariable Id="WixUIBannerBmp" Value="{{ cura_banner_top }}" />
  51. <Icon Id="ICO_Cura" SourceFile="{{ cura_icon }}" />
  52. <Property Id="ARPPRODUCTICON" Value="ICO_Cura" />
  53. <!--Directory structure-->
  54. <Directory Id="TARGETDIR" Name="SourceDir">
  55. <Directory Id="ProgramFiles64Folder">
  56. <Directory Id="APPLICATIONFOLDER" Name="{{ app_name }} {{ version }}" />
  57. <Directory Id="ProgramMenuFolder">
  58. <Directory Id="ShortCutDir" Name="{{ app_name }}" />
  59. </Directory>
  60. </Directory>
  61. </Directory>
  62. <Property Id="ApplicationFolderName" Value="{{ app_name }} {{ version }}" />
  63. <Property Id="WixAppFolder" Value="WixPerMachineFolder" />
  64. <Component Id="CMP_UltiMaker_Cura_exe" Directory="APPLICATIONFOLDER" Guid="*">
  65. <File Id="FILE_UltiMaker_Cura_exe" KeyPath="yes" Source="$(var.CuraDir)\{{ main_app }}" />
  66. <ProgId Id="Cura" Description="{{ app_name }}" Icon="ICO_Cura" Advertise="yes">
  67. <ProgId Id="3mf" Advertise="yes">
  68. <Extension Id="3mf" ContentType="application/3mf">
  69. <Verb Id="open_3mf" Command="Open" Argument='"%1"' />
  70. <MIME Advertise="yes" ContentType="application/3mf" Default="yes" />
  71. </Extension>
  72. </ProgId>
  73. <ProgId Id="stl" Advertise="yes">
  74. <Extension Id="stl" ContentType="application/stl">
  75. <Verb Id="open_stl" Command="Open" Argument='"%1"' />
  76. <MIME Advertise="yes" ContentType="application/stl" Default="yes" />
  77. </Extension>
  78. </ProgId>
  79. <ProgId Id="gcode" Advertise="yes">
  80. <Extension Id="gcode" ContentType="text/x-gcode">
  81. <Verb Id="open_gcode" Command="Open" Argument='"%1"' />
  82. <MIME Advertise="yes" ContentType="text/x-gcode" Default="yes" />
  83. </Extension>
  84. </ProgId>
  85. <ProgId Id="ufp" Advertise="yes">
  86. <Extension Id="ufp" ContentType="application/x-ufp">
  87. <Verb Id="open_ufp" Command="Open" Argument='"%1"' />
  88. <MIME Advertise="yes" ContentType="application/x-ufp" Default="yes" />
  89. </Extension>
  90. </ProgId>
  91. <ProgId Id="curapackage" Advertise="yes">
  92. <Extension Id='curapackage' ContentType='application/curapackage'>
  93. <Verb Id='open_curapackage' Command="Open" Argument='"%1"' />
  94. <MIME Advertise="yes" ContentType="application/curapackage" Default="yes" />
  95. </Extension>
  96. </ProgId>
  97. </ProgId>
  98. <fw:FirewallException Id="FirewallExceptLocalFrontend" Name="Cura (Frontend) Connection (LocalHost)" File="FILE_UltiMaker_Cura_exe" IgnoreFailure="yes">
  99. <fw:RemoteAddress>127.0.0.1</fw:RemoteAddress>
  100. </fw:FirewallException>
  101. </Component>
  102. <Component Id="CMP_CuraEngine_exe" Directory="APPLICATIONFOLDER" Guid="*">
  103. <File Id="FILE_CuraEngine_exe" KeyPath="yes" Source="$(var.CuraDir)\CuraEngine.exe" />
  104. <fw:FirewallException Id="FirewallExceptLocalEngine" Name="CuraEngine (Backend) Connection (LocalHost)" File="FILE_CuraEngine_exe" IgnoreFailure="yes">
  105. <fw:RemoteAddress>127.0.0.1</fw:RemoteAddress>
  106. </fw:FirewallException>
  107. </Component>
  108. <!--Shortcuts-->
  109. <DirectoryRef Id="ShortCutDir">
  110. <Component Id="CMP_Shortcuts" Guid="*">
  111. <Shortcut Id="SHRT_Cura"
  112. Name="{{ app_name }} {{ version }}"
  113. Description="{{ app_name }} {{ version }}"
  114. Target="[APPLICATIONFOLDER]\{{ main_app }}"
  115. Icon="ICO_Cura" />
  116. <Shortcut Id="SHRT_UninstallShortcut"
  117. Name="Uninstall {{ app_name }} {{ version }}"
  118. Description= "Uninstalls {{ app_name }} {{ version }}"
  119. Target="[System64Folder]msiexec.exe"
  120. Arguments="/x [ProductCode]" />
  121. <RemoveFolder Id="RemoveMyShortcutsDir"
  122. On="uninstall" />
  123. <RegistryValue Root="HKCU"
  124. Key="Software\{{ company }}\{{ app_name }}\{{ version }}"
  125. Name="installed"
  126. Type="integer"
  127. Value="1"
  128. KeyPath="yes" />
  129. </Component>
  130. </DirectoryRef>
  131. <Feature Id="ProductFeature" Title="{{ app_name }}" Level="1" ConfigurableDirectory="APPLICATIONFOLDER">
  132. <ComponentRef Id="CMP_UltiMaker_Cura_exe" />
  133. <ComponentRef Id="CMP_CuraEngine_exe" />
  134. <ComponentGroupRef Id="NewFilesGroup" />
  135. <ComponentRef Id="CMP_Shortcuts" />
  136. </Feature>
  137. <Feature Id="UninstallOlderVersionFeature" Title="Uninstall previous versions" Level="{{ 1 if "Enterprise" in app_name else 0 }}" Description="..."/>
  138. </Product>
  139. </Wix>