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

I am trying to develop some Perl scripts that will be using Tk for a GUI. I would like to be able to compile these scripts for Windows systems that do not have Perl installed. I have gotten a test script compiled using ActiveState's PDK 5.2, but it does not work from Win2K at least. When I attempt to run the Perl/Tk executable script I receive the following error: "Program too big to fit in memory".

Anyone have any hints/tips/advice? Is this something that I should be able to do, or is this a known limitation? Thanks in advance. Scott Nipp

Replies are listed 'Best First'.
Re: Compiled Perl/Tk for Windows...
by Mr. Muskrat (Canon) on Aug 19, 2003 at 20:53 UTC

    What command line options did you use with PerlApp?

    One thing you might try is the --trim command line option: --trim Errno;File::Glob (these two modules are loaded by default and can be trimmed provided that you don't use globs or the magic %! hash) as well as removing any unnecessary modules from your script.

    You might also try using the --xclude command line option as well and including the perl5x.dll with your app. (Check the documentation to see if this is legal for your particular application.)

    Other considerations that may or not be relevant: when is the last time you did a a) virus scan, b) disk scan, c) defragmentation?

Re: Compiled Perl/Tk for Windows...
by strat (Canon) on Aug 20, 2003 at 08:52 UTC
    I always use the module PAR -> PAR -> pp from CPAN which works fine. With Tk under Windows, you just need a very recent version

    Under windows, I'd pack the Perl/TK-Script about in the following way:

    pp --gui --icon hello.ico -o script.exe script.pl
    The --gui is to remove the nasty shell window

    Best regards,
    perl -e "s>>*F>e=>y)\*martinF)stronat)=>print,print v8.8.8.32.11.32"

      When I compared perlapp to PAR, the PAR EXE's were significantly bigger than those generated by perlapp. Any idea why this is or what I can do to fix it?
Re: Compiled Perl/Tk for Windows...
by jdtoronto (Prior) on Aug 19, 2003 at 21:08 UTC
    Scott,

    I have not had any experience with PDK5.2 yet, but I have seen a note that there is an issue between the free download version and Tk which is resolved in the full version.

    There is a node here on the subject. GUI (Tk) executables via PerlApp

    When I was googling I did find some other references.

    jdtoronto

Re: Compiled Perl/Tk for Windows...
by batkins (Chaplain) on Aug 19, 2003 at 21:55 UTC
    Hmm, how long is your script exactly?

    I know for a fact that it's possible - I've done it.

    What's the size of the resulting executable?