Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

GUI (Tk) executables via PerlApp

by Pavel (Novice)
on Dec 22, 2001 at 20:06 UTC ( [id://133970]=perlquestion: print w/replies, xml ) Need Help??

Pavel has asked for the wisdom of the Perl Monks concerning the following question:

Hello, everybody.
I decided to try the Active State Perl DevKit, so I have downloaded the Evaluation version. I make EXEs from scripts with PerlApp, and all seems to work. But there is something strange with scripts that use Tk. Here is a code sample:

#!/usr/bin/perl -w use Tk; $wind = MainWindow->new(); $wind->Label( -text => 'Some text' )->pack(); $wind->Button( -text => "Click!", -command => \&display )->pack(-side => 'left'); $text = $wind->Text(-width => 40, -height => 4)->pack(); $text->bind('<Double-1>', \&display); sub display { $text->insert('end', "Hello, Tk!"); } MainLoop;

I try to generate a freestanding EXE and not include Perl56.dll into executable, so I run PerlApp with the following options:

perlapp tk_test.pl -f -x -g

The puzzle for me is, that when I run the resulting EXE on a PC with no Perl installed (but, of course, where Perl56.dll exists in this EXE directory), the system tries to do it, but the window does not appear on screen and no error message is generated.

Moreover, when I do not use the -x option and get an enormous EXE, the situation is the same, with the only difference, that on the machine where Perl is installed I cannot run the EXE either!

Can anyone give me a hint? I will appreciate any advice.

Pavel

Replies are listed 'Best First'.
Re: GUI (Tk) executables via PerlApp
by Jouke (Curate) on Dec 24, 2001 at 18:20 UTC
    Although not an answer to your question, I can recommend IndigoStar's Perl2Exe, which compiled my pVoice and pStory (both Tk applications) with no problems and executes on every system I tried it on.

    Jouke Visser, Perl 'Adept'
    Using Perl to help the disabled: pVoice and pStory

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://133970]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (6)
As of 2024-04-19 06:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found