Sophie

Sophie

distrib > Momonga > development > i686 > media > os > by-pkgid > 4491a32356d36140f3fa915c83d8b177 > files > 990

scribus-doc-1.4.5-2m.mo8.noarch.rpm

<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

  <title>Compiling and Installing Using CMake and Scribus 1.4.x</title>
</head>

<body>
  <h2>Compiling and Installing Using CMake and Scribus 1.4.x</h2>

  <p>After many years of using the autotools build system, the developers of Scribus have selected CMake as a replacement system. It provides a much more flexible setup with a lot less complexity. It also provides compatibility with build tools on Linux and variants of UNIX, Windows and Mac&nbsp;OS&nbsp;X.</p>

  <p>To build with the CMake build system, you will of course need CMake itself. Most Linux and some UNIX distributions provide it as a standard package. If not, please <a href="http://www.cmake.org">download it</a>, and make sure you get a recent version, like 2.8 or higher. Mac OS X users can also find installers there, or get it from <a href="http://macports.org">macports.org</a>. Scribus does not yet use CMake for Windows, although this may be added in the future.</p>

  <p>One of the advantages of CMake is that we can build &ldquo;out of source.&rdquo; By creating a separate directory where the program is being being compiled, the temporary files and resulting application files are not stored in the same location as the Scribus source files. This helps keep directory structures clean and will also reduce the download time for updating your source tree a little. This is the preferred method and strongly recommended by our developers. CMake is also much simpler to maintain for developers and errors can be understood by mere mortals. <!--However, both methods are described below; the first is recommended.--></p>

  <h3>Preparation</h3>

  <p>Let's assume the following:</p>

  <ul>
    <li>Scribus source is in a directory like <code>/home/username/scribussource/</code> (where <em>username</em> is your username)</li>

    <li>CMake is in <code>/usr/bin/</code></li>

    <li>You want to install into <code>/home/username/scribusinstall/</code></li>
  </ul>

  <h3>Starting an Out-of-Source Build</h3>

  <p>Change to the source directory:</p>
  <pre>
cd /home/username/scribussource/
</pre>

  <p>Make a directory to build Scribus in:</p>
  <pre>
mkdir builddir
</pre>

  <p>Change to the build directory:</p>
  <pre>
cd builddir
</pre>

  <p>Then run:</p>
  <pre>
/usr/bin/cmake ../Scribus -DCMAKE_INSTALL_PREFIX:PATH=/home/username/scribusinstall/
</pre>

  <p>If this is the build location you have chosen, please skip down to the <strong>Build Stage</strong> section</p><!--<h3>Starting an In-Source Build</h3>
<p>Change to the source directory:</p>
<pre>cd /home/username/scribussource/</pre>
<p>Then run:</p>
<pre>/usr/bin/cmake . -DCMAKE_INSTALL_PREFIX:PATH=/home/username/scribusinstall/</pre>-->

  <h3>Continuing onto the Build Stage</h3>

  <p>Once the CMake command you have chosen above has completed successfully (remember it needs to find the dependencies of Scribus and record their locations), then you need to run:</p>
  <pre>
make &amp;&amp; make install
</pre>

  <h2>Advanced Options</h2>

  <h3>Build Options</h3>

  <p>Some options that the <b>Scribus 1.4.x</b> CMake files know about (more to come!):</p>

  <ul>
	<li><strong>WANT_VERSIONING=1</strong>: Sets the build to use the VERSION setting as a suffix for the install directories and the binary. For instance, the binary could be scribus-1.4.0. This means that you can install multiple versions with the same prefix with no clashes.</li>

	<li><strong>WANT_DEBUG=1</strong>: Sets the build to be a debug release and use -O0 -g3, instead of -O2 (This is the default for now, and cannot be turned off unless you edit the CMakeFiles.txt file).</li>

	<li><strong>WANT_CAIRO=1</strong> (default): Makes CMake search for the Cairo graphics library and build Scribus with Cairo instead of Qt&rsquo;s Arthur.</li>

	<li><strong>WANT_QTARTHUR=1</strong>: Makes CMake search for and build with Qt&rsquo;s Arthur instead of Cairo.</li>

	<li><strong>WANT_NOHEADERINSTALL=1</strong>: Do not install header files used for developers. Distributions should not use this if they split up Scribus into multiple packages.

	<li><strong>WANT_NORPATH</strong>: Turn off setting a specific RPATH.</li>
	<li><strong>WANT_DISTROBUILD</strong>: An option for OS distributors to use for their builds options.</li>
	<li><strong>WANT_LIB64</strong>: Force 64 bit builds.</li>
	<li><strong>WANT_RELEASEWITHDEBUG</strong>: Set Release style build flags, but also include debug information.</li>
	<li><strong>WANT_UNIVERSAL_BUNDLE</strong>: Mac OS X only, enables building of a .app bundle.</li>
	<li><strong>WANT_QT4MAC_COCOA</strong>: Mac OS X only, enables the buuilding the Cocoa version with Qt 4.5+.</li>
	<li><strong>WANT_QT3SUPPORT</strong>: Enables Qt 3 support in case you have a custom plug-in that you have not converted fully to Qt 4. Not needed for the official Scribus code.</li>
	<li><strong>APPLICATION_DATA_DIR</strong>: Set the name of the preferences location for Scribus (instead of default of ~/.scribus on *nix and /Users/username/Library/Preferences/Scribus on Mac OS X.)</li>
  </ul>
  <p>Example: To make a Cairo debug build, then something like this should be used (all in one line):</p>
  <pre>
/usr/bin/cmake . -DCMAKE_INSTALL_PREFIX:PATH=/home/username/scribusinstall -DWANT_CAIRO=1 -DWANT_DEBUG=1 -DWANT_VERSIONING=1
</pre>

  <h3>Specifying Library Locations</h3>

  <p>Whenever your distribution releases their package for a library that Scribus depends on, it may still not be the very latest stable or unstable version from the authors of the library. In some cases, the Scribus developers have had to rely on the very latest code to improve some parts of Scribus. In this case it is necessary to build your own version of such a library.</p>

  <h3>Creating a Tarball for Distribution</h3>

  <p>To create a tarball for distribution, the old way would be to <code>make dist</code>.</p>

  <p>The new way is to run:</p>
  <pre>
make package_source
</pre>

  <p>or</p>
  <pre>
/usr/bin/cpack -G TBZ2 --config CPackSourceConfig.cmake
</pre>

  <p>to give you a bundle of the source.</p>

  <p><strong>Important:</strong> If you need to re-run cpack remove the <code>_CPack_Packages/</code> before running this a second time.</p>

  <p>You can also use svn export</p>
  <pre>
/path/to/scribus/svn
</pre>in a temporary directory and then tar or zip the directory to create a tarball.

  <h3>Troubleshooting and Success Stories</h3>

  <p>If after reading these instructions through and you still have issues, please join us on <a href="irc.html">IRC</a> or post an email to our <a href="resources.html">mailing list</a> with specifics of your problem. We are also interested in hearing from people who have successfully compiled Scribus on non-Linux platforms. We already know that it&rsquo;s very reliable on Mac&nbsp;OS&nbsp;X.</p>
</body>
</html>