Clone wiki

OpenSauce-Release / Code / Doc_Code_UsingTheCode


This wiki entry should give you the run down of how the code is configured and what you need (and optionally need) to have in order to compile the code

If you already have a clone of the codebase, you can run the PrereqChecks.bat script to verify your machine is ready for working with the code. There are some libraries it can't check for, however (refer to the bat source for more).

Base Requirements

For starters, the only supported IDE is Visual Studio 2013 (and the compilers found in it).

Next, you'll need the June 2010 version of the DirectX SDK.

Finally, you'll need the C++ Boost libraries. At the time of writing, we're using version 1.55. The project will look for boost under C:\Program Files (x86)\boost\boost_1_55_0, and you will need to have compiled all of boost for Visual C++ 12, with the default function call type set to stdcall:

When compiling boost from source on Windows 8.1, you may need to set your include directories differently.

set INCLUDE=C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\INCLUDE;C:\Program Files (x86)\Windows Kits\8.1\include\shared;C:\Program Files (x86)\Windows Kits\8.1\include\um;C:\Program Files (x86)\Windows Kits\8.1\include\winrt

You can download a prebuilt copy of boost to get started faster. (Note: You'll want the 32bit version!)

Once you've installed boost, open a command prompt in your boost_1_55_0 directory and run:

bjam.exe toolset=msvc-12.0 cxxflags=/Gz --build-type=complete define=_SCL_SECURE_NO_WARNINGS,BOOST_NO_EXCEPTIONS,BOOST_FILESYSTEM_NO_DEPRECATED

NOTE: not all binary libraries appear to be able to compile with these defines (likely due to NO_EXCEPTIONS).

Be sure to delete the files in /bin.v2/libs/ and /stage/libs/ prior to building so that previous (cached) build objects aren't used.

OS defines NOMINMAX, so the shitty min/max macros won't be defined, allowing code to use std::min/max. If you need to use macro variants, use VC++'s \_\_min/\_\_max macros.

Some projects require 'vld.h' from Visual Leak Detector which we use to see if we are leaking memory at runtime. You can get Visual Leak Detector from here

Specific Requirements


LowLevel can optionally build some additional code if you have a copy of the XDK. You will need to remove the LOWLEVEL_NO_X360 define from the project config to even begin to enable this code. If you have the XDK, I assume you aren't just some script kiddie and can handle some of the other small compiler hurdles that will follow

BlamLib references the SlimDX SDK, a .NET wrapper for DirectX.

OpenSauce PC and HEK

Halo PC uses GameSpy for its multiplayer framework. GameSpy's OpenSDK also has some useful HTTP libraries, which we use in Halo1_CE.

If you do not have the Open SDK (it was free, but you'll need to source it elsewhere now), open up the project's Common/Precompile.hpp and search for the YELO_USE_GAMESPY_OPEN define and comment it out. You'll also need to remove the SDK's file references in the vcproj. In VS's Solution Explorer, these files can be found under Halo1->Halo1_CE->Common->Shared->GameSpy.

If you do have the SDK, apply the bug fix for ghttpProcess.c that is documented in the same Precompile.hpp mentioned above.

In the lastest OpenSDK they have some code that won't compile under OpenSauce's default settings. We use stdcall conventions where OpenSDK uses (or assumes) cdecl. Because of this, you'll need to change the signature of gsiCoreAtExitShutdown in gsCore.c to explicitly be cdecl.

OpenSauce Xenon

Chances are high that all code found in the Xenon part of the codebase references the XDK. You'll need that to compile the projects.