On Feb 18, 2008 6:39 AM, Henry Wu <[EMAIL PROTECTED]> wrote:
>    I am building perl/tk application with some icon images. I am trying to
> package all the referenced images to the produced exe too.
>
>    I know I can add extra image file to the produced exe using  --addfile
> option, but how do I reference the file from perl.

Use PAR::read_file or PAR::par_handle, see PAR::Tutorial for examples.

But this means that your program must use different methods to get at the
icons depending on whether it's run as a packed executable or a simple script.
For your use case (icons for a perl/tk application) I would rather put the
icons inline into the script (as-is if they are in XPM format or base64-encoded
if they are PNGs, JPEGs etc):

my $img = $widget->Photo(-format => "png", -data => "base64-encoded image");

Cheers, Roderich

Reply via email to