Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Is there a perl version of MSI

by dingus (Friar)
on Dec 20, 2002 at 11:49 UTC ( [id://221400]=note: print w/replies, xml ) Need Help??


in reply to Is there a perl version of MSI

Gosh talk of synchronicity! I was just about to mumble something on the same lines. I've started looking at NSIS as a free windows installer and was wondering what I should do for the Cross-platform installer.

Anyway here are some thoughts at semi-random.

Your 10 tasks looks pretty much correct

It may depend on what your appication is but often the 20 questions can be asked nicely on one or 2 webpages so - if your app is a WEB app then how about a trivial

./install.pl /path/to/cgi-bin/ browserapp <url>
one liner that copies itself to the cgi-bin directory and then runs the browser pointng to http://localhost/cgi-bin/install.pl which does the rest.

Make sure you have an uninstaller (i.e.

./install.pl --uninstall
must "just work") and uninstaller must have the option to keep files that were installed in shared locations such as /usr/lib/perl...

If you could support the NSIS script format then it would be really easy to make a combo *nix/windows installer

For apps that don't need any web interaction a standard set of questions (where to install...) and sensible scriptable defaults would be good.

One big irritation with windows installers IMO is that they often seem to expect to be run as "Administrator" even though they probably aren't really doing anything that needs such access. Need to make sure that the *nix equivalent doesn't abuse root.

Installer needs to be able to bootstrap itself from a minimal setup. ?Can you assume perl is installed?

Dingus


Enter any 47-digit prime number to continue.

Replies are listed 'Best First'.
Re: Re: Is there a perl version of MSI
by tachyon (Chancellor) on Dec 20, 2002 at 12:34 UTC

    With an installer you have to assume somthing. Assuming that they have an OS is safe and if they have an OS it *can* run perl one way or another so coding in Perl makes sense to me (beside the obvious fact that if they don't have Perl well what can you say...) For most flavours of *nix perl is a given, for MS you could wrap the package into an exe with perl app. If you are looking at a Perl installer (as I am) Perl should be a given but as you say....

    As you point out root/Administrator access is not always required although it almost always makes life easier. On Win2k Administrator is like root with the good bits removed anyway....

    If you want a GUI HTML/CGI is the way to go but then you run into the issues of needing a browser and the ability to write a CGI with root issues and the assumption that you have httpd/IIS. Console is more portable, GUI is nicer

    For an unistaller you need basically just need to write a file that lists all the changes so you can try to roll them back. XML along the lines of:

    <write> /some/file/here/file.txt </write> <modify> /some/config/file.conf <change> <add> this </add> <delete> that <save> that here </save> </delete> <modify> s/this/that/ </modify> </change> </modify>

    No choking if something is not where it was or the permissions are wrong, etc.

    No delete, just modify and add so you can un-modify and rm to rollback.

    cheers

    tachyon

    s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (6)
As of 2024-04-25 08:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found