(tye)Re: Win32 executable AS PerlApp, perl2exe, perlcc, ??
by tye (Sage) on Oct 23, 2001 at 20:13 UTC
|
Why play silly tricks that have been shown to break scripts. Why pay money? Add
END { print join( $/, values %INC ), $/ }
to your script. Copy your Perl directory. Delete most modules not mentioned by the above output from the copy. Try your script on the copy. Recopy any parts that you shouldn't have deleted. Put your script into the "bin" subdirectory. Put "bin/perl bin/script" into "run.bat" in the main directory. Zip it up.
All you friend will need to do is unzip the results into any directory they like and "run".
The other methods you mention do basically the same things except they try to be tricky about how they extract the files so that it doesn't look like that is what is going on. The "being tricky" part can break scripts in strange ways (though scripts often will continue to work).
Granted, the automation of determining what to keep and what to delete is kind of nice (except when it guesses wrong), but it isn't worth the price and the potential breakage to me.
By not "installing" Perl, about all that is different is that "perl.exe" is not in the $ENV{PATH} and *.pl files are not flagged as being Perl scripts. I'm not sure what policy allows your friend to copy files but not "install" Perl, but this copying won't allow Perl to be used by malware unless the malware does something whacky like search the entire hard disk hoping to find Perl (which isn't going to happen), so that probably means it shouldn't be a problem for such a policy.
You can even skip the "delete" step. It isn't that likely to save your friend all that much space anyway. Also, start with IndigoPerl from IndigoStar. It comes as a simple *.zip file so you'll get a script that can be used to "install" Perl after everything has been unzipped. That way your friend has the option to later decide to "install" Perl w/o downloading anything extra.
-
tye
(but my friends call me "Tye")
| [reply] [d/l] |
|
|
Great post, this is may opinion, too. But ...
I'm not sure what policy allows your friend to copy files but not "install" Perl
Well, our real life is the following:
We design/support a rather big application for a PC/Mainframe environment and after the switch from OS/2 to Windoze we introduced perl to configure test environment for the different development stages, databases, reproduction of bugs in production environment for different customers etc. Parts are running on a Citrix server and that has to be a closed box. It is easy to mess up things by accident, especially if the administrating people still have some homework left to do.
As the developers do not need perl (poor guys) it was decided to keep the perl runtime off the server and the developers to minimize the risk.
| [reply] |
|
|
Hi,
I came across this while looking for something to make executables from Perl scripts. I found the commercial PerlApp and Perl2EXE - but finally found PAR, which does pretty much the same thing. It's a standard Perl module - so FREE! I installed it from http://www.bribes.org/perl/ppmdir.html (search on PAR.ppd) and it appears to work fine.
I hope this info will help other people on the hunt!
| [reply] |
Re: Win32 executable AS PerlApp, perl2exe, perlcc, ??
by Corion (Patriarch) on Oct 23, 2001 at 20:06 UTC
|
For a Windows setup solution, I use Inno Setup together with My Inno Setup Extensions (not made by me, but the name is "My Inno Setup Extensions"), and as a setup compiler I use ISTool. These are a free (at least beer, and with a setup tool, I didn't care about more) solution that looks professional and is relatively easy to set up.
perl -MHTTP::Daemon -MHTTP::Response -MLWP::Simple -e ' ; # The
$d = new HTTP::Daemon and fork and getprint $d->url and exit;#spider
($c = $d->accept())->get_request(); $c->send_response( new #in the
HTTP::Response(200,$_,$_,qq(Just another Perl hacker\n))); ' # web
| [reply] [d/l] |
Re: Win32 executable AS PerlApp, perl2exe, perlcc, ??
by Anonymous Monk on Oct 23, 2001 at 20:58 UTC
|
PerlDevKit is worth the money, it has a couple of great utilities. Anyway I mainly use it to package my perl scripts as a .exe file. It makes it easy, my client gets a single file and they can't 'accidently' mess with the source.
--Gavin. | [reply] |
Re: Win32 executable AS PerlApp, perl2exe, perlcc, ??
by Gerard (Pilgrim) on Oct 24, 2001 at 00:48 UTC
|
If you download the shareware version of Perl2Exe you should find that it works quite well.
Once you have generated the executable you can run this script or a version of it to remove the console window. I think that I might have had to modify it slightly to get it to do exactly what I want.
Good luck,
Let me know if you discover anything new and interesting. : )
Cheers,
Gerard | [reply] |
|
|
opps. The Script is at
http://jenda.krynicky.cz/perl/GUIscripts.html
Cheers,
Gerard
| [reply] |
Re: Win32 executable AS PerlApp, perl2exe, perlcc, ??
by RayRay459 (Pilgrim) on Oct 23, 2001 at 20:58 UTC
|
Traveler
I have used perl2exe numerous times and it works very well. I haven't used perlcc or PerlDevKit so i can't mention on those. As far as i know...perl2exe is all you'll need to make your script work on a remote/friend's machine.
Good Luck.
Ray | [reply] |
Re: Win32 executable AS PerlApp, perl2exe, perlcc, ??
by mandog (Curate) on Oct 23, 2001 at 20:07 UTC
|
| [reply] |
Re: Win32 executable AS PerlApp, perl2exe, perlcc, ??
by Gerard (Pilgrim) on Oct 24, 2001 at 03:05 UTC
|
There are heaps of setup / install makers available at zdent.com/downloads.
Here is an example of quite a good one
http://www.zdnet.com/downloads/stories/info/0,10615,79728,00.html
Hope this helps | [reply] |