andrew2003 has asked for the wisdom of the Perl Monks concerning the following question:
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: .pl to .exe
by Zeroth (Beadle) on Sep 03, 2003 at 14:01 UTC | |
| [reply] |
|
Re: .pl to .exe
by cchampion (Curate) on Sep 03, 2003 at 13:45 UTC | |
If you are looking for secrecy of your code, before diving into perl2exe, please read some caveats: perl2exe - no more secrets. The same node lists some alternatives. | [reply] |
by batkins (Chaplain) on Sep 03, 2003 at 22:53 UTC | |
it says she can do math, but will she recognize 8 / 0? We can only hope they've put in those safeguards. Worst case scenario: She succeeds in dividing by zero, and suddenly little Tiphany-Amber's bedroom becomes the center of a howling vortex of nonspace, frying the neighborhood with sparkling discharges of zero-point energy. - slashdot | [reply] |
|
Re: .pl to .exe
by pm5 (Acolyte) on Sep 03, 2003 at 13:47 UTC | |
| [reply] | |
by flounder99 (Friar) on Sep 03, 2003 at 15:52 UTC | |
you then can create an executable by doing this: I recommend you then use upx to shrink the executable. I have to admit I haven't used it on any horribly complex scripts but it has alway worked on the ones I have tried. It is nice because you can use the .exe file on any windows computer even if it doesn't have perl installed. (even if you can't fit them on a floppy) Update: Try running this: you get a nice 1.36M hello.exe which upx's down to 909k. -- flounder | [reply] [d/l] [select] |
by Arbogast (Monk) on Sep 03, 2003 at 13:57 UTC | |
| [reply] |
|
Re: .pl to .exe
by cfreak (Chaplain) on Sep 03, 2003 at 17:42 UTC | |
Perl2Exe and ActiveState's PerlApp are both commercial apps and i know that Perl2Exe is also non-free as in speech, not sure about PerlApp. perlcc is a pain to get dependencies right and even in the docs talks about being very experimental I would recommend PAR and its pp utility. I've used it a few times with great success. I think the executable is a bit larger but you can have it include all its dependencies without hassle. Its also free as in speech and beer :) Update I should add that the executable created by PAR is easily broken back down to the original source so if you are looking for a way to hide your source code (which I recommend against doing at all) then use a language you can compile. Lobster Aliens Are attacking the world! | [reply] |
|
Re: .pl to .exe
by snadra (Scribe) on Sep 03, 2003 at 13:35 UTC | |
| [reply] |
by bart (Canon) on Sep 03, 2003 at 14:33 UTC | |
Pod-Browser and The GUI Loft are two examples of applications that can be downloaded in binary form. At least perl2exe does some encryption of the source, though as you can read in "perl2exe - no more secrets", it is easily broken. You might reconsider using PAR or maybe even tinyperl instead. p.s. AFAIK perlcc has been abandoned because of insurmountable problems. It didn't give any speed improvement anyway. So, don't use it. | [reply] |
by Anonymous Monk on Sep 03, 2003 at 21:34 UTC | |
For starters, I use Perl2Exe mostly to create single EXE files (command line and GUI) for some of my users on Win32 boxes that don't require Perl, dependencies, or anything extra be installed. Adding Perl to each user's machine and synchronizing modules with everyone would not be worth the effort. One Application, one file. I really could care less about the fact that the embedded code is encrypted. Perl2Exe also provides the ability to compile your script for other platforms like Linux and Sun provided you have a $449 enterprise license. Not needing to port my scripts to other platforms, I could care less. So, for what I use it for, the $49 version Perl2Exe works just fine for me except when I sometimes need to create GUI apps. To get rid of that annoying command line window I could get the $149 version or just use another Perl script to flip the command line/windows app bit in the finished executable I pulled off this web site (sorry, can't remember the name, but it's here somewhere in a Perl2exe message thread). Since most of my scripts are command line based, I really don’t need to do that much. That said, let's move on. For the first test I took one of my old scripts that grabs scanned LEGO manuals off of the Brickshelf site at http://www.brickshelf.com by sego set number. It's a small, ~3K script that uses LPW to do the actual fetch of the JPG scans. Here's the compile results: As you can see the Perl2exe version is a bit smaller. Just as a test, I moved both files over to another Win2k box that did not have Perl installed and ran them. Both worked, proving that the compiled executables were completely self contained. As for the PAR file, that's just in there for a size reference. Since it's not a completely self contained executable I'm not really interested in it, but this may be of interest to someone else. Now, on to the next test. For this I decided to see how well PAR could handle external DLLs. For a while I've been playing with WxPerl. I like it, but Perl2Exe does not seem to bundle the Wx DLLs into the executable by default. There's probably a way to do this, but I haven't bothered to look. For this test, I used one of the sample files included with WxPerl that just pops up a GUI window. To keep it simple, I opted to not get rid of the command line window that the compiled executable creates. Here's the compile results for the second test: In this case, Perl2exe looks to be the clear winner in this case until you realize that the compiled executable requires three Wx DLLs to function. Not so bad you may say, that is until you see the size of the DLLs: And yes, all three DLLs are required for it to run, I checked. The PAR version worked without them (or with them depending on how you look at it). So, it looks like the 4.5M PAR version is the clear winner in the embedded DLL test. I'd ramble on a bit more, but this is getting a bit long, so I'll continue this in another post. Next test: benchmarks! Rick | [reply] [d/l] [select] |
|
Re: .pl to .exe
by CountZero (Bishop) on Feb 14, 2015 at 18:59 UTC | |
There is no actual compiling going on. These programs scan the script for dependencies and then pack everything needed, including the Perl executable, inside an archive file that knows how to unpack itself and run the included perl.exe with your script. CountZero A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James My blog: Imperial Deltronics | [reply] |
| A reply falls below the community's threshold of quality. You may see it by logging in. | |