Browse Source

Merge branch 'main' into CURA-6867_pkg_for_macos

Joey de l'Arago 2 years ago
parent
commit
3a24ab1bee

+ 2 - 1
.github/workflows/conan-package-create.yml

@@ -75,7 +75,8 @@ jobs:
                     cache-dependency-path: .github/workflows/requirements-conan-package.txt
 
             -   name: Install Python requirements for runner
-                run: pip install -r .github/workflows/requirements-conan-package.txt
+                run: pip install -r https://raw.githubusercontent.com/Ultimaker/Cura/main/.github/workflows/requirements-conan-package.txt
+                #  Note the runner requirements are always installed from the main branch in the Ultimaker/Cura repo
 
             -   name: Use Conan download cache (Bash)
                 if: ${{ runner.os != 'Windows' }}

+ 2 - 1
.github/workflows/conan-recipe-export.yml

@@ -62,8 +62,9 @@ jobs:
 
             -   name: Install Python requirements and Create default Conan profile
                 run: |
-                    pip install -r .github/workflows/requirements-conan-package.txt
+                    pip install -r https://raw.githubusercontent.com/Ultimaker/Cura/main/.github/workflows/requirements-conan-package.txt
                     conan profile new default --detect
+                #  Note the runner requirements are always installed from the main branch in the Ultimaker/Cura repo
 
             -   name: Cache Conan local repository packages
                 uses: actions/cache@v3

+ 1 - 1
.github/workflows/requirements-conan-package.txt

@@ -1,2 +1,2 @@
-conan!=1.51.0,!=1.51.1,!=1.51.2,!=1.51.3,!=1.52.0
+conan!=1.51.0,!=1.51.1,!=1.51.2,!=1.51.3,!=1.52.0,!=1.57.0
 sip

+ 3 - 1
.printer-linter

@@ -12,4 +12,6 @@ format:
     format-definition-single-value-single-line: true # Format dicts and lists with a single item on one line "dict": { "value": 10 }
     format-profile-space-around-delimiters: true
     format-profile-sort-keys: true
-diagnostic-mesh-file-size: 1200000
+diagnostic-mesh-file-size: 1200000
+diagnostic-definition-redundant-override-ignore:
+  - machine_.*

+ 1 - 1
cura/ApplicationMetadata.py

@@ -64,7 +64,7 @@ try:
     if CuraAppDisplayName == "":
         CuraAppDisplayName = DEFAULT_CURA_DISPLAY_NAME
     if IsEnterpriseVersion:
-        CuraAppDisplayName = CuraAppDisplayName + " Enterprise"
+        CuraAppDisplayName = CuraAppDisplayName
 
 except ImportError:
     CuraAppDisplayName = DEFAULT_CURA_DISPLAY_NAME

+ 5 - 5
packaging/msi/CustomizeCuraDlg.wxs

@@ -6,7 +6,7 @@
     <Fragment>
         <UI>
             <Dialog Id="CustomizeCuraDlg" Width="370" Height="270" Title="!(loc.CustomizeDlg_Title)" TrackDiskSpace="yes">
-                <Control Id="Tree" Type="SelectionTree" X="25" Y="85" Width="175" Height="115" Property="_BrowseProperty" Sunken="yes" TabSkip="no" Text="!(loc.CustomizeDlgTree)" />
+                <Control Id="Tree" Type="SelectionTree" X="25" Y="85" Width="175" Height="95" Property="_BrowseProperty" Sunken="yes" TabSkip="no" Text="!(loc.CustomizeDlgTree)" />
                 <Control Id="Browse" Type="PushButton" X="294" Y="210" Width="66" Height="17" Text="!(loc.CustomizeDlgBrowse)">
                     <Publish Event="SelectionBrowse" Value="BrowseDlg">1</Publish>
                     <Condition Action="hide">Installed</Condition>
@@ -16,7 +16,7 @@
                     <Publish Event="Reset" Value="0">1</Publish>
                     <Subscribe Event="SelectionNoItems" Attribute="Enabled" />
                 </Control>
-                <Control Id="DiskCost" Type="PushButton" X="91" Y="243" Width="100" Height="17" Text="!(loc.CustomizeDlgDiskCost)">
+                <Control Id="DiskCost" Type="PushButton" X="91" Y="243" Width="80" Height="17" Text="!(loc.CustomizeDlgDiskCost)">
                     <Publish Event="SpawnDialog" Value="DiskCostDlg">1</Publish>
                     <Subscribe Event="SelectionNoItems" Attribute="Enabled" />
                 </Control>
