Projects/Tellico/Compiling: Difference between revisions

From KDE TechBase
No edit summary
m (Text replace - "<code>" to "<syntaxhighlight lang="text">")
Line 5: Line 5:
== Source Package ==
== Source Package ==
If you download the source package, extract all of the files, which should create a directory named ''tellico-2.0/''.
If you download the source package, extract all of the files, which should create a directory named ''tellico-2.0/''.
<code>
<syntaxhighlight lang="text">
% tar xjvf tellico-2.0.tar.bz2
% tar xjvf tellico-2.0.tar.bz2
% cd tellico-2.0
% cd tellico-2.0
Line 14: Line 14:
== Current Development Source ==
== Current Development Source ==
The source code is stored in KDE's git system, in the ''extragear/office'' folder. Please refer to [[Development/Git/Configuration|Git Configuration]] for more help with using KDE and git.
The source code is stored in KDE's git system, in the ''extragear/office'' folder. Please refer to [[Development/Git/Configuration|Git Configuration]] for more help with using KDE and git.
<code>
<syntaxhighlight lang="text">
% git clone git://anongit.kde.org/tellico
% git clone git://anongit.kde.org/tellico
% cd tellico
% cd tellico
Line 21: Line 21:
= Install required libraries =
= Install required libraries =
Required libraries are (perhaps incomplete):
Required libraries are (perhaps incomplete):
<code>
<syntaxhighlight lang="text">
% apt-get install libpoppler-qt4-dev libtaglib-ocaml-dev libexempi-dev libyaz-dev libqimageblitz4 libqimageblitz-dev  
% apt-get install libpoppler-qt4-dev libtaglib-ocaml-dev libexempi-dev libyaz-dev libqimageblitz4 libqimageblitz-dev  
</code>
</code>
Line 32: Line 32:


In the ''tellico-2.0/'' directory, create a directory for building, named ''build/'', just to keep things clear.
In the ''tellico-2.0/'' directory, create a directory for building, named ''build/'', just to keep things clear.
<code>
<syntaxhighlight lang="text">
% mkdir build
% mkdir build
% cd build
% cd build
Line 46: Line 46:


If cmake complains about QJSON not being found, it needs to be downloaded to ''yourdir'' (outside of the tellico directory):
If cmake complains about QJSON not being found, it needs to be downloaded to ''yourdir'' (outside of the tellico directory):
<code>
<syntaxhighlight lang="text">
% cd /path_to_yourdir
% cd /path_to_yourdir
% git clone git://gitorious.org/qjson/qjson.git qjson
% git clone git://gitorious.org/qjson/qjson.git qjson
</code>
</code>
Then use this cmake command instead:
Then use this cmake command instead:
<code>
<syntaxhighlight lang="text">
% cmake .. -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` -DCMAKE_MODULE_PATH=/path_to_yourdir/qjson/cmake/modules/
% cmake .. -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` -DCMAKE_MODULE_PATH=/path_to_yourdir/qjson/cmake/modules/
</code>
</code>
Line 61: Line 61:


Tellico has many unit tests for checking some parts of the code for problems. The tests can be compiled by using ''-DKDE4_BUILD_TESTS=TRUE'' and then running
Tellico has many unit tests for checking some parts of the code for problems. The tests can be compiled by using ''-DKDE4_BUILD_TESTS=TRUE'' and then running
<code>% make test</code>
<syntaxhighlight lang="text">% make test</code>


= Compile =
= Compile =


''Make'' is used to actually compile Tellico.
''Make'' is used to actually compile Tellico.
<code>% make</code>
<syntaxhighlight lang="text">% make</code>


There will likely be some warnings during compilation, but at the end, if you see something like
There will likely be some warnings during compilation, but at the end, if you see something like
Line 75: Line 75:
= Install =
= Install =
To install Tellico alongside other KDE applications, you will likely need to use the ''sudo'' command.
To install Tellico alongside other KDE applications, you will likely need to use the ''sudo'' command.
<code>% sudo make install</code>
<syntaxhighlight lang="text">% sudo make install</code>


