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

I'm using PAR to create an executable Tk program that I can hand out to fellow employees. When I run the executable on my machine it works just fine. When I run the file on a computer that doesn't have Perl installed, the GUI comes up but all the text characters are replaced with boxes and the program doesn't run at all - basically I just get a funny looking window. All the computers I'm installing this are windows xp machines.... Here is my par command: pp -o --gui file.exe file.pl What am I doing wrong?

Replies are listed 'Best First'.
Re: Tk executable on non-perl machine
by marto (Cardinal) on Oct 03, 2005 at 20:13 UTC
    Hi,

    Have you consulted the PAR::Tutorial?
    It has a section named Packing GUI Applications.
    It may be of some help.

    UPDATE: I just had a thought, have you used a font that is not installed on the other machines you are experiencing the problem with?

    Martin
      According to the documentation on CPAN, it says that I need to link a library path to the executable......how do I do this? It doesn't explain how. Also, to the other question, the font is standard - I haven't chnaged anything. Any suggestions?
        Hi,

        I cant test this at the moment but try:
        pp -l TK --gui -0 file.exe file.pl
        Or
        pp -M TK --gui -0 file.exe file.pl

        its getting late and I dont have access to a machine with Perl at the moment.
        Let me know how you get on with this.

        Hope this helps.

        Martin
Re: Tk executable on non-perl machine
by zentara (Cardinal) on Oct 03, 2005 at 20:12 UTC
    I've never used pp on WinXP, but I see a few things which "could" be a factor.

    First, maybe the --gui option is misplaced in the comman line, try "pp --gui -o file.exe file.pl"

    Second, try it without the --gui option. I think --gui just calls wperl instead of perl


    I'm not really a human, but I play one on earth. flash japh
Re: Tk executable on non-perl machine
by Ace128 (Hermit) on Oct 03, 2005 at 23:15 UTC
    You can also try to insert more: use pragmas.. Like:
    use Tk::Frame; use Tk::Notebook; #And whatever you may be using...
    That way its included if missed with par...
Re: Tk executable on non-perl machine
by reneeb (Chaplain) on Oct 04, 2005 at 07:16 UTC
    You have to add use Encode::Unicode to you script... But add it as the first use-Statement...
Re: Tk executable on non-perl machine
by cognizant (Pilgrim) on Oct 04, 2005 at 09:43 UTC
    Use perlapp 6.0 instead
    perlapp file.pl --exe file.exe
    cheers ---