
i2pd Documentation Выпуск 2.2.0 PurpleI2P team 12 October 2016 Оглавление 1 Установка 3 2 Использование 5 3 Содержание: 7 3.1 Требования для сборки из исходников..............................7 3.2 Сборка на Unix системах.....................................7 3.3 Сборка на Windows.........................................9 3.4 Кросс-компиляция......................................... 12 3.5 Сборка для Android........................................ 14 3.6 Сборка для iOS........................................... 15 3.7 Настройка i2pd........................................... 16 3.8 Настройка Family.......................................... 19 3.9 Примеры использования...................................... 20 i ii i2pd Documentation, Выпуск 2.2.0 i2pd (I2P Daemon) это полнофункциональная реализация I2P клиента на языке C++. • Сайт • GitHub • Вики • Багтрекер • Twitter Оглавление 1 i2pd Documentation, Выпуск 2.2.0 2 Оглавление Глава 1 Установка Самый простой способ установить i2pd это использование бинарных файлов. Инструкции по сборке из исходников для вашей ОС смотрите в документации. 3 i2pd Documentation, Выпуск 2.2.0 4 Глава 1. Установка Глава 2 Использование Смотрите в документацию и документированный конфигурационный файл. 5 i2pd Documentation, Выпуск 2.2.0 6 Глава 2. Использование Глава 3 Содержание: 3.1 Требования для сборки из исходников 3.1.1 Linux/FreeBSD/OSX GCC 4.7 or newer, Boost 1.49 or newer, openssl, zlib. Clang can be used instead of GCC. 3.1.2 Windows VS2013 (known to work with 12.0.21005.1 or newer), Boost 1.46 or newer, crypto++ 5.62. See Win32/README-Build.txt for instructions on how to build i2pd and its dependencies. 3.2 Сборка на Unix системах First of all we need to make sure that all dependencies are satisfied. This doc is trying to cover: • Debian/Ubuntu (contains packaging instructions) • Fedora/Centos • FreeBSD Make sure you have all required dependencies for your system successfully installed. If so then we are ready to go! Let’s clone the repository and start building the i2pd: git clone https://github.com/PurpleI2P/i2pd.git cd i2pd/build cmake -DCMAKE_BUILD_TYPE=Release # more options could be passed, see "CMake Options" make # you may add VERBOSE=1 to cmdline for debugging After successfull build i2pd could be installed with: make install or you can just use ‘make’ once you have all dependencies (boost and openssl) installed git clone https://github.com/PurpleI2P/i2pd.git cd i2pd make 7 i2pd Documentation, Выпуск 2.2.0 3.2.1 Debian/Ubuntu You will need a compiler and other tools that could be installed with build-essential package: sudo apt-get install build-essential Also you will need a bunch of development libraries: sudo apt-get install \ libboost-chrono-dev \ libboost-date-time-dev \ libboost-filesystem-dev \ libboost-program-options-dev \ libboost-system-dev \ libboost-thread-dev \ libssl-dev If you need UPnP support (don’t forget to run CMake with WITH_UPNP=ON) miniupnpc development library should be installed: sudo apt-get install libminiupnpc-dev You may also build deb-package with the following: sudo apt-get install fakeroot devscripts cd i2pd debuild --no-tgz-check 3.2.2 Fedora/Centos You will need a compiler and other tools to perform a build: sudo yum install make cmake gcc gcc-c++ Latest Fedora system using DNF instead of YUM by default, you may prefer to use DNF, but YUM should be ok Centos 7 has CMake 2.8.11 in the official repositories that too old to build i2pd, CMake >=2.8.12 is required You could build CMake for Centos manualy(WARNING there are a lot of build dependencies!): wget https://kojipkgs.fedoraproject.org/packages/cmake/2.8.12/3.fc21/src/cmake-2.8.12-3.fc21.src.rpm yum-builddep cmake-2.8.12-3.fc21.src.rpm rpmbuild --rebuild cmake-2.8.12-3.fc21.src.rpm yum install ~/rpmbuild/RPMS/x86_64/cmake-2.8.12-3.el7.centos.x86_64.rpm Also you will need a bunch of development libraries sudo yum install boost-devel openssl-devel If you need UPnP support (don’t forget to run CMake with WITH_UPNP=ON) miniupnpc development library should be installed: miniupnpc-devel 3.2.3 MAC OS X Requires homebrew 8 Глава 3. Содержание: i2pd Documentation, Выпуск 2.2.0 brew install libressl boost Then build: make HOMEBREW=1 3.2.4 FreeBSD For 10.X use clang. You would also need boost and openssl ports. Type gmake, it invokes Makefile.bsd, make necessary changes there is required. Branch 9.X has gcc v4.2, that knows nothing about required c++11 standart. Required ports: • devel/cmake • devel/boost-libs • lang/gcc47(or later version) To use newer compiler you should set these variables(replace “47” with your actual gcc version): export CC=/usr/local/bin/gcc47 export CXX=/usr/local/bin/g++47 3.2.5 CMake Options Available CMake options(each option has a form of <key>=<value>, for more information see man 1 cmake): • CMAKE_BUILD_TYPE build profile (Debug/Release) • WITH_BINARY build i2pd itself • WITH_LIBRARY build libi2pd • WITH_STATIC build static versions of library and i2pd binary • WITH_UPNP build with UPnP support (requires libupnp) • WITH_AESNI build with AES-NI support (ON/OFF) • WITH_HARDENING enable hardening features (ON/OFF) (gcc only) • WITH_PCH use pre-compiled header (experimental, speeds up build) Also there is -L flag for CMake that could be used to list current cached options: cmake-L 3.3 Сборка на Windows There are two approaches available to build i2pd on Windows. The best one depends on your needs and personal preferences. One is to use msys2 and unix alike infrastructure. Another one is to use Visual Studio. While there might be no difference for end users of i2pd daemon, developers, however, shall be waryof differences in C++ name mangling between the two compilers when making a choice to be able tolinktheir software against libi2pd. 3.3. Сборка на Windows 9 i2pd Documentation, Выпуск 2.2.0 If you are a stranger to C++ with no development tools installed on your system and your only goal is to have i2pd up and running from the most recent source, consider using msys2. Although it relies on command line operations, it should be straight forward. In this guide, we will use CMake for both approaches and we will assume that you typically have your projects in C:\dev\ as your development location for the sake of convenience. Adjust paths accordingly if it is not the case. Note that msys uses unix-alike paths like /c/dev/ for C:\dev. 3.3.1 msys2 x86 (32-bit architecture) Get install file msys2-i686-*.exe from https://msys2.github.io. open MSYS2 Shell (from Start menu). Install all prerequisites and download i2pd source: pacman -S mingw-w64-i686-boost mingw-w64-i686-openssl mingw-w64-i686-gcc git make mkdir -p /c/dev/i2pd cd /c/dev/i2pd git clone https://github.com/PurpleI2P/i2pd.git cd i2pd export PATH=/mingw32/bin:/usr/bin # we need compiler on PATH which is usually heavily cluttered on Windows make x64 (64-bit architecture) Get install file msys2-x86_64-*.exe from https://msys2.github.io. open MSYS2 Shell (from Start menu). Install all prerequisites and download i2pd source: pacman -S mingw-w64-x86_64-boost mingw-w64-x86_64-openssl mingw-w64-x86_64-gcc git make mkdir -p /c/dev/i2pd cd /c/dev/i2pd git clone https://github.com/PurpleI2P/i2pd.git cd i2pd export PATH=/mingw64/bin:/usr/bin # we need compiler on PATH which is usually heavily cluttered on Windows make Caveats It is important to restrict PATH as described above. If you have Strawberry Perl and/or Mercurial installed, it will pick up gcc & openssl from the wrong places. If you do use precompiled headers to speed up compilation (recommended), things can go wrong if compiler options have changed for whatever reason. Just delete stdafx.h.gch found in your build folder, note the file extension. If you are an Arch Linux user, refrain from updating system with pacman -Syu. Always update runtime separately as described on the home page, otherwise you might end up with DLLs incompatibility problems. AES-NI If your processor has AES instruction set, you use make USE_AESNI=1. No check is done however, it will compile, but it might crash with Illegal instruction if not supported. You should be able to run ./i2pd . If you need to start from the new shell, consider starting MinGW-w64 Win32 Shell instead of MSYS2 Shell as it adds/minw32/bin to the PATH. 10 Глава 3. Содержание: i2pd Documentation, Выпуск 2.2.0 UPnP You can install it through the MSYS2 and build with USE_UPNP key. pacman -S mingw-w64-i686-miniupnpc make USE_UPNP=yes or pacman -S mingw-w64-x86_64-miniupnpc make USE_UPNP=yes 3.3.2 Using Visual Studio Requirements for building: • CMake (tested with 3.1.3) • Visual Studio Community Edition (tested with VS2013 Update 4) • Boost (tested with 1.59) • Optionally MiniUPnP (tested with 1.9), we need only few client headers • OpenSSL (tested with 1.0.1p and 1.0.2e), if building from sources (recommended), you’ll need as well – Netwide assembler – Strawberry Perl or ActiveState Perl, do NOT try msys2 perl, it won’t work Building Boost Open a Command Prompt (there is no need to start Visual Studio command prompt to build Boost) and run the following: cd C:\dev\boost bootstrap b2 toolset=msvc-12.0 --build-type=complete --with-filesystem --with-program_options --with-date_time If you are on 64-bit Windows and you want to build 64-bit version as well b2 toolset=msvc-12.0 --build-type=complete --stagedir=stage64 address-model=64 --with-filesystem --with-program_options --with-date_time After Boost is compiled, set the environment variable BOOST_ROOT to the directory Boost was unpacked to, e.g., C:\dev\boost.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages26 Page
-
File Size-