Archive: Building a generic TTW installer?


Building a generic TTW installer?
Hi,

I got my feet wet yesterday, and successfully (I hope :-))built two scripts, one to install the dependencies for a VB5 app, and the other to download a file from the Net.

I read a bunch of messages on this site... but don't think I saw someone mentionning that they had written a generic, ie. application independent through-the-web installer.

Here's what I was thinking of doing:

1. Show list of apps in combo box (eg. "App1", "App2", etc.), so the user can select which app he wants to install

2. Connect to the Net

3. Get list of deps for said app (list.php?app=App2) -> $TEMP\App2.ini

4. For each dep, check if installed and correct version

5. Download, install, registry if necessary

The goal is to make this installer app-independent, and very light so as not to pack/download any file that is already installed on the user's PC (some of our customers are still connected at 56Kbps).

Any idea if this can be done in NSIS? For instance, UpgradeDL requires that both files to be compared are installed on the host, which we'd like to avoid.

Thank you
JD.


Yes, this is possible.

If you want to use the UpgradeDLL macro, you will have to create a custom version that takes a version as parameter and downloads a file.


>>If you want to use the UpgradeDLL macro, you will have to create a custom version that takes a version as parameter and downloads a file

Thanks :-)

OK, I read the whole CHM file... which has very few examples. Before I dive into the \Examples section, any code that someone already has to perform the following would be most appreciated. I assume I'm not the first person to want to write a basic installer that fetches files from the Net, so as to avoid forcing users to download big installers with lots of standards files they already have (VB runtime, etc.).

Step 1: Display a combo box with a list of apps, eg "App1", "App2" etc.

Step 2: Call a PHP script on a web server, with the app name as parameter (www.acme.com/list.php?app=app2), and get list of files require to install this app

Step 3: Either parse the list returned in a HTTP connection (eg. CSV-formatted), or save list as INI file somwhere, and extract dependencies using the ad hoc functions

Step 4: Fill an array for those requirements, and iterate through the array, checking whether each file is already installed and in the correct version; Otherwise, download and install

Thank you for _any_ code you might have
JD.


Everyone will probably have a different method of storing data and lists on the server.

It is not difficult at all. The easiest method is to use INI files on the server. You can create a modified macro that takes the version on the server as parameter and downloads the file.


dear janedoe2003

did you make something to convert DEP files on script .nsi
because I am really interesting in that !!