@@ -33,14 +33,14 @@
                 <Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" />
                 <Control Id="Description" Type="Text" X="25" Y="23" Width="280" Height="15" Transparent="yes" NoPrefix="yes" Text="!(loc.CustomizeDlgDescription)" />
                 <Control Id="Title" Type="Text" X="15" Y="6" Width="210" Height="15" Transparent="yes" NoPrefix="yes" Text="!(loc.CustomizeDlgTitle)" />
-                <Control Id="Box" Type="GroupBox" X="210" Y="81" Width="150" Height="118" />
-                <Control Id="ItemDescription" Type="Text" X="215" Y="90" Width="131" Height="50" Text="!(loc.CustomizeDlgItemDescription)">
+                <Control Id="Box" Type="GroupBox" X="210" Y="81" Width="150" Height="88" />
+                <Control Id="ItemDescription" Type="Text" X="215" Y="90" Width="131" Height="30" Text="!(loc.CustomizeDlgItemDescription)">
                     <Subscribe Event="SelectionDescription" Attribute="Text" />
                 </Control>
                 <Control Id="ItemSize" Type="Text" X="215" Y="140" Width="131" Height="50" Text="!(loc.CustomizeDlgItemSize)">
                     <Subscribe Event="SelectionSize" Attribute="Text" />
                 </Control>
-                <Control Id="UninstallPreviousCheckBox" Type="CheckBox" X="10" Y="210" Width="290" Height="17" Property="PREVIOUS_VERSIONS_INSTALLED" CheckBoxValue="0" Text="Uninstall previous Cura versions." />
+                <Control Id="UninstallPreviousCheckBox" Type="CheckBox" X="25" Y="190" Width="290" Height="17" Property="PREVIOUS_VERSIONS_INSTALLED" CheckBoxValue="0" Text="Uninstall previous Cura versions." />
                 <Control Id="Location" Type="Text" X="90" Y="210" Width="200" Height="20" Text="!(loc.CustomizeDlgLocation)">
                     <Subscribe Event="SelectionPath" Attribute="Text" />
                     <Subscribe Event="SelectionPathOn" Attribute="Visible" />

+ 55 - 45
packaging/msi/UltiMaker-Cura.wxs.jinja

@@ -8,19 +8,21 @@
         Manufacturer="{{ company }}"
         UpgradeCode="{{ upgrade_code }}"
     >
-        <Package InstallerVersion="500"
+        <Package
+            Id="*"
+            InstallerVersion="500"
             Compressed="yes"
             InstallScope="perMachine"
             Manufacturer="{{ company }}"
             Description="UltiMaker Cura the most popular 3D printing slicer"
             Keywords="UltiMaker,Cura,3D,printing,slicer"
-            Comments="Copyright (c) {{ year }} UltiMaker B.V." />
+            Comments="Copyright (c) {{ year }} {{ company }}" />
 
         <InstallExecuteSequence>
             <RemoveExistingProducts Before="InstallInitialize" />
         </InstallExecuteSequence>
 
-        <Property Id="PREVIOUS_VERSIONS_INSTALLED" Secure="yes" Value="{{ 1 if "Enterpise" in app_name else 0 }}" />
+        <Property Id="PREVIOUS_VERSIONS_INSTALLED" Secure="yes" Value="{{ 1 if "Enterprise" in app_name else 0 }}" />
         <Upgrade Id="{{ upgrade_code }}">
             <UpgradeVersion
                 Minimum="4.13.2" Maximum="{{ version_major }}.{{ version_minor }}.{{ version_patch }}"
@@ -28,10 +30,8 @@
                 IncludeMinimum="no" IncludeMaximum="no"
             />
         </Upgrade>
-        <!--TODO: handle copy of configuration of previous version-->
-        <!--TODO: handle removal of old configuration once previous version is uninstalled-->
 
-        {% if "Enterpise" in app_name %}
+        {% if "Enterprise" in app_name %}
         <Property Id="PREVIOUS_413_INSTALLED" Secure="yes" />
         <Upgrade Id="53C603BB-2B17-4206-A609-29C2E0D0B0AE">
             <UpgradeVersion
@@ -86,43 +86,53 @@
         <Property Id="ApplicationFolderName" Value="{{ app_name }} {{ version }}" />
         <Property Id="WixAppFolder" Value="WixPerMachineFolder" />
 
