Building SVN versions with CMake: Difference between revisions

From Scribus Wiki
Jump to navigation Jump to search
Line 204: Line 204:
</div></div>
</div></div>


=====OpenSuse 13.1 RC1 or newer=====
=====OpenSuse=====
Install the OS
<div class="toccolours mw-collapsible mw-collapsed" style="width:800px;">
Install these packages via Yast2:
13.1 RC1 or newer ---->
* libQt5WebkitWidgets-devel
<div class="mw-collapsible-content">
* libqt5-qttools-devel
* Install the OS
* python-devel
* Install these packages via Yast2:
* cairo-devel
: libQt5WebkitWidgets-devel libqt5-qttools-devel python-devel cairo-devel hunspell-devel cmake subversion
* hunspell-devel
: liblcms2-devel (from repo http://download.opensuse.org/repositories/multimedia:/libs/openSUSE_13.1/)
* liblcms2-devel (from repo http://download.opensuse.org/repositories/multimedia:/libs/openSUSE_13.1/)
* Proceed with Scribus compilation process.
* cmake
<div></div>
* subversion
... and that's it.
 
Proceed with Scribus compilation process.


====Additional dependencies for some graphics formats====
====Additional dependencies for some graphics formats====

Revision as of 04:10, 27 June 2014

Broom.png
This article needs to be cleaned up. Please update the information, remove factual errors, refresh category data, or correct the hyperlinks.

TL;DR (Too Long; Didn't Read)

You know what you are doing already and just want to compile Scribus via SVN, skip the introduction and go to Installing 1.5svn

Why would I Need or Want to 'Build' Scribus?

  1. For Necessity: You are using the current stable version, but certain bugs are a problem, and you know they have been fixed since the last release.
  2. For Science: You have heard about some new features in the development version, and you'd like to try them out.
  3. For the World: You're considering helping out the Scribus project and want to see how it's put together to get some idea about how you can help.

'Or, for that matter, what is this 'Building' you speak of?

Expand this content if you need a little bit more background on what Building source code means. --->

Fear is the mind Killer...

"Do not fear building Scribus from source" ~Paul Muad'dib Atreides

There is nothing to fear here, building Scribus yourself is not as hard as it sounds. This page can teach a beginner many things at once: starting with beginning to comprehend the internals of Scribus to appreciating the Command Line shell and how to invoke commands through it. Learn how to install software libraries (components that Scribus utilizes) and go so far as to modify source code through applying patches. This exposure will help increase your skill set to work on most all platforms and widen your knowledge of software creation and maintenance.

Take as an example this following set of commands which are geared towards the Linux environment. Here we see a case in which there is a downloading of the Scribus development version (1.5, not yet stable), building it and then installing it. Note that this assumes that the environment has been prepared previously with all the dependencies installed.

Don't think the placement of the following content in this subsection from here to the end of subsection is really relevant anymore. Thinking about moving it to another section. Kunda (talk) 14:37, 6 June 2014 (CEST)

Warning Warning: You must have CMake version ≥ 2.8.9 for best results. Older versions will fail. See: Official:Compile with CMake
mkdir ~/src/
mkdir ~/src/scribus_svn
sudo mkdir /usr/local/scribus_svn
cd ~/src/scribus_svn
svn co svn://scribus.net/trunk/Scribus
cd ./Scribus
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr/local/scribus_svn ..
make
sudo make install

Note:

  • you may change ~/src/ to wherever you want to put your source into.
  • you may change /usr/local/scribus_svn/ to wherever you want to put the Scribus binaries.
  • in case you want to install the 1.4 stable version, replace the "svn" instruction with following : svn co svn://scribus.net/branches/Version14x/Scribus

End of subsection

1st: Download latest snapshot with Subversion

Subversion is the versioning control system used for Scribus. This allows multiple developers to hack on Scribus source code simultaneously. Check the Subversion page for further details on how to use this tool. Make sure you have svn installed.

# Add instruction here for directory creation where SVN will download to
# Direct the user to choose which SVN branch they are downloading by having them view the table below
# Execute said chosen SVN command to download the branch

Status Version SVN Path Command to download from SVN
Developmental Version150 /trunk/Scribus svn co svn://scribus.net/trunk/Scribus scribus150
Stable Version14x /branches/Version14x/Scribus svn co svn://scribus.net/branches/Version14x/Scribus scribus14x
Outdated Version133x /branches/Version133x/Scribus svn co svn://scribus.net/branches/Version13x/Scribus scribus13x

Important Notes:

  • All subversion URLs for Scribus anonsvn are based at: svn://scribus.net/
  • Updating your working copy is much the same as cvs - just cd into your working copy and run "svn up".
  • There's also http://scribus.net/svn/Scribus/ , which gets you to the same content, but svn://scribus.net/ is usually faster. HTTP access might be useful to those behind paranoid firewalls or proxies.
  • If you used to check out -r <Version>, check out <SVN Path> instead


Where does this need to go? Kunda (talk) 14:33, 6 June 2014 (CEST)
If you are compiling for the first time, don't be scared of the command line. Just copy the lines relevant to the version of Scribus you want to use, one by one on the command line.

Watch out: * Newbies should take care, that only 'make install' part has to be done as a root. Rest of the part, like downloading and compiling can be done easily as a normal users.
You can install as a user, however, if you are installing into a directory you have write permission for. See the -DCMAKE_INSTALL_PREFIX command below. * And if you already have a version of Scribus on your system, don't forget to use the option WANT_VERSIONING=1. You can specify this option as -DWANT_VERSIONING=1.


Thanks to Anduin.net, anonymous SVN access is updated daily.

2nd: Download Dependencies

Dependencies are considered to be 3rd party software libraries or other altogether unique software projects that are have components that are needed to build a specific project from. When we want to build Scribus we need to make sure that we have all the dependencies fulfilled or else it will complain to us about missing components or obsolete ones.

Package Managers

Note: many Linux distros have their own Package Managers i.e. Debian has apt, Fedora and Centos have yum, Redhat uses rpm etc... On Mac OS X there are several choices, most popular are Macports and Homebrew. In general, by utilizing the installed package manager we can streamline the installations through easy one liners which will automate the install. We do this by invoking the following pattern:

(package-manager) install (software-or-library-package-name)

Debian;    apt-get install cmake
Fedora:    yum install cmake
MacOSXbrew install cmake

Essential tools

In order for anything to get built, tools need to exist. In modern OS's especially Linux many of these are build tools arrive already bundled. If they aren't for some reason you will need to install them manually using the package manager.

  • gcc
  • gcc-c++
  • cmake
  • subversion – if you're going to compile, you might as well get the latest Scribus updates

Specific Dependencies

The following section assumes you need to manually install dependencies. Here are the list of package names that will be needed to be installed before attempting to build Scribus. Each major version of Scribus will require different dependencies.

Version 1.5.x

Starting with rev. 18438 (2 September 2013), building version 1.5.0svn requires Qt5 (for previous revision, it was optional).

Build Qt5

Warning Warning: Is this still correct?

If you have Qt4 and Qt5 installed, you need to specify Qt5 with additional CMake options.

As of 21 of September 2013, the best way to get QT5 seems to be to use the installer found on http://qt-project.org/downloads. It suggests as installation directory /home/user/Qt and I suggest you keep to that. The cmake option is -DQT_PREFIX="/home/user/Qt/5.1.1/gcc/". It built OK on SUSE-12.3, Ubuntu-12.04 (Pepperment) and Ubuntu-13.04.

In case you need a list, required qt5 libs are :

 qt5-qtbase.x86_64 0:5.1.1-1.fc19
 qt5-qtbase-devel.x86_64 0:5.1.1-1.fc19
 qt5-qtbase-ibase.x86_64 0:5.1.1-1.fc19
 qt5-qtbase-mysql.x86_64 0:5.1.1-1.fc19
 qt5-qtbase-odbc.x86_64 0:5.1.1-1.fc19
 qt5-qtbase-postgresql.x86_64 0:5.1.1-1.fc19
 qt5-qtbase-static.x86_64 0:5.1.1-1.fc19
 qt5-qtbase-tds.x86_64 0:5.1.1-1.fc19
 qt5-qtbase-x11.x86_64 0:5.1.1-1.fc19
 qt5-qttools.x86_64 0:5.1.1-3.fc19
 qt5-qttools-devel.x86_64 0:5.1.1-3.fc19
 qt5-qtwebkit.x86_64 0:5.1.1-1.fc19
 qt5-qtwebkit-devel.x86_64 0:5.1.1-1.fc19
 qt5-qtdeclarative.x86_64 0:5.1.1-1.fc19
 qt5-qtdeclarative-devel.x86_64 0:5.1.1-1.fc19
 qt5-qtjsbackend.x86_64 0:5.1.1-1.fc19

In case you got problems, Pygmee suggests too : "it build here after i've build sigil where it make a bit changes in QT5 config".

Debian

On Debian Testing, on top of the packages pulled in by apt-get build-dep you need. ---->

Fedora 20

Fedora 20 has Qt5 packages available from its repositories. The requirements seem to be:

Ubuntu

Ubuntu v13.04 ---->

Ubuntu v13.10 ---->

OpenSuse

13.1 RC1 or newer ---->