Compilation Guide - recovered by Mordana

Post Reply
User avatar
nemerle
Posts: 397
Joined: Thu Jan 10, 2013 3:40 pm

Compilation Guide - recovered by Mordana

Post by nemerle » Sat Jan 12, 2013 2:48 pm

Compiling S.E.G.S from Source on Windows

Technical documentation
12/12/2010

Follow the guide exactly!! Download the files to the location instructed, this really is important. If the guide instructs to make a c:\segs folder please make the folder in c:\segs not c:\users\profile\my-awesome-folder\segs

If you are starting from scratch do know that getting all the pieces in place can take some time. Compiling the various projects can take a long time. So be patient and don't rush through the steps.

Getting Started
The S.E.G.S project uses libraries from other projects and does not include these files. You must either compile these dependencies yourself or use ones that have been pre-compiled. The following is a list of projects that S.E.G.S utilizes.

ACE, Boost, zlib, PostGreSQL, SWIG

You should have a good decompression/compression utility. I used 7zip to extract the various files. After 7zip is installed you can right click on a compressed file and then click on 7zip > "Extract to "ProjectName\" Use this method to extract all the compressed files. You can install 7zip from here: http://www.7-zip.org/

You should have enough hard drive space, at least 3gigs.

You should be patient! Downloading, extracting, preparing, and compiling everything can take some time.

Compiling S.E.G.S
Step 1) Get a compiler:

1a. Download C++ 2010 Express Edition from here:http://www.microsoft.com/visualstudio/e ... 10-express
1b. Install C++ 2010 Express Edition. The only thing you can change during the install is the option for SQL Express. S.E.G.S uses Postgre, SQL Express is not needed.

Step 2) Get Cmake, a make file utility

2a. Download Cmake for windows from here: http://www.cmake.org/files/v2.8/cmake-2 ... 32-x86.exe
2b. Install Cmake
2c. On the Install Options wizard select: Add Cmake to the system path for all users. Also place a check in the box "Create Cmake Desktop Icon" Leave all other options their defaults.

To make building from source easier the S.E.G.S forums has a link to a zip file that has all the prerequisites you need. If you have this file jump to step 9. If you would rather build from more current releases see steps Steps 3-8
Step 3) Create the S.E.G.S folders.

3a. On the root of your drive create a folder called segs. c:\segs (this will be our root segs folder)
3b. In the c:\segs folder create a new folder called source. c:\segs\source (the segs source code will go here)
3c. In the c:\segs folder create a new folder called pre. c:\segs\pre (all the segs prerequisites will go in here)
3d. In the c:\segs folder create a new folder called build. c:\segs\build (this will be the location of the compiled segs files)
3e. In the c:\segs folder create a new folder called software. c:\segs\software (the authserver and its dependencies will be copied here)
3f. At the bottom of this document in the files section is a file called copyFiles.cmd. Save this file to c:\segs

Step 4) Compile ACE: Skip this step if using precompiled 3rd_party
The main project page for ACE is here: http://download.dre.vanderbilt.edu/
If You have any trouble compiling ACE-5.8.0, please try version 6.0.2 [ thanks shikohadou]

4a. Download ACE from here: http://download.dre.vanderbilt.edu/prev ... -5.8.0.zip
This is the latest release (ACE+TAO+CIAO x.8.0)
4b. When the download is complete extract the ACE-5.8.0.zip file.
4c. Go to the ACE_wrappers directory.
On my computer this folder unzipped here: C:\Documents and Settings\Administrator\Desktop\ACE-5.8.0
Copy the ACE_wrappers directory to c:\segs\pre
The ACE_wrappers directory should now be here: c:\segs\pre\ACE_wrappers
4d. In the ACE_wrappers\ace folder create a new document and call it config.h
4e. Open config.h in your favorite text editor. Add this entry to the file:

#include "C:\segs\pre\ACE_wrappers\ace\config-win32.h"

4f. Save the config.h file and exit from the text editor.
The config.h file tells the complier where the main configs are for ACE.
4g. Now run the Visual Studio 2008 Solution file. C:\segs\pre\ACE_wrappers\ACE_vc9.sln
Be patient, Visual Studio will need to update IntelliSense. Depending on your computer it could take a long time to open.
4h. In Visual Studio, next to the play button you should see Debug | Win32. If this is correct click on build > build solution.
Be patient, compiling ACE takes forever, it really does! Be prepared to wait, a long time 677 steps worth of waiting.
4i. Exit out of Visual Studio
Step 5) Removed
Step 6) Download zlib:
The main project page for zlib is here: http://www.zlib.net/

