- Prerequisites
- *NIX
- Ubuntu notes
- Obtaining sources
- Building and installing
- Uninstalling
- Microsoft Windows
- Troubleshooting
- LeechCraft segfaults on startup
- LeechCraft fails to build with @your_compiler_name@
- CMake outputs `Package libtorrent-rasterbar was not found in the pkg-config search path` and fails with an error
Prerequisites¶
- Qt 4.6.0 and Phonon 4.2.0 or higher
- Boost 1.37 or higher (be aware that original 1.37 contains a bug that leads to crashes on newer Linux kernels)
- date_time
- filesystem
- system
- general Boost header-only libraries
- OpenSSL and development files
- Rasterbar libtorrent 0.15.x release or from SVN RC 0.15 branch (http://libtorrent.svn.sourceforge.net/svnroot/libtorrent/branches/RC_0_15) compiled with Unicode and DHT support
- libcurl 7.19.4 or higher for the LCFTP plugin
- CMake 2.8 (maybe would work with 2.6 as well)
- KDE 4.2 or higher for the AnHero plugin
- Qross for the Qrosp plugin.
*NIX¶
Ubuntu notes¶
You can get rather fresh Qt from https://launchpad.net/~debfx/+archive/qt (maybe outdated already, though).
Obtaining sources¶
You can either download (an extremely outdated) source package from https://sourceforge.net/projects/leechcraft/files/ or check out the files from git (you will need git for this). The second approach is strongly advised.
To check out, cd into a directory where you want leechcraft subdirectory to be placed. We will assume that it's ~/Programming. In this directory issue the following command:
git clone git://github.com/0xd34df00d/leechcraft.git
This would create
~/Programming/leechcraft and put there the project's sources and commit history. To later update the repository:cd ~/Programming/leechcraft git pull
Building and installing¶
Create a directory in~/Programming/leechcraft, say, build, and cd into it. Typecmake -DCMAKE_BUILD_TYPE=BuildType ../src
Here BuildType specifies what type of the build you want:
-
Release
Release version with no debugging information and optimizations enabled. Debug
Debug version with debugging information and no optimizations at all.RelWithDebInfo
A version with both debugging information and optimizations enabled (recommended).
Then, after cmake successfully prepares the build system, type make and have a cup of coffee while LeechCraft compiles. If it fails, join the Jabber conference leechcraft@conference.jabber.ru or c_plus_plus@conference.jabber.ru and feel free to ask.
Become a root and issue make install to install LeechCraft into /usr/local. That's it!
Please note that LeechCraft won't work without installing.
Uninstalling¶
cd ~/Programming/leechcraft/build sudo cmake -P cmake_uninstall.cmake
Microsoft Windows¶
Hehe. It's tricky. Don't try.
More seriously, building on Win32 requires a good knowledge of the build process, Qt and Boost pecularities and various typical but subtle errors.
Troubleshooting¶
LeechCraft segfaults on startup¶
make install is required, really.
LeechCraft fails to build with your_compiler_name¶
It is known to fail on MSVC 7.1, and it possibly won't compile on GCC 3.x. If your configuration differs, please file a bug.
CMake outputs `Package libtorrent-rasterbar was not found in the pkg-config search path` and fails with an error¶
The full error message is:
Package libtorrent-rasterbar was not found in the pkg-config search path. Perhaps you should add the directory containing `libtorrent-rasterbar.pc' to the PKG_CONFIG_PATH environment variable No package 'libtorrent-rasterbar' found
If you get that, you should find where your
libtorrent-rasterbar.pc (typically the locate libtorrent-rasterbar.pc command will do, though you would probably need to update its base) is and issue the following command:export PKG_CONFIG_PATH="/path/to/your/libtorrent-rasterbar.pc"
and then re-run CMake in the same shell with the same command line.
If you re-configure LeechCraft often, you'd probably want to add this export declaration to your ~/.bashrc.