Enter your password, and Tellico should be installed and should show up in the KDE menu, likely in the Office menu. Or, run it from the command-line.
Enter your password, and Tellico should be installed and should show up in the KDE menu, likely in the Office menu. Or, run it from the command-line.
<code>% tellico</code>
<syntaxhighlight lang="text">% tellico</code>
= Enjoy =
= Enjoy =


Line 84: Line 84:


If you need to uninstall Tellico
If you need to uninstall Tellico
<code>% sudo make uninstall</code>
<syntaxhighlight lang="text">% sudo make uninstall</code>

Revision as of 20:49, 29 June 2011

Download Tellico

To compile Tellico from the source code, you must download the source package or get the code from the git repository.

Source Package

If you download the source package, extract all of the files, which should create a directory named tellico-2.0/. <syntaxhighlight lang="text"> % tar xjvf tellico-2.0.tar.bz2 % cd tellico-2.0

Note
These instructions use Tellico 2.0 as an example. For other versions, replace 2.0 in the commands below.


Current Development Source

The source code is stored in KDE's git system, in the extragear/office folder. Please refer to Git Configuration for more help with using KDE and git. <syntaxhighlight lang="text"> % git clone git://anongit.kde.org/tellico % cd tellico

Install required libraries

Required libraries are (perhaps incomplete): <syntaxhighlight lang="text"> % apt-get install libpoppler-qt4-dev libtaglib-ocaml-dev libexempi-dev libyaz-dev libqimageblitz4 libqimageblitz-dev

After that, there are three steps to build and install Tellico.

Configure

The compilation environment must be configured to your system first. The tool used to create the configuration is CMake. CMake will check that you have all the required development libraries and set up the files for compiling.

In the tellico-2.0/ directory, create a directory for building, named build/, just to keep things clear. <syntaxhighlight lang="text"> % mkdir build % cd build % cmake .. -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix`

Note
Note the backquotes in the cmake command, they are important.


The tells CMake to use the top-level tellico-2.0/ directory as the source directory, and to set the application to install in the same place as other KDE applications. Later, when you install Tellico, you will likely need root access, either through the root password or sudo. To install to a different location, use change the -DCMAKE_INSTALL_PREFIX option. Remember, the KDEDIRS variable must be updated if you install in a nonstandard location.

If you do not have the necessary libraries for building tellico, CMake will fail and show you an error, listing which libraries you lack. Some libraries are required for building. Some are optional for additional functionality. The library packages may have different names, depending on your distribution.

If cmake complains about QJSON not being found, it needs to be downloaded to yourdir (outside of the tellico directory): <syntaxhighlight lang="text"> % cd /path_to_yourdir % git clone git://gitorious.org/qjson/qjson.git qjson Then use this cmake command instead: <syntaxhighlight lang="text"> % cmake .. -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` -DCMAKE_MODULE_PATH=/path_to_yourdir/qjson/cmake/modules/

Options

In order to include support for using a webcam to scan barcodes, you must have the libv4l library installed and include -DENABLE_WEBCAM=true when you run cmake.

To include support for debugging Tellico, you should pass the -DCMAKE_BUILD_TYPE=debug option to cmake. -DCMAKE_BUILD_TYPE=release is for stripped, non-debugging compilation.

Tellico has many unit tests for checking some parts of the code for problems. The tests can be compiled by using -DKDE4_BUILD_TESTS=TRUE and then running <syntaxhighlight lang="text">% make test

Compile

Make is used to actually compile Tellico. <syntaxhighlight lang="text">% make

There will likely be some warnings during compilation, but at the end, if you see something like

[100%] Built target tellico

then the compilation completed successfully.

Install

To install Tellico alongside other KDE applications, you will likely need to use the sudo command. <syntaxhighlight lang="text">% sudo make install

Enter your password, and Tellico should be installed and should show up in the KDE menu, likely in the Office menu. Or, run it from the command-line. <syntaxhighlight lang="text">% tellico

Enjoy

You can send questions to the tellico-users mailing list.

If you need to uninstall Tellico <syntaxhighlight lang="text">% sudo make uninstall