mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-06 13:34:01 -06:00
Fix upgrade from 2.5 to 2.6 to 2.7
CURA-3975 - Set Preferences setting_version in CuraApplication so Preferences can get upgraded correctly - Fix upgrade script for 2.5 to 2.6 - Fix upgrade script for 2.6 to 2.7 which relies on the upgrade of 2.5 to 2.6
This commit is contained in:
parent
3983da30aa
commit
5bf080950f
4 changed files with 91 additions and 6 deletions
|
@ -14,6 +14,21 @@ def getMetaData():
|
|||
# From To Upgrade function
|
||||
("machine_stack", 3000000): ("machine_stack", 3000002, upgrade.upgradeStack),
|
||||
("extruder_train", 3000000): ("extruder_train", 3000002, upgrade.upgradeStack),
|
||||
|
||||
# In 2.6.x, Preferences are saved with "version = 4" and no setting_version.
|
||||
# This means those Preferences files will still be treated as "4.0" as defined in VersionUpgrade25to26,
|
||||
# so the 25to26 upgrade routine will be called again.
|
||||
#
|
||||
# To fix this, we first fix the upgrade routine for 25to26 so it actually upgrades to "4.1", and then
|
||||
# here we can upgrade from "4.1" to "4.2" safely.
|
||||
#
|
||||
("preferences", 4000001): ("preferences", 4000002, upgrade.upgradePreferences),
|
||||
# NOTE: All the instance containers share the same general/version, so we have to update all of them
|
||||
# if any is updated.
|
||||
("quality_changes", 2000001): ("quality_changes", 2000002, upgrade.upgradeOtherContainer),
|
||||
("user", 2000001): ("user", 2000002, upgrade.upgradeOtherContainer),
|
||||
("quality", 2000001): ("quality", 2000002, upgrade.upgradeOtherContainer),
|
||||
("definition_changes", 2000001): ("definition_changes", 2000002, upgrade.upgradeOtherContainer),
|
||||
},
|
||||
"sources": {
|
||||
"machine_stack": {
|
||||
|
@ -24,6 +39,22 @@ def getMetaData():
|
|||
"get_version": upgrade.getCfgVersion,
|
||||
"location": {"./extruders"}
|
||||
},
|
||||
"preferences": {
|
||||
"get_version": upgrade.getCfgVersion,
|
||||
"location": {"."}
|
||||
},
|
||||
"quality_changes": {
|
||||
"get_version": upgrade.getCfgVersion,
|
||||
"location": {"./quality"}
|
||||
},
|
||||
"user": {
|
||||
"get_version": upgrade.getCfgVersion,
|
||||
"location": {"./user"}
|
||||
},
|
||||
"definition_changes": {
|
||||
"get_version": upgrade.getCfgVersion,
|
||||
"location": {"./machine_instances"}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue