How do I make a standalone WIN32 executable from Perl?

Discussion in 'Perl Misc' started by Jeff W, Oct 19, 2003.

  1. Jeff W

    Jeff W Guest

    Hi - Since I'm not a programmer, and OOP C++ is a bit beyond me, but i
    AM a UNIX perl hacker, I was thinking of learning Perl/TK on WIN32 so I
    could write PC scripts and utilities. I downloaded ActivePerl and
    looked at it. However, it appears that I would need a perl
    installation on every target machine. Is there any easy, (and low or
    zero cost) way to generate standalone Perl/Tk executables?

    Thanks
    /j
    Jeff W, Oct 19, 2003
    #1
    1. Advertising

  2. Jeff W

    Tom Guest

    "Jeff W" <> wrote in message
    news:...
    > Hi - Since I'm not a programmer, and OOP C++ is a bit beyond me, but i
    > AM a UNIX perl hacker, I was thinking of learning Perl/TK on WIN32 so I
    > could write PC scripts and utilities. I downloaded ActivePerl and
    > looked at it. However, it appears that I would need a perl
    > installation on every target machine. Is there any easy, (and low or
    > zero cost) way to generate standalone Perl/Tk executables?


    I would look at embedding the Perl in C/C++ and compiling it that way.
    That way, all you need is a very basic C/C++ program.

    >
    > Thanks
    > /j
    >
    Tom, Oct 19, 2003
    #2
    1. Advertising

  3. Jeff W

    Jeff W Guest

    Can I do that with Perl / Tk? Can you point me to an example?

    thanks!
    /j

    Tom wrote:

    >"Jeff W" <> wrote in message
    >news:...
    >> Hi - Since I'm not a programmer, and OOP C++ is a bit beyond me, but i
    >> AM a UNIX perl hacker, I was thinking of learning Perl/TK on WIN32 so I
    >> could write PC scripts and utilities. I downloaded ActivePerl and
    >> looked at it. However, it appears that I would need a perl
    >> installation on every target machine. Is there any easy, (and low or
    >> zero cost) way to generate standalone Perl/Tk executables?

    >
    >I would look at embedding the Perl in C/C++ and compiling it that way.
    >That way, all you need is a very basic C/C++ program.
    >
    >>
    >> Thanks
    >> /j
    >>

    >
    >
    >
    >
    Jeff W, Oct 19, 2003
    #3
  4. Jeff W

    Bob Walton Guest

    Jeff W wrote:

    > Hi - Since I'm not a programmer, and OOP C++ is a bit beyond me, but i
    > AM a UNIX perl hacker, I was thinking of learning Perl/TK on WIN32 so I
    > could write PC scripts and utilities. I downloaded ActivePerl and
    > looked at it. However, it appears that I would need a perl
    > installation on every target machine. Is there any easy, (and low or
    > zero cost) way to generate standalone Perl/Tk executables?

    ....
    > /j


    I don't understand why you think you need to make an executable to have
    it run anywhere that uses the same platform. It is easy, for example,
    to make a CDROM that will autorun a Perl/Tk program on any target Win32
    system, without installing anything, making any executable, etc. Here
    is an example directory list of such a CDROM:

    E:\>dir

    Volume in drive E is 000716_2242
    Volume Serial Number is 3DD9-9056
    Directory of E:\

    AUTORUN INF 30 07-16-00 4:08p autorun.inf
    LOOKUP BAT 26 07-16-00 4:03p lookup.bat
    LOOKUP PL 4,118 07-16-00 9:38p lookup.pl
    LPAP DBN 499,712 07-15-00 11:20p lpap.dbn
    LPFN DB 5,218,304 07-15-00 10:49p lpfn.db
    LPHN DBN 4,472,832 07-15-00 11:13p lphn.dbn
    LPLN DB 5,767,168 07-15-00 10:49p lpln.db
    LPMAIN DB 84,811,776 07-15-00 10:49p lpmain.db
    LPMI DBN 2,449,408 07-16-00 12:56p lpmi.dbn
    LPSD DBN 155,648 07-15-00 11:13p lpsd.dbn
    LPSF DBN 147,456 07-15-00 11:04p lpsf.dbn
    LPSM DBN 2,809,856 07-15-00 11:13p lpsm.dbn
    LPST DB 5,873,664 07-15-00 10:49p lpst.db
    LPTN DBN 2,875,392 07-16-00 8:41p lptn.dbn
    LPZP DBN 2,924,544 07-15-00 11:21p lpzp.dbn
    PERL <DIR> 07-16-00 10:42p Perl
    README TXT 10,719 07-16-00 10:37p readme.txt
    SETUP BAT 26 07-16-00 4:03p setup.bat
    17 file(s) 118,020,679 bytes
    1 dir(s) 0 bytes free

    E:\>

    The Perl/Tk program is lookup.pl, the Perl directory is a direct copy of
    my Perl directory on my PC, including everything there (if space were an
    issue, one could get rid of the docs, unused modules, etc). The
    autorun.inf file contains:

    [autorun]
    open=lookup.bat

    and lookup.bat contains:

    @perl\bin\perl lookup.pl


    The rest of the files are data files or informational. Setup.bat is
    just a copy of lookup.bat for those who might have autorun turned off --
    folks are more likely to type "setup" than "lookup".

    Folks can also simply copy the whole CD to a directory on their hard
    drive, and have it work from there with better performance than straight
    off the CD, with no setup, installation, etc -- and have it be 100% gone
    when they erase the directory. All in all, very effective and very easy.

    HTH.
    --
    Bob Walton
    Email: http://bwalton.com/cgi-bin/emailbob.pl
    Bob Walton, Oct 19, 2003
    #4
  5. On Sun, 19 Oct 2003 15:14:22 -0400
    Jeff W <> wrote:

    > Hi - Since I'm not a programmer, and OOP C++ is a bit beyond me, but
    > i AM a UNIX perl hacker, I was thinking of learning Perl/TK on WIN32
    > so I could write PC scripts and utilities. I downloaded ActivePerl
    > and looked at it. However, it appears that I would need a perl
    > installation on every target machine. Is there any easy, (and low
    > or zero cost) way to generate standalone Perl/Tk executables?


    In the land of *NIX, you could use perlcc to compile an application.
    In Windows land, you _may_ have to get a comercial application -or-
    use Cygwin, compile Perl, and then you _should_ have perlcc available
    to you.

    I can't speak from experience, but that's my understanding.

    HTH

    --
    Jim

    Copyright notice: all code written by the author in this post is
    released under the GPL. http://www.gnu.org/licenses/gpl.txt
    for more information.

    a fortune quote ...
    An artist should be fit for the best society and keep out of it.
    James Willmore, Oct 19, 2003
    #5
  6. Jeff W

    Jeff W Guest

    I appreciate the idea, but I don't really want to leave 118M on
    someone's system because i gave them a 50KB utility...
    thanks though
    /j

    Bob Walton wrote:

    >Jeff W wrote:
    >
    >> Hi - Since I'm not a programmer, and OOP C++ is a bit beyond me, but i
    >> AM a UNIX perl hacker, I was thinking of learning Perl/TK on WIN32 so I
    >> could write PC scripts and utilities. I downloaded ActivePerl and
    >> looked at it. However, it appears that I would need a perl
    >> installation on every target machine. Is there any easy, (and low or
    >> zero cost) way to generate standalone Perl/Tk executables?

    >...
    >> /j

    >
    >I don't understand why you think you need to make an executable to have
    >it run anywhere that uses the same platform. It is easy, for example,
    >to make a CDROM that will autorun a Perl/Tk program on any target Win32
    >system, without installing anything, making any executable, etc. Here
    >is an example directory list of such a CDROM:
    >
    >E:\>dir
    >
    > Volume in drive E is 000716_2242
    > Volume Serial Number is 3DD9-9056
    > Directory of E:\
    >
    >AUTORUN INF 30 07-16-00 4:08p autorun.inf
    >LOOKUP BAT 26 07-16-00 4:03p lookup.bat
    >LOOKUP PL 4,118 07-16-00 9:38p lookup.pl
    >LPAP DBN 499,712 07-15-00 11:20p lpap.dbn
    >LPFN DB 5,218,304 07-15-00 10:49p lpfn.db
    >LPHN DBN 4,472,832 07-15-00 11:13p lphn.dbn
    >LPLN DB 5,767,168 07-15-00 10:49p lpln.db
    >LPMAIN DB 84,811,776 07-15-00 10:49p lpmain.db
    >LPMI DBN 2,449,408 07-16-00 12:56p lpmi.dbn
    >LPSD DBN 155,648 07-15-00 11:13p lpsd.dbn
    >LPSF DBN 147,456 07-15-00 11:04p lpsf.dbn
    >LPSM DBN 2,809,856 07-15-00 11:13p lpsm.dbn
    >LPST DB 5,873,664 07-15-00 10:49p lpst.db
    >LPTN DBN 2,875,392 07-16-00 8:41p lptn.dbn
    >LPZP DBN 2,924,544 07-15-00 11:21p lpzp.dbn
    >PERL <DIR> 07-16-00 10:42p Perl
    >README TXT 10,719 07-16-00 10:37p readme.txt
    >SETUP BAT 26 07-16-00 4:03p setup.bat
    > 17 file(s) 118,020,679 bytes
    > 1 dir(s) 0 bytes free
    >
    >E:\>
    >
    >The Perl/Tk program is lookup.pl, the Perl directory is a direct copy of
    >my Perl directory on my PC, including everything there (if space were an
    >issue, one could get rid of the docs, unused modules, etc). The
    >autorun.inf file contains:
    >
    >[autorun]
    >open=lookup.bat
    >
    >and lookup.bat contains:
    >
    >@perl\bin\perl lookup.pl
    >
    >
    >The rest of the files are data files or informational. Setup.bat is
    >just a copy of lookup.bat for those who might have autorun turned off --
    >folks are more likely to type "setup" than "lookup".
    >
    >Folks can also simply copy the whole CD to a directory on their hard
    >drive, and have it work from there with better performance than straight
    >off the CD, with no setup, installation, etc -- and have it be 100% gone
    >when they erase the directory. All in all, very effective and very easy.
    >
    >HTH.
    >
    >
    Jeff W, Oct 20, 2003
    #6
  7. Jeff W

    Jeff W Guest

    thanks James - I think you are saying I should run unix perl under
    cygwin and use the perlcc provided with that perl. Will that really
    give me a WIN executable?
    /j

    James Willmore wrote:

    >On Sun, 19 Oct 2003 15:14:22 -0400
    >Jeff W <> wrote:
    >
    >> Hi - Since I'm not a programmer, and OOP C++ is a bit beyond me, but
    >> i AM a UNIX perl hacker, I was thinking of learning Perl/TK on WIN32
    >> so I could write PC scripts and utilities. I downloaded ActivePerl
    >> and looked at it. However, it appears that I would need a perl
    >> installation on every target machine. Is there any easy, (and low
    >> or zero cost) way to generate standalone Perl/Tk executables?

    >
    >In the land of *NIX, you could use perlcc to compile an application.
    >In Windows land, you _may_ have to get a comercial application -or-
    >use Cygwin, compile Perl, and then you _should_ have perlcc available
    >to you.
    >
    >I can't speak from experience, but that's my understanding.
    >
    >HTH
    >
    >
    >
    Jeff W, Oct 20, 2003
    #7
  8. Jeff W

    Jeff W Guest

    Thanks Tina - I had found that and tried to read through it - it didn't
    seem easy to use by itself - also - I couldn't find a mention of it in
    ActivePerl - which I thought would be necessary under win32

    /j

    Tina Mueller wrote:

    >Jeff W wrote:
    >> Hi - Since I'm not a programmer, and OOP C++ is a bit beyond me, but i
    >> AM a UNIX perl hacker, I was thinking of learning Perl/TK on WIN32 so I
    >> could write PC scripts and utilities. I downloaded ActivePerl and
    >> looked at it. However, it appears that I would need a perl
    >> installation on every target machine. Is there any easy, (and low or
    >> zero cost) way to generate standalone Perl/Tk executables?

    >
    >try out the PAR module, available on CPAN.
    >
    >hth, tina
    >
    >
    Jeff W, Oct 20, 2003
    #8
  9. Jeff W

    Guest

    On Sun, 19 Oct 2003 20:33:23 -0400, Jeff W <> wrote:

    >Thanks Tina - I had found that and tried to read through it - it didn't
    >seem easy to use by itself - also - I couldn't find a mention of it in
    >ActivePerl - which I thought would be necessary under win32
    >
    >/j
    >
    >Tina Mueller wrote:
    >
    >>Jeff W wrote:
    >>> Hi - Since I'm not a programmer, and OOP C++ is a bit beyond me, but i
    >>> AM a UNIX perl hacker, I was thinking of learning Perl/TK on WIN32 so I
    >>> could write PC scripts and utilities. I downloaded ActivePerl and
    >>> looked at it. However, it appears that I would need a perl
    >>> installation on every target machine. Is there any easy, (and low or
    >>> zero cost) way to generate standalone Perl/Tk executables?

    >>
    >>try out the PAR module, available on CPAN.
    >>
    >>hth, tina
    >>
    >>


    PAR is very easy to use. The "pp" command scans all the files needed
    for your application, zips them up together and turns that into a
    standalone executable. If the PAR documentation looks confusing,
    concentrate on the description of pp.

    You need the Perl installation to create packages, but the target
    machines do not. PAR is not mentioned in ActivePerl because it is not
    part of it. You can download PAR from CPAN, and even if ActiveState
    has a version on its PPM server, it is probably out of date. PAR is
    improving rapidly.

    And it's free....

    Alan Stewart
    , Oct 20, 2003
    #9
  10. Jeff W

    Jeff W Guest

    thanks!!!! - And from someone with the same name as my favorite
    Folk/Rock Artist 8-}

    wrote:

    >On Sun, 19 Oct 2003 20:33:23 -0400, Jeff W <> wrote:
    >
    >>Thanks Tina - I had found that and tried to read through it - it didn't
    >>seem easy to use by itself - also - I couldn't find a mention of it in
    >>ActivePerl - which I thought would be necessary under win32
    >>
    >>/j
    >>
    >>Tina Mueller wrote:
    >>
    >>>Jeff W wrote:
    >>>> Hi - Since I'm not a programmer, and OOP C++ is a bit beyond me, but i
    >>>> AM a UNIX perl hacker, I was thinking of learning Perl/TK on WIN32 so I
    >>>> could write PC scripts and utilities. I downloaded ActivePerl and
    >>>> looked at it. However, it appears that I would need a perl
    >>>> installation on every target machine. Is there any easy, (and low or
    >>>> zero cost) way to generate standalone Perl/Tk executables?
    >>>
    >>>try out the PAR module, available on CPAN.
    >>>
    >>>hth, tina
    >>>
    >>>

    >
    >PAR is very easy to use. The "pp" command scans all the files needed
    >for your application, zips them up together and turns that into a
    >standalone executable. If the PAR documentation looks confusing,
    >concentrate on the description of pp.
    >
    >You need the Perl installation to create packages, but the target
    >machines do not. PAR is not mentioned in ActivePerl because it is not
    >part of it. You can download PAR from CPAN, and even if ActiveState
    >has a version on its PPM server, it is probably out of date. PAR is
    >improving rapidly.
    >
    >And it's free....
    >
    >Alan Stewart
    >
    >
    >
    Jeff W, Oct 20, 2003
    #10
  11. On Sun, 19 Oct 2003 19:41:55 -0400
    Jeff W <> wrote:

    Top posting for this group is rude - please don't do it :)

    > thanks James - I think you are saying I should run unix perl under
    > cygwin and use the perlcc provided with that perl. Will that really
    > give me a WIN executable?
    > /j
    >
    > James Willmore wrote:
    >
    > >On Sun, 19 Oct 2003 15:14:22 -0400
    > >Jeff W <> wrote:
    > >
    > >> Hi - Since I'm not a programmer, and OOP C++ is a bit beyond me,

    > >but> i AM a UNIX perl hacker, I was thinking of learning Perl/TK on
    > >WIN32> so I could write PC scripts and utilities. I downloaded
    > >ActivePerl> and looked at it. However, it appears that I would
    > >need a perl> installation on every target machine. Is there any
    > >easy, (and low> or zero cost) way to generate standalone Perl/Tk
    > >executables?
    > >
    > >In the land of *NIX, you could use perlcc to compile an
    > >application. In Windows land, you _may_ have to get a comercial
    > >application -or- use Cygwin, compile Perl, and then you _should_
    > >have perlcc available to you.
    > >
    > >I can't speak from experience, but that's my understanding.


    It _should_. Like I mentioned in the previous post, I haven't done it
    :-(

    Worse case is you have to put out $$$ for a commercial product - like
    perl2exe. However, if you're like me, you'll try the free route
    first.

    HTH

    --
    Jim

    Copyright notice: all code written by the author in this post is
    released under the GPL. http://www.gnu.org/licenses/gpl.txt
    for more information.

    a fortune quote ...
    Dear Lord: I just want *one* one-armed manager so I never have
    <to hear "On the other hand", again.
    James Willmore, Oct 20, 2003
    #11
  12. Jeff W

    Cyde Weys Guest

    Jeff W wrote:

    > thanks!!!! - And from someone with the same name as my favorite
    > Folk/Rock Artist 8-}


    Can you please stop top-posting ... please ... think of the kittens.
    Cyde Weys, Oct 20, 2003
    #12
  13. On Sun, 19 Oct 2003 19:41:55 -0400, Jeff W <> wrote:

    >James Willmore wrote:
    >
    >>On Sun, 19 Oct 2003 15:14:22 -0400
    >>Jeff W <> wrote:
    >>
    >>> Hi - Since I'm not a programmer, and OOP C++ is a bit beyond me, but
    >>> i AM a UNIX perl hacker, I was thinking of learning Perl/TK on WIN32
    >>> so I could write PC scripts and utilities. I downloaded ActivePerl
    >>> and looked at it. However, it appears that I would need a perl
    >>> installation on every target machine. Is there any easy, (and low
    >>> or zero cost) way to generate standalone Perl/Tk executables?

    >>
    >>In the land of *NIX, you could use perlcc to compile an application.
    >>In Windows land, you _may_ have to get a comercial application -or-
    >>use Cygwin, compile Perl, and then you _should_ have perlcc available
    >>to you.
    >>
    >>I can't speak from experience, but that's my understanding.


    >thanks James - I think you are saying I should run unix perl under
    >cygwin and use the perlcc provided with that perl. Will that really
    >give me a WIN executable?


    I will, but you need to include the cygwin1.dll, and maybe other
    dll-s, depending on how advanced your perlskript is, if you want to
    run it in another MSwin-environment without Cygwin installed.

    --
    mvh/Regards
    Kåre Olai Lindbach
    Kåre Olai Lindbach, Oct 20, 2003
    #13
  14. Jeff W

    Jeff W Guest


    >
    >I[t] will, but you need to include the cygwin1.dll, and maybe other
    >dll-s, depending on how advanced your perlskript is, if you want to
    >run it in another MSwin-environment without Cygwin installed.
    >
    >


    Ok - so I'm back at square one - you're saying I'm just trading the
    requirement that the target machine has Perl for the requirement that it
    has Cygwin. Ok. It was worth asking. But, time to learn Visual C++
    (sigh) 8-}

    Thanks all
    /j [no longer a top poster]
    Jeff W, Oct 21, 2003
    #14
  15. Jeff W

    Jeff W Guest

    Cyde Weys wrote:

    >Jeff W wrote:
    >
    >> thanks!!!! - And from someone with the same name as my favorite
    >> Folk/Rock Artist 8-}

    >
    >Can you please stop top-posting ... please ... think of the kittens.
    >
    >


    Got it - I'm new to this group - and I have to admit - as good as you
    guys are at answering my questions (and you are, really!). You're twice
    as good about telling me to bottom post. {aren't you supposed to read
    prior posts first to see whether I've already been told 8-}]

    sorry - don't mean to pick on you but this about the 5th admonishment
    I've received today 8-{
    Jeff W, Oct 21, 2003
    #15
  16. Jeff W

    Matt Yurek Guest

    "Jeff W" <> wrote in message
    news:...
    > thanks James - I think you are saying I should run unix perl under
    > cygwin and use the perlcc provided with that perl. Will that really
    > give me a WIN executable?


    On Windows, I use Perl2Exe from Indigostar. Works like a charm.
    http://www.indigostar.com/perl2exe.htm
    Matt Yurek, Oct 21, 2003
    #16
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dipesh Mehta

    Standalone Perl Executable ? ? ?

    Dipesh Mehta, Sep 30, 2003, in forum: Perl
    Replies:
    3
    Views:
    4,590
  2. Peter
    Replies:
    13
    Views:
    12,210
  3. Mahesh
    Replies:
    2
    Views:
    397
    '@'.join([..join(['fred','dixon']),..join(['gmail'
    Mar 27, 2005
  4. Replies:
    4
    Views:
    533
    Ian Wilson
    Oct 31, 2006
  5. Amit Gupta
    Replies:
    8
    Views:
    502
    BlueBird
    Apr 1, 2008
Loading...

Share This Page