logo logo

 Back to main page

The NWNX Community Forum

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
NWNX.NET for Windows and Linux

 
Post new topic   Reply to topic    nwnx.org Forum Index -> Linux development
View previous topic :: View next topic  
Author Message
Funny



Joined: 09 Jan 2010
Posts: 1

PostPosted: Sun Jan 17, 2010 17:56    Post subject: NWNX.NET for Windows and Linux Reply with quote

Hi@all,

i have made a .NET binding for NWNX with support for Linux and Windows. You can use the same assembly for both operating systems.

The linux version needs mono.
The windows version needs the .net framework sdk (i don't know why. i am not very good in c++).
Native nwnx plugins should still work.

HowTo:
- Replace the NWNX *.so/*.dll files with the original.
- Copy NWNXDotNetEngine.dll in the nwn directory.

Create an new assembly (a nwnxnet plugin). Add a reference to NWNXDotNetEngine.dll.

To add a new command, just create a class named "MyTestCommand". with parent type NWNXCommand and implement the abstract method [i]string Execute(string Parameter);[/b]. The Parameters are the content of sVar (see bellow). The class name equals sCommand (see bellow). Now you can make something in the Execute method and return a string result.

Call the command via:
string sCommand = "MyTestCommand";
string sVar ="MyVars";
SetLocalString(GetModule(), "NWNX!DOTNET!" + sCommand, sVar);

And get the result via:
GetLocalString(GetModule(), "NWNX!DOTNET!" + sCommand);

Complie this assembly and put it in the nwn directory. Now start nwnx...

This is a alpha version and there may some bugs. But i used this a it works on windows and linux as well.

Download: http://rapidshare.com/files/336759130/NWNXDotNetMono.rar

If is the someone can make the code nicer... You wellcome! Razz
Back to top
View user's profile Send private message
jonesg



Joined: 11 Feb 2011
Posts: 1

PostPosted: Fri Feb 11, 2011 21:19    Post subject: Reply with quote

I just (after spending the better half of a day looking for something similar) stumpled on this. I really apreciate what you have done here.

Will have a look through the code and may return with suggestions and/or questions.

But again thanks for looking into doing something like this!

--Jonesg
Back to top
View user's profile Send private message
Hialmar



Joined: 15 Jun 2005
Posts: 32

PostPosted: Thu Mar 10, 2011 12:15    Post subject: Reply with quote

Thanks for this indeed.

That could be a good solution for my projects as well.

I'll try to port it to NWNX4.
_________________
Hialmar, A Land Far Away Infrastructure Administrator
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Linux development All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group