Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 18th September 2005, 09:01   #1
polygonansigt
Junior Member
 
Join Date: May 2005
Posts: 8
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
polygonansigt is offline   Reply With Quote
Old 18th September 2005, 19:23   #2
polygonansigt
Junior Member
 
Join Date: May 2005
Posts: 8
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 :-)
polygonansigt is offline   Reply With Quote
Old 18th September 2005, 19:47   #3
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
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

Need an installer? http://www.afrowsoft.co.uk
Afrow UK is offline   Reply With Quote
Old 18th September 2005, 19:55   #4
polygonansigt
Junior Member
 
Join Date: May 2005
Posts: 8
Oh i see, i'll try using copy instead :-)
Thanx a lot.
polygonansigt is offline   Reply With Quote
Reply
Go Back   Winamp Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump