A few weeks ago, Anil announced on the mailing list that he has worked on Pierre's code and got indic scripts to work with the current code. Since then, lot of people have been asking how to get the code and test it. This is a good chance to write a short article explaining how to compile Scribus, for people that only want to test it and not contribute code!
If you want to follow the steps described in this article you will need: - a recent Ubuntu or Debian testing, - at least 1 GB of RAM - 3 GB of free hard disk space - a multicore processor - basic knowledge about the terminal (cd, mkdir, rm, ls, pwd, ...)
In the future, I plan other articles for other distributions and even on compiling Scribus without having to touch the terminal... but let's start with this one!
Finally, if you need help, just drop in our IRC channel and yuo will find somebody to hold your hand: irc://irc.freenode.net or http://wiki.scribus.net/canvas/Special:WebChat .
Let's first summarize what you will need to do: - getting all the software and libraries needed to compile Scribus, - getting the Scribus source code, - compiling Scribus, - running the development version of Scribus.
The Linux distributions provide everything you need to compile new software, but often it is not installed by default. You will need: - a compiler (gcc) and the make tools, - the Qt development tools, - the header files that describe how Scribus can use the external libraries it needs, - git to check out the Scribus code.
Linux knows what software can be installed by looking at the content of repositories. In Debian and Ubuntu this list is located in the file /etc/apt/sources.list. The first step is to make sure that you the source packages are included: - On Debian make sure that you have a line like deb-src http://ftp.ch.debian.org/debian/ wheezy main non-free contrib in your /etc/apt/sources.list . In order to make sure that all the repositories are up to date you should update the list of avalaible software by
$ sudo apt-get update- On Ubuntu start the "Software sources" application and make sure that in the "Ubuntu Software" tab has the check box for "Source Code" checked. You can find more help on adding repositories in the Ubuntu help pages: https://help.ubuntu.com/community/Repositories/Ubuntu . When closing the window, don't forget to click on the "Reload" button and update the list of avalaible software.
It's now time to add all the software needed to compile Scribus. Open a terminal and run:
$ sudo apt-get build-dep scribusThis will ask you for your password and then install everything Scribus 1.4 (the Scribus version that Ubuntu and Debian are providing) needs to be compiled.
Since you will be compiling Scribus 1.5.x There are a few libraries that are new and that you will have to install, too:
$ sudo apt-get install libqtwebkit4 libqtwebkit-dev $ sudo apt-get install libicu48 libicu-dev $ sudo apt-get install libcairo2-dev $ sudo apt-get install libpoppler-private-dev $ sudo apt-get install git
You will need a directory where you will put the Scribus source code and, on the other side, one where the binaries will be installed.
In your home, create the two directories: - "Source" where the source code will reside, - "Bin" where Scribus 1.5.x will be installed.
The Scribus contributors are using a git server to share their work. Each new feature is located in its own branch and can be tested separately. While only people having already provided patches can write to it, everybody can download, read and compile the code.
In order to get the code: - open a terminal and make sure that your in your home - go into the "Source" directory - get the Scribus code and put it into the "scribus" directory:
$ cd Source/ $ git clone git://git.scribus.net/scribus.git scribus $ cd scribus/
If you want to activate the "indic" branch you will have to check it out:
$ git checkout indic
First, you will have to make sure that you are in the ~/Source/scribus/Scribus/ directory in a terminal.
Your second step is to create a build/ directory where all the temporary files generated during the compilation will be written and cd into it
$ mkdir build/ $ cd build/
Now that you're in the build/ directory you can launch the program that will make sure that everything needed for the compilation is there and will prepare all the settings for the compilation:
$ # Warning: in the line below some some of the underline signs are missing. #Please have a look at the same line at the bottom of this article to see the real parameters. $ cmake -DCMAKE_INSTALL_PREFIX:PATH=~/Bin/scribus -DWANTDEBUG=1 -DWANTNOOSG=1 -DWANTPRIVATECAIRO=0 ..
If you get any error, please come and ask us in our IRC channel! And don't forget the two dots at the end of the cmake command!
Now that everything is ready, compiling Scribus is just a very simple step:
$ make -j4Where "-j4" will try to use up to 4 processors or threads in parallel and massively speed up the compilation.
After some time, between 10 minutes and one and a half hour depending on the CPUs available, Scribus will be compiled!
Once make is done, you can install Scribus in ~/Bin/scribus/:
$ make install
If everything worked well, you can now launch Scribus with the command:
You can create a link to it on your desktop or in your programs bar.
And if something didn't workout correctly, we are all there in the IRC channel (irc://irc.freenode.net or http://wiki.scribus.net/canvas/Special:WebChat) to give you hints on how to sort everything out!
If all this is too long to read, here is just the list of commands you need:
$ # make sure that the source repositories are in your sources.list $ cat /etc/apt/sources.list $ sudo apt-get update $ sudo apt-get build-dep scribus $ sudo apt-get install libqtwebkit4 libqtwebkit-dev $ sudo apt-get install libicu48 libicu-dev $ sudo apt-get install libcairo2-dev $ sudo apt-get install git $ cd $ mkdir Bin $ mkdir Source $ cd Source/ $ git clone git://git.scribus.net/scribus.git scribus $ cd scribus/ $ git checkout indic $ cd Scribus/ $ mkdir build/ $ cd build/ $ cmake -DCMAKE_INSTALL_PREFIX:PATH=~/Bin/scribus -DWANT_DEBUG=1 -DWANT_NOOSG=1 -DWANT_PRIVATE_CAIRO=0 .. $ make -j4 $ make install $ ~/Bin/scribus/bin/scribus
That's all folks!