TP-MAGIC-CONFIG(1)
β¨ tp-magic-config β the girlies' guide to tp-magic-config(1) β¨
okay so bestie, welcome to section 1 of the manual, and no cap this little script is about to make your whole 'Magic' plugin era SO much easier π
πΈ NAME πΈ
tp-magic-config β the little helper that helps you create 'Magic' tool plugins for Tux Paint(1) π¨β¨
π SYNOPSYS π
(yeah it's spelled like that, we don't question it, we respect it π)
tp-magic-config [--apiversion | --version | --cflags | --pluginprefix |
--plugindocprefix | --dataprefix | --localpluginprefix |
--localdataprefix]
π DESCRIPTION π
so tp-magic-config is literally just a simple shell script β tiny, humble, iconic β and what it does is answer back with all the little pieces of info about the version of Tux Paint(1) that's currently installed on your machine. and why do we care? because those deets are exactly what you need when you're building 'Magic' tool plugins. it's giving personal assistant but for your compiler π«Ά
π¦ OPTIONS π¦
one bullet per option, bestie, we're not skipping a single one:
--apiversionβ spits out the version of the Tux Paint 'Magic' tool plugin API that your installed copy of Tux Paint supports. it's for API compatibility testing, iykyk π§ͺ--versionβ spits out the version of Tux Paint thattp-magic-configcorresponds to. the receipts, basically π--cflagsβ spits out the compiler flags your Tux Paint 'Magic' tool plugins should be compiled with. like, for example, a"-I"include path option that tells the compiler where it can find the plugin API header file,"tp_magic_config.h", which plugins must#include. very "let me show you the way" of it β¨--pluginprefixβ spits out the system directory where the installed copy of Tux Paint expects to find 'Magic' tool plugins (.soshared objects). (e.g.,"/usr/share/tuxpaint/plugins") π--localpluginprefixβ spits out the user directory where the installed copy of Tux Paint expects to find 'Magic' tool plugins (.soshared objects). (e.g.,"/home/username/.tuxpaint/plugins") π--plugindocprefixβ spits out the directory where the installed copy of Tux Paint expects to find documentation for 'Magic' tool plugins (.htmland.txtfiles). Tux Paint's main documentation includes a link to this directory under the section on "Magic" tools π--dataprefixβ spits out the system directory where the installed copy of Tux Paint 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 ποΈ--localdataprefixβ spits out the user directory where the installed copy of Tux Paint 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 πΎ
π SYSTEM-WIDE SHELL EXAMPLES π
the system-wide glow-up, step by step:
$ gcc -shared `tp-magic-config --cflags` my_plugin.c -o my_plugin.so
# cp my_plugin.so `tp-magic-config --pluginprefix`
# cp my_plugin_icon.png `tp-magic-config --dataprefix`/images/magic
# cp my_plugin.html `tp-magic-config --plugindocrefix`/html
# cp my_plugin.txt `tp-magic-config --plugindocrefix`
(yes, --plugindocrefix β that's what it says, we copy it character for character, no editing the queen's words π
)
π LOCAL SHELL EXAMPLES π
and the local one, for when you're doing your own thing in your own home directory:
$ gcc -shared `tp-magic-config --cflags` my_plugin.c -o my_plugin.so
$ mkdir -p `tp-magic-config --localpluginprefix`
$ cp my_plugin.so `tp-magic-config --localpluginprefix`
$ mkdir -p `tp-magic-config --localdataprefix`/images/magic
$ cp my_plugin_icon.png `tp-magic-config --localdataprefix`/images/magic
π§ SYSTEM-WIDE MAKEFILE EXAMPLE π§
for the girlies who automate, we see you, we love you:
MAGIC_CFLAGS=$(shell tp-magic-config --cflags)
MAGIC_PREFIX=$(shell tp-magic-config --pluginprefix)
MAGIC_DOC_PREFIX=$(shell tp-magic-config --plugindocprefix)
DATA_PREFIX=$(shell tp-magic-config --dataprefix)
all: my_plugin.so
my_plugin.so: my_plugin.c
install: install-so install-data install-docs
install-so:
mkdir -p $(MAGIC_PREFIX)
cp my_plugin.so $(MAGIC_PREFIX)/
chmod 644 $(MAGIC_PREFIX)/my_plugin.so
install-data:
mkdir -p $(DATA_PREFIX)
cp icons/my_plugin_icon.png $(DATA_PREFIX)/images/magic/
chmod 644 $(DATA_PREFIX)/images/magic/my_plugin_icon.png
install-docs:
mkdir -p $(MAGIC_DOC_PREFIX)
cp docs/my_plugin.html $(MAGIC_DOC_PREFIX)/html/
chmod 644 $(MAGIC_DOC_PREFIX)/html/my_plugin.html
cp docs/my_plugin.txt $(MAGIC_DOC_PREFIX)/
chmod 644 $(MAGIC_DOC_PREFIX)/my_plugin.txt
π AUTHOR π
Bill Kendrick. <bill@newbreedsoftware.com> β king behavior, honestly π
β SEE ALSO β
tuxpaint(1),- And documentation within
/usr/[local/]share/doc/tuxpaint/.
okay bestie that's the whole page, you're officially certified ππ this was tp-magic-config manual page, source/version 2007.08.07, dated 07 August 2007 β yeah she's vintage, she's a classic, she still slays. go build something cute with it π¦πΈ periodt.
π¦ where this page comes from
- alpine 3.24: tuxpaint-doc 0.9.35-r0 Β· GPL-2.0-or-later
- fedora 43: tuxpaint 1:0.9.35-2.fc43 Β· GPL-2.0-or-later
- fedora 44: tuxpaint 1:0.9.35-4.fc44 Β· GPL-2.0-or-later
- nixos 26.05: tuxpaint 0.9.35
- nixpkgs unstable: tuxpaint 0.9.35
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms