Compile: Difference between revisions

From MyGamingTalk
m (1 revision imported)
 
m (1 revision imported)
(No difference)

Revision as of 08:02, 13 February 2023


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 GameMonkey: https://github.com/jswigart/gmscriptex

The gmscriptex repository has 3 folders. You only need the gmsrc_ex folder. Move it into Omnibot\dependencies folder or create symbolic link.

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

Linux

Compile Boost

Run shell as root. Change current directory to boost.

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

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

It's possible 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 2013. You can use free Express or Community edition.

Compile Boost

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

bootstrap.bat
.\bjam --with-date_time --with-filesystem --with-regex --with-system --with-thread 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 BOOST path.

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

The solution contains projects for all supported and unsupported games. You probably only need to compile projects Common, gm_ex and MOD_ET or MOD_RTCW.

Select Release or Debug configuration on toolbar and compile. There is a Post-Build Event defined to copy output file to installation folder. You can modify it if you want another folder. If you are lucky and compilation is successful, you will have file omnibot_et.dll or omnibot_rtcw.dll.

Compile Mods

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

Return to Castle Wolfenstein solution: GameInterfaces\RTCW\src\RTCW2010.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.

<headertabs />