Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 6 additions & 10 deletions packaging/NSIS/Ultimaker-Cura.nsi.jinja
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Copyright (c) 2025 UltiMaker
# Cura's build system is released under the terms of the AGPLv3 or higher.

ManifestDPIAware true

!define APP_NAME "{{ app_name }}"
!define COMP_NAME "{{ company }}"
!define VERSION "{{ version }}"
Expand Down Expand Up @@ -143,17 +145,8 @@ ${INSTALL_TYPE}{% for files in mapped_out_paths.values() %}{% for file in files
Delete "{{ file[1] }}"{% endfor %}{% endfor %}{% for rem_dir in rmdir_paths %}
RmDir "{{ rem_dir }}"{% endfor %}

# FIXME: dirty solution, but for some reason these directories aren't removed
RmDir "$INSTDIR\share\cura\resources\scripts"
RmDir "$INSTDIR\share\cura\resources"
RmDir "$INSTDIR\share\cura"
RmDir "$INSTDIR\share\uranium\resources\scripts"
RmDir "$INSTDIR\share\uranium\resources"
RmDir "$INSTDIR\share\uranium"
RmDir "$INSTDIR\share"

Delete "$INSTDIR\*"
Delete "$INSTDIR\uninstall.exe"

RmDir /r /REBOOTOK "$INSTDIR"

!ifdef REG_START_MENU
Expand All @@ -164,6 +157,8 @@ Delete "$SMPROGRAMS\${APP_NAME}.lnk"
Delete "$SMPROGRAMS\${APP_NAME}.lnk"
!endif

Delete "$DESKTOP\${APP_NAME}.lnk"

!insertmacro APP_UNASSOCIATE "stl" "Cura.model"
!insertmacro APP_UNASSOCIATE "3mf" "Cura.project"

Expand All @@ -175,5 +170,6 @@ DeleteRegKey HKCR "slicer"

DeleteRegKey ${REG_ROOT} "${REG_APP_PATH}"
DeleteRegKey ${REG_ROOT} "${UNINSTALL_PATH}"
SetAutoClose true
SectionEnd

2 changes: 1 addition & 1 deletion packaging/NSIS/create_windows_installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def generate_nsi(source_path: str, dist_path: str, filename: str, version: str):


nsis_content = template.render(
app_name = f"UltiMaker Cura {version}",
app_name = f"UltiMaker Cura",
main_app = "UltiMaker-Cura.exe",
version = version,
version_major = str(parsed_version.major),
Expand Down
19 changes: 6 additions & 13 deletions packaging/msi/UltiMaker-Cura.wxs.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@

<MediaTemplate EmbedCab="yes" CompressionLevel="high" />

<UIRef Id="WixUI_Mondo" />
<UIRef Id="WixUI_InstallDir" />

<WixVariable Id="WixUILicenseRtf" Value="{{ cura_license_file }}" />
<WixVariable Id="WixUIDialogBmp" Value="{{ cura_banner_side }}" />
Expand All @@ -77,7 +77,7 @@
<!--Directory structure-->
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFiles64Folder">
<Directory Id="APPLICATIONFOLDER" Name="{{ app_name }} {{ version }}" />
<Directory Id="APPLICATIONFOLDER" Name="{{ app_name }}" />
<Directory Id="ProgramMenuFolder">
<Directory Id="ShortCutDir" Name="{{ app_name }}" />
</Directory>
Expand Down Expand Up @@ -137,19 +137,12 @@

<!--Shortcuts-->
<DirectoryRef Id="ShortCutDir">
<Component Id="CMP_Shortcuts" Guid="*">
<Component Id="CMP_Shortcut" Guid="*">
<Shortcut Id="SHRT_Cura"
Name="{{ app_name }} {{ version }}"
Description="{{ app_name }} {{ version }}"
Name="{{ app_name }}"
Description="{{ app_name }}"
Target="[APPLICATIONFOLDER]\{{ main_app }}"
Icon="ICO_Cura" />
<Shortcut Id="SHRT_UninstallShortcut"
Name="Uninstall {{ app_name }} {{ version }}"
Description= "Uninstalls {{ app_name }} {{ version }}"
Target="[System64Folder]msiexec.exe"
Arguments="/x [ProductCode]" />
<RemoveFolder Id="RemoveMyShortcutsDir"
On="uninstall" />
<RegistryValue Root="HKCU"
Key="Software\{{ company }}\{{ app_name }}\{{ version }}"
Name="installed"
Expand Down Expand Up @@ -182,7 +175,7 @@
<ComponentRef Id="CMP_UltiMaker_Cura_exe" />
<ComponentRef Id="CMP_CuraEngine_exe" />
<ComponentGroupRef Id="NewFilesGroup" />
<ComponentRef Id="CMP_Shortcuts" />
<ComponentRef Id="CMP_Shortcut" />
<ComponentRef Id="CuraRegistration"/>
<ComponentRef Id="SlicerRegistration"/>
</Feature>
Expand Down