Open ruimalheiro opened 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
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. 🤔
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:
.ini
files. GetPrivateProfileString and WritePrivateProfileStringA;Note: There are some libs for INI files but I don't think it is necessary as it is that easy via Win32 API.