Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Perl app installer or runing itself on a CD

by DaWolf (Curate)
on Dec 04, 2003 at 22:40 UTC ( [id://312350]=perlquestion: print w/replies, xml ) Need Help??

DaWolf has asked for the wisdom of the Perl Monks concerning the following question:

Ok, ok, this is not a new question, but I would like to make a broad approach here. Please note that I'm talking specifically about Win32 machines.

I was first inspired by Shipping standalone perl apps on Win32, on the part it says "For some applications, it might be much more practical to create a perl "distribution" on CD containing ActivePerl or IndigoPerl and the additional modules you are using, together with your application."

So, I was wondering:

1) Can I have a CD with:
  1. a Perl app runing directly from the CD using
  2. an ActivePerl running also on the CD
  3. If a and b are possible, can this app write to the machine's hard drive?
2) Is it possible to make a Perl Tk or non-Tk app that:
  1. Installs ActivePerl on the users machine*
  2. "Installs" the Perl app
* Remember that the installer should call ActivePerl's installer first and when it's done call the app "installer")

I would like to hear some opinions about this, because to me sounds like a somewhat crazy idea, but that could be a great possibility to ship Perl apps.

Thanks in advance,

my ($author_nickname, $author_email) = ("DaWolf","erabbott\@terra.com.br") if ($author_name eq "Er Galvão Abbott");
  • Comment on Perl app installer or runing itself on a CD

Replies are listed 'Best First'.
Re: Perl app installer or runing itself on a CD
by rob_au (Abbot) on Dec 04, 2003 at 23:23 UTC
    Another option which you might like to take a look at is TinyPerl for Win32 - This small self-contained Perl distribution for Windows is less than 700 kb in size and has a permanent place on my USB keychain.

     

    perl -le "print+unpack'N',pack'B32','00000000000000000000001010010110'"

Re: Perl app installer or runing itself on a CD
by waswas-fng (Curate) on Dec 04, 2003 at 22:46 UTC
    The answer to all of those questions is yes. You will want to look at this before redistributing ASPerl though.


    -Waswas


      -Waswas

      editted to add: if you use the bat file install bundle to install ASP to a relative directory on your disk, you can then burn that to a cd after it is installed to have a fully working copy of perl on CD(as long as you keep the relative path the same on the CD). You can also use the bat installer bundle to install a fresh copy of ASP on the target machine via your TK enabled script. Another option that may be cleaner (or needed depending on redistrib legal junk) is to compile the perl TK installer script and put that on the CD with the bat installer bundle. It all depends on how strict AS is about packaging for redistrib.
      The FAQ, linked to by the same page clarifies some of the issues surrounding redistribution. The main issue is whether the redistribution is for commercial or non-comercial reasons.

      Assuming that the redistribution requirements are met and that you are writing your own installation for your app then it should be possible to incorporate the MSI packaged ActiveState distribution in to your own install script. This can be done by the tool that you are using to write your installation script (Wise, InstallShield etc.).

      If you don't want to install Perl, then you will need to run it from the CD. The cool thing about Perl is that it can be setup and configured without any weird registry settings. The best way to do this is using a batch file so that you can do some work before launching your app. You will need to set the environment variables that Perl can use before launching Perl.exe from your CD. You will also want to use the command line arguments to tell Perl to use the @INC directories on your CD before any other distribution. You will also need to ship any supporting Dlls that are not included with Windows. These will need to be present in the root of the CD where your batch file is running from. see the perlrun documentation for details.

      Needless to say, you will want to try this out on a machine that doesn't have Perl installed to make sure that everything is OK!

      You will want to look at this before redistributing ASPerl though.
      I'm gratefull for whatever contributions activestate has made to perl, but I'd rather build my own :)(it's not that big a deal)
Re: Perl app installer or runing itself on a CD
by iburrell (Chaplain) on Dec 05, 2003 at 22:13 UTC
    Instead of installing ActivePerl, you might want to look at packaging your Perl application. Both ActiveState's PerlApp and PAR work well. They put your application, required modules, and the perl interpreter in an executable and optionaly some extra DLLs and archives.

    The executable can be run from a CD. The distribution files can also be installed like a normal application. More importantly, it can run without needing to install ActivePerl. This saves all the hassle with dealing with an existing version of ActivePerl.

Re: Perl app installer or runing itself on a CD
by Anonymous Monk on Dec 04, 2003 at 22:50 UTC
    I don't know if you can, but it is possible.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://312350]
Approved by rob_au
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (3)
As of 2024-04-24 16:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found