Hello,
I have a perl Tk script that for ease of deployment I have used PP to
compile the script into an exe file.
I have used the --gui option so that there is no CMD window held up in the
back ground while the program is used.
I would like to give the script an option so that if the script is run using
a -v option it tells the version number of the script.
I can get this to work if I do not use the --gui option but it will not work
with this option turned on.
I have tried printing the info to STDERR, STDOUT, and just doing a die on
the script.
I am new to PAR so please be kind if this is a stupid question.
my computer info below.
Jimmy
------------ Begin Computer info --------------
WinXP Pro
Active state perl v5.8.2 build 808
PAR 0.79
-------- Script ----------------
my $PROGRAM_VERSION=1.0;
my @programname = split(/\\/, $0);
my $programname = pop @programname;
@programname = ();
if ( grep /^\-v/, $ARGV[0])
{
print STDOUT "$programname Version number $PROGRAM_VERSION\n";
exit;
}
use Tk;
my $mw = MainWindow->new;
$mw->title("Hello World");
$mw->Button(-text => "Done", -command => sub {exit})->pack;
MainLoop;