Perl packed/compiled GUI app does not start/not work?

237 views Asked by At

I'm trying to pack/compile this simple app using pp with pp --gui -o test.exe test.pl:

#!/usr/bin/perl -w
use Win32::GUI();
use Win32::TieRegistry (Delimiter => "/");
use File::Basename;
use strict;

my $slabel;

my $main = Win32::GUI::Window->new(
    -name   => 'User APP',
    -title  => "User APP",
    -width  => 550,
    -height => 300,
);

$main->Show();
Win32::GUI::Dialog();
exit(0);

sub Main_Terminate {
    return -1;
}

However it does not work, it does not start for some reason. Any ideas why?

If I try to compile/pack it using pp -o test.exe test.pl then I get the error

Can't find Win32.pm.

I'm stuck with this.

1

There are 1 answers

0
Chris Dolan On

Have you tried "pp -M Win32 ..."? The -M argument adds modules that aren't autodiscovered via the Module::ScanDeps heuristics.