Editing
Developing and Distributing wxPerl Applications on Windows
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== PAR::Package and WX::Perl::Packager === ==== Step 1 - Install PAR::Package and Wx::Perl::Packager ==== <code><big>C:\> cpanm --verbose PAR::Package Wx::Perl::Packager</big></code> ==== Step 2 - Generate the EXE ==== Assuming you have a Perl script generated either via wxGlade (see above) or one you have created/updated by hand, the command is as follows: <code><big>C:\> wxpar YOURPROGRAM.pl -o YOURPROGRAM.exe</big></code> ===== Important Notes About wxGlade Generated Code ===== # earlier versions of wxGlade introduced an improper idiom at the bottom of the generated Perl script that caused a problem when running via a PAR::Packed packed executable. TLDR; remove the "unless(caller)" block and just run the Wx event loop unfettered. For more information, please read the [https://metacpan.org/dist/PAR/view/lib/PAR/FAQ.pod#If-I-try-to-compile-my-wxGlade-generated-script%2C-it-doesn%27t-run.-What%27s-wrong%3F PAR::FAQ.] # earlier versions of wxGlade also used a non-Exporter import tage that wxpar could not properly follow; see the code "before" and "after" below: use Wx qw[:allclasses]; use strict; ... package main; unless(caller){ my $local = Wx::Locale->new("English", "en", "en"); # replace with ?? $local->AddCatalog("app"); # replace with the appropriate catalog name my $app = MyApp->new(); $app->MainLoop(); } Should be modified to look like the following: use Wx qw; use strict; ... package main; my $local = Wx::Locale->new("English", "en", "en"); # replace with ?? $local->AddCatalog("app"); # replace with the appropriate catalog name my $app = MyApp->new(); $app->MainLoop(); See [https://github.com/wxGlade/wxGlade/issues/568 this Github issue] for wxGlade, where both were fixed. At the time of this writing, the changes. have not been put out in an official release; but they are applied in the master branch.
Summary:
Please note that all contributions to Perl Guilds - Getting Medieval with Perl may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Perl Guilds - Getting Medieval with Perl:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
Edit source
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information