learningequality / kolibri-installer-windows

Repository for Kolibri windows installer
MIT License
5 stars 12 forks source link

Investigate a new approach to handle the app configuration (CONFIG.dat) #100

Open ruimalheiro opened 5 years ago

ruimalheiro commented 5 years ago

Currently the win32 app is responsible to create and use a file called CONFIG.dat.

This is handled by a basic parser that enforces a specific structure: variable:value; but makes the whole application harder to maintain. Can also cause parsing errors if the structure is manually changed (not sure of the side effects).

Possibly two better approaches to try would be:

Note: There are some libs for INI files but I don't think it is necessary as it is that easy via Win32 API.

indirectlylit commented 5 years ago

what kind of configuration is stored?

FYI in Qt there's a cross-platform 'settings' class: https://doc.qt.io/qt-5/qsettings.html

ruimalheiro commented 5 years ago

I think the current configuration stored in the file are related to how the app should behave. E.g:

RUN_AT_LOGIN
RUN_OPEN_BROWSER
DONT_START
OPEN_BROWSER_OPTION
RUN_OPEN_BROWSER
...

FYI in Qt there's a cross-platform 'settings' class: https://doc.qt.io/qt-5/qsettings.html

That's interesting!

I think one requirement is also being able to edit the configuration without having to start the UI. Would be cool if stored in an human readable format. The Win32 App could also be a command line tool with an option to lunch in GUI mode. 🤔