Let's look at bigger pictureWhat do you think?
We have following kinds of settings:
- script defailts, i.e. settings in the script after it was downloaded
- linked script settings set by user in other project
- linked script settings required by the project, user can't change (not supported)
- linked script defaults overriden by the project, user can change (not supported)
- linked script settings overriden by another script (not supported)
- project's defailt set of script settings, after download
- several sets of user defined script settings for the same project (not supported)
- and some others!
In fact, we have rather complex cross reference to deal with
There is also important issue with preservation of user settings updates
The tech has to be simple, flexible, and easy to control
1. allow each setting to be referred by "qualified name":
name=
script/name=
project/script/name=
2. add following sections to .link, .project, .ini, .script
[require], [default]
Those two sections would contain settings with qualified names.
3. Add .profile files (INI-format files with different names)
For example:
"abcd.profile" - user settings for profile "abcd"
"current.profile" - current options selected by user
"global.profile" - user options for all projects
4. Script can refer other script's settings in own sections as name=%script/name% and get it at runtime as %script/name%, though cyc-reference has to be checked
6. All settings are processed before scripts
So, how it's all supposed to work?
- Load/Save profile is trivial
- no script or INI holds user settings anymore, they all are in .profile files
- .profile files are downloaded only to import other user's settings
- [defult] section holds settings suggested by script developer
- [require] section holds overrides defined by developer
- setting under [require] does not allow user changes, though "higher level" [default] may override it to allow them.
Sequence of processing:
- current global.profile
- script's [default]
- script's [require]
- link's [default]
- link's [require]
- current project's [default]
- current project's [require]
- current project's "current.profile"
As you can see that would supersede dependency support, which becomes just "Selected=" setting
[require] other_script/Selected=trueIt can even change sequience of execution with "other_script/Level="
Additional example: USB-HD project can override Explorer's requirement for RAM-drive.
Selectable global profile may control source path, included projects, etc.
And, most importantly, we have complete separation of developer and user settings
The funny thing, it doesn't seem to be too hard to implement
I really love it It just came up, though I was thinking about such functionality for a while:)
Do you like it?
Alexei