config versioning for updating

If you have a suggestion for a feature, post it here
Post Reply
SuperDre
Posts: 64
Joined: Mon Jun 11, 2012 8:24 am

config versioning for updating

Post by SuperDre »

Would it be possible to add a version to the config files, and after loading a new update, update the config files where needed, so we won't have to redo the config files when you added/changed something. With the latest build I had to redo the subtitle settings..

personally I work with an updating system like that, have all the update routines in the software and I look at what the file is, then update accordingly through every update since.
So if the ini file is v1.00 and the user is loading v2.00 and there have been 3 other updates in between, it goes like this:

Code: Select all

is version lower than 1.10? update to 1.10 (and set version to 1.10)
is version lower than 1.20? update to 1.20 (and set version to 1.20)
is version lower than 2.00? update to 2.00 (and set version to 2.00)
<and the same for any version which require a change to the ini file>
is version lower than current version? set version to current version
and 'updating' also means ofcourse removing old settings. You could 'backup' the files just in case just add a version to the config file so web.conf becomes web.confv110 or something like that.
so just add a section:

Code: Select all

#Version
Version.Major=1
Version.Minor=2
Version.Release=3
Version.Revision=4
OR
Version=1.2.3.4
where major/minor/release/revision is what you use, so if you only would use Major and minor, you could do without the others..

It's a small addition, but it makes sure people never have to throw away their config files, and it makes it more user/dummyfriendly that way..
User avatar
SubJunk
Lead Developer
Posts: 3707
Joined: Sun May 27, 2012 4:12 pm

Re: config versioning for updating

Post by SubJunk »

With version 1.5.0, deleting config won't be needed anymore, since now it is all blank unless you saved something. That lets us change the defaults without interfering with your settings.
Post Reply