config.xml resetting?

Problems and solutions for installing or running FreeOrion, including discussion of bugs if needed before posting a bug report on GitHub. For problems building from source, post in Compile.

Moderator: Oberlus

Post Reply
Message
Author
wheals
Space Squid
Posts: 88
Joined: Sun Mar 24, 2013 3:56 pm

config.xml resetting?

#1 Post by wheals »

I'm not sure what exactly triggers it, but when I switch branches/make commits, my config.xml resets (or at least, the screen resolution option does). Is this intentional? Is there anything I can do to keep options around?
All my code and content provided herein or on GitHub is released under the GPL 2.0 and/or CC-BY-SA 3.0, as appropriate.

User avatar
MatGB
Creative Contributor
Posts: 3310
Joined: Fri Jun 28, 2013 11:45 pm

Re: config.xml resetting?

#2 Post by MatGB »

It checks to see if it's up to date by comparing what generated it to the hash, so if you've recompiled or similar then yeah, it'll die, not seen it go if you just switch branches though.

However, very recent change, Dilvish gave us Persistent Config, delete the bits you don't care about from your config, save it as persistent_config.xml and you're good forever, it's marvellous.
Mat Bowles

Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

User avatar
Vezzra
Release Manager, Design
Posts: 5489
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: config.xml resetting?

#3 Post by Vezzra »

wheals wrote:I'm not sure what exactly triggers it, but when I switch branches/make commits, my config.xml resets (or at least, the screen resolution option does). Is this intentional?
Yes. Upon launch, FO compares the version string of the app to the one stored in config.xml, and if they are different, deletes config.xml to make sure there arent't any conflicts that might arise from using a potentially incompatible configuration.

As the version string contains the git hash of the commit it's based upon, and this hash changes every time you make a commit or switch a branch, what you observed is to be expected.
Is there anything I can do to keep options around?
What Mat said.

wheals
Space Squid
Posts: 88
Joined: Sun Mar 24, 2013 3:56 pm

Re: config.xml resetting?

#4 Post by wheals »

Thanks for the help, I'll use persistent_config.xml!
All my code and content provided herein or on GitHub is released under the GPL 2.0 and/or CC-BY-SA 3.0, as appropriate.

Post Reply