As demonstrated by https://github.com/AnyOldName3/modorganizer-installer_omod/tree/initialise-once, it's possible to reuse the same OMODFrameworkWrapper for multiple OMOD installations instead of constructing and tearing down a fresh one each time. For stuff like the OMODFrameworkSettings, which is static, it better matches the natural lifetime of the state we're setting.
Annoyingly:
This needs doing in multiple chunks as lots of MO2 hasn't started when it calls IPlugin::init. This has been worked around in the branch.
There's no notification when the profile-specific INI files setting is changed, so the ini path OMODFramework uses can become out of sync. This hasn't been fixed, so the branch hasn't been merged.
As demonstrated by https://github.com/AnyOldName3/modorganizer-installer_omod/tree/initialise-once, it's possible to reuse the same OMODFrameworkWrapper for multiple OMOD installations instead of constructing and tearing down a fresh one each time. For stuff like the OMODFrameworkSettings, which is static, it better matches the natural lifetime of the state we're setting.
Annoyingly:
IPlugin::init
. This has been worked around in the branch.