6a. You can download pre-compiled zlib here: http://zlib.net/zlib125-dll.zip
6b. Unzip the files. On my computer this was "C:\Documents and Settings\Administrator\Desktop\zlib125-dll"
6c. Copy the zlib125dll folder to c:\segs\pre
zlib should now be here: C:\segs\pre\zlib125-dll

Step 7) Download Postgre
The main project page for Postgre is here: http://www.postgresql.org/

7a. You can download a pre-compiled postgre here: http://www.enterprisedb.com/products/pgbindownload.do select Win x86-32
7b. Unzip the files. On my computer this was "C:\Documents and Settings\Administrator\Desktop\postgresql-9.0.1-1-windows-binaries\pgsql"
7c. Copy the pgsql folder to c:\segs\pre
Postgre should now be here: c:\segs\pre\pgsql

Step 8) optional Download SWIG:
The main project page for SWIG is here: http://www.swig.org/

8a. You can download a pre-compiled SWIG here http://prdownloads.sourceforge.net/swig ... -2.0.1.zip
8b. Unzip the files. on my computer this was "C:\Documents and Settings\Administrator\Desktop\swigwin-2.0.1\swigwin-2.0.1"
8c. Copy the swigwin-2.0.1 folder to c:\segs\pre
SWIG should now be here: c:\segs\pre\swigwin-2.0.1

Step 9) Download S.E.G.S from Github

9a. Go to this page github.com/Segs/Segs and click on "Zip" button
9b. Extract segs.zip. On my computer it extracted here: "C:\Documents and Settings\Administrator\Desktop\segs"
9d. Copy the segs folder to c:\segs\source
The S.E.G.S source should now be here: c:\segs\source\segs

Step 10) Prepare S.E.G.S with Cmake.

10a. Start Cmake. Cmake should have been installed in Step 2.
10b. For option "Where is the source code:" Click on Browse Source and select C:/segs/source/segs
10c. For Option "Where to build the binaries:" Click on Browse Build and select. C:/segs/build
10d. Setting up Cmake Options
Check the Grouped and Advanced Check boxes.
Click on Configure.
On the "Specify the generator for this project" click the dropdown and select Visual Studio 10 2010. Also make sure that "Use default native compilers" is selected.
Click on Finish.
You will get a Error in Configuration process message just click on OK
Next we need to tell cmake where the various dependencies are located.
10e. Setting the paths for ACE
Click the + to expand ACE.
Place a check box in ACE_debug_lib
Set ACE_lib_path to: C:/segs/pre/ACE_wrappers/lib
Set ACE_path to: C:/segs/pre/ACE_wrappers
Click on Configure.
You will get a Error in Configuration process message just click on OK
10f. Setting the paths for ZLIB
Click the + to expand ZLIB
Set ZLIB_INCLUDE_DIR to: C:/segs/pre/zlib125-dll/include.
Set ZLIB_LIBRARY to: C:/segs/pre/zlib125-dll/lib/zdll.lib.
Click on Configure.
You will get a Error in Configuration process message just click on OK
10g. Setting the paths for SWIG
Click the + to expand Ungrouped Entries.
Set SWIG_EXECUTABLE to: C:/segs/pre/swigwin-2.0.1/swig.exe.
10h. Setting the paths for PGSQL and Generating the make files
Click the + to expand PGSQL
Set PGSQL_lib to: C:/segs/pre/pgsql/lib/libpq.lib
Set PGSQL_path to: C:/segs/pre/pgsql/include
Click on Configure
Click on Generate
Exit Cmake

Step 11) Compile a S.E.G.S binary with Visual Studio

11a. In C:\segs\build double click on SEGS.sln
Be patient, Visual Studio will need to update IntelliSense. Depending on your computer it could take a long time to open.
11b. Next to the play button make sure that Debug | Win32 is set.
11c. Click on build > build solution.

Step 12) Copy authserver and its dependencies to c:\segs\software

