FAQ

[Perl-beginners] perl2exe

Prachi shroff
Jun 1, 2001 at 3:04 pm
Hi!

I am tying to use the Perl2exe utility but am getting an error : " Invalid
Platform :win32 ". I am running Win2000 and installed the exact versions
recommended for the Perl I am using. Any suggestions on this will be great
help.

Thanks,
Prachi


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com
reply

Search Discussions

6 responses

  • Gerrit P. Haase at Jun 3, 2001 at 9:29 am

    prachi shroff schrieb am 2001-06-01, 11:04:

    Hi!

    I am tying to use the Perl2exe utility but am getting an error : " Invalid
    Platform :win32 ". I am running Win2000 and installed the exact versions
    recommended for the Perl I am using. Any suggestions on this will be great
    help.
    Indigo distributes perl2exe for several different platforms:

    http://www.indigostar.com/

    -gph

    --
    =^..^=
  • Randal L. Schwartz at Jun 3, 2001 at 4:26 pm
    "Gerrit" == Gerrit P Haase writes:
    Gerrit> prachi shroff schrieb am 2001-06-01, 11:04:
    Hi!

    I am tying to use the Perl2exe utility but am getting an error : " Invalid
    Platform :win32 ". I am running Win2000 and installed the exact versions
    recommended for the Perl I am using. Any suggestions on this will be great
    help.
    Gerrit> Indigo distributes perl2exe for several different platforms:

    And "perl2exe" isn't. It's an installer maker, not a compiler.

    --
    Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
    <merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
    Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
    See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
  • Randal L. Schwartz at Jun 3, 2001 at 5:41 pm
    "Jody" == Jody Lowes writes:
    Jody> On Sunday 03 June 2001 10:26, you wrote:
    And "perl2exe" isn't. It's an installer maker, not a compiler.
    Jody> I haven't installed it yet but this is from the readme file:

    So let's look at the lies or truth-stretching...

    Jody> About This Program

    Jody> Perl2Exe is a command line utility for converting Perl scripts
    Jody> to executable files.

    In the sense that an installer is an exe, yes. In the implication
    that it speeds your programs up, no. A Perl script is already "an
    executable file", anyway, so that's a bit like saying "this magic wand
    converts your car into a intracontinental transportation device!"

    Jody> This allows you to create stand alone programs in perl that do
    Jody> not require the perl interpreter.

    Right, because it installs all of the Perl interpreter needed to run
    your program. So what's missing there and therefore implied is the
    appended "previously installed". It installs one distinct perl
    interpreter, albeit in a private place that you can't use with other
    Perl source codes.

    Jody> You can also ship the executable file without having to ship
    Jody> your perl source code.

    Right, because it ships your source code right there in the "exe"
    file, trivially extracted. Apparently, they don't even attempt to
    obfuscate that.

    Jody> Perl2Exe also allows you to create no-console programs using Tk.

    As does Perl-TK if you install it.

    Jody> Perl2Exe for Unix can generate executables for supported Unix
    Jody> machines.

    For which you have the precise binary/source configuation. Unix runs
    on dozens of platforms, and with a non-trivial number of variant
    binary architectures on each.

    Jody>   Perl2Exe for Unix can also be used from a Win32
    Jody> host to generate executables for a Unix target host.

    Really? You'd need a helluva lot of cross compilation environment to
    do that.

    Jody> This document covers all versions of Perl2Exe up to V5.xx. Where
    Jody> there are differences between versions, the differences are
    Jody> noted in the text.Usage:

    Jody> perl2exe myscript.pl

    Jody> This will convert a script named myscript.pl to myscript.exe.

    And just watch the size... :)

    --
    Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
    <merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
    Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
    See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
  • Jody Lowes at Jun 3, 2001 at 11:09 pm
    BTW, I never said I used this product, if even why I would want to use it. I
    never assumed it did a good job, or even a bad job for that matter. I never
    said that is made the programs run faster, or even spoke of the size of the
    resulting exe. The question was whether or not it 'compiled' in the sense
    that you don't need any runtime libraries to run the exe. I find this answer
    to be yes. The copied text is directly from the info in the package I
    downloaded.
    On Sunday 03 June 2001 11:41, you wrote:
    "Jody" == Jody Lowes <jmlowes@powersurfr.com> writes:
    Jody> On Sunday 03 June 2001 10:26, you wrote:
    And "perl2exe" isn't. It's an installer maker, not a compiler.
    Jody> I haven't installed it yet but this is from the readme file:

    So let's look at the lies or truth-stretching...

    Jody> About This Program

    Jody> Perl2Exe is a command line utility for converting Perl scripts
    Jody> to executable files.

    In the sense that an installer is an exe, yes. In the implication
    that it speeds your programs up, no. A Perl script is already "an
    executable file", anyway, so that's a bit like saying "this magic wand
    converts your car into a intracontinental transportation device!"

    Jody> This allows you to create stand alone programs in perl that do
    Jody> not require the perl interpreter.

    Right, because it installs all of the Perl interpreter needed to run
    your program. So what's missing there and therefore implied is the
    appended "previously installed". It installs one distinct perl
    interpreter, albeit in a private place that you can't use with other
    Perl source codes.

    Jody> You can also ship the executable file without having to ship
    Jody> your perl source code.

    Right, because it ships your source code right there in the "exe"
    file, trivially extracted. Apparently, they don't even attempt to
    obfuscate that.

    Jody> Perl2Exe also allows you to create no-console programs using Tk.

    As does Perl-TK if you install it.

    Jody> Perl2Exe for Unix can generate executables for supported Unix
    Jody> machines.

    For which you have the precise binary/source configuation. Unix runs
    on dozens of platforms, and with a non-trivial number of variant
    binary architectures on each.

    Jody>   Perl2Exe for Unix can also be used from a Win32
    Jody> host to generate executables for a Unix target host.

    Really? You'd need a helluva lot of cross compilation environment to
    do that.

    Jody> This document covers all versions of Perl2Exe up to V5.xx. Where
    Jody> there are differences between versions, the differences are
    Jody> noted in the text.Usage:

    Jody> perl2exe myscript.pl

    Jody> This will convert a script named myscript.pl to myscript.exe.

    And just watch the size... :)
  • Will W at Jun 4, 2001 at 12:02 am
    [I'm not sure where to tack this on. Please don't put any significance
    on how I'm attaching this to the thread. Also, I sent the same material
    earlier today, but I think it went off into never-never-land. If you
    receive this twice, my apologies.]

    There is a lot of noise on this channel about perl2exe. I feel obligated
    to throw in what I know. I'm a little upset by this as this is my first
    post to the list, and I would much prefer to sit back and see how the
    list functions before I speak up. But serious disinformation needs to be
    countered if this list is to serve its purpose.

    I have used perl2exe successfully in a mixed Win98, WinNT environment.
    There was a need to use a perl script I wrote on my personal Win98
    machine on a number of WinNT machines on a secure network. Installing
    Perl itself and running the script directly was out of the question:
    this would have created an unacceptable security risk. It also would
    have been a headache to maintain, since the "wetware" in that
    environment is not reliable in either intelligence or intent.

    My original script was 12 kb, and used Perl/Tk. Perl2exe compiled it
    into a 1.6 Mb program, which archived to about 850 kb using WinZip (for
    transport and installation). These are acceptable sizes for stand-alone
    Windows apps. Note that the fixed overhead for perl2exe is around 1.5
    Mb: a script ten times longer than mine could be expected to compile to
    under 1.7 Mb.

    Perl2exe does compile the script into a binary executable complete with
    the needed routines pulled out of the Perl installation. The result is a
    true binary compilation of the script, which is functionally no
    different than what Perl itself does in compiling the script internally
    whenever the script is run.

    The source script cannot be extracted from the result of perl2exe.
    (Well, you could reverse-engineer the thing, but if you've got that
    level of skill, you likely have half a dozen more satisfying projects to
    work on than hacking somebody else's stuff).

    The executable binary will be large, but it will be a fraction of the
    size of a full Perl installation (especially if that includes all the
    documentation that should go with Perl).

    The resulting exe runs as fast as the original Perl script, and no
    faster. However the perl2exe executable does not undergo the preparatory
    phases of loading Perl itself, then the script, then doing the compiling
    phase, so depending on what the application does, the perl2exe product
    will appear to be faster to the average user. That was the case in my
    application. But it is doubtful that reducing the loading time from
    maybe 0.3 seconds to something faster is meaningful.

    Perl2exe does a good job of what it does. Don't look for it to speed up
    your programs. Don't look for its executables to be small little things.
    Do consider it when you want to provide software to someone who
    shouldn't have or wouldn't want a full Perl installation on their
    machine. Do consider it if you want to keep your source code
    proprietary. It is a good product, and worth its low cost in some
    situations.

    --Will
  • Jody Lowes at Jun 3, 2001 at 5:44 pm
    And "perl2exe" isn't. It's an installer maker, not a compiler.
    I haven't installed it yet but this is from the readme file:

    # Copied from pxman.html

    About This Program

    Perl2Exe is a command line utility for converting Perl scripts to executable
    files.

    This allows you to create stand alone programs in perl that do not require
    the perl interpreter. You can also ship the executable file without having to
    ship your perl source code.

    Perl2Exe also allows you to create no-console programs using Tk.

    Perl2Exe for Unix can generate executables for supported Unix machines.
    Perl2Exe for Unix can also be used from a Win32 host to generate executables
    for a Unix target host.

    This document covers all versions of Perl2Exe up to V5.xx. Where there are
    differences between versions, the differences are noted in the text.Usage:

    perl2exe myscript.pl

    This will convert a script named myscript.pl to myscript.exe.

    # end copied text

Related Discussions

Discussion Navigation
viewthread | post