Projects/Tellico/Compiling: Difference between revisions
No edit summary |
|||
(10 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
= Download Tellico = | = Download Tellico = | ||
To compile [ | To compile [https://userbase.kde.org/Tellico Tellico] from the source code, you must [http://tellico-project.org/download download the source package] or get the code from the git repository. | ||
== Source Package == | == Source Package == | ||
If you download the source package, extract all of the files, which should create a directory named ''tellico- | If you download the source package, extract all of the files, which should create a directory named ''tellico-3.0/''. | ||
< | <syntaxhighlight lang="text"> | ||
% tar | % tar xJvf tellico-3.0.tar.xz | ||
% cd tellico- | % cd tellico-3.0 | ||
</ | </syntaxhighlight> | ||
{{Note|These instructions use Tellico | {{Note|These instructions use Tellico 3.0 as an example. For other versions, replace 3.0 in the commands below.}} | ||
== Current Development Source == | == Current Development Source == | ||
The source code is | The source code is developed using KDE's git infrastructure. Please refer to [[Development/Git/Configuration|Git Configuration]] for more help with using KDE and git. | ||
< | <syntaxhighlight lang="text"> | ||
% git clone git://anongit.kde.org/tellico | % git clone git://anongit.kde.org/tellico | ||
% cd tellico | % cd tellico | ||
</ | % git checkout 3.2 | ||
</syntaxhighlight> | |||
{{Note|The current stable branch is 3.2, while the master branch is being used for continued development. }} | |||
= Install required libraries = | = Install required libraries = | ||
The list of required libraries in Debian and Ubuntu is: | |||
< | <syntaxhighlight lang="text"> | ||
% apt-get install libpoppler- | % apt-get install libpoppler-qt5-dev libtaglib-ocaml-dev libexempi-dev libyaz-dev | ||
</ | </syntaxhighlight> | ||
Other distributions might use different package names. | |||
In addition, the Taglib and yaz libraries are highly recommended. | |||
After that, there are three steps to build and install Tellico. | After that, there are three steps to build and install Tellico. | ||
Line 31: | Line 37: | ||
The compilation environment must be configured to your system first. The tool used to create the configuration is ''[http://www.cmake.org CMake]''. CMake will check that you have all the required development libraries and set up the files for compiling. | The compilation environment must be configured to your system first. The tool used to create the configuration is ''[http://www.cmake.org CMake]''. CMake will check that you have all the required development libraries and set up the files for compiling. | ||
In the ''tellico- | In the ''tellico-3.0/'' directory, create a directory for building, named ''build/'', just to keep things clear. | ||
< | <syntaxhighlight lang="text"> | ||
% mkdir build | % mkdir build | ||
% cd build | % cd build | ||
% cmake .. -DCMAKE_INSTALL_PREFIX=` | % cmake .. -DCMAKE_INSTALL_PREFIX=`kf5-config --prefix` | ||
</ | </syntaxhighlight> | ||
{{Note|Note the backquotes in the cmake command, they are important.}} | {{Note|Note the backquotes in the cmake command, they are important.}} | ||
The tells CMake to use the top-level ''tellico- | The tells CMake to use the top-level ''tellico-3.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 | location, use change the ''-DCMAKE_INSTALL_PREFIX'' option. | ||
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 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. | ||
==Options== | ==Options== | ||
Line 60: | Line 56: | ||
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. | 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 ''- | Tellico has many unit tests for checking some parts of the code for problems. The tests can be compiled by using ''-DBUILD_TESTS=TRUE'' and then running | ||
< | <syntaxhighlight lang="text">% make test</syntaxhighlight> | ||
= Compile = | = Compile = | ||
''Make'' is used to actually compile Tellico. | ''Make'' is used to actually compile Tellico. | ||
< | <syntaxhighlight lang="text">% make</syntaxhighlight> | ||
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 71: | ||
= 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. | ||
< | <syntaxhighlight lang="text">% sudo make install</syntaxhighlight> | ||
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. | ||
< | <syntaxhighlight lang="text">% tellico</syntaxhighlight> | ||
= Enjoy = | = Enjoy = | ||
You can send questions to the [http://tellico-project.org/mailing-list tellico-users mailing list]. | You can send questions and comments to the [http://tellico-project.org/mailing-list tellico-users mailing list]. | ||
= Uninstall = | |||
If you need to uninstall Tellico | If you need to uninstall Tellico | ||
< | <syntaxhighlight lang="text">% sudo make uninstall</syntaxhighlight> |
Latest revision as of 00:36, 20 September 2019
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-3.0/.
% tar xJvf tellico-3.0.tar.xz
% cd tellico-3.0
Current Development Source
The source code is developed using KDE's git infrastructure. Please refer to Git Configuration for more help with using KDE and git.
% git clone git://anongit.kde.org/tellico
% cd tellico
% git checkout 3.2
Install required libraries
The list of required libraries in Debian and Ubuntu is:
% apt-get install libpoppler-qt5-dev libtaglib-ocaml-dev libexempi-dev libyaz-dev
Other distributions might use different package names.
In addition, the Taglib and yaz libraries are highly recommended.
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-3.0/ directory, create a directory for building, named build/, just to keep things clear.
% mkdir build
% cd build
% cmake .. -DCMAKE_INSTALL_PREFIX=`kf5-config --prefix`
The tells CMake to use the top-level tellico-3.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.
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.
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 -DBUILD_TESTS=TRUE and then running
% make test
Compile
Make is used to actually compile Tellico.
% 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.
% 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.
% tellico
Enjoy
You can send questions and comments to the tellico-users mailing list.
Uninstall
If you need to uninstall Tellico
% sudo make uninstall