Re: Perl Gtk2 for Windows
by Anonymous Monk on Jun 21, 2013 at 07:17 UTC
|
| [reply] |
Re: Perl Gtk2 for Windows
by syphilis (Archbishop) on Jun 21, 2013 at 09:49 UTC
|
There are Windows ppm packages (compiled binaries) for both 32-bit and 64-bit perls at the sisyphusion repo.
These binaries can be installed using either the ppm utility or (if that utility is unavailable) the PAR::Dist::InstallPPD module.
Cheers, Rob | [reply] |
Re: Perl Gtk2 for Windows
by dasgar (Priest) on Jun 21, 2013 at 13:29 UTC
|
I haven't used Citrus Perl or Cava packager as someone else has suggested. I believe that the suggestion there is to use Cava packager to bundle your code into a stand-alone executable that the other person can simply run and you don't need to worry about having Perl or anything else installed on their machine. You can do the same thing by installing PAR::Packer and use it's pp utility
Just a few quick points to keep in mind if you go this route. First, if you want to create a Windows executable, you need to be on Windows. Also, 32-bit Windows systems will not be able to run 64-bit executables, but 64-bit Windows systems can run 32-bit executables. So I would suggest building a 32-bit executable for maximum Windows portability.
If you don't have access to a Windows machine to create a Windows executable, an alternative may be to use App::Fatpacker. Then have the other person install Perl on their Windows XP system - they might need Gtk2 libraries installed too. Going this route, I think you can avoid having to be concerned about what modules and what versions of those modules are installed on the Windows system.
| [reply] |
|
|
FINALLY.......!!
I finally got my script running using Gtk2... I was on vacation last week so I hadn't looked at any of
this since a little over a week ago and maybe my PC needed a vacation too, cause now its working ha...
In my previous post I posted code for a script that installs the necessary Modules needed for Gtk2.
The problem I was having was that the Dependency packages needed would fail every single time I would
try installing them. So today I deleted EVERYTHING perl related from my PC and uninstalled "Strawberry"
Perl, (*which is what I'm using now)...
After uninstalling Perl (*5.12 I think) and then reinstalling the most recent Strawberry Perl
version (*5.18)I began installing the necessary Modules one by one using CPAN up until I hit
this ExtUtils::MakeMaker Module, which refused to install nicely... So I tried using "force install"
and was finally able to get that one installed.
After that Module in the list I had more issues installing the other modules using cpan, so I decided to try
ppm which then installed the remaining Modules without any issues at all...
So now I'm going to try to use the pp (*i.e. the Par::Packer) Utility/Module to package up the script
into an executable so I don't have to go through the same hell I went through to get this installed on my XP Virtual
Machine... Or if its easier (*Not sure would have to try it out first) I'll try the CavaPackager program which
looks like it runs as a GUI, so maybe that's easier... Not sure yet though.
Any advice for which Perl "Packager" would be best or if there's anything I need to know before I give it a try?
Any thoughts would be greatly appreciated!
Thanks AGAIN,
Matt
| [reply] |
|
|
As I've said before, I personally have never used Cava Packager, so I can't offer an opinion on whether it is good or bad. I have seen others recommend it in posts on this site. In my personal experience, I have not had any issues using the pp utility from PAR::Packer to create executables.
If you use the pp utility, be sure to read the documentation. You'll probably want the -x option and might want to read about the --gui option.
From my perspective, it looks like you have a choice of two tools to use. Go with the one that both gets the job done and that you're comfortable using.
| [reply] |
Re: Perl Gtk2 for Windows
by linuxkid (Sexton) on Jun 20, 2013 at 20:45 UTC
|
Perl, the Gtk2 Module, the XML module of your choice, and any module you use.
--linuxkid
imrunningoutofideas.co.cc
| [reply] |
Re: Perl Gtk2 for Windows
by mmartin (Monk) on Jun 21, 2013 at 14:11 UTC
|
Hey Guys, thanks for the replies!!
Awesome, you guys gave me lots to think about, thanks alot!
I do like the idea though of a single, stand-alone executable that the user will just be able to run without
needing all those packages installed on their PC...
Also, yes, I do have a windows machine that I have access to. I have a Windows XP 32-bit Virtual machine that I
use from time to time for certain things like this. So that's not a problem. That "Cava Packager" sounds pretty
cool. Maybe I'll give that a shot first and see if I can get that working.
Also, maybe you guys would know the answer to this. I was trying to test my script I have so far on my Windows XP
Virtual Machine I was telling you about. I have Cygwin and Perl installed. But when trying to execute either "cpan"
or "ppm" it doesn't work, I get the command not recognized error when I try to run them. I tried executing the
command "set PATH=%PATH%;C:/cygwin/bin" and then tried running either of those commands again and I end up with
the same error.
Any ides why this would be not working with this? It's been quite a while since I installed Perl and Cygwin so I don't exactly
remember where I installed Perl from, for example I don't remember if it was ActivePerl or what not...
I know cpan is in that directory but I didn't see "ppm" in there. If I run "dir C:\cygwin\bin | find /I 'cpan' "
08/28/2010 04:52 PM 11,831 cpan
08/28/2010 04:44 PM 22,409 cpan2dist
08/29/2010 06:13 AM 3,029 cpaninject
08/28/2010 04:44 PM 3,398 cpanp
08/28/2010 04:44 PM 536 cpanp-run-perl
08/28/2010 04:51 PM 2,048 cpansign
08/28/2010 04:52 PM 9,742 cpantest
Thanks again guys for the info on what I need installed, much appreciated!
I'll give a couple a shot and post back with whichever one I use...
Thanks Again,
Matt
| [reply] [d/l] |
|
|
I know cpan is in that directory but I didn't see "ppm" in there
Cygwin doesn't have a ppm utility - and those pre-compiled binaries (that I linked to earlier) won't work with Cygwin anyway.
They are for native Windows builds of perl - eg ActiveState Perl and Strawberry Perl. I think they'll be fine with Citrus Perl, too, but I know little about that particular build of perl.
Cygwin does provide the GTK+ library, so you should be able to install that using Cygwin's setup.exe and then build Gtk2 using cpan (if you can get that configured correctly).
I avoid using cpan unless the dependency chain for the module I'm trying to install is a long one.
I prefer to download and unpack the source, then run the 'perl Makefile.PL', 'make test', and 'make install' commands by hand. But if cpan can do the job for you, that's the simplest route to take.
Cheers, Rob
| [reply] |
|
|
Hey syphilis, thanks for the reply!
Sorry for the late response but for some reason I don't think I got a notification that someone responded, or
I did and it just buried in my inbox...
Anyway, thanks for the suggestion/explanation I'm thinking I'm going to use "ActiveState Perl" since I feel like
that's the one I've heard the most about.
Did you say that, for example, if I download "Activestate" I will also need "Citrus" or are they not related?
Thanks Again,
Matt
| [reply] |
Re: Perl Gtk2 for Windows
by mmartin (Monk) on Jun 28, 2013 at 18:06 UTC
|
Hey Guys,
Sorry I haven't responded in a while but I finally just finished up my Gtk2 UI for my Perl script.
My script won't run..! Ughh.... I don't know what I'm doing wrong....?
So I downloaded and installed ActivePerl which all went just fine. Now I tried installing Gtk2 but my
script won't execute still. First I tried from CPAN but I think it failed then I searched for Gtk2 in the
PPM GUI that comes with the ActivePerl install, but it could not find Gtk2 package.
But then I found this package in PPM Bundle-Gnome2 which has the description "A bundle to install all
the Gtk2 and Gnome2 modules". So I installed that.
And after installing that and I try to run my script I get this error:
        "Can't locate Gtk2.pm in @INC (@INC contains: C:/Perl/site/lib C:/Perl/lib .) "
Then since that didn't seem to work, I found someone who wrote this script below to install Gtk2. I ran that
and as I watched it go through it seemed to NOT fail on anything. And since I right-clicked the script and did
'Open With: Perl Command Line Interpreter' as soon as it finished it automatically closed the term window so not
sure what happened at the end...?
#!/usr/bin/perl
use strict;
use warnings;
use CPAN;
CPAN::Shell->install(
"Test::Harness",
"Test::More",
"Test::Number::Delta",
"File::Spec",
"Pod::Man",
"Pod::Simple",
"Text::Wrap",
"Pod::Escapes",
"ExtUtils::MakeMaker",
"ExtUtils::PkgConfig",
"ExtUtils::Depends",
"Cairo",
"Glib",
"Pango",
"Gtk2");
So I'm kinda stuck here and I'm not sure what I'm doing wrong...?
Any help would be greatly appreciated.
Thanks in Advance,
Matt
| [reply] [d/l] |