Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 26th November 2008, 21:04   #1
thivnor
Junior Member
 
Join Date: May 2007
Posts: 15
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?
thivnor is offline   Reply With Quote
Old 26th November 2008, 21:47   #2
thivnor
Junior Member
 
Join Date: May 2007
Posts: 15
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.
thivnor is offline   Reply With Quote
Old 26th November 2008, 22:44   #3
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,337
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.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 27th November 2008, 01:14   #4
thivnor
Junior Member
 
Join Date: May 2007
Posts: 15
Awesome. The NSIS team rocks. Thanks for making this tool available.
thivnor is offline   Reply With Quote
Reply
Go Back   Winamp Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump