- NSIS Discussion
- NSIS Internet Packages
Archive: NSIS Internet Packages
kichik
10th January 2002 19:04 UTC
NSIS Internet Packages
Hi!
I have an idea that will make NSIS internet installations much easier.
Instead of downloading with nsisdl.dll file by file there should be a one download of a "NSIS Internet Package". A "NSIS Internet Package" is a normal NSIS compiled script with the header stripped down. Then the NSIS installer that downloaded this "NSIS Internet Package" could load the package into memory and run it as it was it's own compiled script, copy it's files, run functions and all the other great things NSIS can do.
Then a script would look something like:
GetTempFileName $0
File /oname=$0 nsisdl.dll
Push "http://www.myhost.com/pack1.nsp"
GetTempFileName $1
Push $1
CallInstDLL $0 download
RunPackage $1
instead of:
GetTempFileName $0
File /oname=$0 nsisdl.dll
Push "http://www.myhost.com/file.dll"
Push "$INSTDIR\test.dll"
CallInstDLL $0 download
Push "http://www.myhost.com/file2.dll"
Push "$INSTDIR\test2.dll"
CallInstDLL $0 download
[...]
Push "http://www.myhost.com/file.txt"
Push "$INSTDIR\readme.txt"
CallInstDLL $0 download
What do you think?
KiCHiK
justin
10th January 2002 23:51 UTC
How about the installer just downloads another NSIS generated EXE, and executes it lile this:
Exec '"$TEMP\downloaded.exe" /S /D=$INSTDIR'
That way, we don't have versioning issues between the exe header and the data.
-Justin
kichik
11th January 2002 09:16 UTC
But that requries an extra uesless download of 35KB header.
kichik
11th January 2002 15:52 UTC
I don't think there will any versioning issues as both the installer and the package will be created by the same person. If you do think there will versioning issues you can add a small header with the version of NSIS that compiled this package in it.
KiCHiK
Kreft
11th January 2002 18:38 UTC
the idea sounds good, but i dont understand the reasoning if you prefer to not follow justins suggestion due to the meaningless 35kb then whydont you put all the install script in the installer and have the installer download the individual pieces (or if a large amount of files use a sfx compression on the downloaded package and have it extract from the installer). i guess what i am trying to say is that you didnt propose anything that isnt already possible other than reducing the code needed to download a file.
rainwater
11th January 2002 19:44 UTC
You could just make a function to download a file and save yourself the hassle of all that typing :).
kichik
12th January 2002 09:40 UTC
With SFX I still have the header, which BTW is larger than NSIS's header and with NSIS I could do other stuff but extracting.
And with a function I sill need to specify all the files I need and again I don't have other stuff like registery and so on.
Kreft
12th January 2002 15:22 UTC
as far as your extreme interest on header size, if you use ace2.0 for compression your gains will more than make up for the header infact you will end up well smaller than nsis is going to you do you on most filetypes.
otherwise, i dont understand your statement about not having the registry... its still there on the box you are installing your app on you should be able to use it...
kichik
12th January 2002 17:56 UTC
Sorry, I meant registery handling... NSIS commands in general.
About ACE, it is not free.
Kreft
12th January 2002 18:01 UTC
7z (http://7-zip.com) then
kichik
12th January 2002 18:33 UTC
But then I don't have NSIS commands...
Never mind, I get it. Bad idea :(