Skip to content
⌘ NSIS Forum Archive

NSIS Internet Packages

11 posts

kichik#

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#
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#
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#
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#
You could just make a function to download a file and save yourself the hassle of all that typing 🙂.
kichik#
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#
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...