Sometimes, perlapp exe's are ridiculously huge, even when using --xclude. Using Tk, for instance, will add about 900K to a compressed perlapp exe. Fortunately, you can save some of that space. Here's how you do it: 1) run perlapp with the --verbose and redirect its output to res.txt. e.g. perlapp --verbose --xclude script.pl > res.txt 2) run the script below 3) open size.txt to see a list of all the files built into your archive, sorted by size. Then you can try to weed out unnecessary files. For some reason (or maybe no reason), when you say use Tk;, the site/lib/Tk/demos directory is built into your exe. This directory is around 800KB and removing it can save you a considerable amount of space in the final executable. I would recommend simply moving the demos folder out of site/lib/Tk instead of deleting it. Note that the widget demo will not work until you move the demos directory back in. Enjoy!
open(RES, "<res.txt"); open(SIZES, "+>size.txt"); while(<RES>) { next unless /^\+\+\+/; ($file) = /\+\+\+ (.*)\n/; $sizes{-s $file} = $file; } for(sort {$a <=> $b} (keys(%sizes))) { print SIZES "$_ - $sizes{$_}\n"; } close(SIZES); close(RES);

Replies are listed 'Best First'.
Re: making smaller perlapp exe's
by Aristotle (Chancellor) on Dec 11, 2002 at 14:37 UTC
    my @file = map /\A\+\+\+ (.*)\z/g, <>; my @size = map -s, @file; print map "$_\n", @file[sort { $size[$b] <=> $size[$a] } 0 .. $#size ] +;
    SCNR. :)

    Makeshifts last the longest.

Re: making smaller perlapp exe's
by belg4mit (Prior) on Dec 10, 2002 at 23:23 UTC
    Sounds like something to point out to the Tk author, or ActiveState.

    --
    I'm not belgian but I play one on TV.