Krita/osxbuild: Difference between revisions

From KDE Community Wiki
(Created page with "Note: Krita on OSX is very immature. These build instructions will give you an krita.app bundle you can package in a dmg and distribute. It doesn't use fink or macports: the g...")
 
No edit summary
 
Line 5: Line 5:
Everything you do, you need to do from the terminal: you only need xcode for the compiler, not the ide.
Everything you do, you need to do from the terminal: you only need xcode for the compiler, not the ide.


I have the following layout in my home directory:
Follow the instructions in krita/3rdparty/README.md to setup your build environment, Qt, the krita checkout, the dependencies and finally build Krita.
 
~/bin: for scripts and the macdeployqt utility
~/dev: where we have the code and build it
~/package: with a script and template for a dmg file
~/krita.app: this is where krita gets deployed to, it'll be a normal OSX app bundle
 
In ~/dev, I have the following directories:
 
s: where we'll checkout a cmake project that helps building all dependecies
p: where we'll checkout calligra and build it
b: where the dependencies will be built
i: where we'll install the depdencies and krita (but we cannot run from there...)
 
in s, do:
 
git clone git://anongit.kde.org/scratch/rempt/kritadeposx.git
 
Check carefully the portage_notes.txt file.
 
Now, this project is under development. It's a cmake project with an external project definition for every dependency of krita. Ideally, you'd run cmake, then cmake --build . --target ext_krita --config RelWithDebInfo, and krita and all deps would be downloaded, configured and build automatically. Despite the name, I'm working on making this project cross-platform.
 
This doesn't work yet. It's a bit messy. You'll have to help me develop and debug it.  You can do:
 
git checkout ea4e3cab5db50ce83f9653dd5418e26e7ef0d530
 
To get the revision I used to build the dependencies. Check all the CMakeLists.txt files for places where paths are hardcoded for
 
/Users/boudewijnrempt/dev/i
 
And fix those to fit your situation!
 
Then go to ~/dev/b and run cmake:
 
cmake ../s/kritadeposx
 
Start building dependencies, like this:
 
cmake --build . --target ext_zlib --config RelWithDebInfo
 
This is a matter of trial and error: check the portage_notes.txt file to see where I got stuck.
 
When you have as many deps as you can manage, you can try to start building krita.
 
Go to ~/dev/p and checkout calligra:
 
git clone git://anongit.kde.org/calligra.git
 
in ~/dev/p, make a build directory:
 
mkdir -p ~/dev/p/build
cd ~/dev/p/build
 
Run cmake:
 
cmake ../calligra  -DPRODUCTSET=CREATIVE -DCREATIVEONLY=TRUE -DPACKAGERS_BUILD=ON -DWITH_ICONV=OFF -DKDE4_BUILD_TESTS=TRUE -DCMAKE_BUILD_TYPE=KritaDevs -DHAVE_MEMORY_LEAK_TRACKER=OFF
 
and run
 
make install
 
If this worked out, you'll have all the bits you need in ~/dev/i
 
Then place the deploy.sh script from the kritadeposx repo in ~/bin.
Then build macdeployqt: it's a qt utility that I hacked to also deploy krita's plugins. It's in kritadeposx/macdeployqt. Run ~/dev/i/bin/qmake and make; place the result in ~/bin.
 
Then run deploy.sh
 
About fifteen minutes later, you should have a working krita.app. Type
 
open krita.app
 
And krita should start.
 
 
 
 
 
On OSX, after building everything, you have to depo
 
In the bin directory, you need to place a custom macdeployqt executable and a script to deploy the

Latest revision as of 12:26, 4 January 2016

Note: Krita on OSX is very immature. These build instructions will give you an krita.app bundle you can package in a dmg and distribute. It doesn't use fink or macports: the goal is to have as native an application as possible.

You need to make sure you have cmake (2.8.12 or better), git and xcode installed.

Everything you do, you need to do from the terminal: you only need xcode for the compiler, not the ide.

Follow the instructions in krita/3rdparty/README.md to setup your build environment, Qt, the krita checkout, the dependencies and finally build Krita.