SWGEmu Old Forums Archive  

Go Back   SWGEmu Old Forums Archive > FAQ > SWGEmu FAQ

Notices

Search FAQ Search FAQ
Search Word(s):
Matching Options:
Search in:

Client Setup (LPE)
Client Setup

Client Setup (Manual)
Manual Setup.

Development Environment (Windows) Setup
Dev Env Setup

Development Environment (Linux) Setup
Environment Setup for Ubuntu based on Ubuntu Intrepid 8.10: This first section we're going to install the necessary packages, rather then check to see the system for these packages we're just going to install them with aptitude. There will only be one of three results. A fresh install, an upgrade, or no action taken.


1. Installation: open your terminal window and use the following lines to install the necessary packages

(a) sudo apt-get install gcc

(b) sudo apt-get install g++

(c) sudo apt-get install automake

(d) sudo apt-get install sun-java6-jre

(e) sudo apt-get install lua5.1

(f) sudo apt-get install liblua5.1-dev

(g) sudo apt-get install mysql-server-5.0

(h) sudo apt-get install mysql-admin

(i) sudo apt-get install mysql-query-browser

(j) sudo apt-get install libmysqlclient15-dev


2. Now to do the setup for some of the packages you just installed: Open your terminal window and use the commands listed below.

(a) sudo nano /etc/environment
the entry you will find in this file is:
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
or something close to it. You will want to add the following line towards the end.

:/usr/lib/jvm/java-6-sun-1.6.0.12/jre/bin/

( you will have a different path if your version of java is different.) You're new line for /etc/environment will look like this.

PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/lib/jvm/java-6-sun-1.6.0.12/jre/bin/"

