For up to date instructions on how to compile mpc-hc visit the wiki page:
https://trac.mpc-hc.org/wiki/How_to_compile_the_MPC
Part A: Preparing the Visual Studio environment
Visual Studio 2012
1. Install Visual C++ 2012, part of Visual Studio 2012 Professional (Express won't work, other editions work fine)
2. Install Visual Studio 2012 Update 4 -> http://go.microsoft.com/fwlink/?LinkID=240162#d-visual-studio-2012-update
3. Make sure you install all available updates from Microsoft Update
4. Install the DirectX SDK (June 2010) -> http://go.microsoft.com/fwlink/?LinkID=71193
Visual Studio 2013
1. Install Visual C++ 2013, part of Visual Studio 2013 Professional (Express won't work, other editions work fine)
2. Make sure you install all available updates from Microsoft Update
3. Install the DirectX SDK (June 2010) -> http://go.microsoft.com/fwlink/?LinkID=71193
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 have Git installed then the revision number will be a hard-coded one, like 1.6.3.0.
1. Download and extract MSYS_MinGW-w64_GCC_482_x86-x64.7z to "C:\MSYS" -> http://xhmikosr.1f0.de/tools/MSYS_MinGW-w64_GCC_482_x86-x64.7z
For the components and their version see: http://xhmikosr.1f0.de/tools/MSYS_MinGW-w64_GCC_482_x86-x64_components.txt
2. Edit the "fstab" file in "C:\MSYS\etc" to specify your MinGW path. This is optional.
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 it in PATH when installing it
SET "MPCHC_GIT=C:\Program Files (x86)\Git"
REM Optional, if you plan to modify the translations, install Python 2.7 or set the variable to its path
SET "MPCHC_PYTHON=C:\Python27"
Part C: Downloading and compiling the MPC-HC source
1. Use Git to clone MPC-HC's repository to "C:\mpc-hc" (or anywhere else you like)
Download Git from http://msysgit.googlecode.com/files/Git-1.8.4-preview20130916.exe
Run:
git clone --recursive https://github.com/mpc-hc/mpc-hc.git
or
git clone https://github.com/mpc-hc/mpc-hc.git
git submodule update --init --recursive
If a submodule update fails, try running:
git submodule foreach --recursive git fetch --tags
then run the update again
git submodule update --init --recursive
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.4 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.
https://trac.mpc-hc.org/wiki/How_to_compile_the_MPC
Part A: Preparing the Visual Studio environment
Visual Studio 2012
1. Install Visual C++ 2012, part of Visual Studio 2012 Professional (Express won't work, other editions work fine)
2. Install Visual Studio 2012 Update 4 -> http://go.microsoft.com/fwlink/?LinkID=240162#d-visual-studio-2012-update
3. Make sure you install all available updates from Microsoft Update
4. Install the DirectX SDK (June 2010) -> http://go.microsoft.com/fwlink/?LinkID=71193
Visual Studio 2013
1. Install Visual C++ 2013, part of Visual Studio 2013 Professional (Express won't work, other editions work fine)
2. Make sure you install all available updates from Microsoft Update
3. Install the DirectX SDK (June 2010) -> http://go.microsoft.com/fwlink/?LinkID=71193
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 have Git installed then the revision number will be a hard-coded one, like 1.6.3.0.
1. Download and extract MSYS_MinGW-w64_GCC_482_x86-x64.7z to "C:\MSYS" -> http://xhmikosr.1f0.de/tools/MSYS_MinGW-w64_GCC_482_x86-x64.7z
For the components and their version see: http://xhmikosr.1f0.de/tools/MSYS_MinGW-w64_GCC_482_x86-x64_components.txt
2. Edit the "fstab" file in "C:\MSYS\etc" to specify your MinGW path. This is optional.
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 it in PATH when installing it
SET "MPCHC_GIT=C:\Program Files (x86)\Git"
REM Optional, if you plan to modify the translations, install Python 2.7 or set the variable to its path
SET "MPCHC_PYTHON=C:\Python27"
Part C: Downloading and compiling the MPC-HC source
1. Use Git to clone MPC-HC's repository to "C:\mpc-hc" (or anywhere else you like)
Download Git from http://msysgit.googlecode.com/files/Git-1.8.4-preview20130916.exe
Run:
git clone --recursive https://github.com/mpc-hc/mpc-hc.git
or
git clone https://github.com/mpc-hc/mpc-hc.git
git submodule update --init --recursive
If a submodule update fails, try running:
git submodule foreach --recursive git fetch --tags
then run the update again
git submodule update --init --recursive
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.4 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.