SWGANH Developer Setup Guide

From SWGANH Wiki
Jump to: navigation, search

Thank you for your interest in contributing to the SWGANH project. This guide was written to help new developers get up and running with the SWGANH development environment and build the project for the first time.

Prerequisites

Before you can get started on adding the great new feature you have planned there are a few things that you’ll need to do first.

Install Microsoft Visual Studio 2008

You can’t compile code without something to compile it with, for that you’ll use Microsoft Visual Studio 2008 Express Edition. This is a free application available from Microsoft and can be downloaded at:

http://www.microsoft.com/express/Windows/[1]

During the installation process you will be asked to install optional products. Make sure to uncheck the option for Microsoft SQL Server 2008 Express Edition.

Install Git/TortoiseGit

Source code is managed via Git, a distributed version control system. In order to check out the latest version of the source you’ll need to have Git and TortoiseGit installed. Check out the the Git Setup Guide for further instructions on setting up your Git environment.

Git and checking out the Repository

Install MySQL Community Server

The SWGANH server uses MySQL to manage it’s data making it a requirement for all developers. You can download the latest version of the MySQL Server Community edition for free from the MySQL homepage.

http://www.mysql.com/[2]

Install Star Wars Galaxies and the SWGANH client

The use of the SWGANH client requires that you have purchased the game at some point and have installed it through the official Star Wars Galaxies installer or game discs. For more information please see the Star Wars Galaxies website:

http://www.starwarsgalaxies.com/[3]

After you have a working live installation of Star Wars Galaxies you can download the SWGANH client which will guide you through the setup and installation of the SWGANH Game Client.

http://www.swganh.com/!!swganh!!/anhclient_setup.exe[4]


Checkout and Build the Source Code

Now that all the prerequisites are out of the way it’s time to check out the source and build it! Right click anywhere in a directory where you want to keep the project and choose Git Clone...

Enter the following address in the Url field and hit OK, this will clone a copy of the server source into a project directory called mmoserver.

[email protected]:mmoserver.git

Once the source has been checked out double click the BuildServer.bat and wait for it to complete. This process can take up to 25 minutes the first time it’s run. It will download and build all the necessary dependencies for the source code as well as the project itself. When the build finishes it will notify you if it was successful or not. If there are any errors be sure to alert someone in IRC, otherwise you’re ready to continue!


Load the Database Data

Once the source code has successfully compiled you’re ready to move on to the last step of getting the database ready. First right click anywhere in a directory not within the mmoserver directory and choose Git Clone...

Enter the following address in the Url field and hit OK, this will clone a copy of the server source into a project directory called mmoserver.

[email protected]:mmoserverdb.git

To start the database installer run the batch file located at mmoserverdb/install.bat. You will be asked for the address of the MySQL server you’ll be using along with the account information for a user with root level privileges. If you’ve followed the directions thus far use the settings outlined below, otherwise you should know what to put in these blanks:

IP/Hostname: localhost
Username: root
Password: Root password from Prerequisite Step 3

From the installer main page select option number 1 and let it run its course. When this has completed you can exit the database installer. Before you can fire up the server and start playing there are a couple of additional steps in setting up the database that must be completed first.

Setting the Galaxy IP

In order to successfully connect to a galaxy when creating a character or logging into the game the correct IP address must be set. To do this open your mysql management application, such as Navicat Lite[5], open the swganh database and select the galaxy table on the left and then edit the SWGANH TC row and update the IP address to either your local or external IP address.

Initial Server Run

Now that the source code is compiled and the database is all set it’s time to make a few last configuration file changes and fire up the server for the first time.

To start off the server double click the ServerStart.bat. You’ll need to wait a few moments while each of the server instances loads. Once this has completed you’re ready to start the SWGANH game client and log in with developer account. Have fun and may the Force be with you!