When writing and using IDA plugins, configurations tend to be quite a mess. With each plugin having it's own:
- Color scheme
- Hotkeys
- Configuration file format
- Configuration location
(And that's when you have a seprtate configuration, and not some variables in the plugin itself).
In the current situation, each developer works as he sees fit, and the users usually end up with the unmodified defaults,
as well as a large number of .some-plugin-confuguration
files.
To solve this, we need to create standards for plugin configuration, as well as C and Python libraries that follow them.
- Configurations should be easily exportable and modifiable (a YAML file might be a good solution)
- Should allow user/project based heirarcy:
- Global configuration, stored in the IDA directory
- User configuration, in the user directory
- Per-directory config, stored in the same directory as the
.idb
itself - Per-IDB config, stored as net-nodes in the IDB itself.
- Should allow global-defaults, and per-plugin modifications (like default color schemes for highlighting).
If you feel this is relevant to you, please comment so that we can improve on those ideas before going ahead an implementing them.
as for the hierarchy, I think that a flat key-value store for each plugin is the best solution. Pseudo-groups can always be created by a plugin writer.
For #2, I think that splitting files up is only useful when exporting the settings, and you want to only export the settings for a given plugin. Other than that, I don't see a reason for multiple files.
Concerning #4, it seems that
QSettings
already provide an API to store different types of values (see QSettings::setValue).