Instalacja Scribusa w wersji CVS z użyciem CMake: Difference between revisions

From Scribus Wiki
Jump to navigation Jump to search
No edit summary
 
 
(33 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[Category:Scribus_development]]
[[Category:PL]]
[[Category:JTZ]]
{{TOC_sidebar_PL}}


After many years of using the autotools build system, the developers of Scribus have selected [http://www.cmake.org 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 OSX.
==Wymagania==
* [http://www.cmake.org/HTML/Index.html Cmake] w wersji 2.4.3 lub nowszej
* Linux
* CVS (Concurrent Versions System)


'''You must have CMake 2.4.3 for best results. Older versions will fail.'''
==Pobieranie świeżych plików żródłowych z CVS==


==First thing first: Download latest snapshot==
Aby pobrać najświeższe pliki źródłowe Scribusa z repozytorium CVS wykonaj następujące kroki z poziomu powłoki tekstowej:
To download cvs snapshots of scribus 1.3.3.x and 1.3.x follow these steps.


'''Scribus 1.3.3.x''' - Development - ''Recommended for those using 1.3.x for production use''
===Scribus 1.3.3.xcvs===
Jest to ustabilizowana gałąź wersji deweloperskiej, zalecana przez zespół Scribusa do celów produkcyjnych.  


*export CVSROOT=:pserver:anoncvs:@scribus.info:/cvs
*export CVSROOT=:pserver:anoncvs:@scribus.info:/cvs
*cvs login <Enter>
*cvs login
*cvs -z3 co -r Version133x Scribus
*cvs -z3 co -r Version133x Scribus
'''
'''Scribus 1.3.4cvs''' - Development - ''More Experiemental''


===Scribus 1.3.4cvs===
Jest to wersja deweloperska, niezalecana do celów produkcyjnych.
*export CVSROOT=:pserver:anoncvs:@scribus.info:/cvs
*export CVSROOT=:pserver:anoncvs:@scribus.info:/cvs
*cvs login <Enter>
*cvs login
*cvs -z3 co -r Version13x Scribus
*cvs -z3 co -r Version13x Scribus


Thanks to Anduin.net [[http://anduin.net/]], anonymous CVS access is updated daily.
==Kompilacja i instalacja z użyciem Cmake==
Instalacja Scribusa 1.3.3.x  i 1.3.4cvs przebiega w identyczny sposób. Aby np. zainstalować Scribusa 1.3.4cvs z wbudowaną obsługą biblioteki Cairo w katalogu '''/opt/scribus134cvs''', przejdź do podkatalogu '''Scribus''' i wykonaj następujące polecenia:


'''More info on downloading scribus:'''
* cmake .  -DWANT_CAIRO=1 -DCMAKE_INSTALL_PREFIX:PATH=/opt/scribus134cvs
*Standard download [http://docs.scribus.net/index.php?lang=en&page=download]
* make
*CVS download [http://docs.scribus.net/index.php?lang=en&page=install1]
* make install (to polecenie należy wykonać jako root lub z użyciem polecenia sudo)


If you are compiling for the first time, don't be scare of command line. Just copy the lines relevant to the version of Scribus you want to use, one by one on the command line.
===Dodatkowe opcje===
Niektóre z opcji, których można użyć z poleceniem cmake:


'''Watch out:'''
* '''-DWANT_DEBUG=1''' <br>Włącza kompilowanie programu z możliwością debugowania
*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.
* And if u 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.


Good luck!
* '''-DWANT_VERSIONING=1''' <br>Włącza używanie numeru wersji jako przyrostka dodawanego do katalogu instalacyjnego i do skompilowanego programu.


==To start the build==
* '''-DWANT_CAIRO=1''' <br>Cmake poszuka w systemie i wkompiluje bibliotekę cairo zamiast domyślnej biblioteki libart.  
Before continuing, please note that an out-of-source build is recommended, however..
From the Scribus directory:


<code>/path/to/cmake . -DCMAKE_INSTALL_PREFIX:PATH=/path/to/install/to/scribuscmake/</code>
* '''-DWANT_LIBART=1''' <br>(opcja domyślna) Cmake poszuka i wkompiluje bibliotekę libart zamiast biblioteki cairo.


For example:
* '''-DPREFIX_CAIRO:PATH=/ścieżka_do_biblioteki_cairo''' <br>Tutaj można ręcznie podać katalog, w którym zainstalowana jest biblioteka cairo, np. -DPREFIX_CAIRO:PATH=/opt/cairo


<code>/usr/local/bin/cmake . -DCMAKE_INSTALL_PREFIX:PATH=/opt/scribus134cvs</code>
==Potwierdzenia udanych instalacji==
Otrzymaliśmy potwierdzenia udanych instalacji Scribusa z użyciem Cmake w następujących systemach operacyjnych:


Some options that the Scribus CMake files know about (more to come!):
*Gentoo, current &ndash; [[User:Cbradney|Cbradney]] 17:04, 12.11.2006 (CET)
*WANT_VERSIONING=1: Sets the build to use the VERSION setting as a suffix for the install directories and the binary. Eg, the binary could be <code>scribus-1.3.4cvs</code>. This should mean that you can install multiple versions with the same prefix with no clashes.
*Kubuntu Dapper Drake &ndash; [[User:TomZ|TomZ]] 17:08, 12.11.2006 (CET)
*WANT_DEBUG=1: 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).
*openSuse 10.1 &ndash; [[User:TomZ|TomZ]] 17:08, 12.11.2006 (CET)
*WANT_CAIRO=1: Makes CMake search for cairo and build with cairo instead of LibArt_LGPL. Please note we still consider the cairo build as beta.
*Fedora Core 6 &ndash; [[User:gpittman|gpittman]] 15:44, 12.11.2006 (EST)
*WANT_LIBART=1 (default): Makes CMake search for and build with LibArt_LGPL instead of cairo.
*PLD Linux Th &ndash; [[User:Deejay1|DeeJay1]] 09:52, 13.12.2006 (CET)
*Mandriva 2007 &ndash; [[User:Leo|Leo]] [mailto:leo.thealmighty@gmail.com] 01:00, 16.11.2006 (IST)
*PCLinuxOS 0.93a &ndash; [[User:Leo|Leo]] [mailto:leo.thealmighty@gmail.com] &ndash; po ręcznym wpisaniu położenia bibliotek
*SuSE Linux 10.0 &ndash; [[User:C_Schaefer|C_schaefer]] 19.11.2006


For example: to make a cairo debug build, then something like this:
==Zobacz również==
 
* [[Building 1.3.3.6cvs or 1.3.4cvs or higher with CMake]]
<code>/usr/local/bin/cmake . -DCMAKE_INSTALL_PREFIX:PATH=/opt/scribus134cvs -DWANT_CAIRO=1 -DWANT_DEBUG=1 -DWANT_VERSIONING=1</code>
 
==Out-of-source builds==
One of the advantages of CMake is that you can do an out-of-source build. What is this? It enables you to build the application without writing anything at all to the directory where the Scribus source is. This means your source tree is clean, always. Its easier and faster to update, and you can build multiple targets out-of-source from the same source tree. Cool!
 
To do an out-of-source build, you need a new directory to build in.
Say you have the source files in:
 
<code>/home/username/scribuscmake/Scribus</code>
 
Make the follow directory:
 
<code>/home/username/scribuscmake/builddir</code>
 
So then, instead of doing:
 
<code>eg /usr/local/bin/cmake . -DCMAKE_INSTALL_PREFIX:PATH=/opt/scribus134cvs</code>
 
you would then change to the builddir directory and run:
 
<code>eg /usr/local/bin/cmake ../Scribus -DCMAKE_INSTALL_PREFIX:PATH=/opt/scribus134cvs</code>
 
Simple!
 
==Continuing on to the build stage==
 
Once this has successfully completed, simply run <code>make && make install</code>.
 
The CMake based build system is very new to Scribus and it will change and it will need improving. Please report issues on our mailing list or bugtracker.
 
There is a long todo list for this build system including, but not limited to:
*Checking it works across distributions
*Checking it works across various flavours of UNIX
*Checking it works on 64 bit distros
*Add Win32 and Mac OSX support
 
==Compilation fails using Qt4 binaries==
 
Systems with both Qt3 and Qt4 installed: You have <code>uic</code> and <code>moc</code> from Qt4 in the path and it ''may'' results to the compilation crash. This should ''NOT'' be the case with cmake 2.4.2 when released, or when using current Scribus CVS. However, this might be a useful workaround:
 
Remove cached options from previous cmake configuration run:
<code>rm CMakeCache.txt</code>
 
Then change PATH variable (for my Gentoo) e.g.:
<code>export PATH=/usr/qt/3/bin/:$PATH</code>
 
And run cmake config phase again:
 
eg  <code>~/devel/CMAKE/bin/cmake . -DCMAKE_INSTALL_PREFIX:PATH=/path/to/install/to/scribuscmake/ </code>
 
==Specific library locations==
Whenever your distribution releases their package for a library Scribus depends on, it may still not be the very latest stable or unstable version from the writers of the library. In some cases, the Scribus developers have had to rely on the very latest code to further some parts of Scribus. In this case it is necessary to build your own version of such a library.
 
On example of this is the [http://cairographics.org cairo graphics library]. Right now, 1.3.4cvs has the capability to use the very very latest code from the just released cairo 1.2.
 
To specify a new cairo install path, other than your system's default add this to the cmake command line:
<code>-DPREFIX_CAIRO:PATH=/path/to/your/cairo/install</code>
 
==Making a tarball for distribution==
 
To make a tarball for distribution, the old way would be to <code>make dist</code>. The new way is to run <code>make package_source</code> or <code>/path/to/cpack -G TBZ2 --config CPackSourceConfig.cmake</code> to give you a bundle of the source. With cmake 2.4.1 there is only support for a gzip <code>tar.gz</code> however a bzip2 <code>tar.bz2</code> is possible with later versions of cmake.
 
==TODO==
*Enable more pkg-config usage
*64 bit supoprt
*Prefixes for more packages
 
==Success Stories==
 
Please add the operating system or distribution that you have tested successfully on:
*Gentoo, current (--[[User:Cbradney|Cbradney]] 17:04, 12 November 2006 (CET))
*Kubuntu Dapper Drake (--[[User:TomZ|TomZ]] 17:08, 12 November 2006 (CET))
*openSuse 10.1 (--[[User:TomZ|TomZ]] 17:08, 12 November 2006 (CET))
*Fedora Core 6 (--[[User:gpittman|gpittman]] 15:44, 12 November 2006 (EST))
*PLD Linux Th (--[[User:Deejay1|DeeJay1]] 09:52, 13 November 2006 (CET))
*Mandriva 2007 (--[[User:Leo|Leo]] [[mailto:leo.thealmighty@gmail.com]] 01:00, 16 November, 2006 (IST)) - a smooth ride
*PCLinuxOS 0.93a (--[[User:Leo|Leo]] [[mailto:leo.thealmighty@gmail.com]] few days before i tried mandriva 2007) - manualy specified lib locations
*SuSE Linux 10.0 (--[[User:C_Schaefer|C_schaefer]] 19 November 2006)

Latest revision as of 17:52, 7 February 2007

Strona główna

Jak to zrobić

  1. Pierwsze kroki ze Scribusem
  2. Praca z ramkami tekstowymi
  3. Praca z ramkami graficznymi
  4. Praca ze stronami wzorcowymi
  5. Praca w Edytorze artykułów
  6. Tekst na krzywej
  7. Scribus w Ubuntu Linux
  8. Klik i Scribus działa
  9. Instalacja za pomocą Cmake
  10. Tworzenie spisu treści
  11. Formularze PDF
  12. Kolory dodatkowe
  13. Obrazek ze ścieżką odcięcia

Porady i triki

  1. Instalacja profili ICC
  2. Dodawanie fontów
  3. Import grafik EPS
  4. Zawieszone spójniki
  5. Twój pierwszy artykuł
  6. Tworzenie hiperłączy

Często zadawane pytania

  1. Zarządzanie kolorami
  2. Skąd pobrać Scribusa?
  3. Podgląd wydruku nie działa
  4. Scribus dla MacOSX?
  5. Dodawanie fontów
  6. Scribus po polsku
  7. Type 1 i ligatury
  8. Automatyczne numery stron
  9. Interlinia w Scribusie
  10. Pierwsze kroki z DTP
  11. Skalowanie obrazka w ramce
  12. Export do PDF/X-3
  13. Ligatury i cyfry nautyczne?
  14. Pomoc w rozwoju Scribusa
  15. Przykładowe dokumenty
  16. Zgłaszanie błędów
  17. Słowniki dzielenia na sylaby

Wymagania

  • Cmake w wersji 2.4.3 lub nowszej
  • Linux
  • CVS (Concurrent Versions System)

Pobieranie świeżych plików żródłowych z CVS

Aby pobrać najświeższe pliki źródłowe Scribusa z repozytorium CVS wykonaj następujące kroki z poziomu powłoki tekstowej:

Scribus 1.3.3.xcvs

Jest to ustabilizowana gałąź wersji deweloperskiej, zalecana przez zespół Scribusa do celów produkcyjnych.

  • export CVSROOT=:pserver:anoncvs:@scribus.info:/cvs
  • cvs login
  • cvs -z3 co -r Version133x Scribus

Scribus 1.3.4cvs

Jest to wersja deweloperska, niezalecana do celów produkcyjnych.

  • export CVSROOT=:pserver:anoncvs:@scribus.info:/cvs
  • cvs login
  • cvs -z3 co -r Version13x Scribus

Kompilacja i instalacja z użyciem Cmake

Instalacja Scribusa 1.3.3.x i 1.3.4cvs przebiega w identyczny sposób. Aby np. zainstalować Scribusa 1.3.4cvs z wbudowaną obsługą biblioteki Cairo w katalogu /opt/scribus134cvs, przejdź do podkatalogu Scribus i wykonaj następujące polecenia:

  • cmake . -DWANT_CAIRO=1 -DCMAKE_INSTALL_PREFIX:PATH=/opt/scribus134cvs
  • make
  • make install (to polecenie należy wykonać jako root lub z użyciem polecenia sudo)

Dodatkowe opcje

Niektóre z opcji, których można użyć z poleceniem cmake:

  • -DWANT_DEBUG=1
    Włącza kompilowanie programu z możliwością debugowania
  • -DWANT_VERSIONING=1
    Włącza używanie numeru wersji jako przyrostka dodawanego do katalogu instalacyjnego i do skompilowanego programu.
  • -DWANT_CAIRO=1
    Cmake poszuka w systemie i wkompiluje bibliotekę cairo zamiast domyślnej biblioteki libart.
  • -DWANT_LIBART=1
    (opcja domyślna) Cmake poszuka i wkompiluje bibliotekę libart zamiast biblioteki cairo.
  • -DPREFIX_CAIRO:PATH=/ścieżka_do_biblioteki_cairo
    Tutaj można ręcznie podać katalog, w którym zainstalowana jest biblioteka cairo, np. -DPREFIX_CAIRO:PATH=/opt/cairo

Potwierdzenia udanych instalacji

Otrzymaliśmy potwierdzenia udanych instalacji Scribusa z użyciem Cmake w następujących systemach operacyjnych:

  • Gentoo, current – Cbradney 17:04, 12.11.2006 (CET)
  • Kubuntu Dapper Drake – TomZ 17:08, 12.11.2006 (CET)
  • openSuse 10.1 – TomZ 17:08, 12.11.2006 (CET)
  • Fedora Core 6 – gpittman 15:44, 12.11.2006 (EST)
  • PLD Linux Th – DeeJay1 09:52, 13.12.2006 (CET)
  • Mandriva 2007 – Leo [1] 01:00, 16.11.2006 (IST)
  • PCLinuxOS 0.93a – Leo [2] – po ręcznym wpisaniu położenia bibliotek
  • SuSE Linux 10.0 – C_schaefer 19.11.2006

Zobacz również