I don't know the WxPerl way, but from the PerlApp perspective, you can
check to see if you are running from a bound file by looking at
$PerlApp::VERSION, and if so, extract the bound file to a temporary
directory. Or you can extract the data directly into a scalar.
my $BOUND;
$BOUND =1 if ( defined $PerlApp::VERSION );
my $bitmap_file = $BOUND
? PerlApp::extract_bound_file('XFX3d_logo.jpg')
: 'C:\\Program Files\\XFX\\SyrINJ\\XFX3d_logo.jpg';
$obj->{bitmap_helpPage} = Wx::BitmapButton->new(
$obj->{pane_Help},
-1,
Wx::Bitmap->new( $bitmap_file, wxBITMAP_TYPE_ANY)
);
Dodger wrote:
Hi, all...
I'm loading up an image into a bitmap button (for a link) like so:
$obj->{bitmap_helpPage} = Wx::BitmapButton->new($obj->{pane_Help},
-1, Wx::Bitmap->new("C:\\Program Files\\XFX\\SyrINJ\\XFX3d_logo.jpg",
wxBITMAP_TYPE_ANY));
The whole thing is to be packaged up with PerlApp for Win32 as a
binary executable. This works fine mostly, except:
...there's no guarantee that the user will install the program into
C:\Program Files\XFX\SyrINJ. They might have their programs installed
on D:\ or they might decide to stick it into a sorted folder like
C:\Program Files\Art\3D\ for instance, in which case the image will be
there, instead.
Is there a normal way to deal with this issue? It seems like it must
be a common issue and stuff. Maybe embed the program? Maybe there's an
ENV key that would know what folder to look in?