File: conf_file.html

package info (click to toggle)
pcb-rnd 3.1.7b-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 33,108 kB
  • sloc: ansic: 213,400; yacc: 6,241; sh: 4,698; awk: 3,016; makefile: 2,254; lex: 1,166; python: 519; xml: 261; lisp: 154; tcl: 67; perl: 34; javascript: 6; ruby: 5
file content (46 lines) | stat: -rw-r--r-- 1,590 bytes parent folder | download | duplicates (2)
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>