Compile

From MyGamingTalk


You can get Omni-bot C++ source code from GitHub: https://github.com/jswigart/omni-bot

Latest Omni-bot version for Enemy Territory and Return to Castle Wolfenstein is in the stable branch !!!

Use the Download ZIP button or install Git and then clone the repository.

You also need submodule GameMonkey: https://github.com/jswigart/gmscriptex

Omni-bot depends on the Boost libraries which can be downloaded from https://sourceforge.net/projects/boost/

Linux

Compile Boost

If your Linux distribution contains boost packages, you can just install the packages and skip this step.

Run shell as root. Change current directory to boost.

./bootstrap.sh --with-libraries=date_time,filesystem,regex,system
./b2 address-model=32 link=static install

Header files will be copied into /usr/local/include/boost. Libraries will be copied into /usr/local/lib

You can use --prefix parameter to install boost to another folder which does not require root privileges. See boost documentation.

Compile Omni-bot

If you want to compile Omni-bot for other games than Enemy Territory, open the file Omnibot\Jamfile in a text editor and uncomment build-project commands (they are at the end of Jamfile).

Open script Omnibot\linux\buildbot.sh in a text editor and change paths. The BOOST_SUFFIX variable should be empty in current Boost version. Then run the script.

If you are lucky and compilation is successful, you will have file omnibot_et.so or omnibot_rtcw.so somewhere in Omnibot\build folder.

Compile Mods

Run script buildet.sh or buildrtcw.sh.

Files cgame.mp.i386.so and ui.mp.i386.so must be compressed into archive omnibot_et.pk3 or omnibot_rtcw.pk3.

64-bit

If you use 64-bit ET:Legacy and legacy mod, you must compile 64-bit Omni-bot.

Add parameters address-model=64 cflags=-fPIC when you compile Boost.

Add parameter address-model=64 to bjam command when you compile Omni-bot.


Windows

Project files are for Microsoft Visual Studio 2017 or newer. You can use free Community edition.

Compile Boost

You can download boost binaries from https://sourceforge.net/projects/boost/files/boost-binaries/. Then you can skip this step.

Start "x86 Native Tools Command Prompt for VS" from the Start menu. Change current directory to boost root.

bootstrap.bat
.\b2 --with-date_time --with-filesystem --with-regex --with-system link=static runtime-link=static variant=release

Change variant parameter to debug if you want to compile Omni-bot with debugging info.

Change runtime-link parameter to shared if you want to use Code Generation / Runtime Library - Multi-threaded DLL (/MD)

Compile Omni-bot

Open file Omnibot\projects\msvc12\PropertySheets\Paths.props in a text editor and change the BOOST path.

Open solution Omnibot\projects\msvc12\Omni-bot.sln.

The solution contains projects for all supported games. Project MOD_ET is for Enemy Territory. Project MOD_RTCW is for Return to Castle Wolfenstein. Projects Common and gm_ex are required for both games.

Select Release or Debug configuration and Win32 or x64 configuration on the toolbar and compile. There is a Post-Build Event defined to copy output files to installation folders. These folders are defined in Omnibot\projects\msvc12\PropertySheets\Paths.props. Files omnibot_et.dll or omnibot_et_x64.dll are copied into ET_INST. Files omnibot_rtcw.dll or omnibot_rtcw_x64.dll are copied into RTCW_INST.

Compile Mods

Enemy Territory mod solution: GameInterfaces\ET\src\ET.sln

Return to Castle Wolfenstein solution: GameInterfaces\RTCW\src\RTCW.sln

There are 3 projects in the solution: cgame, game, ui. Projects cgame and ui have Post-Build Event defined to compress cgame_mp_x86.dll and ui_mp_x86.dll into omnibot_et.pk3 or omnibot_rtcw.pk3.