Krita/Winbuild: Difference between revisions

From KDE Community Wiki
(Blanked the page)
 
Line 1: Line 1:
== 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
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:
{{Input|1=<nowiki>
#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")
</nowiki>}}
Also, do a global replace of "c:\dev\desktop64\" to "c:\dev\YOURTREE\".
(THIS NEEDS FIXING)
Then, create a batch file called env.bat with the following content:
{{Input|1=<nowiki>
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
</nowiki>}}
And run the batchfile.
Go to c:\dev\YOUR_TREE\b and run the cmake command:
{{Input|1=<nowiki>
cmake ..\s\kritawindep
</nowiki>}}
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
{{Input|1=<nowiki>
cmake --build . --target ext_krita --config RelWithDebInfo > \b\log.txt
</nowiki>}}
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.
{{Input|1=<nowiki>
cmake --build . --target ext_jpeg --config RelWithDebInfo > \b\log.txt
</nowiki>}}
And then copy  jpeg.lib to libjpeg.lib in the inst/lib directory, otherwise Qt cannot find it.
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:
                    http://bazaar.launchpad.net/~kritalime/+junk/tools/view/head:/l10n-gen

Latest revision as of 15:42, 13 October 2017