This introduces a new mechanism for handling bit flags. Instead of using an int (or two, or three) to write bits into, this uses the std::bitset in a wrapper class that accepts an enum class as input. This means that certain classes of errors we've had a few of in the engine, where a coder used the wrong set of flags or checked them against the wrong variable (SF_STEALTH vs SIF_STEALTH, for example) can now be detected at a compiler level rather than not at all.
FreeSpace2 Source Code Project
Building
For building you will need CMake. Version 3.4 is required. Once you have installed CMake you should create a build directory where the project/make files should be created, do not create them inside the source tree!
On Windows you can use the cmake-gui executable to get a nice GUI, on Unix just use cmake. Use the newly created directory as build directory (change to this directory on Unix) and run cmake. On Windows this can be done by clicking the Configure button. Choose your compiler version and hit Generate when configuring is done.
Depending on the makefile generator used build the all or ALL_BUILD target to compile the project.
Available variables to control the build
FSO_BUILD_WXFRED2: Build the wxfred2 project, requires wxWidgetsFSO_FREESPACE_PATH: Sets the path of your FreeSpace install, can be used to automatically run the generated executables with the correct working directory, this is an optional variable. By default this will use the value of theFS2PATHenvironment variable.FSO_BUILD_TOOLS: Build some tools related to FSO
Windows only variables
FSO_BUILD_FRED2: Build FRED2, requires a Visual Studio version that ships with MFCFSO_USE_SPEECH: Build a binary with text-to-speech supportFSO_USE_VOICEREC: Build a binary with voice recognition support
Advanced variables
You should only use these variables if you know what you're doing
FSO_CMAKE_DEBUG: Print CMake debugging informationsFSO_BUILD_INCLUDED_LIBS: Build libraries from the included sourceFSO_USE_OPENALSOFT: Use OpenALSoft for OpenAL supportFSO_USE_LUAJIT: Use luajit as a replacement for luaFSO_DEVELOPMENT_MODE: Toggles some development behavior, only use if you really need it.FSO_RUN_ARGUMENTS: If you run an executable from within the project, these arguments will also be passed to the executableFSO_BUILD_POSTFIX: Sets a postfix to be added to the executable name, may be useful for release candidates.
Visual Studio specific variables
MSVC_USE_RUNTIME_DLL: Use the DLL version of the runtime, experimental and not well tested.MSVC_SIMD_INSTRUCTIONS: The instruction set the executables will be optimized for.
Generating an installation package
CMake can automaticall generate installation packages of the project. To do this you will just need to run the package target of the build system and the package will be placed inside your build directory. On Windows you will have to install NSIS to use this.