Old 16th July 2007, 13:26   #1
riskable
Junior Member
 
Join Date: Jul 2007
Posts: 4
Send a message via AIM to riskable Send a message via Yahoo to riskable
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.
riskable is offline   Reply With Quote
Old 16th July 2007, 13:57   #2
riskable
Junior Member
 
Join Date: Jul 2007
Posts: 4
Send a message via AIM to riskable Send a message via Yahoo to riskable
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
riskable is offline   Reply With Quote
Old 16th July 2007, 14:52   #3
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,449
If you are not changing the system.dll code, you don't need to compile it, grab it from a normal install

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 16th July 2007, 18:01   #4
riskable
Junior Member
 
Join Date: Jul 2007
Posts: 4
Send a message via AIM to riskable Send a message via Yahoo to riskable
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.
riskable is offline   Reply With Quote
Old 16th July 2007, 18:10   #5
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
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.

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 16th July 2007, 18:11   #6
riskable
Junior Member
 
Join Date: Jul 2007
Posts: 4
Send a message via AIM to riskable Send a message via Yahoo to riskable
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!
riskable is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast 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