Archive: Using the System plugin on Linux


Using the System plugin on Linux
I've just installed the NSIS Debian package, and now have NSIS v2.33-1 installed on my Ubuntu box. I have /usr/share/nsis/Plugins/System.dll, and the file is readable. makensis works on a simple .nsi script.

Some of my scripts use the System plugin. For example:

System::Call "kernel32::GetCurrentDirectory(i ${NSIS_MAX_STRLEN}, t .r0)"

I have added:

!addplugindir /usr/share/nsis/Plugins

to my .nsi script, in case that is required.

When I compile, I get:
Invalid command: System::Call

I'm also unable to use System::Get



The documentation for the System plug-in notes "The most useful System plug-in functions (Call, Get and Debug) are not available when compiling with GCC. To work around this, either download a MSVC-compiled version or write your own plugin that calls the functions you need."

I'm not clear how that affects me. I'm not compiling using gcc but rather using makensis which was (presumably) compiled with gcc.

* Is this something structural with the Linux port of NSIS?

* Should I be able to use the System plug-in, when compiling my .nsi script under Linux?

* If so, any ideas what I might be doing wrong?


I am able to use:

System::Alloc 64

This tells me the problem was specific to System::Get / System::Call.

I tried replacing System.dll with the version included in a standard Windows release, and now my script compiles. Sweet!

So it seems that the System.dll which ships with the Debian package doesn't support those 3 special calls.


System.dll shipped with Debian is built using gcc and therefore doesn't support System::Call. Downloading a MSVC-compiled version is exactly what you did by getting System.dll from your Windows machine.

The next version of NSIS (2.42) should support System::Call on gcc builds as well.


Awesome. The NSIS team rocks. Thanks for making this tool available.