Skip to content

Add INI config file support#167

Open
jarz wants to merge 1 commit intodingusdev:masterfrom
jarz:config-file
Open

Add INI config file support#167
jarz wants to merge 1 commit intodingusdev:masterfrom
jarz:config-file

Conversation

@jarz
Copy link
Contributor

@jarz jarz commented Feb 20, 2026

Add support for reading and writing INI configuration files using CLI11's built-in config infrastructure.

New options

  • -c, --config <file> — Load settings from an INI file (defaults to dingusppc.ini in the working directory). The file is optional; if it doesn't exist, it's silently ignored.
  • --write-config [file] — Export the current configuration (including any CLI overrides and machine properties) to an INI file and exit. Defaults to dingusppc.ini.

Example workflow

# Save a config with machine properties
dingusppc --machine pmg3dt --ramsize=128 --write-config

# Launch using saved config
dingusppc
# or explicitly:
dingusppc -c dingusppc.ini

Changes

  • Enable config_extras_mode::capture so machine-specific properties (which are registered late) pass through to the config file and are available for lookup.
  • Rewrite get_setting_value to look up properties from app.remaining() directly, handling --key=value, --key value (CLI), and bare key value pairs (config file).
  • Mark --log-verbosity and --write-config as non-configurable so they don't round-trip into the INI file.
  • Add dingusppc.ini to .gitignore.

@maximumspatium maximumspatium force-pushed the master branch 3 times, most recently from e2755c2 to 20dfe79 Compare February 23, 2026 02:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant