From: David K. <da...@po...> - 2002-09-01 15:19:35
|
Has anyone successfully converted a simple "hello world" wxPerl script into an .exe using the Activestate PDK's PerlApp utility? i've been trying all day with no joy. the .exe failed silently until i tried compiling it without the -gui option. after droppping the -gui, i see this error on stderr (at run time, not compile time): Can't load 'auto/Wx/Wx.dll' for module Wx: load_file:One of the library files ne eded to run this application cannot be found at /PerlApp/DynaLoader.pm line 212. but the "verbose" perlapp output (below) clearly shows that perlapp found and included the Wx.dll: PerlApp 4.0.0 build 401 Copyright (C) ActiveState Corp 2001-2002. All rights reserved. Commercial license for David Kaufman <da...@gi...> +++ C:/Perl/lib/AutoLoader.pm +++ C:/Perl/lib/Carp.pm +++ C:/Perl/lib/Carp/Heavy.pm +++ C:/Perl/lib/Config.pm +++ DynaLoader.pm (internal) +++ C:/Perl/lib/Errno.pm +++ C:/Perl/lib/Exporter.pm +++ C:/Perl/lib/Exporter/Heavy.pm +++ C:/Perl/lib/File/Glob.pm +++ C:/Perl/lib/Text/ParseWords.pm +++ C:/Perl/lib/Tie/Handle.pm +++ C:/Perl/site/lib/Wx.pm +++ C:/Perl/site/lib/Wx/App.pm +++ C:/Perl/site/lib/Wx/Bitmap.pm +++ C:/Perl/site/lib/Wx/Brush.pm +++ C:/Perl/site/lib/Wx/Caret.pm +++ C:/Perl/site/lib/Wx/Colour.pm +++ C:/Perl/site/lib/Wx/ComboBox.pm +++ C:/Perl/site/lib/Wx/ControlWithItems.pm +++ C:/Perl/site/lib/Wx/Cursor.pm +++ C:/Perl/site/lib/Wx/DC.pm +++ C:/Perl/site/lib/Wx/DND.pm +++ C:/Perl/site/lib/Wx/DropSource.pm +++ C:/Perl/site/lib/Wx/Event.pm +++ C:/Perl/site/lib/Wx/FS.pm +++ C:/Perl/site/lib/Wx/Grid.pm +++ C:/Perl/site/lib/Wx/Help.pm +++ C:/Perl/site/lib/Wx/Html.pm +++ C:/Perl/site/lib/Wx/Icon.pm +++ C:/Perl/site/lib/Wx/Image.pm +++ C:/Perl/site/lib/Wx/ImageList.pm +++ C:/Perl/site/lib/Wx/ListCtrl.pm +++ C:/Perl/site/lib/Wx/Locale.pm +++ C:/Perl/site/lib/Wx/MDI.pm +++ C:/Perl/site/lib/Wx/Menu.pm +++ C:/Perl/site/lib/Wx/Pen.pm +++ C:/Perl/site/lib/Wx/Print.pm +++ C:/Perl/site/lib/Wx/RadioBox.pm +++ C:/Perl/site/lib/Wx/Rect.pm +++ C:/Perl/site/lib/Wx/Region.pm +++ C:/Perl/site/lib/Wx/STC.pm +++ C:/Perl/site/lib/Wx/ScreenDC.pm +++ C:/Perl/site/lib/Wx/Sizer.pm +++ C:/Perl/site/lib/Wx/SplashScreen.pm +++ C:/Perl/site/lib/Wx/StaticBitmap.pm +++ C:/Perl/site/lib/Wx/Timer.pm +++ C:/Perl/site/lib/Wx/ToolBar.pm +++ C:/Perl/site/lib/Wx/TreeCtrl.pm +++ C:/Perl/site/lib/Wx/Window.pm +++ C:/Perl/site/lib/Wx/_Constants.pm +++ C:/Perl/site/lib/Wx/_Exp.pm +++ C:/Perl/site/lib/Wx/_Functions.pm +++ C:/Perl/site/lib/Wx/_Inheritance.pm +++ C:/Perl/site/lib/Wx/_Ovl.pm +++ XSLoader.pm (internal) +++ C:/Perl/lib/auto/DynaLoader/autosplit.ix +++ C:/Perl/lib/auto/DynaLoader/dl_expandspec.al +++ C:/Perl/lib/auto/DynaLoader/dl_find_symbol_anywhere.al +++ C:/Perl/lib/auto/DynaLoader/dl_findfile.al +++ C:/Perl/lib/auto/File/Glob/Glob.dll +++ C:/Perl/lib/auto/File/Glob/autosplit.ix +++ C:/Perl/site/lib/auto/Wx/Wx.dll +++ C:/Perl/lib/base.pm +++ C:/Perl/lib/fields.pm +++ C:/Perl/lib/overload.pm +++ C:/Perl/lib/strict.pm +++ C:/Perl/lib/vars.pm +++ C:/Perl/lib/warnings.pm +++ C:/Perl/lib/warnings/register.pm Created 'test.exe' any help would be greatly appreaciated, -dave |
From: DH <cra...@ya...> - 2002-09-01 16:34:35
|
Hi. I've tried using Set(Fore|Back)groundColour with Wx::StaticLine, but it's not working. Wx::Static line is a Wx::Window, so it should happen. Refresh should help, but it doesn't. Neither does Clear. Calling Show('show') does paint it the default light gray, but only if you pass Show as string. Show(1) doesn't quite work. (this is also very bizzare ). The color gets set, cause if I set/get it, I can see that the values are correct, the static line just never gets painted, like it should. I believe this to be a bug ( it can't be because it's a "static" line, or can it ;)? My example is below, width peaks at 80 chars ;) =head1 NAME Wx::HexOrRgb - a Wx Dialog/App for converting color from/to hex/rgb =head1 SYNOPSIS perl -MWx::HexOrRgb -e Wx::HexOrRgb::App->new()->MainLoop() # or use Wx::HexOrRgb; Wx::HexOrRgb::App->new()->MainLoop(); # or even require Wx::HexOrRgb; system $^X, $INC{'Wx/HexOrRgb.pm'}; # or the oneliner version (quotes may vary ;) perl -mWx::HexOrRgb -e"system $^X, $INC{q{Wx/HexOrRgb.pm}};" # -m is equivalent to use Wx::HexOrRgb(); in case you was wondering =head1 DESCRIPTION Run it as a standalone app, or embed it easily into any wxPerl application, cause you never know when it might come in handy to convert between rgb and hex You probably got Wx::HexOrRgb from http://perlmonks.org/index.pl?node_id=194461 $Id: HexOrRgb.pm,v 0.05 2002/09/1 16:21:00 _ Exp $ =cut package Wx::HexOrRgb; use Wx qw( :everything ); use Wx::Event qw( EVT_RIGHT_DOWN EVT_SLIDER EVT_BUTTON ); use base qw( Wx::Frame ); use vars qw( $VERSION ); use strict; $VERSION = 0.05; sub new { my $class = shift; my $SIZE = [500,160]; my $self = $class->SUPER::new( undef, -1, "Wx::HexOrRgb - you know what it is ;)", [ 50, 50], $SIZE, wxSIMPLE_BORDER # as perl boo_radley's instruction | wxTHICK_FRAME # allows for resizability -- i don't want taht | wxSYSTEM_MENU | wxCAPTION | wxSYSTEM_MENU | wxMINIMIZE_BOX | wxCLIP_CHILDREN, # removes flicker (windows only) ); $self->SetIcon( Wx::GetWxPerlIcon() ); my $p = Wx::Panel->new( $self, -1, [50,50], $SIZE, ); $self->GUI($p); ## and we construct the dialog EVT_BUTTON( $self, $self->ID('HEX2RGB_BUTTON'), \&OnHEX ); EVT_RIGHT_DOWN( $self, \&OnAbout ); EVT_RIGHT_DOWN( $p, \&OnAbout ); EVT_SLIDER( $self, $self->ID('R_SLIDER'), sub { my( $self, $event ) = @_; my $pos = $event->GetInt; $self->OnRGB($pos ); }); EVT_SLIDER( $self, $self->ID('G_SLIDER'), sub { my( $self, $event ) = @_; my $pos = $event->GetInt; $self->OnRGB(undef, $pos ); }); EVT_SLIDER( $self, $self->ID('B_SLIDER'), sub { my( $self, $event ) = @_; my $pos = $event->GetInt; $self->OnRGB(undef, undef, $pos ); }); for my $key( keys %{ $self->ID() } ) { EVT_RIGHT_DOWN( $self->FindWindow( $self->ID($key) ), \&OnAbout ); } my( $MainSizer ) = Wx::BoxSizer->new( Wx::wxHORIZONTAL ); $MainSizer->Add( $p, 1, wxGROW ); $self->SetSizer( $MainSizer ); $self->SetAutoLayout( 1 ); ## ;) $self->Layout(); ##force layout of the children anew $MainSizer->Fit( $self ); $MainSizer->SetSizeHints( $self ); #die Wx::GetColourFromUser( $self ); return $self; } #### THE EVENT HANDLERS sub OnRGB { my( $self, $r, $g, $b ) = @_; $r ||= $self->FindWindow( $self->ID('R_SLIDER') )->GetValue; $g ||= $self->FindWindow( $self->ID('G_SLIDER') )->GetValue; $b ||= $self->FindWindow( $self->ID('B_SLIDER') )->GetValue; my $rgb = $self->FindWindow( $self->ID('RGB_PANEL') ); $rgb->Refresh; # or Clear ;) $rgb->SetBackgroundColour( new Wx::Colour( $r, $g, $b ) ); $self->FindWindow( $self->ID('HEX_TEXT') )->SetValue( sprintf '#%02X%02X%02X', $r, $g, $b ); } sub OnHEX { my( $self, $evt ) = @_; $_ = $self->FindWindow( $self->ID('HEX_TEXT') )->GetValue; my( $r, $g, $b ) = m/\#?([a-z0-9]{2})([a-z0-9]{2})([a-z0-9]{2})/i; unless( $r and $g and $b ) { Wx::MessageBox( "Sorry mate, missing a hex value someplace. ($_) Need 6 you know.", "EEEEEEEEK! Now how'd that happen?!?!?", wxICON_ERROR | wxOK, $self, ); return(); }; for ( $r, $g, $b ) { $_ = hex $_; } $self->FindWindow( $self->ID('R_SLIDER') )->SetValue( $r ); $self->FindWindow( $self->ID('G_SLIDER') )->SetValue( $g ); $self->FindWindow( $self->ID('B_SLIDER') )->SetValue( $b ); my $rgb = $self->FindWindow( $self->ID('RGB_PANEL') ); $rgb->Refresh; # or Clear ;) $rgb->SetBackgroundColour( new Wx::Colour( $r, $g, $b ) ); } sub OnAbout { my( $self, $event ) = @_; # display a simple about box (i just keep copying and pasting this) Wx::MessageBox( qq[ ${\__PACKAGE__} $VERSION Created by podmaster of perlmonks.org fame running on wxPerl $Wx::VERSION ${\wxVERSION_STRING()} This program is released under the same terms as perl itself (if you don't know what that means, visit http://perl.com ) To learn more about wxPerl visit http://wxperl.sf.net/ ], "About ${\__PACKAGE__} $VERSION", # TITLE wxOK | wxICON_INFORMATION, $self ); } ##### GGGUI GENERATORs sub BOXS { my( $self, $parent, $str, $orient ) = @_; return Wx::StaticBoxSizer->new( Wx::StaticBox->new( $parent, $self->ID(time.{}.rand), # so I can register OnAbout $str, ,), $orient, ,); } sub ID { ## ALL KEYS ARE UPPERCASED my($self, $key, $dontCreate ) = @_; return $self->{"\0ID_"} if not defined $key; $self->{"\0I"} ||=6660; # the perpetual ID incrementor $key = uc($key); if(exists $self->{"\0ID_"}->{$key} ) { return $self->{"\0ID_"}->{$key}; } else { return 0 if $dontCreate; return $self->{"\0ID_"}->{$key} = ++$self->{"\0I"}; } } sub GUI { my( $self, $parent ) = @_; my $RSizer = $self->BOXS($parent, "v. Red", wxVERTICAL); my $RScroll = Wx::Slider->new( $parent, $self->ID('R_SLIDER'), 255, 0, 255, [-1,-1], [-1,-1], wxSL_HORIZONTAL | wxSL_AUTOTICKS | wxSL_LABELS # not nice imho ;( ## wxSB_HORIZONTAL ## no different thant wxSL_HORIZONTAL ); $RSizer->Add( $RScroll, 1, wxGROW | wxALIGN_CENTRE, 0); my $GSizer = $self->BOXS($parent, "v. Green", wxVERTICAL); my $GScroll = Wx::Slider->new( $parent, $self->ID('G_SLIDER'), 255, 0, 255, [-1,-1], [-1,-1], wxSL_HORIZONTAL | wxSL_AUTOTICKS | wxSL_LABELS # not nice imho ;( ); $GSizer->Add( $GScroll, 1, wxGROW | wxALIGN_CENTRE, 0); my $BSizer = $self->BOXS($parent, "v. Blue", wxVERTICAL); my $BScroll = Wx::Slider->new( $parent, $self->ID('B_SLIDER'), 255, 0, 255, [-1,-1], [-1,-1], wxSL_HORIZONTAL | wxSL_AUTOTICKS | wxSL_LABELS # not nice imho ;( ); $BSizer->Add( $BScroll, 1, wxGROW | wxALIGN_CENTRE, 0); my $Hex2RGB = Wx::Button->new( $parent, $self->ID('HEX2RGB_BUTTON'), "HEX TO RGB", wxDefaultPosition, wxDefaultSize, wxNO_BORDER ); my $HexText = Wx::TextCtrl->new( $parent, $self->ID('HEX_TEXT'), '#FFFFFF', [-1,-1], [-1,-1], ); my $StaticLine = new Wx::StaticLine( $parent, $self->ID('HEX_LINE'), [-1,-1], [-1,-1], wxLI_HORIZONTAL | wxSIMPLE_BORDER | wxCLIP_CHILDREN ); warn $_.' '.$StaticLine->GetBackgroundColour->$_ for qw/Red Green Blue/; warn $_.' '.$StaticLine->GetForegroundColour->$_ for qw/Red Green Blue/; $StaticLine->Show(1); # won't cut it, but a string will, imagine that?? $StaticLine->Show('string'); ## the following don't do anything, WTF??? $StaticLine->Refresh(); $StaticLine->Clear(); $StaticLine->SetBackgroundColour( new Wx::Colour(0,0,255) ); # RED $StaticLine->SetForegroundColour( new Wx::Colour(0,0,255) ); warn $_.' '.$StaticLine->GetBackgroundColour->$_ for qw/Red Green Blue/; warn $_.' '. $StaticLine->GetForegroundColour->$_ for qw/Red Green Blue/; my $ButtonSizer = Wx::BoxSizer->new( wxHORIZONTAL ); $ButtonSizer->Add( $Hex2RGB, 0, wxCENTRE | wxALIGN_LEFT | wxALL, 5 ); $ButtonSizer->Add( $StaticLine, 1, wxCENTRE | wxGROW, 5 ); $ButtonSizer->Add( $HexText, 0, wxCENTRE | wxALIGN_RIGHT| wxALL, 5 ); my $RGBSizer = Wx::BoxSizer->new( wxVERTICAL ); $RGBSizer->Add( $RSizer, 1, wxGROW | wxALIGN_CENTRE, 5 ); $RGBSizer->Add( $GSizer, 1, wxGROW | wxALIGN_CENTRE, 5 ); $RGBSizer->Add( $BSizer, 1, wxGROW | wxALIGN_CENTRE, 5 ); $RGBSizer->Add( $ButtonSizer, 1, wxGROW | wxALIGN_CENTRE, 5 ); my $RGBPanel = Wx::Panel->new( $parent, $self->ID('RGB_PANEL'), [-1, -1], [100, -1], ); $RGBPanel->SetBackgroundColour( new Wx::Colour(255, 255, 255) ); # white my $RGBPanelSizer = $self->BOXS($parent, "h. RGB", wxHORIZONTAL); $RGBPanelSizer->Add( $RGBPanel, 1, wxGROW | wxALIGN_CENTRE, 5 ); my $RootSizer = Wx::BoxSizer->new( wxHORIZONTAL ); $RootSizer->Add( $RGBSizer, 1, wxGROW | wxALIGN_CENTRE, 5 ); $RootSizer->Add( $RGBPanelSizer, 0, wxGROW | wxALIGN_CENTRE, 5 ); $parent->SetAutoLayout( 1 ); $parent->SetSizer( $RootSizer ); # $RootSizer->Fit( $parent ); # cause I don't want it fitted $RootSizer->SetSizeHints( $parent ); return $RootSizer; } package Wx::HexOrRgb::App; use strict; use Wx; use base qw(Wx::App); sub OnInit { my( $self ) = @_; my( $frame ) = new Wx::HexOrRgb(); $frame->Show(1); $frame->Refresh(); 1; } package main; # if this file is invoked directly (not use'd), run the app unless( caller() ) { Wx::HexOrRgb::App->new()->MainLoop(); } __END__ =head1 AUTHOR podmaster - http://perlmonks.org/index.pl?node=podmaster =head1 LICENSE Copyright D.H ( podmaster ) http://crazyinsomniac.perlmonk.org 2002, All rights reserved. This program is released under the same terms as perl itself (if you don't know what that means, visit http://perl.com ) =cut http://perlmonks.org/index.pl?node_id=155288;#Holy Getopt::Long, Pod::Usage Man! __________________________________________________ Do You Yahoo!? Yahoo! Finance - Get real-time stock quotes http://finance.yahoo.com |
From: Nick J. <sk...@er...> - 2002-09-01 21:29:04
|
I had the exact same problem. To fix it, just copy the "auto" directory containing the wxWindows/wxPerl .DLL files into the directory with your script in it. It worked fine for me then. If the --gui causes a "Bad command or filename" or the equivalent NT/Win2k error to appear, I have a fix for that too. In Perl's config files, one of the vars contains the location to Perl's binary. I think it might be PERL5BIN but I honestly can't remember. Anyway the problem is caused when this path includes UNIX-style forward slashes rather than the DOS/Windows style slashes. AFAIK this is because the PerlApp program runs another program which modifies the executable to be a GUI program. And command.com doesn't take kindly to UNIX-style slashes. Hope this works. It took me ages to figure this out, I don't know why PDK cannot include the required files automatically. Regards, Nick Johnston David Kaufman wrote: >Has anyone successfully converted a simple "hello world" wxPerl script >into an .exe using the Activestate PDK's PerlApp utility? > >i've been trying all day with no joy. the .exe failed silently until i >tried compiling it without the -gui option. after droppping the -gui, i >see this error on stderr (at run time, not compile time): > >Can't load 'auto/Wx/Wx.dll' for module Wx: load_file:One of the library >files ne >eded to run this application cannot be found at /PerlApp/DynaLoader.pm >line 212. > >but the "verbose" perlapp output (below) clearly shows that perlapp >found and included the Wx.dll: > >PerlApp 4.0.0 build 401 >Copyright (C) ActiveState Corp 2001-2002. All rights reserved. >Commercial license for David Kaufman <da...@gi...> > >+++ C:/Perl/lib/AutoLoader.pm >+++ C:/Perl/lib/Carp.pm >+++ C:/Perl/lib/Carp/Heavy.pm >+++ C:/Perl/lib/Config.pm >+++ DynaLoader.pm (internal) >+++ C:/Perl/lib/Errno.pm >+++ C:/Perl/lib/Exporter.pm >+++ C:/Perl/lib/Exporter/Heavy.pm >+++ C:/Perl/lib/File/Glob.pm >+++ C:/Perl/lib/Text/ParseWords.pm >+++ C:/Perl/lib/Tie/Handle.pm >+++ C:/Perl/site/lib/Wx.pm >+++ C:/Perl/site/lib/Wx/App.pm >+++ C:/Perl/site/lib/Wx/Bitmap.pm >+++ C:/Perl/site/lib/Wx/Brush.pm >+++ C:/Perl/site/lib/Wx/Caret.pm >+++ C:/Perl/site/lib/Wx/Colour.pm >+++ C:/Perl/site/lib/Wx/ComboBox.pm >+++ C:/Perl/site/lib/Wx/ControlWithItems.pm >+++ C:/Perl/site/lib/Wx/Cursor.pm >+++ C:/Perl/site/lib/Wx/DC.pm >+++ C:/Perl/site/lib/Wx/DND.pm >+++ C:/Perl/site/lib/Wx/DropSource.pm >+++ C:/Perl/site/lib/Wx/Event.pm >+++ C:/Perl/site/lib/Wx/FS.pm >+++ C:/Perl/site/lib/Wx/Grid.pm >+++ C:/Perl/site/lib/Wx/Help.pm >+++ C:/Perl/site/lib/Wx/Html.pm >+++ C:/Perl/site/lib/Wx/Icon.pm >+++ C:/Perl/site/lib/Wx/Image.pm >+++ C:/Perl/site/lib/Wx/ImageList.pm >+++ C:/Perl/site/lib/Wx/ListCtrl.pm >+++ C:/Perl/site/lib/Wx/Locale.pm >+++ C:/Perl/site/lib/Wx/MDI.pm >+++ C:/Perl/site/lib/Wx/Menu.pm >+++ C:/Perl/site/lib/Wx/Pen.pm >+++ C:/Perl/site/lib/Wx/Print.pm >+++ C:/Perl/site/lib/Wx/RadioBox.pm >+++ C:/Perl/site/lib/Wx/Rect.pm >+++ C:/Perl/site/lib/Wx/Region.pm >+++ C:/Perl/site/lib/Wx/STC.pm >+++ C:/Perl/site/lib/Wx/ScreenDC.pm >+++ C:/Perl/site/lib/Wx/Sizer.pm >+++ C:/Perl/site/lib/Wx/SplashScreen.pm >+++ C:/Perl/site/lib/Wx/StaticBitmap.pm >+++ C:/Perl/site/lib/Wx/Timer.pm >+++ C:/Perl/site/lib/Wx/ToolBar.pm >+++ C:/Perl/site/lib/Wx/TreeCtrl.pm >+++ C:/Perl/site/lib/Wx/Window.pm >+++ C:/Perl/site/lib/Wx/_Constants.pm >+++ C:/Perl/site/lib/Wx/_Exp.pm >+++ C:/Perl/site/lib/Wx/_Functions.pm >+++ C:/Perl/site/lib/Wx/_Inheritance.pm >+++ C:/Perl/site/lib/Wx/_Ovl.pm >+++ XSLoader.pm (internal) >+++ C:/Perl/lib/auto/DynaLoader/autosplit.ix >+++ C:/Perl/lib/auto/DynaLoader/dl_expandspec.al >+++ C:/Perl/lib/auto/DynaLoader/dl_find_symbol_anywhere.al >+++ C:/Perl/lib/auto/DynaLoader/dl_findfile.al >+++ C:/Perl/lib/auto/File/Glob/Glob.dll >+++ C:/Perl/lib/auto/File/Glob/autosplit.ix >+++ C:/Perl/site/lib/auto/Wx/Wx.dll >+++ C:/Perl/lib/base.pm >+++ C:/Perl/lib/fields.pm >+++ C:/Perl/lib/overload.pm >+++ C:/Perl/lib/strict.pm >+++ C:/Perl/lib/vars.pm >+++ C:/Perl/lib/warnings.pm >+++ C:/Perl/lib/warnings/register.pm > >Created 'test.exe' > > > >any help would be greatly appreaciated, > >-dave > > > > >------------------------------------------------------- >This sf.net email is sponsored by: OSDN - Tired of that same old >cell phone? Get a new here for FREE! >https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390 >_______________________________________________ >wxperl-users mailing list >wxp...@li... >https://lists.sourceforge.net/lists/listinfo/wxperl-users > > > |
From: David K. <da...@po...> - 2002-09-02 06:12:41
|
Thanks for the reply, Nick! You were quite right. it turned out that perlapp "knew" my app required Wx.dll so it included that properly, but perlapp did *not* notice that Wx.dll has dependencies of it's own, on wx22_9.dll that was installed right next to Wx.dll. my .exe file runs fine as long as the wx22_9.dll is in right there the same directory along side of it, or even if i throw it in the windows directory or, i suspect, anywhere else in the system's path. i haven't figured out just how to have perlapp "bind" it properly into the exe, and expand it at run time, but that's okay; i can just distribute that dll with with .exe anyway, keep the exe size smaller, and save perlapp the trouble of expanding it and cleaning it up for each run... thanks again! -dave Nick Johnston <sk...@er...> wrote: > > I had the exact same problem. > > To fix it, just copy the "auto" directory containing the > wxWindows/wxPerl .DLL files into the directory with your script in it. > It worked fine for me then. > > If the --gui causes a "Bad command or filename" or the equivalent > NT/Win2k error to appear, I have a fix for that too. In Perl's config > files, one of the vars contains the location to Perl's binary. I think > it might be PERL5BIN but I honestly can't remember. Anyway the problem > is caused when this path includes UNIX-style forward slashes rather > than the DOS/Windows style slashes. AFAIK this is because the PerlApp > program runs another program which modifies the executable to be a > GUI program. And command.com doesn't take kindly to UNIX-style > slashes. > > Hope this works. It took me ages to figure this out, I don't know why > PDK cannot include the required files automatically. > > Regards, > > > Nick Johnston > > David Kaufman wrote: > >> Has anyone successfully converted a simple "hello world" wxPerl >> script into an .exe using the Activestate PDK's PerlApp utility? >> >> i've been trying all day with no joy. the .exe failed silently >> until i tried compiling it without the -gui option. after droppping >> the -gui, i see this error on stderr (at run time, not compile time): >> >> Can't load 'auto/Wx/Wx.dll' for module Wx: load_file:One of the >> library files ne >> eded to run this application cannot be found at >> /PerlApp/DynaLoader.pm line 212. >> >> but the "verbose" perlapp output (below) clearly shows that perlapp >> found and included the Wx.dll: >> >> PerlApp 4.0.0 build 401 >> Copyright (C) ActiveState Corp 2001-2002. All rights reserved. >> Commercial license for David Kaufman <da...@gi...> >> >> +++ C:/Perl/lib/AutoLoader.pm >> +++ C:/Perl/lib/Carp.pm >> +++ C:/Perl/lib/Carp/Heavy.pm >> +++ C:/Perl/lib/Config.pm >> +++ DynaLoader.pm (internal) >> +++ C:/Perl/lib/Errno.pm >> +++ C:/Perl/lib/Exporter.pm >> +++ C:/Perl/lib/Exporter/Heavy.pm >> +++ C:/Perl/lib/File/Glob.pm >> +++ C:/Perl/lib/Text/ParseWords.pm >> +++ C:/Perl/lib/Tie/Handle.pm >> +++ C:/Perl/site/lib/Wx.pm >> +++ C:/Perl/site/lib/Wx/App.pm >> +++ C:/Perl/site/lib/Wx/Bitmap.pm >> +++ C:/Perl/site/lib/Wx/Brush.pm >> +++ C:/Perl/site/lib/Wx/Caret.pm >> +++ C:/Perl/site/lib/Wx/Colour.pm >> +++ C:/Perl/site/lib/Wx/ComboBox.pm >> +++ C:/Perl/site/lib/Wx/ControlWithItems.pm >> +++ C:/Perl/site/lib/Wx/Cursor.pm >> +++ C:/Perl/site/lib/Wx/DC.pm >> +++ C:/Perl/site/lib/Wx/DND.pm >> +++ C:/Perl/site/lib/Wx/DropSource.pm >> +++ C:/Perl/site/lib/Wx/Event.pm >> +++ C:/Perl/site/lib/Wx/FS.pm >> +++ C:/Perl/site/lib/Wx/Grid.pm >> +++ C:/Perl/site/lib/Wx/Help.pm >> +++ C:/Perl/site/lib/Wx/Html.pm >> +++ C:/Perl/site/lib/Wx/Icon.pm >> +++ C:/Perl/site/lib/Wx/Image.pm >> +++ C:/Perl/site/lib/Wx/ImageList.pm >> +++ C:/Perl/site/lib/Wx/ListCtrl.pm >> +++ C:/Perl/site/lib/Wx/Locale.pm >> +++ C:/Perl/site/lib/Wx/MDI.pm >> +++ C:/Perl/site/lib/Wx/Menu.pm >> +++ C:/Perl/site/lib/Wx/Pen.pm >> +++ C:/Perl/site/lib/Wx/Print.pm >> +++ C:/Perl/site/lib/Wx/RadioBox.pm >> +++ C:/Perl/site/lib/Wx/Rect.pm >> +++ C:/Perl/site/lib/Wx/Region.pm >> +++ C:/Perl/site/lib/Wx/STC.pm >> +++ C:/Perl/site/lib/Wx/ScreenDC.pm >> +++ C:/Perl/site/lib/Wx/Sizer.pm >> +++ C:/Perl/site/lib/Wx/SplashScreen.pm >> +++ C:/Perl/site/lib/Wx/StaticBitmap.pm >> +++ C:/Perl/site/lib/Wx/Timer.pm >> +++ C:/Perl/site/lib/Wx/ToolBar.pm >> +++ C:/Perl/site/lib/Wx/TreeCtrl.pm >> +++ C:/Perl/site/lib/Wx/Window.pm >> +++ C:/Perl/site/lib/Wx/_Constants.pm >> +++ C:/Perl/site/lib/Wx/_Exp.pm >> +++ C:/Perl/site/lib/Wx/_Functions.pm >> +++ C:/Perl/site/lib/Wx/_Inheritance.pm >> +++ C:/Perl/site/lib/Wx/_Ovl.pm >> +++ XSLoader.pm (internal) >> +++ C:/Perl/lib/auto/DynaLoader/autosplit.ix >> +++ C:/Perl/lib/auto/DynaLoader/dl_expandspec.al >> +++ C:/Perl/lib/auto/DynaLoader/dl_find_symbol_anywhere.al >> +++ C:/Perl/lib/auto/DynaLoader/dl_findfile.al >> +++ C:/Perl/lib/auto/File/Glob/Glob.dll >> +++ C:/Perl/lib/auto/File/Glob/autosplit.ix >> +++ C:/Perl/site/lib/auto/Wx/Wx.dll >> +++ C:/Perl/lib/base.pm >> +++ C:/Perl/lib/fields.pm >> +++ C:/Perl/lib/overload.pm >> +++ C:/Perl/lib/strict.pm >> +++ C:/Perl/lib/vars.pm >> +++ C:/Perl/lib/warnings.pm >> +++ C:/Perl/lib/warnings/register.pm >> >> Created 'test.exe' >> >> >> >> any help would be greatly appreaciated, >> >> -dave |
From: Mattia B. <mb...@ds...> - 2002-09-02 16:44:42
|
No platform, wxWindows, wxPerl version Assuming Win32, wxWindows 2.2.x, some wxPerl (does not matter) > Hi. > I've tried using > Set(Fore|Back)groundColour > with Wx::StaticLine, > but it's not working. > > Wx::Static line is a Wx::Window, so it should happen. Yes. > Refresh should help, but it doesn't. > Neither does Clear. > > Calling Show('show') does paint it the default light gray, but only if you pass Show > as string. Show(1) doesn't quite work. (this is also very bizzare ). Well, the bizarre thing is that you need to call Show... why do you call it? As for the string thing, I don't know why it happens. > The color gets set, cause if I set/get it, I can see that the values are correct, > the static line just never gets painted, like it should. > > I believe this to be a bug ( it can't be because it's a "static" line, > or can it ;)? Yes :) it appears Windows treats static controls differently from other windows when it comes to color handling. > My example is below, width peaks at 80 chars ;) I *really* appreciate the test case, but, in general, I will appreciate it much more if it is a *minimal* test case; for example, adding this ---- my $sta = Wx::StaticLine( ... ); $sta->SetBackgroundColour( Wx::Colour->new( 'red' ) ); ---- to the minimal sample, is sufficient to demonstarte the bug. The reason is that, in general, it is much easier to track down bugs with a minimal testcase than with a complex one. Regards Mattia |