For up to date instructions on how to compile mpc-hc visit the wiki page:

http://sourceforge.net/apps/trac/mpc-hc/wiki/How_to_compile_the_MPC


Part A: Preparing the Visual Studio environment

 Visual Studio 2010
  1. Install Visual C++ 2010, part of Visual Studio 2010 Professional (Express won't work, other editions work fine)
  2. Install Visual Studio 2010 Service Pack 1 -> http://www.microsoft.com/downloads/en/details.aspx?FamilyID=75568aa6-8107-475d-948a-ef22627e57a5&displaylang=en
  3. Install the DirectX SDK (June 2010) -> http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=3021d52b-514e-41d3-ad02-438a3ba730ba


Part B: Preparing the GCC environment
 NOTES:
  * If you installed the MSYS/MinGW package in an other directory you will have to use that path in the following steps.
  * If you don't use TortoiseSVN then the revision number will be a hard-coded one, like 1.6.3.0.

 1. Download and extract MSYS_MinGW-w64_GCC_471_x86-x64.7z to "C:\MSYS" -> http://xhmikosr.1f0.de/tools/MSYS_MinGW-w64_GCC_471_x86-x64.7z
    For the components and their version see: http://xhmikosr.1f0.de/tools/MSYS_MinGW-w64_GCC_471_x86-x64_components.txt
 2. Edit the "fstab" file in "C:\MSYS\etc" to specify your MinGW path.
    Add this to it: C:\MSYS\mingw	\mingw
    Note the tab-space between "mingw" and "\mingw"
 3. Create a file named "build.user.bat" in "C:\mpc-hc" containing the following entries, adapted for your system:

@ECHO OFF
SET "MPCHC_MSYS=C:\MSYS"
SET "MPCHC_MINGW32=%MPCHC_MSYS%\mingw"
SET "MPCHC_MINGW64=%MPCHC_MINGW32%"
REM Git is optional to set if you chose to add git in PATH when installing it
SET "%MPCHC_GIT%=C:\Program Files (x86)\Git"


Part C: Downloading and compiling the MPC-HC source

1. Use Git to checkout MPC-HC's master branch to "C:\mpc-hc" (or anywhere else you like)
    Repository URL: https://github.com/mpc-hc/mpc-hc.git
    Grab it from http://msysgit.googlecode.com/files/Git-1.7.11-preview20120710.exe
2. Open the solution file "C:\mpc-hc\mpc-hc.sln"
    Change the solution's configuration to "Release" (in the toolbar).
3. Press F7 to build the solution.
4. You now have "mpc-hc.exe" under "C:\mpc-hc\bin\mpc-hc_x86"
5. Open the solution file "C:\mpc-hc\mpciconlib.sln"
6. Press F7 to build the solution.
7. You now have "mpciconlib.dll" under "C:\mpc-hc\bin\mpc-hc_x86"
8. Open the solution file "C:\mpc-hc\mpcresources.sln"
    In Visual Studio go to Build->Batch Build->Press Select All->Press Build
9. You now have "mpcresources.XX.dll" under "C:\mpc-hc\bin\mpc-hc_x86\Lang"

Alternatively, you can use "build.bat" which can build everything for you
(run: build.bat help for more info)


Part D: Building the installer

Download Inno Setup Unicode v5.5.1 or newer from: http://www.jrsoftware.org/isdl.php
Install everything and then go to "C:\mpc-hc\distrib", open "mpc-hc_setup.iss" with Inno Setup,
read the first comments in the script and compile it.
Notes:
* "build.bat" can build the installer by using the "installer" or the "packages" switch.
* Use Inno Setup's built-in IDE if you want to edit the iss file.
