File: ext_fungw.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 (41 lines) | stat: -rw-r--r-- 1,472 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
<html>
<body>
<h1> pcb-rnd - plugin development - external fungw plugin </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 fungw plugin
method. Pros: simpler code, less boilerplate. Cons: loaded like a script,
shouldn't access pcb-rnd APIs other than actions,
requires system installed (full featured) fungw.
<p>
Note: this method is equivalent to using a script language and writing
an user script - except that it's written in C, needs to be compiled, and
if crashes, will bring down the whole process with it.
<p>
Please refer to the <a href="template_fungw/">example/template plugin</a>.
After make, the resulting .so can be loaded from pcb-rnd using the script()
action:
<pre>
LoadScript(foo, ./ext_bar.so, c)
</pre>
<p>
The stderr message from init should appear. The ExtBar action should be
available.
<p>
To start your external plugin, copy it to new directory and rename
ext_bar both in file names and file content. Please preserve the ext_ prefix.

<h2> how to develop the plugin </h2>
<p>
Some naming conventions  differ from core plugin development. It is not
possible to register action help and syntax at the moment.

<h2> Other considerations </h2>
<p>
As documented for <a href="ext_pup.html#other">puplug plugins</a>.

</body>
</html>