mirror of https://github.com/PurpleI2P/i2pd.git
Jeff Becker
9 years ago
32 changed files with 655 additions and 158 deletions
After Width: | Height: | Size: 146 KiB |
After Width: | Height: | Size: 730 KiB |
After Width: | Height: | Size: 119 KiB |
@ -0,0 +1,75 @@ |
|||||||
|
Cross compilation notes |
||||||
|
======================= |
||||||
|
|
||||||
|
Static 64 bit windows binary on Ubuntu 15.10 (Wily Werewolf) |
||||||
|
--------------------------------------------------------------------- |
||||||
|
|
||||||
|
Install cross compiler and friends |
||||||
|
```sh |
||||||
|
sudo apt-get install g++-mingw-w64-x86-64 |
||||||
|
``` |
||||||
|
Default is to use Win32 threading model which lacks std::mutex and such. So we change defaults |
||||||
|
```sh |
||||||
|
sudo update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix |
||||||
|
``` |
||||||
|
From now on we assume we have everything in `~/dev/`. Get Boost sources unpacked into `~/dev/boost_1_60_0/` |
||||||
|
and change directory to it. |
||||||
|
Now add out cross compiler configuration. Warning: the following will wipe out whatever you had in there. |
||||||
|
```sh |
||||||
|
echo "using gcc : mingw : x86_64-w64-mingw32-g++ ;" > ~/user-config.jam |
||||||
|
``` |
||||||
|
Proceed with building Boost normal way, but let's define dedicated staging directory |
||||||
|
```sh |
||||||
|
./bootstrap.sh |
||||||
|
./b2 toolset=gcc-mingw target-os=windows variant=release link=static runtime-link=static address-model=64 \ |
||||||
|
--build-type=minimal --with-filesystem --with-program_options --with-regex --with-date_time \ |
||||||
|
--stagedir=stage-mingw-64 |
||||||
|
cd .. |
||||||
|
``` |
||||||
|
Now we get & build OpenSSL |
||||||
|
```sh |
||||||
|
git clone https://github.com/openssl/openssl |
||||||
|
cd openssl |
||||||
|
git checkout OpenSSL_1_0_2g |
||||||
|
./Configure mingw64 no-rc2 no-rc4 no-rc5 no-idea no-bf no-cast no-whirlpool no-md2 no-md4 no-ripemd no-mdc2 \ |
||||||
|
no-camellia no-seed no-comp no-krb5 no-gmp no-rfc3779 no-ec2m no-ssl2 no-jpake no-srp no-sctp no-srtp \ |
||||||
|
--prefix=~/dev/stage --cross-compile-prefix=x86_64-w64-mingw32- |
||||||
|
make depend |
||||||
|
make |
||||||
|
make install |
||||||
|
cd .. |
||||||
|
``` |
||||||
|
and Zlib |
||||||
|
```sh |
||||||
|
git clone https://github.com/madler/zlib |
||||||
|
cd zlib |
||||||
|
git checkout v1.2.8 |
||||||
|
CC=x86_64-w64-mingw32-gcc CFLAGS=-O3 ./configure --static --64 --prefix=~/dev/stage |
||||||
|
make |
||||||
|
make install |
||||||
|
cd .. |
||||||
|
``` |
||||||
|
Now we prepare cross toolchain hint file for CMake, let's name it `~/dev/toolchain-mingw.cmake` |
||||||
|
```cmake |
||||||
|
SET(CMAKE_SYSTEM_NAME Windows) |
||||||
|
SET(CMAKE_C_COMPILER x86_64-w64-mingw32-gcc) |
||||||
|
SET(CMAKE_CXX_COMPILER x86_64-w64-mingw32-g++) |
||||||
|
SET(CMAKE_RC_COMPILER x86_64-w64-mingw32-windres) |
||||||
|
SET(CMAKE_FIND_ROOT_PATH /usr/x86_64-w64-mingw32) |
||||||
|
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) |
||||||
|
``` |
||||||
|
Download miniupnpc, unpack, and symlink it into `~/dev/miniupnpc/`. |
||||||
|
Finally, we can build i2pd with all that goodness |
||||||
|
```sh |
||||||
|
git clone https://github.com/PurpleI2P/i2pd |
||||||
|
mkdir i2pd-mingw-64-build |
||||||
|
cd i2pd-mingw-64-build |
||||||
|
BOOST_ROOT=~/dev/boost_1_60_0 cmake -G 'Unix Makefiles' ~/dev/i2pd/build -DBUILD_TYPE=Release \ |
||||||
|
-DCMAKE_TOOLCHAIN_FILE=~/dev/toolchain-mingw.cmake -DWITH_AESNI=ON -DWITH_UPNP=ON -DWITH_STATIC=ON \ |
||||||
|
-DWITH_HARDENING=ON -DCMAKE_INSTALL_PREFIX:PATH=~/dev/i2pd-mingw-64-static \ |
||||||
|
-DZLIB_ROOT=~/dev/stage -DBOOST_LIBRARYDIR:PATH=~/dev/boost_1_60_0/stage-mingw-64/lib \ |
||||||
|
-DOPENSSL_ROOT_DIR:PATH=~/dev/stage |
||||||
|
make |
||||||
|
x86_64-w64-mingw32-strip i2pd.exe |
||||||
|
``` |
||||||
|
By now, you should have a release build with stripped symbols. |
@ -0,0 +1,111 @@ |
|||||||
|
## Configuration file for a typical i2pd user |
||||||
|
## See https://i2pd.readthedocs.org/en/latest/configuration.html |
||||||
|
## for more options you can use in this file. |
||||||
|
|
||||||
|
## Lines that begin with "## " try to explain what's going on. Lines |
||||||
|
## that begin with just "#" are disabled commands: you can enable them |
||||||
|
## by removing the "#" symbol. |
||||||
|
|
||||||
|
## Tunnels config file |
||||||
|
## Default: ~/.i2pd/tunnels.cfg or /var/lib/i2pd/tunnels.cfg |
||||||
|
#tunconf = /var/lib/i2pd/tunnels.cfg |
||||||
|
|
||||||
|
## Where to write pidfile (don't write by default) |
||||||
|
#pidfile = /var/run/i2pd.pid |
||||||
|
|
||||||
|
## Logging configuration section |
||||||
|
## By default logs go to stdout with level info |
||||||
|
## |
||||||
|
## Logs destination (stdout, file) |
||||||
|
#log = file |
||||||
|
## Path to logfile (default - autodetect) |
||||||
|
#logfile = /var/log/i2pd.log |
||||||
|
## Log messages above this level (debug, *info, warn, error) |
||||||
|
#loglevel = info |
||||||
|
|
||||||
|
## Path to storage of i2pd data (RI, keys, peer profiles, ...) |
||||||
|
## Default: ~/.i2pd or /var/lib/i2pd |
||||||
|
#datadir = /var/lib/i2pd |
||||||
|
|
||||||
|
## Daemon mode. Router will go to background after start |
||||||
|
#daemon |
||||||
|
## Run as a service. Router will use system folders like ‘/var/lib/i2pd’ |
||||||
|
#service |
||||||
|
|
||||||
|
## External IP address to listen for connections |
||||||
|
## By default i2pd sets IP automatically |
||||||
|
#host = 1.2.3.4 |
||||||
|
## Port to listen for connections |
||||||
|
## By default i2pd picks random port. You MUST pick a random number too, |
||||||
|
## don't just uncomment this |
||||||
|
#port = 4321 |
||||||
|
##Enable communication through ipv6 |
||||||
|
ipv6 |
||||||
|
## Bandwidth configuration |
||||||
|
## L limit bandwidth to 32Kbs/sec, O - to 256Kbs/sec, P - unlimited |
||||||
|
## Default is P for floodfill, L for regular node |
||||||
|
#bandwidth = L |
||||||
|
|
||||||
|
## Router will not accept transit tunnels at startup |
||||||
|
#notransit |
||||||
|
|
||||||
|
## Router will be floodfill |
||||||
|
#floodfill |
||||||
|
|
||||||
|
## Section for Web Console |
||||||
|
## By default it's available at 127.0.0.1:7070 even if it's not configured |
||||||
|
[http] |
||||||
|
## The address to listen on |
||||||
|
address = 127.0.0.1 |
||||||
|
## The port to listen on |
||||||
|
port = 7070 |
||||||
|
|
||||||
|
## Section for HTTP proxy |
||||||
|
## By default it's available at 127.0.0.1:4444 even if it's not configured |
||||||
|
[httpproxy] |
||||||
|
## The address to listen on |
||||||
|
address = 127.0.0.1 |
||||||
|
## The port to listen on |
||||||
|
port = 4444 |
||||||
|
## Optional keys file for proxy local destination |
||||||
|
#keys = http-proxy-keys.dat |
||||||
|
## Uncomment if you want to disable HTTP proxy |
||||||
|
#enabled=false |
||||||
|
|
||||||
|
## Section for Socks proxy |
||||||
|
## By default it's available at 127.0.0.1:4447 even if it's not configured |
||||||
|
#[socksproxy] |
||||||
|
## The address to listen on |
||||||
|
#address = 127.0.0.1 |
||||||
|
## The port to listen on |
||||||
|
#port = 4447 |
||||||
|
## Optional keys file for proxy local destination |
||||||
|
#keys = socks-proxy-keys.dat |
||||||
|
## Uncomment if you want to disable Socks proxy |
||||||
|
#enabled=false |
||||||
|
## Socks outproxy. Example below is set to use Tor for all connections except i2p |
||||||
|
## Address of outproxy |
||||||
|
#outproxy = 127.0.0.1 |
||||||
|
## Outproxy remote port |
||||||
|
#outproxyport = 9050 |
||||||
|
|
||||||
|
## Section for SAM bridge |
||||||
|
#[sam] |
||||||
|
## The address to listen on |
||||||
|
#address = 127.0.0.1 |
||||||
|
## Port of SAM bridge |
||||||
|
#port = 7656 |
||||||
|
|
||||||
|
## Section for BOB command channel |
||||||
|
#[bob] |
||||||
|
## The address to listen on |
||||||
|
#address = 127.0.0.1 |
||||||
|
## Port of BOB command channel. Usually 2827. BOB is off if not specified |
||||||
|
#port = 2827 |
||||||
|
|
||||||
|
## Section for I2PControl protocol |
||||||
|
#[i2pcontrol] |
||||||
|
## The address to listen on |
||||||
|
#address = 127.0.0.1 |
||||||
|
## Port of I2P control service |
||||||
|
#port = 7650 |
Loading…
Reference in new issue