Compiling Frhed

Table of Contents

  1. Getting Sources
  2. Environment
  3. Project Files
  4. Compiling
  5. Visual Studio 2005 & 2008 Manifest Files

Getting Sources

Frhed is always released with sources. Sources are not (anymore) in the same binary package. Sources are in own package, named Frhed-version-src.zip. Links to latest releases are in Frhed homepage. Direct link to SourceForge.net downloads: Frhed downloads.

The latest codes are available from Frhed Subversion repository. Instructions for accessing Frhed Subversion repository can be fround here. In short, checkout from url https://frhed.svn.sourceforge.net/svnroot/frhed/trunk.

Environment

Supported Compilers

Visual Studio c++ 2008 Express Edition is a free compiler available from http://www.microsoft.com/Express/. You don't need to buy commercial Visual Studio edition for compiling Frhed.

Needed libraries

Platform SDK (PSDK) or Windows SDK is needed for compiling.

  1. For VS 6 the Platform SDK February 2003 is recommended, later ones might not work properly. Download and install.
  2. For VS2003.Net and later: Platform SDK Windows 2003 SP1 or later is recommended. Download and install.

Frhed uses htmlhelp library to show HTML help files in help viewer. The HtmlHelp library is available as a part of HTML Help Workshop and as part of Platform SDK (PSDK).

For VS 6 it is recommended to install HTML Help Workshop. It can be downloaded from Microsoft: HTML Help Workshop. After installing HTML Help Workshop you must add its include and lib -folders to Visual Studio settings as additional include- and library-file folders.

Project Files

The sources contain solution and project files for Visual Studio 6. But later Visual Studio versions convert those files to new format.

Frhed consist of three projects:

The dependencies are such that:

Compile

To compile Frhed:

Visual Studio 2005 & 2008 Manifest Files

When the VC6 project file (.dsp) or VS2003 project file (.vcproj) is converted to a Visual Studio 2005 or 2008 project, the visual styles do not get enabled. The problem is Visual Studio 2005 and 2008 automatically generate and embed a manifest file for the executable, but that generated manifest file does not include all needed properties to enable visual styles. The solution is to add WinMerge's manifest file as an additional manifest.

From project properties, set
Manifest Tool / Input and Output / Additional Manifest Files -property value to:
$(InputDir)\res\Frhed.exe.manifest
More general form of:
$(InputDir)\res\$(TargetFileName).manifest
should work too but currently it does not for some reason.

There is a Python script Tools/fix_manifest.py which does the conversion. Note that the script re-formats the project file XML structure when saving so do not generate patches without first opening and saving the project file with Visual Studio.

See also Manifests in VS2005-- What are they? -thread in Microsoft forum.