12a. Double click on the c:\segs\copyFiles.cmd script that you saved in step 3f
This will copy all the necessary files to run segs.exe. If your OS is Windows 7 you will need to run this batch file as the administrator.

Document To Do's:
* Shorten Step 10 To setup the paths in cmake its easier to check grouped and advanced than continually clicking on the Configure button.
* Add Step 12) Create the program folder
* Add screen-shots to assist some of the steps
* Check for spelling and other mistakes
Last edited by nemerle on Fri Feb 15, 2013 3:34 pm, edited 1 time in total.
Reason: Updated the guide a little bit.
"Ich was in one sumere dale,
in one suthe diyhele hale,
iherde ich holde grete tale
an hule and one niyhtingale."

User avatar
Sergio526
Posts: 6
Joined: Fri Mar 22, 2013 2:39 pm

Re: Compilation Guide - recovered by Mordana

Post by Sergio526 » Sun Mar 31, 2013 10:55 pm

Oh no! I did all the steps (well, I guess I missed onnnneee littttlllle step) and I get to step 12 where it says to run copyFiles.cmd, but there is no copyFiles.cmd because there is no files section on this document. Any chance someone has this crucial file sitting around?
I can do anything, the impossible just takes longer!

Mordana
Question Deflector
Question Deflector
Posts: 8
Joined: Sun Jan 13, 2013 6:31 am

Re: Compilation Guide - recovered by Mordana

Post by Mordana » Thu Apr 04, 2013 10:29 pm

Hi, unfortunately this was recovered from Google's cache and that file could not be downloaded from there.

My best advice is to download segs runtime and use the file layout as a guide. If there has been any changes to which files are required, running the server should cause a missing file prompt in which case you can just search through the third party folders and copy the missing files to the server folder manually.

PocketKnife
Community Manager
Posts: 5
Joined: Tue May 07, 2013 12:27 am

Re: Compilation Guide - recovered by Mordana

Post by PocketKnife » Sat May 18, 2013 1:16 am

You can see how to compile and install on our Wiki

http://redmine.nemerle.eu/projects/segs ... stallation

User avatar
broxen
Posts: 59
Joined: Tue Jun 07, 2016 8:26 am
Location: USA
Contact:

Re: Compilation Guide - recovered by Mordana

Post by broxen » Mon Oct 16, 2017 9:23 am

I've tried the instructions here, and on the GitHub wiki, but I've been unable to get a this to compile cleanly in Linux.

Can I send you my QTCreator compile output?
-broxen

User avatar
nemerle
Posts: 397
Joined: Thu Jan 10, 2013 3:40 pm

Re: Compilation Guide - recovered by Mordana

Post by nemerle » Mon Oct 16, 2017 9:48 am

Sure thing, either post it here, or open an issue on github
"Ich was in one sumere dale,
in one suthe diyhele hale,
iherde ich holde grete tale
an hule and one niyhtingale."

User avatar
broxen
Posts: 59
Joined: Tue Jun 07, 2016 8:26 am
Location: USA
Contact:

Re: Compilation Guide - recovered by Mordana

Post by broxen » Mon Oct 16, 2017 8:58 pm

nemerle wrote:
Mon Oct 16, 2017 9:48 am
...open an issue on github
Done. Thanks Nemerle!
-broxen

User avatar
nemerle
Posts: 397
Joined: Thu Jan 10, 2013 3:40 pm

Re: Compilation Guide - recovered by Mordana

Post by nemerle » Mon Oct 16, 2017 9:47 pm

If the fix I proposed for that issue works, feel free to open a pull request.
If You manage 4 PRs to various github projects You might even get a free t-shirt from these guys
"Ich was in one sumere dale,
in one suthe diyhele hale,
iherde ich holde grete tale
an hule and one niyhtingale."

User avatar
broxen
Posts: 59
Joined: Tue Jun 07, 2016 8:26 am
Location: USA
Contact:

Re: Compilation Guide - recovered by Mordana

Post by broxen » Wed Oct 18, 2017 5:36 am

I was able to get this to compile!

Thank you for all of your help on Github. I'm reposting my solution below, in case anyone else runs into this thread.

On Fedora 26, make sure you have installed:
qt5 >= 5.8.0-2
SDL2-devel

Note: on Fedora 26, you must switch to the updates-testing repo to install fully QT5.8.0-2 or greater.
-broxen

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests