QtCreator - workflow for Scribus and Git repository under Linux: Difference between revisions

From Scribus Wiki
Jump to navigation Jump to search
No edit summary
mNo edit summary
Line 1: Line 1:
[[Category:Development]]
[[Category:Development]] [[Category:Help]]
You have successful installed Scribus git repository on local storage, eg. in ~/ScribusGIT. You have QtCreator installed as well.<br />
You have successful installed Scribus git repository on local storage, eg. in ~/ScribusGIT. You have QtCreator installed as well.<br />
This article show how to work with Scribus git repository in QtCreator.<br />
This article show how to work with Scribus git repository in QtCreator.<br />
Line 11: Line 11:
<br />
<br />
Now create here symlink for Scribus source folder (~/ScribusGIT/Scribus)
Now create here symlink for Scribus source folder (~/ScribusGIT/Scribus)
<source lang="bash">
<syntaxhighlight lang="bash">
#ln -s ~/ScribusGIT/Scribus ~/ScribusDEV/Scribus
#ln -s ~/ScribusGIT/Scribus ~/ScribusDEV/Scribus
</source>
</syntaxhighlight>


Now create here (still in ~/ScribusDEV) two shell scripts, which will be used in QtCreator as your own building steps:
Now create here (still in ~/ScribusDEV) two shell scripts, which will be used in QtCreator as your own building steps:
Line 21: Line 21:
Let see how these scripts look in my case:<br />
Let see how these scripts look in my case:<br />
"building" looks like this:<br />
"building" looks like this:<br />
<source lang="bash">
<syntaxhighlight lang="bash">
#!/bin/sh -e
#!/bin/sh -e
cd builddir
cd builddir
Line 27: Line 27:
make -j4
make -j4
make install -j4
make install -j4
</source>
</syntaxhighlight>
"debug" looks like this:<br />
"debug" looks like this:<br />
<source lang="bash">
<syntaxhighlight lang="bash">
#!/bin/sh -e
#!/bin/sh -e
cd debugdir
cd debugdir
Line 35: Line 35:
make -j4
make -j4
make install -j4
make install -j4
</source>
</syntaxhighlight>
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.<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.<br />
<br />
<br />

Revision as of 12:46, 18 November 2013

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
cd builddir
cmake ../Scribus -DCMAKE_INSTALL_PREFIX:PATH=~/Scribus_install -DWANT_DEBUG=0 -DWANT_GRAPHICSMAGICK=1 -DWANT_VERSIONING=0
make -j4
make install -j4

"debug" looks like this:

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

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.

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 ~/ScribusGit/.git/info/exclude file and add there "Scribus.pro.user" line.