http://www.perlmonks.org?node_id=568728

rvosa has asked for the wisdom of the Perl Monks concerning the following question:

Dear monks,

I am building a Wx application, and plan to distribute it packaged with Wx::Perl::Packager. I use several icons (actually *.pngs, though I might use *.gifs or *.xpms instead), which I would like to distribute packed inside the par'ed application. I am curious about how to do this. I've tried placing the icons in a separate folder and add that to the archive (wxpar --gui -a icons -o script.exe script.pl), then accessing this folder relative to the /script folder in the archive (i.e. ../icons), but that doesn't work (wx dies, can't find image). So what's the right way to do this?

Thank you!

Replies are listed 'Best First'.
Re: How to access Wx icons from within *.par
by jdtoronto (Prior) on Aug 22, 2006 at 03:14 UTC
    Hi rvosa,

    't seem like the Wx and PAR experts have found your question yet! Only suggestion I have is that when using ActiveState's PerlApp that I need to use FindBin to determine where the programme is running and then find my module directory relative to that:

    use FindBin; use lib "$FindBin::Bin/lib";
    Have you tried something like that? With PerlApp it is necessary because the application runs in a Temp directory - notht edirectory where the .exe is found.

    jdtoronto

Re: How to access Wx icons from within *.par
by Anonymous Monk on Aug 22, 2006 at 13:34 UTC
    then accessing this folder relative to the /script folder in the archive (i.e. ../icons), but that doesn't work (wx dies, can't find image). So what's the right way to do this?
    RTFM? PAR doesn't change directories.
    D:\> echo I know how to RTFM >data.txt D:\> pp -a data.txt -e "use Cwd;print cwd(),$/;print PAR::read_file(qw +,data.txt,);" D:\> a.exe D:/ I know how to RTFM D:\>