David,

It seems that the problem is... On the original machine, you are running
the executable in the same directory where the bitmap also resides
(outside of the PAR'ed exe).  So, when you run the executable, it can
find the bitmap.  However, when you move the exe to another machine,
that bitmap does not exist.

The answer, then, is to refer to bitmap _within_ the executable.  Doing
so involves using Archive::Zip to open up the exe and extract the
bitmap.

I'm working on some code now to do just that, as it is a problem I was
trying to solve myself.  When I have something working, I'll post the
code.

Clay.

> -----Original Message-----
> From: David Greenlee 
> [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, February 03, 2004 4:09 PM
> To: [EMAIL PROTECTED]
> Subject: directoryerror reading bitmap file "" 
> 
> 
> Hi,
> 
> I made an executable using pp which works on the machine that created 
> it but not on a different one.
> 
> The error I get is:
> 
> couldn't read bitmap file "": No such file or directoryerror reading 
> bitmap file "" at Tk/Widget.pm line 205.
>   at Tk/Widget.pm line 203
> 
> I use Mac OS 10.3, X11, perl5.8.1, PAR-0.79 and the test script is:
> 
> 
> #!/usr/bin/perl
> use strict;
> use Tk;
> use Tk::DateEntry;
> 
> my $mw = MainWindow->new;
> $mw->title("Hello World");
> $mw->DateEntry->pack;
> $mw->Button(-text => "Done",
>           -command => sub {exit 0;})->pack;
> MainLoop;
> 
> 
> I use PAR to produce an executable by:
> 
> 
> pp -o tk.exe tk.pl
> 
> and run the file on a different machine by:
> 
> ./tk.exe
> 
> which dies with the above error.
> 
> Any suggestions appreciated, David Greenlee
> 
> 

Reply via email to