-		<Component Id="CMP_UltiMaker_Cura_exe" Directory="APPLICATIONFOLDER" Guid="*">
-			<File Id="FILE_UltiMaker_Cura_exe" KeyPath="yes" Source="$(var.CuraDir)\{{ main_app }}"/>
-			<!--Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppModel\PackageRepository\Extensions\windows.fileTypeAssociation\.3mf-->
-
-			<RegistryValue Root="HKLM" Key="SOFTWARE\{{ app_name }}\Capabilities\FileAssociations" Name=".3mf" Value="PRG_UltiMaker_Cura.3MF" Type="string" />
-			<RegistryValue Root="HKLM" Key="SOFTWARE\{{ app_name }}\Capabilities\FileAssociations" Name=".stl" Value="PRG_UltiMaker_Cura.STL" Type="string" />
-			<RegistryValue Root="HKLM" Key="SOFTWARE\{{ app_name }}\Capabilities\MIMEAssociations" Name="application/3mf" Value="PRG_UltiMaker_Cura.3MF" Type="string" />
-			<RegistryValue Root="HKLM" Key="SOFTWARE\{{ app_name }}\Capabilities\MIMEAssociations" Name="application/stl" Value="PRG_UltiMaker_Cura.STL" Type="string" />
-			<RegistryValue Root="HKLM" Key="SOFTWARE\{{ app_name }}\Capabilities\shell\Open\command" Value='"[APPLICATIONFOLDER]\{{ main_app }}" "%1"' Type="string" />
-			<RegistryValue Root="HKLM" Key="SOFTWARE\RegisteredApplications" Name="{{ app_name }}" Value="SOFTWARE\MyApp\Capabilities" Type="string" />
-
-			<RegistryValue Root="HKLM" Key="SOFTWARE\Classes\Applications\{{ main_app }}\SupportedTypes" Name=".3mf" Value="" Type="string" />
-			<RegistryValue Root="HKLM" Key="SOFTWARE\Classes\Applications\{{ main_app }}\SupportedTypes" Name=".stl" Value="" Type="string" />
-			<RegistryValue Root="HKLM" Key="SOFTWARE\Classes\Applications\{{ main_app }}\shell\open" Name="{{ app_name }}" Value="{{ main_app }}" Type="string" />
-
-			<ProgId Id="PRG_UltiMaker_Cura.STL" Description="{{ app_name }}" Icon="FILE_UltiMaker_Cura_exe">
-				<Extension Id="STL">
-					<Verb Id='edit' TargetFile="FILE_UltiMaker_Cura_exe" Argument='"%1"' />
-					<MIME ContentType="application/stl" Default="yes" />
-				</Extension>
-			</ProgId>
-			<ProgId Id="PRG_UltiMaker_Cura.3MF" Description="{{ app_name }}" Icon="FILE_UltiMaker_Cura_exe">
-				<Extension Id="3MF">
-					<Verb Id='edit' TargetFile="FILE_UltiMaker_Cura_exe" Argument='"%1"' />
-					<MIME ContentType="application/3mf" Default="yes" />
-				</Extension>
-			</ProgId>
-
-			<!-- Current Cura versions are not supported on XP or Server 2003. Even so, add 'ignorefailure=yes'. After all, worst that can happen is the user gets asked, like before. -->
-			<fw:FirewallException Id="FirewallExceptLocalFrontend" Name="Cura (Frontend) Connection (LocalHost)" File="FILE_CuraEngine_exe" Port="127.0.0.1" IgnoreFailure="yes" Scope="localSubnet" />
-		</Component>
-		<Component Id="CMP_CuraEngine_exe" Directory="APPLICATIONFOLDER" Guid="*">
-			<File Id="FILE_CuraEngine_exe" KeyPath="yes" Source="$(var.CuraDir)\CuraEngine.exe" />
-
-			<!-- Current Cura versions are not supported on XP or Server 2003. Even so, add 'ignorefailure=yes'. After all, worst that can happen is the user gets asked, like before. -->
-			<fw:FirewallException Id="FirewallExceptLocalEngine" Name="CuraEngine (Backend) Connection (LocalHost)" File="FILE_CuraEngine_exe" Port="127.0.0.1" IgnoreFailure="yes" Scope="localSubnet" />
-		</Component>
+        <Component Id="CMP_UltiMaker_Cura_exe" Directory="APPLICATIONFOLDER" Guid="*">
+            <File Id="FILE_UltiMaker_Cura_exe" KeyPath="yes" Source="$(var.CuraDir)\{{ main_app }}" />
+
+            <ProgId Id="Cura" Description="{{ app_name }}" Icon="ICO_Cura" Advertise="yes">
+                <ProgId Id="3mf" Advertise="yes">
+                    <Extension Id="3mf" ContentType="application/3mf">
+                        <Verb Id="open_3mf" Command="Open" Argument='"%1"' />
+                        <MIME Advertise="yes" ContentType="application/3mf" Default="yes" />
+                    </Extension>
+                </ProgId>
+                <ProgId Id="stl" Advertise="yes">
+                    <Extension Id="stl" ContentType="application/stl">
+                        <Verb Id="open_stl" Command="Open" Argument='"%1"' />
+                        <MIME Advertise="yes" ContentType="application/stl" Default="yes" />
+                    </Extension>
+                </ProgId>
+                <ProgId Id="gcode" Advertise="yes">
+                    <Extension Id="gcode" ContentType="text/x-gcode">
+                        <Verb Id="open_gcode" Command="Open" Argument='"%1"' />
+                        <MIME Advertise="yes" ContentType="text/x-gcode" Default="yes" />
+                    </Extension>
+                </ProgId>
+                <ProgId Id="ufp" Advertise="yes">
+                    <Extension Id="ufp" ContentType="application/x-ufp">
+                        <Verb Id="open_ufp" Command="Open" Argument='"%1"' />
+                        <MIME Advertise="yes" ContentType="application/x-ufp" Default="yes" />
+                    </Extension>
+                </ProgId>
+                <ProgId Id="curapackage" Advertise="yes">
+                    <Extension Id='curapackage' ContentType='application/curapackage'>
+                        <Verb Id='open_curapackage' Command="Open" Argument='"%1"' />
+                        <MIME Advertise="yes" ContentType="application/curapackage" Default="yes" />
+                    </Extension>
+                </ProgId>
+            </ProgId>
+
+            <fw:FirewallException Id="FirewallExceptLocalFrontend" Name="Cura (Frontend) Connection (LocalHost)" File="FILE_UltiMaker_Cura_exe" IgnoreFailure="yes">
+                <fw:RemoteAddress>127.0.0.1</fw:RemoteAddress>
+            </fw:FirewallException>
+        </Component>
+        <Component Id="CMP_CuraEngine_exe" Directory="APPLICATIONFOLDER" Guid="*">
+            <File Id="FILE_CuraEngine_exe" KeyPath="yes" Source="$(var.CuraDir)\CuraEngine.exe" />
+
+            <fw:FirewallException Id="FirewallExceptLocalEngine" Name="CuraEngine (Backend) Connection (LocalHost)" File="FILE_CuraEngine_exe" IgnoreFailure="yes">
+                <fw:RemoteAddress>127.0.0.1</fw:RemoteAddress>
+            </fw:FirewallException>
+        </Component>
 
         <!--Shortcuts-->
         <DirectoryRef Id="ShortCutDir">
