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 
 
Plugins

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



Joined: 13 Jul 2007
Posts: 4

PostPosted: Sat Jul 14, 2007 16:22    Post subject: Plugins Reply with quote

Hello...

Today I decided that I wanted to make my own plugin to NWNX (for now just a "Hello World, [Arguments sent from NWN]"). Now I got the code done, my problem is compiling it. It does not have a makefile and I forgot/do not know how to create one.


--- "This is what I have done so far" ---
The name of the plugin is "SN". I added it in a sub-folder of the NWNX2 source (Got the linux source from here and overwrote with the latest from here) like the functions and db plugin.

I figured it would make great sense to use the configure command like this:
Code:

./configure prefix=/PATH/nwn/ --with-extraplugins="sn"


and it printed
Code:

[... A lot of system testing - All ok ...]
configure: creating ./config.status
config.status: creating Makefile
config.status: creating db/Makefile
config.status: creating mnx/Makefile
config.status: creating functions/Makefile
config.status: creating hashset/Makefile
config.status: creating sn/Makefile
config.status: error: cannot find input file: sn/Makefile.in


I decided to try make anyway. And it failed with this:

Code:

[... make of other plugins ...]
make -C sn
make[1]: Entering directory `/PATH/nwn/nwnx2/sn'
make[1]: *** No targets specified and no makefile found.  Stop.
make[1]: Leaving directory `/PATH/nwn/nwnx2/sn'
make: *** [sn] Error 2


I also tried (from /PATH/nwn/nwnx2/)
Code:

make -project

Yet it only lists a lot of variables without giving my makefile.

~Moon
_________________
Working on/for:
Shayan's Subrace Engine
StormNexus
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Papillon
x-man


Joined: 28 Dec 2004
Posts: 1060
Location: Germany

PostPosted: Sat Jul 14, 2007 16:51    Post subject: Reply with quote

I haven't worked with the linux side of things for quite a while, but my first approach would be to copy an existing plugin directory, and one-by-one get rid of the files you do not need, and adjust the Makefile along the way... just a thought.

This works quite well on Windows, too Smile.
_________________
Papillon
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Moon



Joined: 13 Jul 2007
Posts: 4

PostPosted: Sun Jul 15, 2007 0:00    Post subject: Reply with quote

Well, this is how I made the initial part of the plugin. However the makefiles never seem to work, even when manipulated. I might not be doing them right though, so I was hoping there was an auto-generator.

Edit: Hmm do not know what I did wrong last time, but I have successfully managed to re-write a Makefile now Very Happy

~Moon
_________________
Working on/for:
Shayan's Subrace Engine
StormNexus
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Moon



Joined: 13 Jul 2007
Posts: 4

PostPosted: Mon Jul 16, 2007 0:18    Post subject: Reply with quote

Alright, on to my next question about plugins.

When you start the nwserver, it remains interactive. Is it possible to send something to that process or otherwise use the native "command-side" commands? I am hoping to create an method to ban players in-game.

~Moon
_________________
Working on/for:
Shayan's Subrace Engine
StormNexus
Back to top
View user's profile Send private message Send e-mail MSN Messenger
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