1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
|
<html>
<body>
<h1> pcb-rnd - plugin development - local default conf file </h1>
<p>
Each plugin can have a config file, <i>pluginname</i>.conf, stored
locally and also installed. When this file is available, it specifies
the default value for the <a href="conf.html">plugin-local config nodes</a>.
It also allows users to create user config under ~/.pcb-rnd/ using the
same file name, modularizing the config.
<h2> create the config file </h2>
<p>
Copy <a href="conf_file.conf"> the template </a> and rename it to
<i>pluginname</i>.conf, replace <i>pluginname</i> and the config nodes
to match the plugin's conf.h.
<p>
Create an empty file called <i>conf_internal.c</i> (but do <b>not</b> commit it).
<h2> include the internal version of the config file </h2>
<p>
Insert the following lines in the main plugin c source:
<pre>
#include "../src_plugins/<i>pluginname</i>/conf_internal.c"
</pre>
<h2> Register the custom intern conf</h2>
Done as part of the normal plugin conf initialization.
<h2> Unregister the custom conf intern </h2>
<p>
Done as part of the normal plugin conf uninitialization.
<h2> make dep </h2>
<p>
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.
<p>
When done, the build system knows how to generate conf_internal.c -
remove the dummy empty file and run make to get it generated.
<p>
The file will contain one large character array, holding the internal
version of <i>pluginname</i>.conf
</body>
</html>
|