View previous topic :: View next topic |
Author |
Message |
Moon
Joined: 13 Jul 2007 Posts: 4
|
Posted: Sat Jul 14, 2007 16:22 Post subject: Plugins |
|
|
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/)
Yet it only lists a lot of variables without giving my makefile.
~Moon _________________ Working on/for:
Shayan's Subrace Engine
StormNexus |
|
Back to top |
|
|
Papillon x-man
Joined: 28 Dec 2004 Posts: 1060 Location: Germany
|
Posted: Sat Jul 14, 2007 16:51 Post subject: |
|
|
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 . _________________ Papillon |
|
Back to top |
|
|
Moon
Joined: 13 Jul 2007 Posts: 4
|
Posted: Sun Jul 15, 2007 0:00 Post subject: |
|
|
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
~Moon _________________ Working on/for:
Shayan's Subrace Engine
StormNexus |
|
Back to top |
|
|
Moon
Joined: 13 Jul 2007 Posts: 4
|
Posted: Mon Jul 16, 2007 0:18 Post subject: |
|
|
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 |
|
|
|