Magic tools (and tp-magic-config) supports local (user) plugins.

Added copyright & credit info to new Magic tool plugin .c files.
Updated Magic plugin doc API.
This commit is contained in:
William Kendrick 2007-08-08 06:56:04 +00:00
parent cf10090cc1
commit 0d6c2cf1b9
30 changed files with 1146 additions and 350 deletions

View file

@ -1,11 +1,11 @@
.\" tp-magic-config - 2007.08.02
.TH TP-MAGIC-CONFIG 1 "02 August 2007" "2007.08.02" "tp-magic-config"
.\" tp-magic-config - 2007.08.07
.TH TP-MAGIC-CONFIG 1 "07 August 2007" "2007.08.07" "tp-magic-config"
.SH NAME
tp-magic-config -- Helps creating 'Magic' tool plugins for Tux Paint(1)
.SH SYNOPSYS
.TP 16
.B tp-magic-config [\-\-apiversion | \-\-version | \-\-cflags | \-\-pluginprefix | \-\-plugindocprefix | \-\-dataprefix]
.B tp-magic-config [\-\-apiversion | \-\-version | \-\-cflags | \-\-pluginprefix | \-\-plugindocprefix | \-\-dataprefix | \-\-localpluginprefix | \-\-localdataprefix]
.SH DESCRIPTION
\fItp-magic-config\fP is a simple shell script that responds with various
@ -29,8 +29,14 @@ compiler where it can find the plugin API header file, "tp_magic_config.h",
that plugins must #include.)
.TP 8
.B \-\-pluginprefix
Outputs the directory where the installed copy of \fITux Paint\fP expects
Outputs the system directory where the installed copy of \fITux Paint\fP expects
to find 'Magic' tool plugins (".so" shared objects).
(e.g., "/usr/share/tuxpaint/plugins")
.TP 8
.B \-\-localpluginprefix
Outputs the user directory where the installed copy of \fITux Paint\fP expects
to find 'Magic' tool plugins (".so" shared objects).
(e.g., "/home/username/.tuxpaint/plugins")
.TP 8
.B \-\-plugindocprefix
Outputs the directory where the installed copy of \fITux Paint\fP expects
@ -39,12 +45,19 @@ to find documentation for 'Magic' tool plugins (".html" and ".txt" files).
under the section on "Magic" tools.
.TP 8
.B \-\-dataprefix
Outputs the directory where the installed copy of \fITux Paint\fP keeps its
global data files (e.g., "/usr/share/tuxpaint/"). This is the same value that
plugins will receive in the "data_directory" string within the
"magic_api" structure sent to the plugins' functions.
Outputs the system directory where the installed copy of \fITux Paint\fP keeps
its global data files (e.g., "/usr/share/tuxpaint/"). This is the same value
that plugins installed system-wide will receive in the "data_directory" string
within the "magic_api" structure sent to the plugins' functions.
.TP 8
.B \-\-localdataprefix
Outputs the user directory where the installed copy of \fITux Paint\fP
expects plugins to install their local data files.
(e.g., "/home/username/.tuxpaint/plugins/data"). This is the same value
that plugins installed locally will receive in the "data_directory" string
within the "magic_api" structure sent to the plugins' functions.
.SH SHELL EXAMPLES
.SH SYSTEM-WIDE SHELL EXAMPLES
$ gcc -shared `tp-magic-config --cflags` my_plugin.c -o my_plugin.so
.br
# cp my_plugin.so `tp-magic-config \-\-pluginprefix`
@ -55,7 +68,18 @@ $ gcc -shared `tp-magic-config --cflags` my_plugin.c -o my_plugin.so
.br
# cp my_plugin.txt `tp-magic-config \-\-plugindocrefix`
.SH MAKEFILE EXAMPLE
.SH LOCAL SHELL EXAMPLES
$ gcc -shared `tp-magic-config --cflags` my_plugin.c -o my_plugin.so
.br
$ mkdir -p `tp-magic-config \-\-localpluginprefix`
.br
$ cp my_plugin.so `tp-magic-config \-\-localpluginprefix`
.br
$ mkdir -p `tp-magic-config \-\-localdataprefix`/images/magic
.br
$ cp my_plugin_icon.png `tp-magic-config \-\-localdataprefix`/images/magic
.SH SYSTEM-WIDE MAKEFILE EXAMPLE
MAGIC_CFLAGS=$(shell tp-magic-config --cflags)
.br
MAGIC_PREFIX=$(shell tp-magic-config --pluginprefix)