UltiMaker-Cura.wxs.jinja 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  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. <Property Id="ASSOCIATE_URL_PROTOCOLS">
  34. <RegistrySearch Id="CheckCuraProtocolHandler"
  35. Type="raw"
  36. Root="HKCR"
  37. Key="cura"
  38. Name="URL Protocol"
  39. />
  40. <RegistrySearch Id="CheckSlicerProtocolHandler"
  41. Type="raw"
  42. Root="HKCR"
  43. Key="slicer"
  44. Name="URL Protocol"
  45. />
  46. </Property>
  47. {% if "Enterprise" in app_name %}
  48. <Property Id="PREVIOUS_413_INSTALLED" Secure="yes" />
  49. <Upgrade Id="53C603BB-2B17-4206-A609-29C2E0D0B0AE">
  50. <UpgradeVersion
  51. Minimum="1.0.0" Maximum="4.13.2"
  52. Property="PREVIOUS_VERSIONS_INSTALLED"
  53. IncludeMinimum="yes" IncludeMaximum="yes"
  54. />
  55. </Upgrade>
  56. {% endif %}
  57. <Condition Message= "OS must be Windows 8.1 64bit or higher.">
  58. <![CDATA[Installed OR VersionNT64 >= 600]]>
  59. </Condition>
  60. <MediaTemplate EmbedCab="yes" CompressionLevel="high" />
  61. <UIRef Id="WixUI_Mondo" />
  62. <WixVariable Id="WixUILicenseRtf" Value="{{ cura_license_file }}" />
  63. <WixVariable Id="WixUIDialogBmp" Value="{{ cura_banner_side }}" />
  64. <WixVariable Id="WixUIBannerBmp" Value="{{ cura_banner_top }}" />
  65. <Icon Id="ICO_Cura" SourceFile="{{ cura_icon }}" />
  66. <Property Id="ARPPRODUCTICON" Value="ICO_Cura" />
  67. <!--Directory structure-->
  68. <Directory Id="TARGETDIR" Name="SourceDir">
  69. <Directory Id="ProgramFiles64Folder">
  70. <Directory Id="APPLICATIONFOLDER" Name="{{ app_name }} {{ version }}" />
  71. <Directory Id="ProgramMenuFolder">
  72. <Directory Id="ShortCutDir" Name="{{ app_name }}" />
  73. </Directory>
  74. </Directory>
  75. </Directory>
  76. <Property Id="ApplicationFolderName" Value="{{ app_name }} {{ version }}" />
  77. <Property Id="WixAppFolder" Value="WixPerMachineFolder" />
  78. <Component Id="CMP_UltiMaker_Cura_exe" Directory="APPLICATIONFOLDER" Guid="*">
  79. <File Id="FILE_UltiMaker_Cura_exe" KeyPath="yes" Source="$(var.CuraDir)\{{ main_app }}" />
  80. <ProgId Id="Cura" Description="{{ app_name }}" Icon="ICO_Cura" Advertise="yes">
  81. <ProgId Id="3mf" Advertise="yes">
  82. <Extension Id="3mf" ContentType="application/3mf">
  83. <Verb Id="open_3mf" Command="Open" Argument='"%1"' />
  84. <MIME Advertise="yes" ContentType="application/3mf" Default="yes" />
  85. </Extension>
  86. </ProgId>
  87. <ProgId Id="stl" Advertise="yes">
  88. <Extension Id="stl" ContentType="application/stl">
  89. <Verb Id="open_stl" Command="Open" Argument='"%1"' />
  90. <MIME Advertise="yes" ContentType="application/stl" Default="yes" />
  91. </Extension>
  92. </ProgId>
  93. <ProgId Id="gcode" Advertise="yes">
  94. <Extension Id="gcode" ContentType="text/x-gcode">
  95. <Verb Id="open_gcode" Command="Open" Argument='"%1"' />
  96. <MIME Advertise="yes" ContentType="text/x-gcode" Default="yes" />
  97. </Extension>
  98. </ProgId>
  99. <ProgId Id="ufp" Advertise="yes">
  100. <Extension Id="ufp" ContentType="application/x-ufp">
  101. <Verb Id="open_ufp" Command="Open" Argument='"%1"' />
  102. <MIME Advertise="yes" ContentType="application/x-ufp" Default="yes" />
  103. </Extension>
  104. </ProgId>
  105. <ProgId Id="curapackage" Advertise="yes">
  106. <Extension Id='curapackage' ContentType='application/curapackage'>
  107. <Verb Id='open_curapackage' Command="Open" Argument='"%1"' />
  108. <MIME Advertise="yes" ContentType="application/curapackage" Default="yes" />
  109. </Extension>
  110. </ProgId>
  111. </ProgId>
  112. <fw:FirewallException Id="FirewallExceptLocalFrontend" Name="Cura (Frontend) Connection (LocalHost)" File="FILE_UltiMaker_Cura_exe" IgnoreFailure="yes">
  113. <fw:RemoteAddress>127.0.0.1</fw:RemoteAddress>
  114. </fw:FirewallException>
  115. </Component>
  116. <Component Id="CMP_CuraEngine_exe" Directory="APPLICATIONFOLDER" Guid="*">
  117. <File Id="FILE_CuraEngine_exe" KeyPath="yes" Source="$(var.CuraDir)\CuraEngine.exe" />
  118. <fw:FirewallException Id="FirewallExceptLocalEngine" Name="CuraEngine (Backend) Connection (LocalHost)" File="FILE_CuraEngine_exe" IgnoreFailure="yes">
  119. <fw:RemoteAddress>127.0.0.1</fw:RemoteAddress>
  120. </fw:FirewallException>
  121. </Component>
  122. <!--Shortcuts-->
  123. <DirectoryRef Id="ShortCutDir">
  124. <Component Id="CMP_Shortcuts" Guid="*">
  125. <Shortcut Id="SHRT_Cura"
  126. Name="{{ app_name }} {{ version }}"
  127. Description="{{ app_name }} {{ version }}"
  128. Target="[APPLICATIONFOLDER]\{{ main_app }}"
  129. Icon="ICO_Cura" />
  130. <Shortcut Id="SHRT_UninstallShortcut"
  131. Name="Uninstall {{ app_name }} {{ version }}"
  132. Description= "Uninstalls {{ app_name }} {{ version }}"
  133. Target="[System64Folder]msiexec.exe"
  134. Arguments="/x [ProductCode]" />
  135. <RemoveFolder Id="RemoveMyShortcutsDir"
  136. On="uninstall" />
  137. <RegistryValue Root="HKCU"
  138. Key="Software\{{ company }}\{{ app_name }}\{{ version }}"
  139. Name="installed"
  140. Type="integer"
  141. Value="1"
  142. KeyPath="yes" />
  143. </Component>
  144. </DirectoryRef>
  145. <!--Url Scheme-->
  146. <Component Id="CuraRegistration" Guid="*" Directory="APPLICATIONFOLDER">
  147. <RegistryKey Root="HKCR" Key="cura">
  148. <RegistryValue Type="string" Value="URL:Cura Protocol"/>
  149. <RegistryValue Type="string" Name="URL Protocol" Value=""/>
  150. <RegistryValue Type="string" Key="DefaultIcon" Value="[APPLICATIONFOLDER]\{{ main_app }},1"/>
  151. <RegistryValue Type="string" Key="shell\open\command" Value="&quot;[APPLICATIONFOLDER]\{{ main_app }}&quot; &quot;%1&quot;"/>
  152. </RegistryKey>
  153. </Component>
  154. <Component Id="SlicerRegistration" Guid="*" Directory="APPLICATIONFOLDER">
  155. <RegistryKey Root="HKCR" Key="slicer">
  156. <RegistryValue Type="string" Value="URL:Slicer Protocol"/>
  157. <RegistryValue Type="string" Name="URL Protocol" Value=""/>
  158. <RegistryValue Type="string" Key="DefaultIcon" Value="[APPLICATIONFOLDER]\{{ main_app }},1"/>
  159. <RegistryValue Type="string" Key="shell\open\command" Value="&quot;[APPLICATIONFOLDER]\{{ main_app }}&quot; &quot;%1&quot;"/>
  160. </RegistryKey>
  161. </Component>
  162. <Feature Id="ProductFeature" Title="{{ app_name }}" Level="1" ConfigurableDirectory="APPLICATIONFOLDER">
  163. <ComponentRef Id="CMP_UltiMaker_Cura_exe" />
  164. <ComponentRef Id="CMP_CuraEngine_exe" />
  165. <ComponentGroupRef Id="NewFilesGroup" />
  166. <ComponentRef Id="CMP_Shortcuts" />
  167. <ComponentRef Id="CuraRegistration"/>
  168. <ComponentRef Id="SlicerRegistration"/>
  169. </Feature>
  170. <Feature Id="UninstallOlderVersionFeature" Title="Uninstall previous versions" Level="{{ 1 if "Enterprise" in app_name else 0 }}" Description="..."/>
  171. </Product>
  172. </Wix>