# Building Raw Therapee in Windows 64

12 November 2011
This short guide outlines setting up a development environment for building RawTherapee (64 bit) in Windows.
Apology and warning: the procedure is convoluted. Prepare for frustration if you deviate even one bit. Sorry.
Step 0:
Use TortoiseHg to grab the latest Raw Therapee, put it in a directory whose name doesn't contain spaces. This is more or less simple but well documented, please figure it out yourself.
Step 1:
Download the latest CMake. Install it into C:\CMake.
Step 2:
Download a rather specific version of gtkmm64. Install it into C:\gtkmm64.
Step 3:
Download a rather specific build of MinGW. When installing, uncheck "Check for updated files...", check "Experimental (32 and 64 bit)", check the "openmp" component under Components->gcc, install into C:\MinGW64.
Step 4:
Download the latest Precompiled package for 64bit Windows. Unzip the file contents (already organized into several subdirectories) into C:\MinGW64.
Step 5:
Download a rather specific build of MSYS. Install to C:\msys. At the end it asks for your MinGW directory, make sure you give it C:/MinGW64. That's a forward slash, and it matters.
Step 6:
Create a file named build.bat in your raw therapee source directory with the following content:
set GTKMM_BASEPATH=C:\gtkmm64
set GTKMM64_BASEPATH=C:\gtkmm64
set MINGW_BASEPATH=C:\MinGW64
set PATH=%PATH%;C:\gtkmm64\bin;C:\MinGW64\bin;C:\CMake\bin
set PKG_CONFIG_PATH=C:\MinGW64\lib\pkgconfig;c:\gtkmm64\lib\pkgconfig
cmake -DCMAKE_BUILD_TYPE=Release -G "MinGW Makefiles" -DPROC_TARGET_NUMBER:STRING=2
mingw32-make -j2 install
pause
Running the batch file above after completing all steps properly should slowly but flawlessly build Raw Therapee.
If it doesn't work, please tell us about it at the Raw Therapee forum. Maybe this document needs updating.
Do not rest until it builds. A complicated build sucks, but out of date or inaccurate build documentation is unacceptable.