Tutorial How to compile a own Server (Basic Knowings)
#1

Hello,

 

because therefore I have learn a lot of this theme and many people helped me to understand how it works I want to create a little Tutorial for beginners. I make this Tutorial as a short manual instruction.

 

I want to say a big big big Thanking to this board.

 

Ok now a little Tutorial:

 

1. First you have to take a OS which you setting your compile. I had take Centos 6.7. It is stable and good. You have to learn how works the Terminal. The Terminal is very Important. Please take care that you use a 32bit version bc at a 64 version you maybe get errors. The best what you can do is to create a swap file. If you do not you maybe get errors at the compile or a abborting. If a swap file is set or raised enough the compile will works fine.

 

You have make ready your centos that this can compile things. Therefore at first you have to install Centos (you can do it for example with vmware. This works too).

 

2. When your Centos are installed and ready bring it up to date and then follow the Barunson List. In the Barunson Instruction List. You have there all step by step to make your Centos ready for a compile. Don´t forget to set

 

3. Now you put your Server Files into a custom Folder and look into the end of the Barunson List. There are 3 things to change in your server sources. For example disable server auth and xtrap.

 

4. Now you can customize your server sources.

The very important files are at GameServer and at LoginServer the "Description.cpp". There you have must set the check ip for your server. The best it is to comment it out. For example how the following:

Descriptor.cpp GameServer
*************************

Line 259-277
Disable Version / Nation Check GS:

// if (packet->version != VERSION_FOR_CLIENT)
// {
// throw MSG_FAIL_WRONG_VERSION;
// }

//#if defined (INTERGRATION_SERVER)
// if ( !gserver->m_intergrationInfo.Check(packet->nation) )
//#else
// if (packet->nation != gserver->m_national )
//#endif // BILA_INTERGRATION_SERVER
// {
// GAMELOG << init("INVALID_NATION", packet->id)
// << packet->nation
// << end;
// throw MSG_FAIL_WRONG_VERSION;
// }

if (packet->mode == MSG_LOGIN_NEW)
this->m_playmode = MSG_LOGIN_NEW;

Descriptor.cpp LoginServer
**************************

Line 108-127
Disable Version /Nation Check LS:

#ifdef CHECKIP_USA
int IsUSA;
#endif // CHECKIP_USA

// if (packet->version != VERSION_FOR_CLIENT)
// {
// throw MSG_FAIL_LOGINSERV_WRONG_VERSION;
// }

//#if defined (INTERGRATION_SERVER)
// if ( !gserver.m_intergrationInfo.Check(packet->nation) )
//#else
// if (packet->nation != gserver.m_national )
//#endif // LC_BILA
// {
// GAMELOG << init("INVALID_NATION", packet->id)
// << packet->nation
// << end;
// throw MSG_FAIL_WRONG_VERSION;
// }

if (gserver.m_bOnlyLocal)
{

You also can change the start ip. Or you want to have some items at start after create a new char etc. This you will all find out when you had make some compiles and know how this works.

 

Now you have the basics changes and your source are ready to compile.

 

5. Open a Terminal in your Centos ang went to the main folder where are your Sources. I ever do at first cleaning the source. This you can do with a terminal setting to your main folder of the source with this command:

[Your Folder of the Sources:] # make -j32 -C ./ShareLib clean

This you have to do with all other server parts how as the GameServer etc.

 

6. If you all have clean then you can start the compile itself. In the Terminal use this Command:

[Your Folder of the Sources:] # make -j32 -C ./ShareLib usa

Take care that you at first compile the ShareLib Folder. Look in the File "Makefile" in your source. There a list with all command. with "usa" at the end of the command you set your language. if you for example want to have a spain server take "spn". But with other languages you can get trouble with the sources bc you have more to set and maybe get the problem with some letters how ä ö ü etc. Therefore it is better to take usa.

 

7. Take all compiled server parts out of the folders and build your server.

 

I hope I could give some helping informations back to the board and give some beginners a better start to learn how it works.



Forum Jump:


Users browsing this thread: 1 Guest(s)