DarkRadiant - Compiling in Visual C++ 2005

From The DarkMod Wiki
Jump to navigationJump to search
The DarkRadiant VC++ project files have migrated to a more recent version of Visual Studio. Please refer to the current article linked from the DarkRadiant - Compilation Guide.

You'll need a working VC++ build environment to open and compile the DarkRadiant solution file. See below for instructions about how to setup VC++ 2005 Express: Installing VC++ 2005 Express

Once you have VC++ installed, there is a prefabricated solution file (.sln) ready for you in the tools/vcprojects folder. I created them using MS Visual C++ 2005 Express Edition, I can't say how older versions behave, but I suspect newer ones will just have to convert the vcprojects. Hit Ctrl-Shift-B in VC++ to start building the sources.

The project output files are setup so that the binaries get automatically installed in the install/, modules/ and plugins/ folders. Also, all dependencies from the w32deps/ folder (see previous section) are automatically copied into the install/ folder during the post-build event.

See the previous section of how to checkout the sources.

svn co https://darkradiant.svn.sourceforge.net/svnroot/darkradiant/trunk/darkradiant/

Installing Visual C++ 2005 Express Edition

You can download Visual C++ 2005 Express Edition for free from Microsoft (the needed Platform SDK is also available for free):

These are two hefty downloads, so watch your bandwidth. First, mount and install VC++ 2005 Express, this should be straight forward. This tutorial referring to the default installation paths from now on.

Installing the Platform SDK

Mount the Platform SDK image and hit setup. You don't need to install everything from that package, so deselect everything except:

  • Configuration Options (not sure about the child option Register Environment Variables, select that too)
  • Microsoft Windows Core SDK
  • Microsoft Data Access Services (MDAC) SDK
  • Debugging Tools for Windows

Once you have the Platform SDK installed, you'll need to

  • Open VC++ 2005
  • Go to menu Tools > Options
  • Go to Projects and Solutions > VC++ Directories
  • Select "Show Directories for" Include files
  • Add the folder C:\Program Files\Microsoft Platform SDK\Include
  • Select "Show Directories for" Library files
  • Add the folder C:\Program Files\Microsoft Platform SDK\Lib
  • Then close VC++, go to the folder C:\Program Files\Microsoft Visual Studio 8\VC\VCProjectDefaults
  • Open the file corewin_express.vsprops using a text editor and replace the XML key <Tool /> with this:
<Tool Name="VCLinkerTool" AdditionalDependencies="kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib 
 advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib" />

Once that's done, restart VC++ and you should be ready to compile the DarkRadiant sources.

Links