Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

How to access Wx icons from within *.par

by rvosa (Curate)
on Aug 22, 2006 at 00:24 UTC ( #568728=perlquestion: print w/replies, xml ) Need Help??

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:\>

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://568728]
Approved by GrandFather
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2020-11-26 01:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?