Krita/Winbuild

From KDE Community Wiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Build Krita on Windows

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

Get:

  • 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:

git://anongit.kde.org/scratch/rempt/kritadepwin.git

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

git://anongit.kde.org/calligra.git

in c:\dev\shared_p, checkout

git://anongit.kde.org/clones/kdelibs/rempt/kdelibs-stripped.git

Download https://www.valdyas.org/~boud/icons.zip and unpack in c:\dev\YOURTREE\i\share

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

set DOWNLOAD_DIR=/dev/d
set INSTALL_DIR=/dev/YOURTREE/i
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.

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:

#SET(GLOBAL_PROFILE -DCMAKE_MODULE_LINKER_FLAGS=/machine:x64 
#	-DCMAKE_EXE_LINKER_FLAGS=/machine:x64 
#	-DCMAKE_SHARED_LINKER_FLAGS=/machine:x64
#	-DCMAKE_STATIC_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\".

(THIS NEEDS FIXING)

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