rjstephens
15th February 2004 02:10 UTC
using NSISdl to get a list of files to download
HI
I am building an auto-update engine for my software in NSIS. Is it possible to download a list of files to download using NSISdl , and then download and replace those files one by one? I have searched the forums and the archive, and have not found a way to do this.
deguix
15th February 2004 02:36 UTC
Use NSISdl::download, and after the Rename command.
rjstephens
15th February 2004 02:43 UTC
I'm afraid I don't understand what your saying. If you could point me to an example script, please do so. I need a way to download a list of files, open that list, and then download the files in that list one by one.
I would just download the main EXE, but what if I want to add more new stuff than the main EXE? What if a new feature I added requires a new dll or something?
The only thing I can think of is to download and run an installer. But I'd rather be able to download a list of files, like I said at the top of this post.
Joost Verburg
15th February 2004 11:54 UTC
There are several examples of file reading available in the NSIS Archive.
rjstephens
15th February 2004 12:12 UTC
I was thinking more along the lines of "download a nsis script, and then run the instructions in the script". Is this possible?
Joost Verburg
15th February 2004 12:53 UTC
You can't evaluate script code on run-time. Why not use a textfile with files to download?
rjstephens
15th February 2004 13:01 UTC
because I might want to register a new dll or something, and it might not all be going in the same folder, etc. etc.
I think the way to go on this one is to download an installer, and run the downloaded installer. Only thing is the downloaded installer might want to replace the updater. Is there a way to get the installer to copy itself to a temp folder before running itself, in the same way that the uninstaller does?
Joost Verburg
15th February 2004 13:07 UTC
Sure. For an example see the NSIS Update script (available in CVS, Contrib\NSIS Update).
rjstephens
15th February 2004 13:17 UTC
thanks for that. I'll look at it in the morning. It's past 11pm and i'm tired.