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 
 
Guide to installing NWNX on Ubuntu 12.04

 
Post new topic   Reply to topic    nwnx.org Forum Index -> Linux technical support
View previous topic :: View next topic  
Author Message
Squatting Monk



Joined: 28 Jun 2007
Posts: 76

PostPosted: Thu Dec 12, 2013 10:14    Post subject: Guide to installing NWNX on Ubuntu 12.04 Reply with quote

I decided to whip up a guide to installing NWNX after doing so successfully on my shiny new server. Hopefully, this will help anyone who's unsure of what to do. I'd appreciate any questions or criticism you folks may have.

Here it is for those folks too lazy to follow links:

Quote:
This guide assumes you know the basics of the Linux command line interface. It assumes you're using Ubuntu 12.04 (Precise Pangolin) 32-bit. Your mileage may vary if you use other distros. It also assumes you've already installed NWN at /opt/nwn.

We'll need a few packages in order to build NWNX:

Code:
sudo apt-get install build-essential cmake gperf zlib1g-dev libmysqlclient18 libmysqlclient-dev


Now we need to install Git so we can download the necessary files:

Code:
sudo apt-get install git-core


Download the NWNX files to your home directory:

Code:
git clone https://github.com/NWNX/nwnx2-linux.git


You should now have a folder in your home directory called nwnx2-linux. Navigate to it:

Code:
cd nwnx2-linux


Now compile!

Code:
./compile.sh


You may need to install additional libraries for some of the plugins. Check the output of compile.sh and make sure that you have the necessary packages for any of the plugins you need. The library listed may not actually be the package name as it's shipped under Ubuntu, so use some Google-fu if you need.

The compilation will take about five minutes, during which you should see lots of compiler messages going by on the screen. When compilation finishes, you should see the following message:

Code:

NWNX has been compiled successfully.

- Look in the 'compiled' directory for the libraries.
- Copy those that you want to use into your NWN server directory.

IMPORTANT:
- In the case of multiple so files and/or dynamic and static
  variants (for example, the odmbc plugin), choose only one.
  If you're running wserver the same host that you are compiling on,
  the dynamic one is recommended.
  static binaries include the database connector linked in.

- Read & change nwnx2.ini carefully.
- Edit nwnstartup.sh to match your desired server settings.

Have fun!


Hooray! Now we need to copy our compiled plugins to our NWN install directory:

Code:
cp compiled/* /opt/nwn


Now we need to limit ourselves to one odbc plugin. Rename the one you want to nwnx_odbc.so and remove the others.

Code:
cd /opt/nwn
mv nwnx_odmbc_mysql.so nwnx_odbc.so
rm nwnx_odmbc_*.so


Now edit your nwnx2.ini file to use the correct login information for your database:

Code:
nano nwnx2.ini


Note: semicolons are comment characters: make sure to use these to comment out all information about database types you don't wish to use:

Code:

[ODBC2]
; for sqlite3
;source=SQLITE
;file=./test.sqlite3

; for mysql
source=MYSQL
server=localhost
user=myuser
pass=mypassword
db=mydatabase

; for postgre
;source=PGSQL
;server=localhost
;user=username
;pass=password
;db=database

; Set hookscorco to false if you want to disable hooking of
; StoreCampaignObject and RetrieveCampaignObject entirely
hookscorco=true


Now edit your startup script to pass the settings you wish nwserver to use, making sure that any multi-word server or module names are encapsulated in double quotes ("):

Code:
nano nwnstartup.sh


When you're done, run the startup script:

Code:
./nwnstartup.sh


You should see output similar to the following. Check to make sure all plugins initialize correctly:

Code:
NWNX2lib: Init
NWNX2lib: org SetString() at 81f41b4, new SetString() at f76da2ce
NWNX2lib: org GetObj() at 81f40bc, new GetObj() at f76da2f5
* Parsing configuration...
NWN Extender v2.8-dev
(c) 2004 by the APS/NWNX Linux Conversion Group
(c) 2007-2010 by virusman and Acaos
Based on the Win32 version (c) 2003 by Ingmar Stieger (Papillon)
and Jeroen Broekhuizen
visit us at http://www.avlis.org

* Searching for signatures...
* Loading modules...
ODMBC_MYSQL plugin registered.
CHAT plugin registered.
SERVERLIST plugin registered.
EXTEND plugin registered.
TWEAKS plugin registered.
AREAS plugin registered.
DEFENSES plugin registered.
FUNCSEXT plugin registered.
OPTIMIZATIONS plugin registered.
NAMES plugin registered.
MNX plugin registered.
VISIBILITY plugin registered.
CONNECT plugin registered.
EVENTS plugin registered.
WEAPONS plugin registered.
HASHSET plugin registered.
PROFILER plugin registered.
SYSTEM plugin registered.
SPELLS plugin registered.
FUNCS plugin registered.
DMACTIONS plugin registered.
STRUCTS plugin registered.
TMI plugin registered.
RESET plugin registered.
RESMAN plugin registered.
FIXES plugin registered.
* NWNX2 activated.
Neverwinter Nights Server
Build:8109
Copyright BioWare Corp 1998-2004

Server: Loading...
Server: Running...

Server: Loading module "Chapter1"...................................................................................................................
Server: Module loaded


That's all there is to it, folks!


Last edited by Squatting Monk on Sun Dec 28, 2014 5:24; edited 1 time in total
Back to top
View user's profile Send private message
David



Joined: 30 Mar 2005
Posts: 12
Location: Netherlands

PostPosted: Thu Feb 06, 2014 21:48    Post subject: Reply with quote

Thanks a lot for this guide. It really helped me out. I think this is better way of installing nwnx than presented here: http://www.nwnx.org/index.php?id=doc_nwnx_linux.
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
virusman



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Fri Feb 07, 2014 15:29    Post subject: Reply with quote

I've added a link to this guide on the site. Thanks for the heads up!
_________________
In Soviet Russia, NWN plays you!
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Linux technical support 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