mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
* build docs : markdown cleanup & reformatting
This commit is contained in:
parent
8e1687e7b3
commit
890807b8d7
5 changed files with 278 additions and 320 deletions
|
@ -23,81 +23,55 @@ paths like /c/dev/ for C:\dev\.
|
|||
msys2
|
||||
-----
|
||||
|
||||
### x86 (32-bit architecture)
|
||||
Get install file `msys2-$ARCH-*.exe` from `https://msys2.github.io`
|
||||
|
||||
Get install file msys2-i686-*.exe from https://msys2.github.io.
|
||||
open MSYS2 Shell (from Start menu).
|
||||
Install all prerequisites and download i2pd source:
|
||||
Where $ARCH is `i686` or `x86_64` (matching your system).
|
||||
|
||||
```bash
|
||||
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:
|
||||
|
||||
```bash
|
||||
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
|
||||
```
|
||||
- Open MSYS2 Shell (from Start menu).
|
||||
- Install all prerequisites and download i2pd source:
|
||||
|
||||
export ARCH='i686' # or 'x86_64'
|
||||
export MINGW='mingw32' # or 'mingw64'
|
||||
pacman -S mingw-w64-$ARCH-boost mingw-w64-$ARCH-openssl mingw-w64-$ARCH-gcc git make
|
||||
mkdir -p /c/dev/i2pd
|
||||
cd /c/dev/i2pd
|
||||
git clone https://github.com/PurpleI2P/i2pd.git
|
||||
cd i2pd
|
||||
# we need compiler on PATH which is usually heavily cluttered on Windows
|
||||
export PATH=/$MINGW/bin:/usr/bin
|
||||
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.
|
||||
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.
|
||||
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](https://en.wikipedia.org/wiki/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.
|
||||
If your processor has [AES instruction set](https://en.wikipedia.org/wiki/AES_instruction_set),
|
||||
use `make USE_AESNI=1` instead just `make`. No check is done however, it will compile,
|
||||
but it might crash with `Illegal instruction` if this feature is not supported by your processor.
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
### UPnP
|
||||
You can install it through the MSYS2
|
||||
and build with USE_UPNP key.
|
||||
|
||||
```bash
|
||||
pacman -S mingw-w64-i686-miniupnpc
|
||||
make USE_UPNP=yes
|
||||
```
|
||||
or
|
||||
```bash
|
||||
pacman -S mingw-w64-x86_64-miniupnpc
|
||||
make USE_UPNP=yes
|
||||
```
|
||||
You can install it through the MSYS2 and build with `USE_UPNP` key.
|
||||
|
||||
export ARCH='i686' # or 'x86_64'
|
||||
pacman -S mingw-w64-$ARCH-miniupnpc
|
||||
make USE_UPNP=yes
|
||||
|
||||
Using Visual Studio
|
||||
-------------------
|
||||
|
@ -112,7 +86,6 @@ Requirements for building:
|
|||
* [Netwide assembler](http://www.nasm.us/)
|
||||
* 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
|
||||
|
@ -129,11 +102,9 @@ If you are on 64-bit Windows and you want to build 64-bit version as well
|
|||
After Boost is compiled, set the environment variable `BOOST_ROOT` to
|
||||
the directory Boost was unpacked to, e.g., C:\dev\boost.
|
||||
|
||||
If you are planning on building only particular variant, e.g. Debug
|
||||
only and static linking, and/or you are out of space/time, you might
|
||||
consider `--build-type=minimal`. Take a look at
|
||||
[appveyor.yml](../appveyor.yml) for details on how test builds are done.
|
||||
|
||||
If you are planning on building only particular variant, e.g. Debug only and static linking,
|
||||
and/or you are out of space/time, you might consider `--build-type=minimal`.
|
||||
Take a look at [appveyor.yml](../appveyor.yml) for details on how test builds are done.
|
||||
|
||||
### Building OpenSSL
|
||||
|
||||
|
@ -153,23 +124,19 @@ Now open Visual Studio command prompt and change directory to that with OpenSSL
|
|||
|
||||
You should have it installed into C:\OpenSSL-Win32 by now.
|
||||
|
||||
Note that you might consider providing `-DOPENSSL_ROOT_DIR` to CMake
|
||||
and/or create a symlink (with mklink /J) to C:\OpenSSL if you plan on
|
||||
maintaining multiple versions, e.g. 64 bit and/or
|
||||
static/shared. Consult `C:\Program Files
|
||||
(x86)\CMake\share\cmake-3.3\Modules\FindOpenSSL.cmake` for details.
|
||||
|
||||
Note that you might consider providing `-DOPENSSL_ROOT_DIR` to CMake and/or
|
||||
create a symlink (with mklink /J) to C:\OpenSSL if you plan on maintain
|
||||
multiple versions, e.g. 64 bit and/or static/shared.
|
||||
See `C:\Program Files (x86)\CMake\share\cmake-3.3\Modules\FindOpenSSL.cmake` for details.
|
||||
|
||||
### Get miniupnpc
|
||||
|
||||
If you are behind a UPnP enabled router and don't feel like manually
|
||||
configuring port forwarding, you should consider using
|
||||
[MiniUPnP](http://miniupnp.free.fr) client. I2pd can be built capable
|
||||
of using miniupnpc shared library (DLL) to open up necessary
|
||||
port. You'd want to have include headers around to build i2pd with
|
||||
support for this. Unpack client source code in a sibling folder,
|
||||
e.g. C:\dev\miniupnpc . You may want to remove version number from
|
||||
folder name included in downloaded archive.
|
||||
If you are behind a UPnP enabled router and don't feel like manually configuring port forwarding,
|
||||
you should consider using [MiniUPnP](http://miniupnp.free.fr) client.
|
||||
I2pd can be built capable of using miniupnpc shared library (DLL) to open up necessary port.
|
||||
You'd want to have include headers around to build i2pd with support for this.
|
||||
Unpack client source code to subdir, e.g. `C:\dev\miniupnpc`.
|
||||
You may want to remove version number from folder name included in downloaded archive.
|
||||
|
||||
### Creating Visual Studio project
|
||||
|
||||
|
@ -177,19 +144,16 @@ Start CMake GUI, navigate to i2pd directory, choose building directory, e.g. ./
|
|||
|
||||
Alternatively, if you feel adventurous, try that from the command line
|
||||
|
||||
```
|
||||
cd <i2pd_dir>
|
||||
mkdir out
|
||||
cd out
|
||||
cmake ..\build -G "Visual Studio 12 2013" -DWITH_UPNP=ON -DWITH_PCH=ON -DCMAKE_INSTALL_PREFIX:PATH=C:\dev\Debug_Win32_stage
|
||||
```
|
||||
|
||||
WITH_UPNP will stay off, if necessary files are not found.
|
||||
mkdir i2pd\out
|
||||
cd i2pd\out
|
||||
cmake ..\build -G "Visual Studio 12 2013" -DWITH_UPNP=ON -DWITH_PCH=ON -DCMAKE_INSTALL_PREFIX:PATH=C:\dev\Debug_Win32_stage
|
||||
|
||||
If necessary files are not found `WITH_UPNP` will stay off.
|
||||
|
||||
### Building i2pd
|
||||
|
||||
You can open generated solution/project with Visual Studio and build
|
||||
from there, alternatively you can use `cmake --build . --config Release --target install` or
|
||||
You can open generated solution/project with Visual Studio and build from there,
|
||||
alternatively you can use `cmake --build . --config Release --target install` or
|
||||
[MSBuild tool](https://msdn.microsoft.com/en-us/library/dd293626.aspx)
|
||||
`msbuild i2pd.sln /p:Configuration=Release`.
|
||||
|
||||
msbuild i2pd.sln /p:Configuration=Release
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue