diff options
-rw-r--r-- | INSTALL.md | 109 |
1 files changed, 57 insertions, 52 deletions
@@ -16,14 +16,14 @@ | |||
16 | Build dependencies: | 16 | Build dependencies: |
17 | 17 | ||
18 | ```bash | 18 | ```bash |
19 | apt-get install build-essential libtool autotools-dev automake libconfig-dev ncurses-dev cmake checkinstall check | 19 | apt-get install build-essential libtool autotools-dev automake libconfig-dev ncurses-dev checkinstall check |
20 | ``` | 20 | ``` |
21 | 21 | ||
22 | On Fedora: | 22 | On Fedora: |
23 | 23 | ||
24 | ```bash | 24 | ```bash |
25 | yum groupinstall "Development Tools" | 25 | yum groupinstall "Development Tools" |
26 | yum install libtool autoconf automake libconfig-devel ncurses-devel cmake check check-devel | 26 | yum install libtool autoconf automake libconfig-devel ncurses-devel check check-devel |
27 | ``` | 27 | ``` |
28 | 28 | ||
29 | Note that `libconfig-dev` should be >= 1.4. | 29 | Note that `libconfig-dev` should be >= 1.4. |
@@ -59,28 +59,18 @@ Then clone this repo and generate makefile: | |||
59 | ```bash | 59 | ```bash |
60 | git clone git://github.com/irungentoo/ProjectTox-Core.git | 60 | git clone git://github.com/irungentoo/ProjectTox-Core.git |
61 | cd ProjectTox-Core | 61 | cd ProjectTox-Core |
62 | mkdir build && cd build | 62 | autoreconf -i |
63 | cmake .. | 63 | ./configure |
64 | ``` | ||
65 | Advance cmake options: | ||
66 | - `-DUSE_NACL=ON` (default `OFF`) � Use NaCl library instead of libsodium. | ||
67 | |||
68 | Note that you should call cmake on the root [`CMakeLists.txt`](/CMakeLists.txt) file only. | ||
69 | |||
70 | Then you can build any of the [`/testing`](/testing) and [`/other`](/other) that are currently supported on your platform by running: | ||
71 | ```bash | ||
72 | make name_of_c_file | ||
73 | ``` | ||
74 | For example, to build [`Messenger_test.c`](/others/Messenger_test.c) you would run: | ||
75 | ```bash | ||
76 | make Messenger_test | ||
77 | ``` | ||
78 | |||
79 | Or you could just build everything that is supported on your platform by running: | ||
80 | ```bash | ||
81 | make | 64 | make |
82 | ``` | 65 | make install |
83 | 66 | ``` | |
67 | Advance configure options: | ||
68 | - --prefix=/where/to/install | ||
69 | - --with-libsodium-headers=/path/to/libsodium/include/ | ||
70 | - --with-libsodium-libs=/path/to/sodiumtest/lib/ | ||
71 | - --BUILD_DHT_BOOTSTRAP_DAEMON="yes" | ||
72 | - --BUILD_NTOX="yes" | ||
73 | - --BUILD_TESTS="yes" | ||
84 | <a name="osx" /> | 74 | <a name="osx" /> |
85 | ###OS X: | 75 | ###OS X: |
86 | 76 | ||
@@ -88,14 +78,27 @@ You need the latest XCode with the Developer Tools (Preferences -> Downloads -> | |||
88 | The following libraries are required along with libsodium and cmake for Mountain Lion and XCode 4.6.3 install libtool, automake and autoconf. You can download them with Homebrew, or install them manually. | 78 | The following libraries are required along with libsodium and cmake for Mountain Lion and XCode 4.6.3 install libtool, automake and autoconf. You can download them with Homebrew, or install them manually. |
89 | 79 | ||
90 | There are no binaries/executables going to /bin/ or /usr/bin/ now. Everything is compiled and ran from the inside your local branch. See [Usage](#usage) below. | 80 | There are no binaries/executables going to /bin/ or /usr/bin/ now. Everything is compiled and ran from the inside your local branch. See [Usage](#usage) below. |
91 | |||
92 | <a name="homebrew" /> | 81 | <a name="homebrew" /> |
93 | ####Homebrew: | 82 | ####Homebrew: |
94 | ``` | 83 | ``` |
95 | brew install libtool automake autoconf libconfig libsodium cmake check | 84 | brew install libtool automake autoconf libconfig libsodium check |
96 | cmake . | 85 | ``` |
86 | Then clone this repo and generate makefile: | ||
87 | ```bash | ||
88 | git clone git://github.com/irungentoo/ProjectTox-Core.git | ||
89 | cd ProjectTox-Core | ||
90 | autoreconf -i | ||
91 | ./configure | ||
97 | make | 92 | make |
93 | make install | ||
98 | ``` | 94 | ``` |
95 | Advance configure options: | ||
96 | - --prefix=/where/to/install | ||
97 | - --with-libsodium-headers=/path/to/libsodium/include/ | ||
98 | - --with-libsodium-libs=/path/to/sodiumtest/lib/ | ||
99 | - --BUILD_DHT_BOOTSTRAP_DAEMON="yes" | ||
100 | - --BUILD_NTOX="yes" | ||
101 | - --BUILD_TESTS="yes" | ||
99 | 102 | ||
100 | <a name="non-homebrew" /> | 103 | <a name="non-homebrew" /> |
101 | ####Non-homebrew: | 104 | ####Non-homebrew: |
@@ -119,10 +122,22 @@ sudo make install | |||
119 | 122 | ||
120 | In your local TOX repository: | 123 | In your local TOX repository: |
121 | 124 | ||
125 | Then generate the makefile: | ||
122 | ```bash | 126 | ```bash |
123 | cmake . | 127 | cd ProjectTox-Core |
128 | autoreconf -i | ||
129 | ./configure | ||
124 | make | 130 | make |
131 | make install | ||
125 | ``` | 132 | ``` |
133 | Advance configure options: | ||
134 | - --prefix=/where/to/install | ||
135 | - --with-libsodium-headers=/path/to/libsodium/include/ | ||
136 | - --with-libsodium-libs=/path/to/sodiumtest/lib/ | ||
137 | - --BUILD_DHT_BOOTSTRAP_DAEMON="yes" | ||
138 | - --BUILD_NTOX="yes" | ||
139 | - --BUILD_TESTS="yes" | ||
140 | |||
126 | 141 | ||
127 | Do not install them from macports (or any dependencies for that matter) as they get shoved in the wrong directory | 142 | Do not install them from macports (or any dependencies for that matter) as they get shoved in the wrong directory |
128 | (or the wrong version gets installed) and make your life more annoying. | 143 | (or the wrong version gets installed) and make your life more annoying. |
@@ -136,7 +151,6 @@ http://caiustheory.com/install-gcc-421-apple-build-56663-with-xcode-42 | |||
136 | 151 | ||
137 | You should install: | 152 | You should install: |
138 | - [MinGW](http://sourceforge.net/projects/mingw/)'s C compiler | 153 | - [MinGW](http://sourceforge.net/projects/mingw/)'s C compiler |
139 | - [CMake](http://www.cmake.org/cmake/resources/software.html) | ||
140 | - [check] (http://check.sourceforge.net/) | 154 | - [check] (http://check.sourceforge.net/) |
141 | 155 | ||
142 | You have to [modify your PATH environment variable](http://www.computerhope.com/issues/ch000549.htm) so that it contains MinGW's bin folder path. With default settings, the bin folder is located at `C:\MinGW\bin`, which means that you would have to append `;C:\MinGW\bin` to the PATH variable. | 156 | You have to [modify your PATH environment variable](http://www.computerhope.com/issues/ch000549.htm) so that it contains MinGW's bin folder path. With default settings, the bin folder is located at `C:\MinGW\bin`, which means that you would have to append `;C:\MinGW\bin` to the PATH variable. |
@@ -145,28 +159,19 @@ Then you should either clone this repo by using git, or just download a [zip of | |||
145 | 159 | ||
146 | After that you should get precompiled package of libsodium from [here](https://download.libsodium.org/libsodium/releases/libsodium-win32-0.4.2.tar.gz) and extract the archive into this repo's root. That is, `sodium` folder should be along with `core`, `testing` and other folders. | 160 | After that you should get precompiled package of libsodium from [here](https://download.libsodium.org/libsodium/releases/libsodium-win32-0.4.2.tar.gz) and extract the archive into this repo's root. That is, `sodium` folder should be along with `core`, `testing` and other folders. |
147 | 161 | ||
148 | Navigate in `cmd` to this repo and run: | 162 | Then clone this repo and generate makefile: |
149 | ```cmd | ||
150 | mkdir build && cd build | ||
151 | cmake -G "MinGW Makefiles" .. | ||
152 | ``` | ||
153 | Advance cmake options: | ||
154 | - `-DSHARED_TOXCORE=ON` (default OFF) � Build Core as a shared library. | ||
155 | - `-DSHARED_LIBSODIUM=ON` (default OFF) � Link libsodium as a shared library. | ||
156 | |||
157 | Note that you should call cmake on the root [`CMakeLists.txt`](/CMakeLists.txt) file only. | ||
158 | |||
159 | Then you can build any of the [`/testing`](/testing) and [`/other`](/other) that are currently supported on your platform by running: | ||
160 | ```cmd | ||
161 | mingw32-make name_of_c_file | ||
162 | ``` | ||
163 | For example, to build [`Messenger_test.c`](/others/Messenger_test.c) you would run: | ||
164 | ```cmd | 163 | ```cmd |
165 | mingw32-make Messenger_test | 164 | git clone git://github.com/irungentoo/ProjectTox-Core.git |
166 | ``` | 165 | cd ProjectTox-Core |
167 | 166 | autoreconf -i | |
168 | Or you could just build everything that is supported on your platform by running: | 167 | ./configure |
169 | ```bash | 168 | make |
170 | mingw32-make | 169 | make install |
171 | ``` | 170 | ``` |
172 | 171 | Advance configure options: | |
172 | - --prefix=/where/to/install | ||
173 | - --with-libsodium-headers=/path/to/libsodium/include/ | ||
174 | - --with-libsodium-libs=/path/to/sodiumtest/lib/ | ||
175 | - --BUILD_DHT_BOOTSTRAP_DAEMON="yes" | ||
176 | - --BUILD_NTOX="yes" | ||
177 | - --BUILD_TESTS="yes" | ||