I have successfully produced .exe files with pp (Tk included): The resulting .exe takes relatively long to startup because pp essentially makes a copy of perl's runtime system which has to be unpacked more or less on every run.

As I'm the Admin anyway, I found it better to copy the perl folder and the folder containing script + additional needed files to the target and create a .lnk with target "{perl folder}\perl\bin\wperl.exe" xxxxx.pl {additional parameters}, and execute in the folder that contains the script.

P.S. the "cmd /c" is there because actually, I put it into a .cmd batch, and pp is also a .cmd a .bat file. Now that I think of it, I should have made a perl script and calling pp from there…

Update: Still not optimal (argument setting for pp, error checking), but here you go:
use 5.011; # implies strict + feature 'say' use warnings; use pp; use Win32::Exe; my $name = shift; my ( $script, $exefile, $icon ) = map { "$name.$_" } qw(pl exe ico); say "creating $exefile from $script"; @ARGV = qw(-g -o); push @ARGV, $exefile, $script; pp->go(); say "setting icon from $icon"; my $exe = Win32::Exe->new($exefile); $exe->set_single_group_icon($icon); $exe->write;

In reply to EXE from Script (Re: General advice desperately needed) by soonix
in thread General advice desperately needed by twv

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.