Skip to content

Guide to build Playerbot

blueboy edited this page Oct 9, 2011 · 21 revisions

Obtaining Playerbot Source Code

Playerbot code is currently available for both MaNGOS and MaNGOS Zero cores.

Release Code (master branch)

This is tried and tested code (full support provided):

  • Playerbot for MaNGOS
  • Playerbot for MaNGOS Zero
  • Currently unavailable (Please use Beta Test Code)

Beta Test Code (master branch)

This code is generally available for testing (full support provided):

  • Playerbot for MaNGOS
  • Playerbot for MaNGOS Zero

Alpha Development Code

In addition to the Beta Test Code (master branch), there are several branches that hold code in raw development. These represent the latest Playerbot ideas, and are not guaranteed (minimal support provided, feedback is for developer’s information only). A full list of available branches can be obtained from:

  • Playerbot for MaNGOS
  • Playerbot for MaNGOS Zero

You will need the git utility to be installed on your system to obtain the above code

Merging the code

In order to build Playerbot with either core, it is first necessary to merge the code.
This can be done directly or by applying a prepared patch.

Direct Merge Method

1. Obtain either core.

MaNGOS

git clone git://github.com/mangos/mangos.git <local repository> 

The default local repository will be called mangos, but you can change this to suite

MaNGOS Zero

git clone git://github.com/mangos-zero/server.git <local repository> 

The default local repository will be called server, but you can change this to suite

2. Merging relevant Playerbot Code from the links given above. It is assumed that the core code
is either clean or contains only playerbot code, previously merged (i.e. no other third party code).

cd <local repository> 
git pull git://github.com/playerbot/mangos.git <branch name>

The branch name will be an online branch, either master or a code sub-branch

3. If you wish to update an existing local repository, then repeat instruction 2. All changes since
the last merge will then be merged into the local repository

If no changes have occured, then you will be told

From git://github.com/playerbot/mangos.git
 * branch            <branch name>     -> FETCH_HEAD
Already up-to-date.

Prepared Patch Method

Playerbot for MaNGOS (full patch)

Run the following script

#!/bin/bash -x
git clone git://github.com/mangos/mangos.git playerbot
cd playerbot
git fetch git://github.com/playerbot/mangos.git master:playerbot
git checkout playerbot
HASH=`git log --pretty=oneline | grep -m 1 '\[1[0-9]\{4\}]' | cut -d " " -f 1`
git diff $HASH > playerbot.patch

Playerbot for MaNGOS Zero (full patch)

Run the following script

#!/bin/bash -x
git clone git://github.com/mangos-zero/server.git portal_zero_patch
cd portal_zero_patch
git fetch git://github.com/blueboy/portalzero.git master:portalzero
git checkout portalzero
HASH=`git log --pretty=oneline | grep -m 1 '\[z1[0-9]\{3\}]' | cut -d " " -f 1`
git diff $HASH > playerbot_zero.patch

copy the patch created to the local repository

cd <local repository>
git apply --check --whitespace=fix <prepared patch>

The —check option does a dumby run, to check for conflicts. If none, remove and apply again.

If you follow the instructions above, it is unlikely that you will experience any merge conflicts.
However if you do, please contact support Playerbot Thread

Once you have applied the Playerbot code successfully to the core, proceed with the build normally, according to your system.