Archive: InstallOptions


InstallOptions
I am reading the test.nsi for InstallOptions. I read in the docs that this "File /oname=$8 InstallOptions.dll" (and a few more lines) are substituted with "InstallOptions::dialog "ini.ini"". But I don't see this in the test.nsi.

The question is not "why is it there?", but: Can we make the onInit section no needed as InstallOptions::dialog is there? and the same for ReserveFile?


It's there: InstallOptions::dialog "$PLUGINSDIR\test.ini"

You don't need to extract InstallOptions anymore but you still need to extract your INI files of course.

ReserveFile is only useful when you are using BZIP2 compression, because the files will be added in the right order (files in .onInit first).


Sorry, Joost. I didn't understand.

What I say is: can we avoid "file /oname" anymore, and ReserveFile to make easier the use of plugins?


No. It's impossible to detect which files plugins use.

ReserveFile is not required, but very useful when you are using BZIP2 compression and your .onInit function is not at the top of the script.

NSIS compresses a file when it gets a File instruction. Things in .onInit need to be extracted first, so your installer will startup faster when these files are at the beginning of the datablock.


Originally posted by Joost Verburg
No. It's impossible to detect which files plugins use.
Sorry, I didn't understand either.

From what I understand now this is how nsis treats dll:
InstallOptions::dialog"ini.ini"

And the name of the dll is the first thing you read, and the ini the third.

But you are saying that "File /oname" is still needed. Could nsis extract the ini file when InstallOptions is used?

this "::" is only used for plugins isn't it?

That's just a parameter for the DLL. Each DLL has it's own parameters.


RTFM
Please read section 3.9 of the NSIS documentation, it explains that NSIS already packs the plugin into your installer automatically when you use a plugin command. (Section 3.9).

Sorry if I've misunderstood your question.


He is talking about the INI file, not the DLL.


mmm...

Thanks everyone for explanations.

I think I understood.:)