Index: sources.html =================================================================== --- sources.html (nonexistent) +++ sources.html (revision 2035) @@ -0,0 +1,66 @@ + + +

The new config system in pcb-rnd

+

Sources

+There are different sources of configuration settings. These are +different configuration files, sometimes located on the file system. +The full list of config sources is: + + +
role default
setting
prio
location presence remarks +
internal + 100 + (compiled into the executable) + always + the ultimate fallback; allows pcb-rnd even if no other configuration file is found + + +
system + 200 + /usr/share/pcb-rnd/pcb-conf.lht + recommended + should hold system and installation specific settigns, e.g. path to the system-wise installed footprint library + +
user + 300 + ~/.pcb-rnd/pcb-conf.lht + recommended + store user preferences, user's common footprint lib path, etc; this is the first file the user can modify (even from the GUI) + +
environment + 400 + environment variables (TODO) + occassional + inject the same (temporary) settings in multiple pcb-rnd sessions without having to change config files + +
project + 500 + projdect.lht in the project directory + optional + local project settings - useful for large projects with multiple design (.pcb) files + +
design + 600 + saved in the design (.pcb) file + optional, common + per design deviation from the user+system config + +
cli + 700 + command line argument + occassional + inject/change a setting for a single session; useful in batch/automated processing +
+ +

+Pcb-rnd reads them all, then merges all settings into a master binary +representation. If a setting is specified in multiple sources, the one +with the higher priority wins, except for lists where it is also possible +to prepend/append items. Default priorities are designed to result +precedence in an intuitive way (e.g. design settigns overwrite user settings). +However, priority can be changed per setting, resulting +in weak settings ("use this value if it was not already set") or strong settings +("I always want to use mincut, so I enable it from my user's config with high +priority and a version controlled project setting can not turn it off") + +