QtCreator - workflow for Scribus and Git repository under Linux

From Scribus Wiki
Revision as of 06:46, 5 June 2012 by Cezaryece (talk | contribs) (→‎QtCreator - workflow for Scribus and Git repository -- ~~~~: new section)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

QtCreator - workflow for Scribus and Git repository -- Cezaryece (talk) 08:46, 5 June 2012 (CEST)

You have successful installed Scribus git repository on local storage, eg. in ~/ScribusGIT. You have QtCreator installed as well.
This article show how to work with Scribus git repository in QtCreator.

First of all I am suggesting to make separate folder where you will work on code and make all builds and installs without messing up local git repository with building files.
So, create new folder eg. ~/ScribusDEV (or any other naming you use).
In this folder create subfolders for building purposes:

  • builddir
  • debugdir
  • install


Now create here symlink for Scribus source folder (~/ScribusGIT/Scribus)

#ln -s ~/ScribusGIT/Scribus ~/ScribusDEV/Scribus

Now create here (still in ~/ScribusDEV) two shell scripts, which will be used in QtCreator as your own building steps:

  • building
  • debug

Let see how these scripts look in my case:
"building" looks like this:

#!/bin/sh -e<br />
cd builddir<br />
cmake ../Scribus -DCMAKE_INSTALL_PREFIX:PATH=~/Scribus_install -DWANT_DEBUG=0 -DWANT_GRAPHICSMAGICK=1 -DWANT_VERSIONING=1<br />
make -j4<br />
make install -j4<br />

"debug" looks like this:

#!/bin/sh -e<br />
cd debugdir<br />
cmake ../Scribus -DCMAKE_INSTALL_PREFIX:PATH=../install -DWANT_DEBUG=1 -DWANT_GRAPHICSMAGICK=1 -DWANT_VERSIONING=1<br />
make -j4<br />
make install -j4<br />

In my case I have quad core processor, so I put -j4 switch for faster compilation. Use -jN switch if you have processor with N threads.

Now you are ready for set up QtCreator project.

  1. run QtCreator and open project ~/ScribusDEV/Scribus/Scribus.pro
  2. go to "Projects"
  3. for release build configuration:
  4. set "Build directory" to "~/ScribusDEV/builddir"
  5. remove all build steps
  6. in Add Build Step select Custom Process Step, as Command browse to "building" script, as Working directory" set "~/ScribusDEV"
  7. repeat last steps for Debug configuration with "debugdir" instead "builddir" and "debug" script instead "building"


Now you can test if your develop environment is working: try to build Scribus in QtCreator.