QtCreator - workflow for Scribus and Git repository under Linux

From Scribus Wiki
Revision as of 22:58, 19 January 2014 by Kunda (talk | contribs) (→‎Setup Qt-Creator Project: reformat + added <code> + removed quotation marks)
Jump to navigation Jump to search


This article show how to work with Scribus git repository in QtCreator.


  1. You have successful installed Scribus git repository on local storage, eg. in ~/ScribusGIT. (Editor: Needs link here how to do that)
  2. You have QtCreator installed as well.

Where to Start

  1. 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.
  2. Create new folder eg. ~/ScribusDEV (or any other naming you use).
  3. In this folder create subfolders for building purposes:
    • builddir
    • debugdir
    • install
  4. Now create a symlink for Scribus source folder (~/ScribusGIT/Scribus) like so:
    ln -s ~/ScribusGIT/Scribus ~/ScribusDEV/Scribus
  5. Now create (we're still within ~/ScribusDEV) 2 shell scripts. The scripts will be used in QtCreator as your own building steps:
  1. building
  2. debug

Let see how these scripts look in my case:
The "building" script

#!/bin/sh -e
cd builddir
make -j4
make install -j4

The "debug" script

#!/bin/sh -e
cd debugdir
make -j4
make install -j4

Note: 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.

Setup Qt-Creator Project

Now you are ready to set up the 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.

Final Note

Last thing to do is to exclude "Scribus.pro.user" file created by QtCreator from git repository so it will not be show as untracked file.

Edit the ~/ScribusGit/.git/info/exclude file and add a line entry that contains: