pcb-rnd - plugin development - local default conf file

Each plugin can have a config file, pluginname.conf, stored locally and also installed. When this file is available, it specifies the default value for the plugin-local config nodes. It also allows users to create user config under ~/.pcb-rnd/ using the same file name, modularizing the config.

create the config file

Copy the template and rename it to pluginname.conf, replace pluginname and the config nodes to match the plugin's conf.h.

Create an empty file called conf_internal.c (but do not commit it).

include the internal version of the config file

Insert the following lines in the main plugin c source:

#include "../src_plugins/pluginname/conf_internal.c"

Register the custom intern conf

Done as part of the normal plugin conf initialization.

Unregister the custom conf intern

Done as part of the normal plugin conf uninitialization.

make dep

After finishing all these, before the commit, you will need to run make dep in src/. Before committing that, double check svn diff: it must not have any unrelated change, only files related to your plugin.

When done, the build system knows how to generate conf_internal.c - remove the dummy empty file and run make to get it generated.

The file will contain one large character array, holding the internal version of pluginname.conf