Build Krita on Windows

Not for the faint of heart... Everything happens on the konsole.


  • cmake (minimum version 2.8.12)
  • git (minimum version 1.9.2)
  • Visual Studio Express 2012 (not any other version)

Install all of this using the default options. If you intend to push changes from Windows, use pageant/putty together with git.

Make the following layout on your C:\ drive, where YOURTREE is a unique drectory name:

  • c:\dev\shared_p
  • c:\dev\d
  • c:\dev\YOURTREE\s
  • c:\dev\YOURTREE\b
  • c:\dev\YOURTREE\i
  • c:\dev\YOURTREE\i\share
  • c:\dev\YOURTREE\p
  • c:\dev\YOURTREE\vs2012

in c:\dev\YOURTREE\s, check out:


in c:\dev\YOURTREE\p, check out:


in c:\dev\shared_p, checkout


Download and unpack in c:\dev\YOURTREE\i\share

Now decide whether you want to do a 32 or a 64 bits build. Open the right Visual Studio terminal (VS2012 x64 Cross Tools Command prompt or VS2012 x86 Native Tools Command Prompt). For a 32 bit build, comment out this block in s\kritadepwin\CMakeLists.txt:

Then, create a batch file called env.bat with the following content:

set DOWNLOAD_DIR=/dev/d
set Path=%PATH%;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Git\cmd;C:\Program Files (x86)\CMake 2.8\bin;C:\Program Files (x86)\Vim\vim73;\dev\YOURTREE\i\bin

And run the batchfile.

#	-DCMAKE_EXE_LINKER_FLAGS=/machine:x64 
#	-DCMAKE_RC_COMPILER="C:/Program Files (x86)/Windows Kits/8.0/bin/x64/rc.exe")

Also, do a global replace of "c:\dev\desktop64\" to "c:\dev\YOURTREE\".


Go to c:\dev\YOUR_TREE\b and run the cmake command:

cmake ..\s\kritawindep

This will fill the b directory with a host of projects. In a perfect world, if all the dependencies are listed correctly, you could just do a

cmake --build . --target ext_krita --config RelWithDebInfo > \b\log.txt

And a few hours later everything is fine. That probably won't work, though. Before building Qt, we need to make sure that libjpeg is built correctly.

cmake --build . --target ext_ --config RelWithDebInfo > \b\log.txt

Languages: 14:01:51 < mmolch_> boud: I made a small script yesterday, when run with --win-2.9 it downloads and

                   compiles all translations for windows: 

Content is available under Creative Commons License SA 4.0 unless otherwise noted.