< Calligra | Building | 2Revision as of 17:56, 6 December 2010 by Cyrille (talk | contribs) (Created page with '==Building== First, you have to get the source of KOffice and install all dependencies. That is discribed best in the Building KOffice Arti...')(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff) Building First, you have to get the source of KOffice and install all dependencies. That is discribed best in the Building KOffice Article, which would be anyway a good read, if you are building the first time. I have tested the following instructions on KOffice 2.2 trunk (rev. 1129718), QtCreator 1.3.1 and Qt 4.6.2. Start Creator, from the file menu call open and point it to the CMakeLists.txt file which is in the root of your koffice sourcetree. The CMake wizard should start. You can set an custom build directory, but I left the standard one (/path/to/source/qtcreator-build). On the following page you should add at least the install-dir build option: -DCMAKE_INSTALL_PREFIX=/home/user/devel/kde/Depending on what kind of build you want, you can also add these: For a full development build.-DKDE4_BUILD_TESTS=1 -DCMAKE_BUILD_TYPE:STRING=debugfull For a build where you want to be able to report bugs (backtraces) and maybe develop on-DBUILD_TESTS=0 -DCMAKE_BUILD_TYPE:STRING=debugfull For a fast running release build, not really useful for development.-DKDE4_BUILD_TESTS=0 -DBUILD_TESTS=0 -DCMAKE_BUILD_TYPE=release I used the following string:-DCMAKE_INSTALL_PREFIX=/home/damdam/progn/kde/inst -DCMAKE_BUILD_TYPE:STRING=debugfull After finishing the wizard, change to the Project view. Edit the make build step and set the additional arguments to install Add build step: enable, name=Kbuildsycoca4, command=kbuildsycoca4, working dir=$BUILDDIR, command args= Add the following variables to the build environment find out kdedir: enter 'kde4-config --prefix' into the konsole, on my sys it was /usr KDEDIRS=/home/damdam/progn/kde/inst:/usr LD_LIBRARY_PATH=/home/damdam/progn/kde/inst/lib Assure, that Run Environment -> Base environment = Build Environment Now you can select in Project -> Active run configuration, which program should start. With this guide it's possible to run and to debug, svn works too. Adding a breakpoint works in my case only after the application is started already in debug mode. After setting the breakpoint, the debugger seems to stop, but starts again automatically (don't click on continue, that is evil). Speed up Open a console in /path/to/source/qtcreator-build and type 'ccmake .', there you can switch off unneeded parts of koffice.What I've enabled for developing Krita: BUILD_colorengines, BUILD_dockers, BUILD_krita, BUILD_libkowmf (needed by vectorshape), BUILD_vectorshapeI've not touched any variable below BZIP2_EXECUTABLE. Open the project settings and add --quiet -j 3 to Build Steps->Make->Additional arguments, where 3 is the thread count (3 works better than 2 on my Athlon x2) Move kdedirs and ld lib path to .bashrc:export LD_LIBRARY_PATH=/home/damdam/progn/kde/inst/libexport KDEDIRS=/home/damdam/progn/kde/inst:/usrrun .bashrc, so that these two varis get exported and then run kbuildsycoca4. Finally remove it from the build steps. If you update modules in cmake or there are bigger lib changes, you have to run kbuildsycoca4 on yourself, but it doesn't get started every time compiling. Retrieved from "https://community.kde.org/index.php?title=Calligra/Building/2/Developing_With_QtCreator&oldid=6591" Content is available under Creative Commons License SA 4.0 unless otherwise noted.