(b) sudo ln -s /usr/include/lua5.1/* /usr/local/include
you may confirm this step went well by typing the following.

ls -l /usr/local/include/

the results should look like those below.


kaigeos@kaigeos:~$ ls -l /usr/local/include
total 0
lrwxrwxrwx 1 root root 29 2008-11-06 14:39 lauxlib.h -> /usr/include/lua5.1/lauxlib.h
lrwxrwxrwx 1 root root 29 2008-11-06 14:39 luaconf.h -> /usr/include/lua5.1/luaconf.h
lrwxrwxrwx 1 root root 25 2008-11-06 14:39 lua.h -> /usr/include/lua5.1/lua.h
lrwxrwxrwx 1 root root 27 2008-11-06 14:39 lua.hpp -> /usr/include/lua5.1/lua.hpp
lrwxrwxrwx 1 root root 28 2008-11-06 14:39 lualib.h -> /usr/include/lua5.1/lualib.h
kaigeos@kaigeos:~$

(c) sudo ln -ds /usr/include/mysql/ /usr/local/include/
You will avoid mysql errors durring your compile with this step. Your /usr/local/include/ directory should now look like the listing below.


kaigeos@kaigeos:~$ ls -l /usr/local/include/
total 0
lrwxrwxrwx 1 root root 29 2008-11-06 14:39 lauxlib.h -> /usr/include/lua5.1/lauxlib.h
lrwxrwxrwx 1 root root 29 2008-11-06 14:39 luaconf.h -> /usr/include/lua5.1/luaconf.h
lrwxrwxrwx 1 root root 25 2008-11-06 14:39 lua.h -> /usr/include/lua5.1/lua.h
lrwxrwxrwx 1 root root 27 2008-11-06 14:39 lua.hpp -> /usr/include/lua5.1/lua.hpp
lrwxrwxrwx 1 root root 28 2008-11-06 14:39 lualib.h -> /usr/include/lua5.1/lualib.h
lrwxrwxrwx 1 root root 19 2008-11-11 13:26 mysql -> /usr/include/mysql/
kaigeos@kaigeos:~$

(d) sudo nano ~/.bashrc
You will need to add the following line to the bottom of this file.

CLASSPATH=/workspace/MMOEngine/bin/idlc.jar; export CLASSPATH

I have a rather lengthy .bashrc file so I'll only past the last 8 lines to show an example of what this should look like.

# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if [ -f /etc/bash_completion ]; then
. /etc/bash_completion
f
fi
C
CLASSPATH=/home/kaigeos/workspace/MMOEngine/bin/idlc.jar; export CLASSPATH

You will want to replace /kaigeos/ with your current user account. Afterwards you will wish to run the following command.
source ~/.bashrc

3. Now it is time to setup Eclipse. First you will download eclipse GET ECLIPSE NOW you will need the package Eclipse IDE for C/C++ Developers (68 MB), choose the version you need. I personally use Linux 32bit.


For this example I downloaded the archived file to: /home/kaigeos/Desktop/ I then unpacked it. I now have a new directory on my Desktop called eclipse. Open the eclipse directory and launch the file named eclipse. We'll first setup eclipse to install the SVN plugin. On your menu bar go to Help/Software Updates, next you need to click on the TAB for Available Software and click the Add Site button, you will add this site. http://subclipse.tigris.org/update_1.4.x you will now see that address listed in available packages select the checkbox, then once available select all of the packages and hit Install in the upper right corner and follow the prompts, you will have to accept a license agreement. After the installation you will be prompted to restart eclipse just hit YES. Now you can get your SVN projects with Eclipse.


4. Checking out your first SVN project. You will click on File/New/Project. Open the folder labled SVN and select Checkout Projects from SVN and click Next. Select the top radio button for Create a new repository location and click Next. use this address http://svn2.assembla.com/svn/swgemu on the text field provided. Click next, and you will see a prompt to select a folder. Open the address that you just added by clicking the arrow next to it. Then click the arrow next to engine3public also core3 then also the arrow next to trunk. You will now see the choices for MMOEngine and MMOCoreORB hold down the control key and click both of these files once selected you can click Next. You can change settings here for what you will check out, but for your first time I suggest you just leave everything alone and click Next. Here you may checkout to any directory you wish, but I recommend you leave it on the default. Click FINISH, depending on your system this may take a while. Once eclipse is finished with the checkout you may close eclipse.


5. Open terminal we have some more tweaking to do now. I will give you the next few commands you'll need in terminal. Remember to replace /kaigeos/ with your own user directory, this is only for the example.


(a) sudo mv /home/kaigeos/workspace/MMOEngine/lib/unix/libengine3.a /home/kaigeos/workspace/MMOEngine/lib/unix/libengine3.a.unix this just changes the filename as a backup.

(b) sudo cp /home/kaigeos/workspace/MMOEngine/lib/linux/libengine3.a /home/kaigeos/workspace/MMOEngine/lib/unix/libengine3.a this copies a different version of libengine.a from the linux libraries to the unix libraries.

(c) sudo cp /home/kaigeos/workspace/MMOEngine/bin/idlc /usr/local/bin then run. sudo chmod 755 /usr/local/bin/idlc ## This step sets idlc up so it will run when called from the makefile, otherwise it will not be found.

(d) sudo ln -s /usr/lib/liblua5.1.so.0.0.0 /usr/lib/liblua.so; sudo ln -s /usr/lib/liblua5.1.a /usr/lib/liblua.a; sudo ln -s /usr/lib/liblua5.1.la /usr/lib/liblua.la; ## This step is needed so you don't get a llua not found error.

6. Now change your directory to /home/kaigeos/workspace/MMOCoreORB again /kaigeos/ is only for this example.

(a) cd ~/workspace/MMOCoreORB ## now to execute the following commands.

(b) make config ## this will configure your source to compile on your environment setup.

(c) make clean ## this is not always needed, I would skip first time as you just checked out from the repository.

(d) make ## this is the last step, your code will be compiling and this will take a while. You may want to find something else to go do at this point.

(e) If you rather compile with Eclipse you have one more step to go. Launch eclipse, and you will right click on MMOCoreORB and at the bottom of the menu click properties. You will then select C++ Make Project and click on the Environment TAB. Click the New button, for name you will enter CLASSPATH and for value you will use /home/kaigeos/workspace/MMOEngine/bin/idlc.jar restart Eclipse and you should be ready to go.

Author- Kaigeos


All times are GMT -4. The time now is 12:15 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
All Contents Copyright 2004-2010, SWGEmu.