Skip to content
⌘ NSIS Forum Archive

NSIS 2.42 plugin handling

5 posts

aerDNA#

NSIS 2.42 plugin handling

Could I please get some clarification on the new plugin handling introduced in 2.42?
Which one is true (if any):
1. A plugin stays loaded after calling and is unloaded before installer exits.
2. A plugin is unloaded after calling, unless it specifies that it needs to stay loaded.
If 2. is true: since /NOUNLOAD is deprecated, is there no way to force a plugin to stay loaded?
Anders#
if you implement the new nsis function export in your dll, it will stay loaded, if you don't, everything is like it was in 2.41
aerDNA#
I'm not a plugin developer, I was asking as a scripter. You say that plugins which don't utilize the changes in plugin api are treated the same as they were before, which means that they're unloaded unless script says otherwise. I did some testing and I've seen for myself that it's true - 'old' plugins which require to stay loaded (e.g. NSISArray, Stack) still work fine, unless you remove /nounload from their headers. So /nounload and SetPluginsUnload still work, and I had thought they were completely obsolete since they were removed from nsis documentation. As for updated plugins, System for instance, they don't respond to /nounload and can't be forced to stay loaded. Or maybe I'm wrong, but I couldn't get a locked system.dll after installer exit (👍 ). I guess I should've done this script-fiddling before posting my confusion. But perhaps someone else was wondering about this and that's why I'm so elaborately answering my own questions. 🙂
I have another question, though: I used to use /nounload with System even when it wasn't necessary - specifically, when I had it called many times in a script, to avoid repetitive loading and unloading. But I haven't seen anyone else do that and now it's not even possible, so, did it make any sense or can nothing be gained by such approach?
Anders#
I used to do that also (/NOUNLOAD for everything except the last call), but now system plugin stays loaded always, so there is no point in doing that