@@ -140,7 +150,7 @@
                 <RemoveFolder Id="RemoveMyShortcutsDir"
                               On="uninstall" />
                 <RegistryValue Root="HKCU"
-                               Key="Software\{{ company }}\{{ app_name }}"
+                               Key="Software\{{ company }}\{{ app_name }}\{{ version }}"
                                Name="installed"
                                Type="integer"
                                Value="1"
@@ -148,7 +158,7 @@
             </Component>
         </DirectoryRef>
 
-        <Feature Id="ProductFeature" Title="{{ app_name }}" Level="1">
+        <Feature Id="ProductFeature" Title="{{ app_name }}" Level="1" ConfigurableDirectory="APPLICATIONFOLDER">
             <ComponentRef Id="CMP_UltiMaker_Cura_exe" />
             <ComponentRef Id="CMP_CuraEngine_exe" />
             <ComponentGroupRef Id="NewFilesGroup" />

+ 22 - 5
packaging/msi/create_windows_msi.py

@@ -82,20 +82,37 @@ def build(dist_path: Path, filename: Path):
     manageoldcuradlg_loc = work_loc.joinpath("CustomizeCuraDlg.wxs")
     build_loc = work_loc.joinpath("build_msi")
 
-    heat_command = ["heat", "dir", f"{dist_loc.as_posix()}\\", "-dr", "APPLICATIONFOLDER", "-cg", "NewFilesGroup", "-sw5150",
-                    "-gg", "-g1", "-sf", "-srd", "-var", "var.CuraDir", "-t", f"{exclude_components_loc.as_posix()}",
+    heat_command = ["heat",
+                    "dir", f"{dist_loc.as_posix()}\\",
+                    "-dr", "APPLICATIONFOLDER",
+                    "-cg", "NewFilesGroup",
+                    "-sw5150",  # Don't pollute logs with warnings from auto generated content
+                    "-gg",
+                    "-g1",
+                    "-sf",
+                    "-srd",
+                    "-var", "var.CuraDir",
+                    "-t", f"{exclude_components_loc.as_posix()}",
                     "-out", f"{heat_loc.as_posix()}"]
     subprocess.call(heat_command)
 
-    build_command = ["candle", "-arch", "x64", f"-dCuraDir={dist_loc}\\",
+    build_command = ["candle",
+                     "-arch", "x64",
+                     f"-dCuraDir={dist_loc}\\",
                      "-ext", "WixFirewallExtension",
                      "-out", f"{build_loc.as_posix()}\\",
-                     f"{wxs_loc.as_posix()}", f"{heat_loc.as_posix()}", f"{manageoldcuradlg_loc.as_posix()}"]
+                     f"{wxs_loc.as_posix()}",
+                     f"{heat_loc.as_posix()}",
+                     f"{manageoldcuradlg_loc.as_posix()}"]
     subprocess.call(build_command)
 
-    link_command = ["light", f"{build_loc.joinpath(wxs_loc.name).with_suffix('.wixobj')}",
+    link_command = ["light",
+                    f"{build_loc.joinpath(wxs_loc.name).with_suffix('.wixobj')}",
                     f"{build_loc.joinpath(heat_loc.name).with_suffix('.wixobj')}",
                     f"{build_loc.joinpath(manageoldcuradlg_loc.name).with_suffix('.wixobj')}",
+                    "-sw1076",  # Don't pollute logs with warnings from auto generated content
+                    "-dcl:high",  # Use high compression ratio
+                    "-sval",  # Disable ICE validation otherwise the CI complains
                     "-ext", "WixUIExtension",
                     "-ext", "WixFirewallExtension",
                     "-out", f"{work_loc.joinpath(filename.name)}"]

+ 0 - 2
plugins/Marketplace/resources/qml/PackageCardHeader.qml

@@ -45,8 +45,6 @@ Item
             visible: parent.packageHasIcon
             anchors.fill: parent
             source: packageData.iconUrl
-            sourceSize.height: height
-            sourceSize.width: width
         }
 
         UM.ColorImage

+ 0 - 71
plugins/UM3NetworkPrinting/resources/qml/MonitorBuildplateConfiguration.qml

@@ -1,71 +0,0 @@
-// Copyright (c) 2019 Ultimaker B.V.
-// Cura is released under the terms of the LGPLv3 or higher.
-
-import QtQuick 2.2
-import QtQuick.Controls 2.0
-import UM 1.5 as UM
-
-/**
- * This component comprises a buildplate icon and the buildplate name. It is
- * used by the MonitorPrinterConfiguration component along with two instances
- * of MonitorExtruderConfiguration.
- *
- * NOTE: For most labels, a fixed height with vertical alignment is used to make
- * layouts more deterministic (like the fixed-size textboxes used in original
- * mock-ups). This is also a stand-in for CSS's 'line-height' property. Denoted
- * with '// FIXED-LINE-HEIGHT:'.
- */
-Item
-{
-    // The buildplate name
-    property var buildplate: null
-
-    // Height is one 18px label/icon
-    height: 18 * screenScaleFactor // TODO: Theme!
-    width: childrenRect.width
-
-    Row
-    {
-        height: parent.height
-        spacing: UM.Theme.getSize("slider_handle").width // TODO: Theme! (Should be same as extruder spacing)
-
-        // This wrapper ensures that the buildplate icon is located centered
-        // below an extruder icon.
-        Item
-        {
-            height: parent.height
-            width: 32 * screenScaleFactor // Ensure the icon is centered under the extruder icon (same width)
-
-            Rectangle
-            {
-                anchors.centerIn: parent
-                height: parent.height
-                width: height
-                color: buildplateIcon.visible > 0 ? "transparent" : UM.Theme.getColor("monitor_skeleton_loading")
-                radius: Math.floor(height / 2)
-            }
-
-            UM.ColorImage
-            {
-                id: buildplateIcon
-                anchors.centerIn: parent
-                color: UM.Theme.getColor("monitor_icon_primary")
-                height: UM.Theme.getSize("medium_button_icon").width
-                source: UM.Theme.getIcon("Buildplate")
-                width: height
-                visible: buildplate
-            }
-        }
-
-        UM.Label
-        {
-            id: buildplateLabel
-            elide: Text.ElideRight
-            text: buildplate ? buildplate : ""
-            visible: text !== ""
-
-            // FIXED-LINE-HEIGHT:
-            height: 18 * screenScaleFactor // TODO: Theme!
-        }
-    }
-}

Some files were not shown because too many files changed in this diff