Archive: How to install from lines in a file.


How to install from lines in a file.
Hi all.
I have been playing around with nsis for some days now, but i find myself somewhat lost now.
I have written functions to connect to the internet and retrieve a file:

directory/fileonsystem1.dll|filenameonserver1.dll|MD5
directory/fileonsystem2.dll|filenameonserver2.dll|MD5
directory/fileonsystem3.dll|filenameonserver3.dll|MD5
eof

It goes through that file using readfile, test if fileonsystem1.dll exists on the computer, if it does calculates the md5 value and compare it to the value in the retrieved file, if there is a difference it writes the line to a file. When eof is reached i have a file that looks like this:

plugins/fileonsystem1.dll|filenameonserver1.dll
plugins/fileonsystem2.dll|filenameonserver2.dll

Here i am completely lost. I would like to have those lines put into sections, one section for each file so the user can select which files to download and install.

I am probabably doing something real wierd i find the scripting laungage quite hard :-)

Many Regards
poly


As there are no reply's i perhaps am unclear. I have changed the project a bit here is what i have now:

$R0 = path
$R1 = filename (file has been downloaded to $TEMP)

SetOutPath "$INSTDIR\$R0" (this works)
File /nonfatal $TEMP\$R1 (this doesn't work)

The file is not installed. Perhaps i am just trying to do something that isn't possible to to in nsis?

It seems that nsis won't have anything to do with the file if it isn't on the system on the time i compile the program.

Like if i specify the file without variables
File /nonfatal c:\test\filename.dll
it works fine as long as the filename is on the disk when i compile, but as the point is to download the file and install it that is not possible for me :-)


The File instruction is a compile time instruction, therefore you cannot use run time variables in it.

File takes a file on the compiler machine and compresses it into the installer file. If you are downloading a file and want to install it, use CopyFiles or Rename.

-Stu


Oh i see, i'll try using copy instead :-)
Thanx a lot.