Implement a user edible config file, possibly using a library for YAML or TOML.
I figured out you can serialize the data out by modifying the existing TrackerSettingsDatabase::serialize function, and then serialize it back in the same way.
Why this works (and why it's possible to dump everything out as strings easily in the first place) is that the PPDictionary class it's based on uses PPDictionaryKey, which seems to store everything as a PPString, and then expects you to convert data back to what it's supposed to be later from getStringValue and getIntValue (i.e. BOOL allowExternalKeys = theKey->getIntValue();)
The lucky part about that though, is it means that when serializing everything back in, it's possible to save the data, then load it back in and put it in the database and have everything keep converting it out again as expected.
Since the system was converting lists of data to strings so they can go in the database, and then converting them back out later, you get some lines that have many colors/fields/etc in one line, so those all need to be split apart
[x] Pick a library. Selected library should 1. Exist in at least some popular Linux package managers 2. Format should be easily user editable 3. would be nice if it supported preservation of existing comments. Maybe something like toml11, it's in the Ubuntu package manager, uses CMake, and can preserve comments? Currently running into some issues trying to load it via CMake, though It seems to load with find_library but not find_package?
[x] Add the library to the CMakeLists.txt file. Just added it to the main file in a straightforward way, this will probably have to be altered later for crossplatform support
[ ] Change default config creation to create a toml file
[ ] Add support for old style config files - I think I can remove nearly all of the old config code, and just keep the part that loads it, then try parsing the data into the new style format
[x] Add code for exporting
[x] Add code for importing
[ ] Change filename to avoid collision between old and new config files, System::getConfigFileName() appears to have different behavior on different systems, so if that gets changed it needs to happen for each platform that currently does different things / has different hardcoded filenames
[x] (Change it on for linux/*nix)
For Windows and MacOS, it might make more sense to ifdef it so only Linux gets the new changes until changes get tested on other platforms:
[ ] (Change it for Windows)
[ ] Update tracker/win32/PreferencesDialog.cpp to use the getTOMLConfigFileName/getOldConfigFileName functions
[x] Have it look for old config files if it can't find the new one, in the places it looks for the standard location currently.
[ ] Add alert dialog for when the config file has errors in it, ask whether the user wants to ignore the file, or shut down without replacing the file so they can fix it
[ ] Add toml11 to the install guide list of required packages (also update that list to use the more recent ones)
[ ] Add toml11 as a git sub-module so things build correctly on windows (this can happen later)
[ ] Check if it's loading on MacOS properly, add support for that if not
Implement a user edible config file, possibly using a library for YAML or TOML.
BOOL allowExternalKeys = theKey->getIntValue();
)Currently running into some issues trying to load it via CMake, thoughIt seems to load with find_library but not find_package?