Compilation - RazielXT/mtTorrent GitHub Wiki
mtTorrent is currently distributed with:
- Visual Studio project files (Solution file)
- CMakeFiles
For compilation of mtTorrent library you need:
Asio for networking (Home, Git) - Asio is included as git submodule
Optional OpenSSL for HTTPS support
To build OpenSSL from source get:
- Perl: eg. Strawberry perl for Microsoft Windows
- Netwide Assembler (NASM): An assembler for the x86 CPU architecture
- check installed version: perl -v,nasm -v
start terminal or VS prompt (x64 Native Tools Command Prompt):
- perl Configure VC-WIN64A (target eg. 64bit windows) --prefix=path (run in openssl folder, path where to output) no-shared (if not shared (dll))
- nmake (start building)
Qt for Gui example client (version 6.2+)
Get official Qt build or for custom build from source:
Example static windows build setup in VS prompt (x64 Native Tools Command Prompt):
cd C:\qtpath\Src
mkdir ..\lib-static
set QTDIR=C:\qtpath\Src\qtbase
set PATH=C:\qtpath\Src\qtbase\bin;%PATH%
configure -debug-and-release -prefix "C:\qtpath\lib-static" -opensource -platform win32-msvc -opengl desktop -static -static-runtime -nomake examples -nomake tests
nmake
nmake install
After custom build qt.conf might be missing, add file qt.conf to C:\qtpath\lib-static\bin\ with content (your version path):
[Paths]
Documentation=../../Docs/Qt-6.4.1
Examples=../../Examples/Qt-6.4.1
Prefix=..
Visual Studio:
- Library supports static/dynamic library, MT/MD compilation configurations. Default Visual Studio compilation targets are for static library.
CMake:
- Select library type in mtTorrent/CMakeLists.txt
Current projects include:
- mtTorrent - main project containing full library
- SdkExample - example usage of mtTorrent API in console application
- mtTorrentGui - example usage of mtTorrent library in Gui application, using Qt
- countryIpListParser - utility for creating packed file used for country by ip lookup, optional