logo       

Re: question on glade/gtkperl application packaging: msg#00090

gnome.gtk+.perl

Subject: Re: question on glade/gtkperl application packaging

Thomas Ledbetter wrote:
>
> I've been messin' around with gtk perl for awhile, and lately have
> been using Glade to design the interface. Its cool - but using Glade
> generates many files which make up the end application.
>
> I've seen how to write the interface in gtkperl directly, but its
> really nice to be able to use Glade to design the interface.
>
> Has any one had much success in _easily_ packing everything up into a
> single executable?
>
[...]
> What is the best way to do package a gtkperl application that has had
> its interface created by glade?
Hi Thomas,

If you edit the run script so that it has a line:
use lib "./";

and set the pixmap directory variable to "./pixmaps" (or whatever you set
pixmaps_directory to):
$Glade::PerlRun::pixmaps_directory = "./pixmaps";

the tarball generated by 'make dist' will run wherever you unpack it and
there is no need to install it at all.

eg.
cd /path/to/tmp/directory/
tar xzf /path/to/YourApp-1.23.tar.gz
cd YourApp-1.23
perl run.pl

The app should find all your pixmaps, modules and data.

If you copy Glade/PerlRun.pm to the development directory and make sure
that it is in the MANIFEST file before you run 'make dist' it will be
ready and waiting for the run - this adds about 19k to tarball.

The MANIFEST file can then be reduced to this:

pixmaps/Logo.xpm
src/Base.pm
src/BaseUI.pm
run.pl
Glade/PerlRun.pm

and the app will still run and it does not need Glade-Perl installed on
the target machine - although your app cannot be installed automatically
from this tarball.

I guess that you could write a little bash script to do the unpack/cd/run
that could even look for a later version or ftp it from your site. :)

The only permanent files are the app's data and run files which you will
need to store data in eg. $ENV{HOME}/.yourapp.

Of course, there is no need to unpack the app every time it is used.

Regards, Dermot


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise