__init__.py 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. # Copyright (c) 2018 Ultimaker B.V.
  2. # Cura is released under the terms of the LGPLv3 or higher.
  3. from . import VersionUpgrade34to35
  4. upgrade = VersionUpgrade34to35.VersionUpgrade34to35()
  5. def getMetaData():
  6. return {
  7. "version_upgrade": {
  8. # From To Upgrade function
  9. ("preferences", 6000004): ("preferences", 6000005, upgrade.upgradePreferences),
  10. ("definition_changes", 4000004): ("definition_changes", 4000005, upgrade.upgradeInstanceContainer),
  11. ("quality_changes", 4000004): ("quality_changes", 4000005, upgrade.upgradeInstanceContainer),
  12. ("user", 4000004): ("user", 4000005, upgrade.upgradeInstanceContainer),
  13. ("machine_stack", 4000004): ("machine_stack", 4000005, upgrade.upgradeStack),
  14. ("extruder_train", 4000004): ("extruder_train", 4000005, upgrade.upgradeStack),
  15. },
  16. "sources": {
  17. "preferences": {
  18. "get_version": upgrade.getCfgVersion,
  19. "location": {"."}
  20. },
  21. "machine_stack": {
  22. "get_version": upgrade.getCfgVersion,
  23. "location": {"./machine_instances"}
  24. },
  25. "extruder_train": {
  26. "get_version": upgrade.getCfgVersion,
  27. "location": {"./extruders"}
  28. },
  29. "definition_changes": {
  30. "get_version": upgrade.getCfgVersion,
  31. "location": {"./definition_changes"}
  32. },
  33. "quality_changes": {
  34. "get_version": upgrade.getCfgVersion,
  35. "location": {"./quality_changes"}
  36. },
  37. "user": {
  38. "get_version": upgrade.getCfgVersion,
  39. "location": {"./user"}
  40. }
  41. }
  42. }
  43. def register(app):
  44. return { "version_upgrade": upgrade }