Archive: Workaround for missing System::Call?


Workaround for missing System::Call?
The latest version of nsis (2.29) doesn't compile the System plugin on Linux systems. I have an existing nsi (from the openvpn-gui app) that has the following code:

; Check if we are running on a 64 bit system.
System::Call "kernel32::GetCurrentProcess() i .s"
System::Call "kernel32::IsWow64Process(i s, *i .r0)"
IntCmp $0 0 tap-win32

I can disable this check but that isn't optimal. Does anyone know of an alternate method to perform the same function that doesn't use "System::Call"? Thanks.


I thought I should clarify... the System plugin does compile into nsis (when you use gcc) but it doesn't include the System::Call function. For reference, this is the error I get:

Invalid command: System::Call
Error in script "openvpn-gui.nsi" on line 364 -- aborting creation process


If you are not changing the system.dll code, you don't need to compile it, grab it from a normal install


Is it portable across platforms? As far as I know the system.dll that anyone, anywhere can compile for Linux doesn't have "System::Call". I'll try copying the system.dll from a Windows machine and see if that works.


System's code has inline assembly which GCC can't compile. That's why System::Call and System::Get are not compiled on Linux. Take System.dll from a ZIP distribution and you're set.


That actually worked! I copied the System.dll from a Windows install to my Linux server and I'm not getting any errors when I use System::Call.

Thanks!