File: BUILD.md

package info (click to toggle)
freelan 2.2-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 10,868 kB
  • sloc: cpp: 37,251; ansic: 4,038; python: 436; sh: 327; makefile: 22
file content (117 lines) | stat: -rw-r--r-- 3,218 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
Build instructions
==================

Third-party libraries
---------------------

FreeLAN depends on the following libraries:

- libcurl4
- libminiupnpc
- boost
- OpenSSL
- iconv (Windows)

Generally Linux users can just use the binaries provided by their package
manager, Mac OSX users can use brew and Windows users can use `vcpkg`.

### Microsoft Windows

You will also need Python, perl and cmake. Refers to
https://chocolatey.org/install to install chocolatey package manager. Then in
an elevated cmd.exe:

> choco install ActivePerl cmake python2 innosetup

To install vcpkg and FreeLAN dependencies, run the following:

```
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
.\bootstrap-vcpkg.bat
vcpkg integrate install
vcpkg install boost miniupnpc libiconv openssl curl --triplet x64-windows-static
vcpkg install boost miniupnpc libiconv openssl curl --triplet x86-windows-static
```

### Debian Linux

To install the required dependencies on Debian Linux (Or Ubuntu), type the
following command:

```
sudo apt-get install scons python libssl-dev libcurl4-openssl-dev \
  libboost-system-dev libboost-thread-dev libboost-program-options-dev \
  libboost-filesystem-dev libboost-iostreams-dev libminiupnpc-dev build-essential
```

### Mac OSX

To install the required dependencies on Mac OS, type the following commands: 

```
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew update
brew install scons boost openssl miniupnpc
```

You will also need tuntap driver:

> brew cask install tuntap

Building FreeLAN
----------------

FreeLAN is written in C++11. Make sure your C++ compiler is recent enough and
supports this standard. On Linux for instance, you need at least `gcc >= 4.8`
for things to go fine.

FreeLAN uses [scons](http://www.scons.org/) as its build system on POSIX-like
systems (basically everything except Windows).

To build the main binary, just type:

> scons apps

To build everything in the directory (including samples), type instead:

> scons samples

To build then install everything into a specific directory, type instead:

> scons install prefix=/usr/local/

### Debugging

If the debug-level logging exposed with the `-d` parameter to freelan does not
expose enough information to assist development or bug-finding, it is possible
to enable additional debug information at build time with:

> scons all --mode=debug

Be aware that this will produce a significant amount of logging information and
is not intended for production use.

### Windows

You will need Microsoft Visual Studio 2017 to compile freelan. All projects come
with a `.vcxproj` file for all the targets (debug/release and x86/x64).

The root directory also contains a solution file (`.sln`) that references all
the sub-projects. You can use the Visual Studio GUI or the command-line
interface.

To build with the CLI, run a cmd.exe with the buildtools, then:
> nmake -f Makefile.windows

The resulting binaries will be located in the [install](install) directory.

### Mac OSX

On Mac OSX, an additional SCons target exists to build the freelan installation
package:

> scons package

The package will be generated at the root of the repository.