KatsBits Community

Game Editing => idTech Editing Hints & Tips => Topic started by: kat on July 08, 2016, 07:29:54 AM

Title: [doom3.gpl] Compiling Doom 3/idtech 4 source code
Post by: kat on July 08, 2016, 07:29:54 AM


Instructions below relate to using Windows 7 to compile Doom3.gpl using Microsoft Visual Studio 2013 Community edition (not tested or checked on Windows 8/8.1 or Windows 10 - modified code as per below DOES NOT build with Visual Studio 2015). Code is extracted and used with minor modification (explained below).
(!) items required to produce a successful build.

How to install
The installation process for Visual Studio 2013 differs slightly to that of Visual Studio 2010 in that a number of components previously requiring separate download are now included by default during install (although still optional so need to be selected for inclusion), i.e. Microsoft Visual C++ library.
How to use
The source code likely won't compile without error by default but it shouldn't need any modification itself, all necessary changes are typically simple edits to the projects properties and settings.

Step 1: project update
The below loads the *.sln file into Visual Studio (may need to be opened from the application if more than one version of Visual Studio is available) and updates the data to be fully compatible with 2013.
Step 2: project properties
Setting up the projects environment, settings and properties. Once the project is loaded and updated, next;Step 3: modify snd_system.cpp
Step 4: Build
If the code is to be used as is without modifying anything, before compiling the 'build type' should be set to "Release" or "Dedicated Release" to ensure all the files and data are included in the appropriate *.exe, *.dll and other core files.
Successful compile
If successful a series of files are produced and saved to "build\Win32\Dedicated Release" in the project directory (where the source files were unpacked and the *.sln was double-clicked - note: a separate folder is created per build type within which output is saved). These are;
Once available copy to actual development folder (should contain folder/directory structure replicating that of Doom 3).

Other useful doom3.gpl topics
- Changing the name of DOOM3.exe (https://www.katsbits.com/smforum/index.php?topic=897.0) (custom naming DOOM3.exe)
- Changing the Doom3.exe shortcut & program icon (https://www.katsbits.com/smforum/index.php?topic=898.0)

Additional Information
The following information ostensibly pertains to using Visual Studio 2015 but may also be useful to Visual Studio 2013 in some situations.