It is currently Mon Nov 09, 2026 10:22 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 26 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: @Rod - compiling gimp plugins in C
PostPosted: Sun May 12, 2013 1:09 am  (#1) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14835
Location: roma, italy
GIMP Version: 2.8.4
Operating System: Windows
OS Version: Win 7 - 32 bits
GIMP Experience: Beginner Level

List any relevant plug-ins or scripts:
all plug-ins in C



Hi Rod,

if you are still playing somehow with the environment to compile Gimp plug-ins in C provided nicely to us by Samj, I like to tell you about my progress.
I started recompiling the plug-ins provided to us by Samj in those mythical folders like "gimp-nameofplugin_32bits-64bits_gimp-2.8-Win".
For the moment I ignored those that look too complicated to me and considered only those which have a simple c source.
The reason for recompiling is my desire to change the menu (which was at the origin of the request made to Samj).
Some of them did compile without problems.
Some of them did not compile due to the following line of code:
"bindtextdomain (GETTEXT PACKAGE, LOCALEDIR)"
Initially I was tempted to consider the GETTEXT being the problem, but it was not so, the problem is LOCALEDIR which is not solved automatically by the environment; so my solution has been to add a line at the beginning of those plug-ins: #define LOCALEDIR "/locale", and they got compiled; it's maybe not an elegant solution, probably there is a correct solution in enhancing somehow the environment in order to get the reference solved automatically, but it works.
Then I tried to recompile the "max-rgb.c" (a plug-in in which I'm interested, you probably remember it was the one on which I stopped at the end of the post @samj).
In there, the problem lies on a line of code which says "gtk_box_new ...".
For a long while I tried to understand, until I found that this statement is valid only with GTK 3.0, while our environment is GTK 2.0; I tried to include GTK 3.0 in the environment, but unsuccessfully; eventually, I got the solution by googling (another c plug-in - beautify.c - was changed for the same reason): we must insert the following lines of code:
/* compatible with gtk2 ---- aggiunte inizio ----- */
#if GTK_MAJOR_VERSION < 3
GtkWidget *
gtk_box_new (GtkOrientation orientation,
gint spacing)
{
if (orientation == GTK_ORIENTATION_HORIZONTAL)
return gtk_hbox_new (FALSE, spacing);
else
return gtk_vbox_new (FALSE, spacing);
}
#endif
/* compatible with gtk2 ---- aggiunte fine
----- */
I post these info here in case you (or someone else who installed the environment to play with) are willing to continue on the road...

_________________
"Where am I ?"


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: @Rod - compiling gimp plugins in C
PostPosted: Sun Aug 04, 2013 6:58 pm  (#2) 
Offline
GimpChat Member

Joined: Feb 01, 2013
Posts: 24
Location: London, UK
Good tips, thanks.

_________________
-- jayprich


Top
 Post subject: Re: @Rod - compiling gimp plugins in C
PostPosted: Sun Aug 04, 2013 8:55 pm  (#3) 
Offline
Global Moderator
User avatar

Joined: May 16, 2010
Posts: 16251
jayprich wrote:
Good tips, thanks.


Something you should remember when compiling with this a fore mentioned WINDOWS environment.It is set up to compile plugins for Gimp-2.7 so some plugins will be very hard to compile for Gimp-2.8 builds. If you want to compile WINDOWS c plug-in src files correctly you will need to update the Gimp version by recompiling BABL, GEGL, and Gimp-2.8 src files.
Undoubtedly you will also have to re compile GLIB and most other LIBRARY DEPENDENCIES first. I am almost sure of it.
Just thought i would mention that. Some plugins will compile if they do not need certain libraries to do so, others will error on
./configure
make
OR
gimptool-2.0 --build plugin.c
.

You could try just updating the compiler (GCC) or the LIBS that the GIMP plug-ins need to run.
eg GLIB, INTOOL, LIBTOOL, PKG_CONFIG, PANGO, CAIRO ect..ect. Instead of recompiling GIMP again. This may or may not work. I have never tried this method. Be sure to compile or replace both lib and lib-dev for these dependencies if you do.

_________________
Image


Top
 Post subject: Re: @Rod - compiling gimp plugins in C
PostPosted: Mon Aug 05, 2013 12:16 am  (#4) 
Offline
Script Coder
User avatar

Joined: Feb 18, 2011
Posts: 4826
Location: Bendigo Vic. Australia
The easiest way to change your plugin Menu Location is by editing the pluginrc file.
once done it rarely needs to be done again (it even survives plugin updates)

_________________
Image
No matter how much you push the envelope, it'll still be stationery.


Top
 Post subject: Re: @Rod - compiling gimp plugins in C
PostPosted: Mon Aug 05, 2013 3:23 am  (#5) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14835
Location: roma, italy
@Graechan
thanks, that is one of your first suggestions I followed when I was just a "novice" in gimp-chat.
The problem on my home computer is that from time to time I have to delete pluginrc to get it recreated (a problem about date last plug-in update which does not function correctly in my env, I don't know why), so it's a bit frustrating to re-change everytime the menu.
Anyhow, thanks to recall it to me.

@Rod
I appreciate your recommendation to update my Gimp compiling environment, but I'm not capable as you are, so I wait until another "gift" will allow me to create a new compiling environment.
By the way, I take this occasion to express a doubt I have: I know there is one link by which you can get any day a new up-to-date compiled version of Gimp (32 bits only, but that what matters to me); so, why that people does not insert also a link to their environment (the one they use to compile) so who is interested could re-create it in his own computer? It would be very much appreciated (I don't think the compiling env will change continuously, so once linked it may stay there for a long time, probably...)

_________________
"Where am I ?"


Top
 Post subject: Re: @Rod - compiling gimp plugins in C
PostPosted: Mon Aug 05, 2013 7:25 am  (#6) 
Offline
GimpChat Member

Joined: May 09, 2012
Posts: 914
@Dinasset
Environment: Take a look at this >> viewtopic.php?f=23&t=8111


Top
 Post subject: Re: @Rod - compiling gimp plugins in C
PostPosted: Mon Aug 05, 2013 12:00 pm  (#7) 
Offline
Global Moderator
User avatar

Joined: May 16, 2010
Posts: 16251
Personally i prefer an sh file to always having to find dependencies.
Then you need only have that one file, and run it in Minimal System. The file would download everything you need and systematically compile everything in the correct order. One script to run and that's that. :)

There used to be one. I may still have it lurking about on Media Fire. I will check. Of course it is for older dependencies (BABL, GEGL, and GIMP), but it can be edited to work i am sure.

The sh file is sort of like a GIT command (sort-of).
It auto links to the FTP GTK site for win32 libs, downloads and if necessary compiles them and installs them to the correct directory. Then it links to GTK+ and GLIB files and does the same thing. Compiles and installs them.
Once the first step of downloading and updating each lib dependency is finished, BABL is downloaded compiled and installed.
Then GEGL, and finally GIMP.

Pretty simple really. :)

_________________
Image


Top
 Post subject: Re: @Rod - compiling gimp plugins in C
PostPosted: Mon Aug 05, 2013 12:19 pm  (#8) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14835
Location: roma, italy
Thanks Samj, thanks Rod!
I will have a look at what Samj indicates (theoretical, for now, I'm not at home), I hope the level of info there is at my (low) level of (in)competence.
I also wait upon what Rod anticipated (even if I don't know - in my ignorance - what an sh file is); I hope it will be really easy for me (and other interested people) to follow the necessary steps
Thanks a lot

_________________
"Where am I ?"


Top
 Post subject: Re: @Rod - compiling gimp plugins in C
PostPosted: Mon Aug 05, 2013 12:59 pm  (#9) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14835
Location: roma, italy
@samj
just started reading referenced info.
One simple question to understand the flow (probably a silly question for less ignorant people around here):
- one win (32 bits) user like me, using those info, will as first step install a virtual Debian machine under windows? then perform all the rest of the steps under this Debian machine?
Thanks

_________________
"Where am I ?"


Top
 Post subject: Re: @Rod - compiling gimp plugins in C
PostPosted: Mon Aug 05, 2013 4:47 pm  (#10) 
Offline
GimpChat Member

Joined: May 09, 2012
Posts: 914
@Dinasset

With a 32-bit machine you have to use a 32-bit virtual machine, for example :
http://www.aljacom.com/~gmic/GimpEVAL-2 ... -32bits.7z
Volume : (1 658 776 406 octets) / MD5 : 8aec87f1b17a8c805f9c26274a63063b

To see what happens I will suggest using scripts from July 31 in the archive:
http://aljacom.com/~gmic/divers_compilation_croisee.zip (10 320 409 octets) / MD5 34478d03d735bf520e45e14712750449 / version 20130803

Use this command to compile the stable version : MODULE=gimp-stable ./build

You can analyze the scripts, they give the compiler options, patches, etc.. They can inspire you to create your script as you suggest Rod.

The results of compilation can be used to create your environment.


Top
 Post subject: Re: @Rod - compiling gimp plugins in C
PostPosted: Mon Aug 05, 2013 5:07 pm  (#11) 
Offline
Global Moderator
User avatar

Joined: May 16, 2010
Posts: 16251
samj wrote:
@Dinasset

With a 32-bit machine you have to use a 32-bit virtual machine, for example :
http://www.aljacom.com/~gmic/GimpEVAL-2 ... -32bits.7z
Volume : (1 658 776 406 octets) / MD5 : 8aec87f1b17a8c805f9c26274a63063b

To see what happens I will suggest using scripts from July 31 in the archive:
http://aljacom.com/~gmic/divers_compilation_croisee.zip (10 320 409 octets) / MD5 34478d03d735bf520e45e14712750449 / version 20130803

Use this command to compile the stable version : MODULE=gimp-stable ./build

You can analyze the scripts, they give the compiler options, patches, etc.. They can inspire you to create your script as you suggest Rod.

The results of compilation can be used to create your environment.

Agreed. The script could simply duplicate the environment you provided to us Sam. Thereby updating all the libraries to an up to date status. :)
The trick is to find all the dependencies, be sure the links are always reliable, and adjust the script accordingly to mimic the present compile environment. You could do this for both 32 and 64 bit systems. :)
Great idea Sam. I will check out the scripts you provided.

Thanks again for all your contributions, and help to me. :bigthup It is much appreciated.

_________________
Image


Top
 Post subject: Re: @Rod - compiling gimp plugins in C
PostPosted: Mon Aug 05, 2013 5:15 pm  (#12) 
Offline
Global Moderator
User avatar

Joined: May 16, 2010
Posts: 16251
Rod wrote:
samj wrote:
@Dinasset

With a 32-bit machine you have to use a 32-bit virtual machine, for example :
http://www.aljacom.com/~gmic/GimpEVAL-2 ... -32bits.7z
Volume : (1 658 776 406 octets) / MD5 : 8aec87f1b17a8c805f9c26274a63063b

To see what happens I will suggest using scripts from July 31 in the archive:
http://aljacom.com/~gmic/divers_compilation_croisee.zip (10 320 409 octets) / MD5 34478d03d735bf520e45e14712750449 / version 20130803

Use this command to compile the stable version : MODULE=gimp-stable ./build

You can analyze the scripts, they give the compiler options, patches, etc.. They can inspire you to create your script as you suggest Rod.

The results of compilation can be used to create your environment.

Agreed. The script could simply duplicate the environment you provided to us Sam. Thereby updating all the libraries to an up to date status. :)
The trick is to find all the dependencies, be sure the links are always reliable, and adjust the script accordingly to mimic the present compile environment. You could do this for both 32 and 64 bit systems. :)
Great idea Sam. I will check out the scripts you provided.

Thanks again for all your contributions, and help to me. :bigthup It is much appreciated.

Having reliable links to GIMPS dependencies is half the work. :)

_________________
Image


Top
 Post subject: Re: @Rod - compiling gimp plugins in C
PostPosted: Mon Aug 05, 2013 5:29 pm  (#13) 
Offline
GimpChat Member

Joined: May 09, 2012
Posts: 914
:tyspin Rod (Allow at least 1 gigabytes of memory for the virtual machine if you use it).

Scripts are created by Drawoc : https://github.com/drawoc/windows-gimp-jhbuild
I thank him for his excellent work :jumpclap


Top
 Post subject: Re: @Rod - compiling gimp plugins in C
PostPosted: Mon Aug 05, 2013 6:31 pm  (#14) 
Offline
Global Moderator
User avatar

Joined: May 16, 2010
Posts: 16251
Thanks! :bigthup
Sam can you confirm these as the newest dev packages for building GIMP-2.8 version?
CAIRO_VERSION="1.10.2-1"
EXPAT_VERSION="2.0.1-1"
FONTCONFIG_VERSION="2.8.0-2"
FREETYPE_VERSION="2.4.4-1"
GETTEXTRT_VERSION="0.18.1.1-2"
GETTEXTTOOLS_VERSION="0.18.1.1-2"
GNUTLS_VERSION="2.4.2-1"
HICOLICONTHEME_VERSION="0.10-1"
ICONNAMINGUTILS_VERSION="0.8.7-1"
ISOCODES_VERSION="3.5-1"
LIBBZIP2_VERSION="1.0.2"
LIBFFI_VERSION="3.0.6-1"
LIBICAL_VERSION="0.43-1"
LIBICONV_VERSION="1.9.1"
LIBPNG_VERSION="1.4.3-1"
LIBTIFF_VERSION="3.9.2-1"
LIBXML2_VERSION="2.7.7-1"
PKGCONFIG_VERSION="0.25-1"
POPPLER_VERSION="0.6.4"
TANGOICON_VERSION="0.8.1"
WINICONV_VERSION="20100912"
ZLIB_VERSION="1.2.5-2"


I am updating the old SH file i used before. :)
Going to attempt that first i think.

Also i need to know if the install path is /env or /mingw for all dependencies?
My fstab points to
c:/msys-mingw-gimp /env
c:/msys-mingw-gimp/MinGW /mingw
c:/msys-mingw-gimp/strawberry-perl/perl /perl
c:/msys-mingw-gimp/Python27 /python


So i am assuming /mingw is correct?

_________________
Image


Top
 Post subject: Re: @Rod - compiling gimp plugins in C
PostPosted: Mon Aug 05, 2013 7:17 pm  (#15) 
Offline
GimpChat Member

Joined: May 09, 2012
Posts: 914
@Rod

You can see all the versions by editing the files .pc which are located in /lib/pkgconfig
for example in the archive http://aljacom.com/~gmic/gimp-2.8.7-201 ... ortable.7z , cairo.pc >> Version: 1.12.14

For the environment :
You need to edit these files for prefix=/foo match reality.
Place all the files .pc in a directory recognized by pkgconfig.

I do not think the old environment for Windows 32bit will work (compiler).


I suggest you use this compiler (Windows) :

http://sourceforge.net/projects/mingw-w ... g%20Win32/


http://sourceforge.net/projects/mingw-w ... %20Builds/
or
http://sourceforge.net/projects/mingw-w ... p/download


Mingw :
http://sourceforge.net/projects/mingw-w ... mingw-w64/

Libraries :
Edit 20130806 for 32 bit
http://download.opensuse.org/repositori ... .2/noarch/

64 bit :
http://download.opensuse.org/repositories/windows:/mingw:/win64/openSUSE_12.2/noarch/
(do not forget to edit .pc files)


Last edited by samj on Tue Aug 06, 2013 8:20 am, edited 1 time in total.

Top
 Post subject: Re: @Rod - compiling gimp plugins in C
PostPosted: Mon Aug 05, 2013 7:31 pm  (#16) 
Offline
Global Moderator
User avatar

Joined: May 16, 2010
Posts: 16251
Actually the script seems to be running fine except i cannot configure the local host for the needed libs. :)
Here is my error.
$ ./compile-gimp.sh
Starting to get build environment for GIMP
Testing if wget is available...
OK1
Testing if unzip is available...
OK2
Testing if perl is available...
OK3
Downloading ATK packages...
Getting atk_1.32.0-2_win32
--2013-08-05 20:22:32--  http://ftp.gnome.org/pub/gnome/binaries/win32/atk/1.32/
/atk_1.32.0-2_win32.zip
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:3128... failed: Connection refused.


The url seems to be correct.

GOT IT! - had to change the local host url to
# use proxy for wget
export http_proxy="http://ftp.gnome.org/pub/gnome/binaries/win32/"

_________________
Image


Top
 Post subject: Re: @Rod - compiling gimp plugins in C
PostPosted: Mon Aug 05, 2013 7:39 pm  (#17) 
Offline
Global Moderator
User avatar

Joined: May 16, 2010
Posts: 16251
If this works and it seems to be so far, i will attach the SH file here after. :)

_________________
Image


Top
 Post subject: Re: @Rod - compiling gimp plugins in C
PostPosted: Tue Aug 06, 2013 5:50 am  (#18) 
Offline
GimpChat Member

Joined: May 09, 2012
Posts: 914
@Rod

I do not know if it helps, here is some information on scripts by Drawoc :
Links to libraries are in the files ".moduleset".
The compiler options are in "build.jhbuildrc".
Patches are in the folder "/patches".

I'm sorry if I do not understand all the questions in English...

Good luck building your development environment :)


Top
 Post subject: Re: @Rod - compiling gimp plugins in C
PostPosted: Tue Aug 06, 2013 10:37 am  (#19) 
Offline
Global Moderator
User avatar

Joined: May 16, 2010
Posts: 16251
Thanks Sam. I will look at those tonight. :)
The script is working as far as finding all needed dependencies online downloading with WGET, and installing/unzipping them correctly into mingw directory using the UNZIP utility.
A few still need to be compiled by doing them manualy.Some have a slash that i can't seem to find that causes a double slash to be added to the download link of some dependencies. GTK RUNTIMES is one of those.

I have to update to a newer version of GLIB so GEGL will compile. Forgot how much fun this all was. :lol
Right at this time i am having trouble linking GLIB to FFI. Any ideas?
I tried adding the LIB and CFLAGS to the profile, and the fstab file but no luck yet.
For some reason libffi installs into mingw/lib/libffi/include , instead of mingw/include. At any rate GLIB can't link to the libffi h files.

Just a few bugs to work out. Nothing new hey! :P

_________________
Image


Top
 Post subject: Re: @Rod - compiling gimp plugins in C
PostPosted: Tue Aug 06, 2013 6:26 pm  (#20) 
Offline
GimpChat Member

Joined: May 09, 2012
Posts: 914
Bonjour,

I wrote a small manual in French to update the build environment I propose to download.
http://www.aljacom.com/~gmic/mise_a_jou ... w-gimp.txt

My desire was to compile gimp-plugin-template in Windows with newer compilers : gcc Version 4.7.3 (rubenvb-4.7.4-release)
The result is a minimal environment, there will be corrections and additions (compilations, libraries) to be done by the users.


Top
Post new topic Reply to topic  [ 26 posts ]  Go to page 1, 2  Next

All times are UTC - 5 hours [ DST ]



* Login  



Powered by phpBB3 © phpBB Group