It is currently Thu Jun 20, 2013 1:11 am


Latest GIMP Scripts & Plug-ins

All times are UTC - 5 hours [ DST ]




Post new topic Reply to topic  [ 58 posts ]  Go to page 1, 2, 3, 4, 5, 6  Next
Author Message
 Post subject: Getting Perl to work in Gimp
PostPosted: Fri Jan 07, 2011 10:38 pm  (#1) 
Offline
GimpChat Member
User avatar

Joined: Oct 19, 2010
Posts: 370
Location: North Central Ohio, USA
First things first: Based on the limited amount of information I've been able to find, it seems that there is a problem getting Perl to work with Gimp under Windows. So, depending on how this turns out, this thread may not work for those using Windows. Can a Windows user confirm general Perl dysfunction for me?

This thread came about as a few of us were discussing a nifty plug-in called Autosave and getting it working in Gimp. You can read more about it and get it here from the Gimp Plugin Registry, if you're interested. The reason it was a bit of a challenge is that there's not much documentation - although to be fair the plug-in author has provided assistance in getting the plug-in to work for persons who asked in the comments area, and as recently as June of 2010. Based on my own experiences, the problems I experienced were not due to the Autosave plug-in, but due to the Gimp-perl plug-in. As best I can tell (and please correct me if I'm wrong, someone), the Gimp-perl plug-in has not been worked on since 2004-2005. Gimp has changed a lot in 6 years.

Gimp-perl provides perl scripting capabilities to Gimp, very similar to how Python does. It can be argued that there's no need to add yet another scripting language to Gimp, and that's fine. In order to get the Autosave plug-in to work, you can either make Gimp-perl work, or rewrite the plug-in in another language.

Here's what I did:
1. Get the Gimp-perl archive from here.
2. Unpack it into a directory. For those using Ubuntu and similar Linux, file-roller or your archive manager should allow you to recreate the enclosed file structure and extract the files.
3. Change to the extracted directory. If you do read the README, it says that you need to have a recent version of Perl, Gtk, Gimp and the Perl Data Language. Truthfully, if you are running a recent version of your Linux-based OS, you will most likely have more up-to-date versions of the dependencies, as the version of Gimp required is 2.2 or better.
4. The README will next tell you to run the following command in a terminal:
perl Makefile.PL
Don't waste your time, it's probably not ready yet. There are some perl dependencies that have to be satisfied before this will run successfully.
5. Do this:
sudo perl -MCPAN -e 'install ExtUtils::Depends'
sudo perl -MCPAN -e 'install ExtUtils::PkgConfig'
sudo apt-get install libsexy-dev

6. Now the perl dependencies should be satisfied, so now run
perl Makefile.PL
Assuming this makefile is able to run successfully, you are now ready for the usual:
sudo make
sudo make test
sudo make install

It's worth noting that there are some interesting perl scripts in the examples directory. It you move them to you plugins directory they will become usable in Gimp.

7. Now it's likely I goofed somewhere along the line, but when all this was done, Gimp couldn't find Gimp-perl. Gimp was looking for the perl stuff in a directory that didn't exist: /opt/bin/. Rather than uninstall and possibly really screwing something up, I elected to create the missing directory and put in a symbolic link there that pointed to my actual perl installation in /usr/bin. I used the following command in a terminal:
sudo ln -s /usr/bin/perl /opt/bin/perl
If you are not familiar with this command ln -s (that's a lower-case 'L') is a command that allows you to make a link between a file - sort of like a detour sign, and the -s option specifies that the link is symbolic. /usr/bin/perl is the actual file that I want the OS to find and /opt/bin/perl is the symbolic link that this command creates - the detour sign, if you will.

Here's what I found out. The Gimp-perl plug-in seems to suffer from the same age-related problems that many old Script-Fu/Scheme plug-in do. It seems to use deprecated procedure names that give Gimp hiccups that you will notice if you start Gimp from the command line. If you don't then you will see errors when running the examples. The errors did not seem to affect the operation of the scripts.

Autosave will appear on the Gimp File Menu, and there are three menu options. First is to disable the plug-in, next to enable, and third to set configuration options.

As always, your mileage may vary. I think I got lucky in getting Gimp-perl to work with just me and Google. If you need more in-depth help you may wish to contact rain, the author/poster of Autosave, through the GimpPlugin Registry as he/she seems willing to offer any assistance if asked. I'm willing to help anybody who wants to take a swing at it also, but "I ain't no professional." :hehe

_________________
Adult Truth: #11
It's the bumps in the road of life that make it worth traveling.


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Profile  
 

 Post subject: Re: Getting Perl to work in Gimp
PostPosted: Fri Jan 07, 2011 10:56 pm  (#2) 
Offline
GimpChat Member

Joined: Oct 06, 2010
Posts: 2688
Your discovery of #5 made all the difference for me being able to compile. Had you not been able to distinguish what you needed from your google searches, I wouldn't have it compiled now. I gave up on it last year. See how great gimpchat really is? Many thanks, Bob!

_________________
You cannot do a kindness too soon because you never know how soon it will be too late.

~Ralph Waldo Emerson


Top
 Profile  
 
 Post subject: Re: Getting Perl to work in Gimp
PostPosted: Sat Jan 08, 2011 12:14 am  (#3) 
Offline
GimpChat Member
User avatar

Joined: Oct 19, 2010
Posts: 370
Location: North Central Ohio, USA
You're welcome, mahvin!

I'm really surprised (thinking about this further) that this hasn't been written in Python. Maybe my surprise is due to my ignorance - as in, I don't know what python is capable of compared to perl; and I know next to nothing about perl. I was only good at programming in BASICA under DOS. :rofl

_________________
Adult Truth: #11
It's the bumps in the road of life that make it worth traveling.


Top
 Profile  
 
 Post subject: Re: Getting Perl to work in Gimp
PostPosted: Sat Jan 08, 2011 5:30 am  (#4) 
Offline
Global Moderator
User avatar

Joined: May 16, 2010
Posts: 9354
Location: "Looking for my eraser" =P
No way to get it to work in windows as msys or cygwin doesnt understand sudo command or a few others.
msysgit is possible along with cyg-apt, but anything like sudo or any other linux commands are not available i don't think.
Oh well maybe someone will come along and script it in Python or SCM. =)

Thanks for all your work in this though Bob! :coolthup :tyspin

_________________
Image
Gimp Rocks Blog
Simply Gimp Tutorials
"Once your in the cloud, you're in the net"
____________
OK, . . . . so what's the speed of dark?


Top
 Profile  
 
 Post subject: Re: Getting Perl to work in Gimp
PostPosted: Sat Jan 08, 2011 9:00 am  (#5) 
Offline
GimpChat Member
User avatar

Joined: Oct 19, 2010
Posts: 370
Location: North Central Ohio, USA
Rod,
Right, there's no such animal as sudo on a Windows machine. The closest thing you'd have is "Run as Administrator" on certain versions. I didn't really expect it to directly cross over, what I was after from Windows users was some feedback about whether or not they can install and run Perl itself. If they cannot get Perl to install and run, then any Perl script will fail. :(

_________________
Adult Truth: #11
It's the bumps in the road of life that make it worth traveling.


Top
 Profile  
 
 Post subject: Re: Getting Perl to work in Gimp
PostPosted: Sat Jan 08, 2011 9:19 am  (#6) 
Offline
Global Moderator
User avatar

Joined: May 16, 2010
Posts: 9354
Location: "Looking for my eraser" =P
Yes i do have Perl installed, in C:\Perl\bin.
When i was compiling gimp-2.7.2 or trying to compile it i should say, i had perl working fine.
But i had to copy it into a bin folder named "opt" - C:\cygwin\bin\opt\Perl

although the compiler found it fine in C:\Perl\bin - Gimp is a strange monkey to build in windows

_________________
Image
Gimp Rocks Blog
Simply Gimp Tutorials
"Once your in the cloud, you're in the net"
____________
OK, . . . . so what's the speed of dark?


Top
 Profile  
 
 Post subject: Re: Getting Perl to work in Gimp
PostPosted: Sat Jan 08, 2011 10:02 am  (#7) 
Offline
GimpChat Member
User avatar

Joined: Oct 19, 2010
Posts: 370
Location: North Central Ohio, USA
Here's the reason I asked: In my search for Perl-related things, I happened across the Camelbox project. It seems to be capable of installing Perl, and all of the bits and bytes that Gimp uses such as Gtk, pango, cairo, etc. on a 32-bit Windows machine

I was intrigued as most of this stuff is a challenge (usually) when trying to get Gimp up and running on Windows - or it was, anyhow. I ran the installer just a few minutes ago on my VirtualBox Win XP 32-bit and at the very least, the installer reported no problems and installed a ton of software, even MinGW! (One of the options, the one I selected, was "Bloatware", referred to as the whole enchilada in the installer.)

I'm in the very early stages of testing this, so other than a successful installation, I don't have any other info. And my machine hasn't started spamming Chinese ED cures, so I'm hopeful. :rofl I already have a working Gimp 2.6.11 install on this VM, so...we will see where it leads.

If you are interested in checking this out, look here:Camelbox.
Quote:
What is Camelbox?¶

A complete build of Perl for 32-bit Windows that includes:

* A nice Windows installer that automatically downloads and installs the correct archive files
* All of the core Gtk2-Perl modules (Gtk2, Glib, Cairo), as well as their equivalent C libraries compiled for Windows.
* A working CPAN module
* Bonus (!) Perl modules, including DBI/DBD[SQLite|mysql|Pg|ODBC] and friends
* Extra binaries, utilities, development libraries/headers for compiling even more Perl modules from CPAN
* Lots of Perl/GTK documenation in HTML format
* Windows shortcuts for applications, demos, documentation, and links to doumentation/tutorials on the web

all neatly packaged and ready to install!

_________________
Adult Truth: #11
It's the bumps in the road of life that make it worth traveling.


Top
 Profile  
 

 Post subject: Re: Getting Perl to work in Gimp
PostPosted: Sun Jan 09, 2011 12:59 am  (#8) 
Offline
GimpChat Member

Joined: Apr 12, 2010
Posts: 4960
No problem to install Perl on win , camelbox seems a very good resource

_________________
My 3D Gallery on Deviantart http://photocomix2.deviantart.com/
Main gallery http://www.flickriver.com/photos/photocomix-mandala/
Mandala and simmetry http://www.flickriver.com/photos/photocomix_mandala/

Image

Mrs Wilbress


Top
 Profile  
 
 Post subject: Re: Getting Perl to work in Gimp
PostPosted: Sun Jan 09, 2011 1:01 am  (#9) 
Offline
Global Moderator
User avatar

Joined: May 16, 2010
Posts: 9354
Location: "Looking for my eraser" =P
Thanks Bob, and PC i' will check it out.
I have Perl already but wth. :)

_________________
Image
Gimp Rocks Blog
Simply Gimp Tutorials
"Once your in the cloud, you're in the net"
____________
OK, . . . . so what's the speed of dark?


Top
 Profile  
 
 Post subject: Re: Getting Perl to work in Gimp
PostPosted: Sun Jan 09, 2011 9:07 am  (#10) 
Offline
GimpChat Member
User avatar

Joined: Oct 19, 2010
Posts: 370
Location: North Central Ohio, USA
Rod,
I noticed this morning in the Autosave plugin comments at the Gimp Plugin Registry that a poster named wacmaster is also trying to get this running using Camelbox. You may want to check there now and then and see if he makes any progress. (Actually he beat me to it - I planned on posting there this morning once I got everyone off to church and the house quieted down. It's enough of a challenge to switch back and forth between my Linux host and the XP VM and keeping my brain straight without all the cats/dogs/people noise that accompanies a Sunday morning! :gaah )

_________________
Adult Truth: #11
It's the bumps in the road of life that make it worth traveling.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 58 posts ]  Go to page 1, 2, 3, 4, 5, 6  Next

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: Google Feedfetcher and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

* Login  

* Subscribe to Gimp Chat's RSS Feed    * Subscribe to Gimp Chat's Tutorial RSS Feed


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group