You are here

help with gimp build procedure for plugins

I am working on revising a plugin (the resynthesizer.)

I am trying to use gimpish build procedures. (Formerly it had a handcrafted makefile.) So I started with gimp-plugin-template and copied and hacked most of its build files (like configure.in, Makefile.am, etc.) It seems to build and install the main plugin OK.

Problem 1. It doesn't seem to build a .pot file for i18n. Shouldn't it??? In other words, a standard invocation of make doesn't seem to build the template for internationalization. Translators would use that file as input for editing translations. It should get built ever time the plugin gets built.

Problem 2. The plugin is in C but has many script plugins accompanying it. It doesn't seem to install the scripts, at least Gimp doesn't find them. (I can't remember whether and where a standard Gimp distribution puts scripts, or whether an install of a script should go somewhere in the user's home.) If anyone has a hint about how to accomplish an installation of a script plugin using the GNU build tools as used in gimp-plugin-template????

I suppose I should ask on the IRC channel but I hate to bother them.

Here is my best guess at an answer:

> make update-po

This seems to create the correct .pot file. I suppose that 'make all' is for installation time instead of development time. The .pot file should be made at development time, and translators should create the .po files at development time, and then at installation time, there is no purpose to creating a new .pot file, so the makefile does not. Or maybe the reasoning is: translation cannot be done without translators, so there is no point in making a .pot file automatically, it should wait until there is a human decision to update the translations.

Note that the .pot file for a project such as a clone of gimp-plugin-template includes the translatable strings for all the files in the project. For example, if there are more than one C source file for one plugin and a Python script for another plugin in the project, all the translatable strings are in the project_name.pot file. I suppose all the plugins refer to the same translation domain name, the project_name.

I still don't know why 'make install' is not installing the Python plugins in the project to where I think should be /usr/local/share/gimp/2.0/scripts.

I found that if I add this to the configure.in in gimp-plugin-template project (as well as make some other changes in several Makefile.am files scattered throughout the project), it will install a Python plugin that is part of the project to the main directory where other official Gimp plugins are installed. Note it is hard coded to install to the gimp/2.0 subdirectory. It's probably fragile if gimp goes to 3.0.

gimpplugindir="$libdir/gimp/2.0"
AC_SUBST(gimpplugindir)

Discussion: there is a gimp-plugin-template project that includes all the build configuration files (configure.in, Makefile.am, etc.) for a C language plugin that includes internationalization i18n support and help data files. It includes instructions for editing the files (brief instructions and not very explicit) to customize the project for your plugin. When you are done, you have a bundle of files (a package) that can be built and installed the conventional GNU way (./configure, make, sudo make install). Shouldn't there be such a template project for Python plugins? The template wouldn't do any compiling, but it would update the translations and install in the correct place. The alternative is the way things are done now: repeatedly tell users where to put downloaded files, how to change permissions, etc.

Hope you succeed and also make it faster. That would be a happy day then. :)

Subscribe to Comments for "help with gimp build procedure for plugins"