diff --git a/doc/Building.md b/doc/Building.md index f538b7c..0eb5a42 100644 --- a/doc/Building.md +++ b/doc/Building.md @@ -19,27 +19,32 @@ For more information refer to vendor documentation or the [Apple Technical Note] In order to build on Windows the following tools should be installed: - Visual Studio. For a minimal install, the command line only build tools can be - downloaded and installed from https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2017 -- Cmake -- (optional) The OpenSSL library. Prebuild binaries can be downloaded from https://slproweb.com/products/Win32OpenSSL.html . - The full version is required (not the "Light" version). The Win32 version of it is usually required for a standard build. + downloaded and installed from https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2017. - NOTE: in order to skip OpenSSL compilation, edit CMakeLists.txt and replace +- CMake - ```plaintext - OPTION(N2N_OPTION_AES "USE AES" ON) - with - OPTION(N2N_OPTION_AES "USE AES" OFF) - ``` +- (optional) The OpenSSL library. Prebuild binaries can be downloaded from https://slproweb.com/products/Win32OpenSSL.html. + The full version is required, i.e. not the "Light" version. The Win32 version of it is usually required for a standard build. - NOTE: to static link OpenSSL, add the `-DOPENSSL_USE_STATIC_LIBS=true` option to the cmake command +> NOTE: In order to skip OpenSSL compilation, edit `CMakeLists.txt` and replace **– is this still valid?** +> +> ```plaintext +> OPTION(N2N_OPTION_AES "USE AES" ON) +> with +> OPTION(N2N_OPTION_AES "USE AES" OFF) +> ``` -In order to run n2n: + NOTE: To statically link OpenSSL, add the `-DOPENSSL_USE_STATIC_LIBS=true` option to the `cmake` command below. + +- If compilation throws a "conig.h: No such file or directory" error, an `include/config.h` file needs to be obtained from an already configured Linux compilation and put into the `include/` directory as discussed [here](https://github.com/ntop/n2n/issues/366). + +In order to run n2n, you will need the following: - The TAP drivers should be installed into the system. They can be installed from - http://build.openvpn.net/downloads/releases (search for "tap-windows") -- If OpenSSL has been linked dynamically, the corresponding .dll file should be available - into the target computer + http://build.openvpn.net/downloads/releases, search for "tap-windows". + +- If OpenSSL has been linked dynamically, the corresponding `.dll` file should be available + onto the target computer. ## Build (CLI) @@ -50,14 +55,17 @@ md build cd build cmake .. -MSBuild edge.vcxproj /t:Build /p:Configuration=Release -MSBuild supernode.vcxproj /t:Build /p:Configuration=Release +MSBuild.exe edge.vcxproj /t:Build /p:Configuration=Release +MSBuild.exe supernode.vcxproj /t:Build /p:Configuration=Release +MSBuild.exe n2n-benchmark.vcxproj /t:Build /p:Configuration=Release ``` -NOTE: if cmake has problems finding the installed OpenSSL library, try to download the official cmake and invoke it with: -`C:\Program Files\CMake\bin\cmake` +NOTE: If CMake has problems finding the installed OpenSSL library, try to download the official cmake and invoke it with +`C:\Program Files\CMake\bin\cmake`. + +NOTE: Visual Studio might not add `MSBuild.exe`'s path to the environment variable %PATH% so you might have difficulties finding and executing it without giving the full path. Regular installations seem to have it reside at `"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\MSBuild.exe"` -The compiled exe files should now be available under the Release directory. +The compiled `.exe` files should now be available in the `build\Release` directory. ## Run @@ -67,7 +75,7 @@ Here is an example `edge.conf` file: ```plaintext -c=mycommunity --k=mysecretkey +-k=mysecretpass # supernode IP address -l=1.2.3.4:5678 @@ -81,10 +89,10 @@ The `supernode.exe` program reads the `supernode.conf` file located into the cur Here is an example `supernode.conf` file: ```plaintext --l=5678 +-p=5678 ``` -See `edge.exe --help` and `supernode.exe --help` for a list of supported options. +See `edge.exe --help` and `supernode.exe --help` for a full list of supported options. # General Building Options @@ -156,4 +164,4 @@ Your specific ARM mileage may vary, so it can be enabled by configuring the defi `./configure CFLAGS="-DSPECK_ARM_NEON"` -Just make sure that the correct architecture is set, too. `-march=native` usually works quite well. \ No newline at end of file +Just make sure that the correct architecture is set, too. `-march=native` usually works quite well.