File: ext_pup.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 (69 lines) | stat: -rw-r--r-- 2,787 bytes parent folder | download | duplicates (5)
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<html>
<body>
<h1> pcb-rnd - plugin development - external pupplug plugin + FAQ </h1>
<p>
First of all: <b><a href="ext_dont.html">you should write a core plugin, not
an external plugin</a></b>.
<p>
If you absolutely can't avoid writing an external plugin, you have two choices:
a native puplug plugin or a fungw engine plugin. This page is about the puplug plugin
method. Pro: have full access to all APIs. Con: more boilerplate code.
<p>
Please refer to the <a href="template_pup/">example/template plugin</a>.
After make and make install, starting pcb-rnd should auto-load the plugin.
The stderr message from init should appear. The ExtFoo action should
be available.
<p>
To start your external plugin, copy it to new directory and rename
ext_foo both in file names and file content. Make sure to fill in the
fields in the pup file. Please preserve the ext_ prefix.

<h2> how to develop the plugin </h2>
<p>
Other than some naming conventions and the #includes, which are
either "src/*.h" or you need an extra -I for src/, everything is
as documented for core plugins.

<h2 id="other"> how to access pcb-rnd's CC, CFLAGS, LDFLAGS, etc.</h2>
<p>
For that you need to use <a href="http://repo.hu/projects/scconfig">scconfig</a>
to configure your external plugin. Once you do that, you can use the
--import=$(TRUNK)/scconfig/config.cache argument, which will get scconfig
to read everything cached during pcb-rnd's configuration. This will save
running some detections that are already done for pcb-rnd and will also
import the exact results of CC, CFLAGS, LDFLAGS, etc.
<p>
After that, you should get your hooks.c to generate a conf file you can
include from your Makefile.
<p>
Note: we generally do not support having external plugins, so please do
not make requests for pcb-rnd's Makefile.conf to contain whatever nodes
your external plugin may need.

<h2> How to use autotools, cmake, qmake, ...</h2>
<p>
No idea, at pcb-rnd we don't use those - we don't provide support for those
tools.

<h2> Suddenly pcb-rnd core API changed and my external plugin broke!</h2>
<p>
<a href="ext_dont.html">We told you so</a>. Please consider restarting
your plugin from scratch as a core plugin. If you can't, you will have to
live with frequent API changes. pcb-rnd is not a lib, but an application,
we do not promote developing external plugins, so we don't feel obliged
to keep internal API backward compatibility.

<h2> The API changes too often. Can you stop doing that please? </h2>
<p>
<a href="ext_dont.html">No.</a>

<h2> The API changes too often. Could you please maintain my external plugin? </h2>
<p>
<a href="ext_dont.html">No.</a>

<h2> The API changes too often. Could you please include my external plugin as core plugin? </h2>
<p>
<a href="ext_dont.html">No.</a>

</body>
</html>