How to have perl on a CD (windows)

N

News KF

Hi,


I want to have a perl-application, that could reside on a CD or USB
memory stick and could run on any windows computer.
Source code protection is of now issue, but being able to run the code
wherever I go would be important.


Is there any standard recipe to do so?


What I magine is to write a perl script, that needs some modules with
native code sections for example GD or expat.

Then I'd like to create a directory containing the perl interpreter and
all required DLLs and modules and the source code.



Is it possible get something like this up and running without messing
around in the registry or any other file on the hard disk?


Thanks inadvance for any info and bye



nkf



P.S. My perl experience is so far only linux and cygwin based and I
don't know about how messy it is to install perl on windows.
 
N

News KF

Hi Thanks For this info,


I'll look into this later in detail.
I had already a quick glance.


What I figured out by myself is, that the zip file of active perl can be
expanded onto a memory stick and it seems, that I can execute perl
scripts by setting the pathname in a batch file.


This solution should be fine for me for the time being.


On the other hand:
PAR seems to be quite attractive as the result should be just one exe
and not a whole directory tree.

Now my next question is where to get the apropriate modules for Active
perl. (I started a new thread for this).


Thanks again and bye



nkf
 
V

Veli-Pekka Tätilä

News said:
I want to have a perl-application, that could reside on a CD or USB
memory stick and could run on any windows computer.

Hi,
I think the only difference between the two is that CD's are read-only
usually, so you'd need to have the program write its files and extract any
temporary modules to some writable location. I've been succesfully using two
solutions.

Firstly, Tiny Perl is able to run Perl programs, say from a floppy, with
know needd to run a Windows installer first:

http://tinyperl.sourceforge.net/

There are not too many libraries but you can usually copy any of the more
special one's from an active state distro. The procedure is finding the lib
pm files either under site/lib or lib. You should also copy any related DLLs
under the .\auto directory. As moduiles may require each other, you can
either try running the module manually adding stuff until it works or find
out the dependencies with a CPAN util called scandeps..

Example hash::Util

Checking the lib.zip file under Tiny Perl reveals that no hash modules have
been installed. But Active State has got the files. Most of the stuff you
add with ppm goes under site\lib but Hash is core enough to be in the lib
directory directly, that is:

C:\Perl\lib\Hash

It only contains the file Util.pm that you'll need but you need to maintain
the directory hierarchy so grab the whole hash directory. As to where it
should be copied, regardless of whether the file came from site\lib or lib,
it goes in a directory called lib under Tiny Perl.

Looking for DLLs in the auto directory at:

C:\Perl\lib\auto

There's no sub-dir called hash so you should be done now provided that
Hash::Util doesn't depend on anything that Tiny perl doesn't already have.

The other app I've been using is called perl2exe and has a 30-day trial
version:

http://www.indigostar.com/perl2exe.htm

It is able to resolve all dependencies and link in all ordinarily named pm
and dll files for you based on the source code. It will create one, big,
nice self-contained exe file which extracts the libraries in some readable
temporary directory when you run it. It seems to be one of the Windows temp
directories by default.

Hope this can be of help,
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top