summaryrefslogtreecommitdiff
path: root/INSTALL.md
blob: b4e2837918acccb1eb3f7d123c2f22aa7e13cf14 (plain)
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
##Installation

###Linux:

You should get and install [libsodium](https://github.com/jedisct1/libsodium):
```bash
git clone git://github.com/jedisct1/libsodium.git
cd libsodium
git checkout tags/0.4.2
./autogen.sh
./configure && make check
sudo make install
sudo ldconfig
```

Then clone this repo and run:
```bash
cmake CMakeLists.txt
```

Then you can build any of the [`/testing`](/testing) and [`/other`](/other) by running:
```bash
make name_of_c_file
```
For example, to build [`Messenger_test.c`](/others/Messenger_test.c) you would run:
```bash
make Messenger_test
```

###Windows:

You should install:
  - [MinGW](http://sourceforge.net/projects/mingw/)'s C compiler
  - [CMake](http://www.cmake.org/cmake/resources/software.html)

Then you should either clone this repo by using git, or just download a [zip of current Master branch](https://github.com/irungentoo/ProjectTox-Core/archive/master.zip) and extract it somewhere.

After that you should get precompiled packages of libsodium from [here](https://download.libsodium.org/libsodium/releases/) and extract the archive into this repo's root. That is, `sodium` folder should be along with `core`, `testing` and other folders.

Navigate in `cmd` to this repo and run:
```cmd
cmake -G "MinGW Makefiles" CMakeLists.txt
```

Then you can build any of the [`/testing`](/testing) and [`/other`](/other) by running:
```cmd
mingw32-make name_of_c_file
```
For example, to build [`Messenger_test.c`](/others/Messenger_test.c) you would run:
```cmd
mingw32-make Messenger_test
```