Show HN: Example C++ app using Hjson, CMake and Qt 5
github.com
github.com
One of the main features of the example application is that configuration values can be manipulated by the app and then written back to the configuration file at application exit. Comments, key order and indentation are all preserved when the configuration file is rewritten.
The example application is tested on Windows, Mac and Ubuntu. Will myself use it as starting point for any new C++ GUI application I create.
"The general idea is that the application code contains default values for all configuration keys, defaults that can be overruled by a config file read from disk at application startup. "
This should be expected of any application but many don't get this right.
"The CMake file for this example project does not automatically download Hjson or Qt 5. The headers and libs for Hjson and Qt 5 are expected to already exist on the local machine. "
Good call. Just flag dependencies as required, detect when not present and let developer sort it out. Control over dependencies is not to be overestimated. Plenty of developers need to lock the version used of many dependencies for stability reasons.