16 Commits

Author SHA1 Message Date
Ghostkeeper
ae2b312472
Add typing for all version upgrade plug-ins
Hopefully we'll take this typing along when we next copy-paste the stuffs.

Contributes to issue CURA-5936.
2018-11-14 13:41:23 +01:00
fieldOfView
9ac744b9ba Remove unnecessary import and declaration of i18n in plugins 2018-10-03 22:00:24 +02:00
Mark
9a193ad5c5 Changing AGPLv3 to LGPLv3 2017-09-28 13:00:43 +02:00
Jaime van Kessel
44125d3275 Moved certain meta data entries to seperate file
CURA-3856 & CURA-3712
2017-06-21 11:22:35 +02:00
Ghostkeeper
0a84a181c4
Track cfg version numbers with major-minor, sorta
We now have a (format) version and a setting version. Ideally we'd like major-minor version numbers in our profiles. However, introducing major-minor version numbers requires substantial changes to the version upgrade manager to compare version numbers, find a path towards the current version, or even keeping track of the current version. Therefore we just collapse the two version numbers into one: Multiply the major version number by a million and you'll never exceed it in the minor versioning. The only problem is that we now have to update the versioning for all of our three upgrade plug-ins, because they all need to know locally how to find the version number of their file types (because the upgrade manager has no knowledge of the file types) and they have no access to each other because a plug-in may be disabled.

Contributes to issue CURA-3427.
2017-05-11 17:31:37 +02:00
Ghostkeeper
c1a593c3d8
Create new user profile upon upgrading machine instance
This defines a new configuration type: 'user', for the user profile.

Contributes to issue CURA-844.
2016-09-21 17:34:22 +02:00
Ghostkeeper
002f43598b Correct storing upgraded config location
Two big things had to happen for this: The resource types of quality and machine stack have to be defined before the initialisation of the version upgrade manager, since the version upgrade manager needs to know those storage locations at initialisation. But the storage location is still prefaced with '.config/UM' at this point, so instead we pass on the resource type (but the resource type still has to be defined before the init).

The other big change is that we now have to name the configuration type 'quality' and 'machine_stack' instead of 'instance_container' and 'container_stack' to coincide with the resource type. This allows us to be more consistent in later plug-ins when we also have to upgrade other instance container types.

Contributes to issue CURA-844.
2016-07-07 13:51:41 +02:00
Ghostkeeper
e1db3e5316 Convert instance profiles as profiles
Treated in the same way.

Contributes to issue CURA-844.
2016-07-07 13:46:40 +02:00
Ghostkeeper
04974a4308 Correct preferences version number
The old version was 2, so the new one needs to be 3.

Contributes to issue CURA-844.
2016-07-07 13:46:40 +02:00
Ghostkeeper
f04430ba57 Increment plug-in API version
It is now settings-rework-aware!

Contributes to issue CURA-844.
2016-07-07 13:46:40 +02:00
Ghostkeeper
c1b738953b Align documentation better
I just couldn't stand it...

'I have to sort my books', she cried
With self-indulgent glee
With senseless, narcissistic pride:
'I'm just so OCD'

'How random, guys', I smiled and said
Then left without a peep
And washed my hands until they bled
And cried myself to sleep

Contributes to issue CURA-844.
2016-07-07 13:46:39 +02:00
Ghostkeeper
68afd08afd Fix links to upgrade functions
These are bound methods of an instance.

Contributes to issue CURA-844.
2016-07-07 13:46:39 +02:00
Ghostkeeper
8a44705413 Update metadata with dynamic config types
After settings rework, we decided to make the upgrade plug-ins define their own configuration types. This is basically the definition for these configuration types. Only the get_version function is not yet implemented.

Contributes to issue CURA-844.
2016-07-07 13:46:39 +02:00
Ghostkeeper
41ee575cc1 Correct copyright year
These files were made in 2016.

Contributes to issue CURA-844.
2016-07-07 13:46:39 +02:00
Ghostkeeper
242559bd7e Remove preferences upgrade from 2.1->2.2
No preferences will need to be upgraded.

Contributes to issue CURA-844.
2016-07-07 13:46:39 +02:00
Ghostkeeper
2f4e63a944 Add boilerplate version upgrade plug-in
This plug-in does nothing at the moment. It merely says that it is able to upgrade configuration from version 2.1 to 2.2, but then raises exceptions when you actually try to use it. This is by design. I will now implement the functions that do the conversion.

Contributes to issue CURA-844.
2016-07-07 13:46:39 +02:00