UltiMaker-Cura.wxs.jinja 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  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 Before="InstallInitialize" />
  22. </InstallExecuteSequence>
  23. <Property Id="PREVIOUS_VERSIONS_INSTALLED" Secure="yes" Value="{{ 1 if "Enterprise" in app_name else 0 }}" />
  24. <Upgrade Id="{{ upgrade_code }}">
  25. <UpgradeVersion
  26. Minimum="4.13.2" Maximum="{{ version_major }}.{{ version_minor }}.{{ version_patch }}"
  27. Property="PREVIOUS_VERSIONS_INSTALLED"
  28. IncludeMinimum="no" IncludeMaximum="no"
  29. />
  30. </Upgrade>
  31. {% if "Enterprise" in app_name %}
  32. <Property Id="PREVIOUS_413_INSTALLED" Secure="yes" />
  33. <Upgrade Id="53C603BB-2B17-4206-A609-29C2E0D0B0AE">
  34. <UpgradeVersion
  35. Minimum="1.0.0" Maximum="4.13.2"
  36. Property="PREVIOUS_413_INSTALLED"
  37. IncludeMinimum="yes" IncludeMaximum="yes"
  38. />
  39. </Upgrade>
  40. {% endif %}
  41. <Condition Message= "OS must be Windows 8.1 64bit or higher.">
  42. <![CDATA[Installed OR VersionNT64 >= 600]]>
  43. </Condition>
  44. <MediaTemplate EmbedCab="yes" CompressionLevel="high" />
  45. <UI Id="MyWixUI_Mondo">
  46. <UIRef Id="WixUI_Mondo" />
  47. <DialogRef Id="CustomizeCuraDlg" />
  48. <Publish Dialog="SetupTypeDlg" Control="CustomButton" Event="NewDialog" Value="CustomizeCuraDlg">1</Publish>
  49. <Publish Dialog="CustomizeCuraDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg" Order="1">WixUI_InstallMode = "Change"</Publish>
  50. <Publish Dialog="CustomizeCuraDlg" Control="Back" Event="NewDialog" Value="SetupTypeDlg" Order="2">WixUI_InstallMode = "InstallCustom"</Publish>
  51. <Publish Dialog="CustomizeCuraDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
  52. <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="CustomizeCuraDlg" Order="1">WixUI_InstallMode = "InstallCustom"</Publish>
  53. <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="CustomizeCuraDlg" Order="3">WixUI_InstallMode = "Change"</Publish>
  54. <Publish Dialog="MaintenanceTypeDlg" Control="ChangeButton" Event="NewDialog" Value="CustomizeCuraDlg">1</Publish>
  55. </UI>
  56. <UIRef Id="WixUI_ErrorProgressText" />
  57. <WixVariable Id="WixUILicenseRtf" Value="{{ cura_license_file }}" />
  58. <WixVariable Id="WixUIDialogBmp" Value="{{ cura_banner_side }}" />
  59. <WixVariable Id="WixUIBannerBmp" Value="{{ cura_banner_top }}" />
  60. <Icon Id="ICO_Cura" SourceFile="{{ cura_icon }}" />
  61. <Property Id="ARPPRODUCTICON" Value="ICO_Cura" />
  62. <!--Directory structure-->
  63. <Directory Id="TARGETDIR" Name="SourceDir">
  64. <Directory Id="ProgramFiles64Folder">
  65. <Directory Id="APPLICATIONFOLDER" Name="{{ app_name }} {{ version }}" />
  66. <Directory Id="ProgramMenuFolder">
  67. <Directory Id="ShortCutDir" Name="{{ app_name }}" />
  68. </Directory>
  69. </Directory>
  70. </Directory>
  71. <Property Id="ApplicationFolderName" Value="{{ app_name }} {{ version }}" />
  72. <Property Id="WixAppFolder" Value="WixPerMachineFolder" />
  73. <Component Id="CMP_UltiMaker_Cura_exe" Directory="APPLICATIONFOLDER" Guid="*">
  74. <File Id="FILE_UltiMaker_Cura_exe" KeyPath="yes" Source="$(var.CuraDir)\{{ main_app }}" />
  75. <ProgId Id="Cura" Description="{{ app_name }}" Icon="ICO_Cura" Advertise="yes">
  76. <ProgId Id="3mf" Advertise="yes">
  77. <Extension Id="3mf" ContentType="application/3mf">
  78. <Verb Id="open_3mf" Command="Open" Argument='"%1"' />
  79. <MIME Advertise="yes" ContentType="application/3mf" Default="yes" />
  80. </Extension>
  81. </ProgId>
  82. <ProgId Id="stl" Advertise="yes">
  83. <Extension Id="stl" ContentType="application/stl">
  84. <Verb Id="open_stl" Command="Open" Argument='"%1"' />
  85. <MIME Advertise="yes" ContentType="application/stl" Default="yes" />
  86. </Extension>
  87. </ProgId>
  88. <ProgId Id="gcode" Advertise="yes">
  89. <Extension Id="gcode" ContentType="text/x-gcode">
  90. <Verb Id="open_gcode" Command="Open" Argument='"%1"' />
  91. <MIME Advertise="yes" ContentType="text/x-gcode" Default="yes" />
  92. </Extension>
  93. </ProgId>
  94. <ProgId Id="ufp" Advertise="yes">
  95. <Extension Id="ufp" ContentType="application/x-ufp">
  96. <Verb Id="open_ufp" Command="Open" Argument='"%1"' />
  97. <MIME Advertise="yes" ContentType="application/x-ufp" Default="yes" />
  98. </Extension>
  99. </ProgId>
  100. <ProgId Id="curapackage" Advertise="yes">
  101. <Extension Id='curapackage' ContentType='application/curapackage'>
  102. <Verb Id='open_curapackage' Command="Open" Argument='"%1"' />
  103. <MIME Advertise="yes" ContentType="application/curapackage" Default="yes" />
  104. </Extension>
  105. </ProgId>
  106. </ProgId>
  107. <fw:FirewallException Id="FirewallExceptLocalFrontend" Name="Cura (Frontend) Connection (LocalHost)" File="FILE_UltiMaker_Cura_exe" IgnoreFailure="yes">
  108. <fw:RemoteAddress>127.0.0.1</fw:RemoteAddress>
  109. </fw:FirewallException>
  110. </Component>
  111. <Component Id="CMP_CuraEngine_exe" Directory="APPLICATIONFOLDER" Guid="*">
  112. <File Id="FILE_CuraEngine_exe" KeyPath="yes" Source="$(var.CuraDir)\CuraEngine.exe" />
  113. <fw:FirewallException Id="FirewallExceptLocalEngine" Name="CuraEngine (Backend) Connection (LocalHost)" File="FILE_CuraEngine_exe" IgnoreFailure="yes">
  114. <fw:RemoteAddress>127.0.0.1</fw:RemoteAddress>
  115. </fw:FirewallException>
  116. </Component>
  117. <!--Shortcuts-->
  118. <DirectoryRef Id="ShortCutDir">
  119. <Component Id="CMP_Shortcuts" Guid="{{ shortcut_uuid }}">
  120. <Shortcut Id="SHRT_Cura"
  121. Name="{{ app_name }} {{ version }}"
  122. Description="{{ app_name }} {{ version }}"
  123. Target="[APPLICATIONFOLDER]\{{ main_app }}"
  124. Icon="ICO_Cura" />
  125. <Shortcut Id="SHRT_UninstallShortcut"
  126. Name="Uninstall {{ app_name }} {{ version }}"
  127. Description= "Uninstalls {{ app_name }} {{ version }}"
  128. Target="[System64Folder]msiexec.exe"
  129. Arguments="/x [ProductCode]" />
  130. <RemoveFolder Id="RemoveMyShortcutsDir"
  131. On="uninstall" />
  132. <RegistryValue Root="HKCU"
  133. Key="Software\{{ company }}\{{ app_name }}\{{ version }}"
  134. Name="installed"
  135. Type="integer"
  136. Value="1"
  137. KeyPath="yes" />
  138. </Component>
  139. </DirectoryRef>
  140. <Feature Id="ProductFeature" Title="{{ app_name }}" Level="1" ConfigurableDirectory="APPLICATIONFOLDER">
  141. <ComponentRef Id="CMP_UltiMaker_Cura_exe" />
  142. <ComponentRef Id="CMP_CuraEngine_exe" />
  143. <ComponentGroupRef Id="NewFilesGroup" />
  144. <ComponentRef Id="CMP_Shortcuts" />
  145. </Feature>
  146. </Product>
  147. </Wix>