[Opensim-dev] Ini file(s) loading

Jeff Ames jeffames at gmail.com
Fri Mar 6 03:19:41 UTC 2009


Melanie wrote:
> read [the config directory] first
> then read the inimaster
> then read the inifile

If I understand this correctly, the config/*.ini files would be
essentially read-only, and all local changes would be made to the
inimaster or OpenSim.ini.  But then OpenSim.ini is not broken up, and
it may be confusing to users why there are two sets of config files.

Is this just due to OpenSim's current behavior of requiring an .ini
file to be present?  Currently the default values for all settings
exist in the code itself and in the .ini.example file (itself an
unfortunate duplication, but that's another topic).  Instead of
requiring that an .ini be present, we could simply use the default
values in the code if there is no .ini.  This would also have the
pleasant side effect of matching the behavior when an empty .ini file
is present.

Then we could break up and move OpenSim.ini.example entirely to
config/*.ini.example files, and when the user wants to change a value,
create foo.ini based on foo.ini.example (copying the whole file if
they want everything, or only adding the options they want to
explicitly set).

Then I guees the load order would be:
 - read inimaster (if present)
 - read config/*.ini (if present)
 - use defaults in code for anything not set

I think this would also avoid the merging problem, if users only add
options they're explicitly setting to the *.ini files.  It would also
remove the annoyance of having to copy the .ini.example file over
every time on a new install.

Jeff



More information about the Opensim-dev mailing list