diff options
-rw-r--r-- | INSTALL.md | 91 | ||||
-rw-r--r-- | docs/av_api.md | 16 | ||||
-rw-r--r-- | other/bootstrap_daemon/README.md | 70 |
3 files changed, 70 insertions, 107 deletions
@@ -1,31 +1,29 @@ | |||
1 | #Install Instructions | 1 | # Install Instructions |
2 | 2 | ||
3 | - [Installation](#installation) | 3 | - [Installation](#installation) |
4 | - [Unix like](#unix) | 4 | - [Unix like](#most-unix-like-oses) |
5 | - [Quick install](#quick-install) | 5 | - [Quick install](#quick-install) |
6 | - [Build manually](#build-manually) | 6 | - [Build manually](#build-manually) |
7 | - [Compile toxcore](#compile-toxcore) | 7 | - [Compile toxcore](#compile-toxcore) |
8 | - [OS X](#osx) | 8 | - [OS X](#os-x) |
9 | - [Homebrew](#homebrew) | 9 | - [Homebrew](#homebrew) |
10 | - [Non-Homebrew](#non-homebrew) | 10 | - [Non-Homebrew](#non-homebrew) |
11 | - [Windows](#windows) | 11 | - [Windows](#windows) |
12 | - [Cross-Compile](#windows-cross-compile) | 12 | - [Cross-Compile](#cross-compile) |
13 | - [Setting up a VM](#windows-cross-compile-vm) | 13 | - [Setting up a VM](#setting-up-a-vm) |
14 | - [Setting up the environment](#windows-cross-compile-environment) | 14 | - [Setting up the environment](#setting-up-the-environment) |
15 | - [Compiling](#windows-cross-compile-compiling) | 15 | - [Compiling](#compiling) |
16 | - [Native](#windows-native) | 16 | - [Native](#native) |
17 | - [Additional](#additional) | 17 | - [Additional](#additional) |
18 | - [Advanced configure options](#aconf) | 18 | - [Advanced configure options](#advanced-configure-options) |
19 | - [A/V support](#av) | 19 | - [A/V support](#av-support) |
20 | - [libtoxav](#libtoxav) | 20 | - [libtoxav](#libtoxav) |
21 | - [Bootstrap daemon](#bootstrapd) | 21 | - [Bootstrap daemon](#bootstrap-daemon) |
22 | - [nTox](#ntox) | 22 | - [nTox](#ntox-test-cli) |
23 | 23 | ||
24 | <a name="installation" /> | 24 | ## Installation |
25 | ##Installation | ||
26 | 25 | ||
27 | <a name="unix" /> | 26 | ### Most Unix like OSes: |
28 | ###Most Unix like OSes: | ||
29 | 27 | ||
30 | #### Quick install: | 28 | #### Quick install: |
31 | 29 | ||
@@ -131,17 +129,16 @@ sudo make install | |||
131 | ``` | 129 | ``` |
132 | 130 | ||
133 | 131 | ||
134 | <a name="osx" /> | 132 | ### OS X: |
135 | ###OS X: | ||
136 | 133 | ||
137 | You need the latest XCode with the Developer Tools (Preferences -> Downloads -> Command Line Tools). | 134 | You need the latest XCode with the Developer Tools (Preferences -> Downloads -> Command Line Tools). |
138 | 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. | 135 | 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. |
139 | 136 | ||
140 | **Note: OS X users can also install Toxcore using [osx_build_script_toxcore.sh](other/osx_build_script_toxcore.sh)** | 137 | **Note: OS X users can also install Toxcore using [osx_build_script_toxcore.sh](other/osx_build_script_toxcore.sh)** |
141 | 138 | ||
142 | 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. | 139 | There are no binaries/executables going to /bin/ or /usr/bin/ now. Everything is compiled and ran from the inside your local branch. |
143 | <a name="homebrew" /> | 140 | |
144 | ####Homebrew: | 141 | #### Homebrew: |
145 | To install from the formula: | 142 | To install from the formula: |
146 | ```bash | 143 | ```bash |
147 | brew tap Tox/tox | 144 | brew tap Tox/tox |
@@ -177,8 +174,7 @@ make install | |||
177 | ``` | 174 | ``` |
178 | 175 | ||
179 | 176 | ||
180 | <a name="non-homebrew" /> | 177 | #### Non-homebrew: |
181 | ####Non-homebrew: | ||
182 | 178 | ||
183 | Grab the following packages: | 179 | Grab the following packages: |
184 | * https://gnu.org/software/libtool/ | 180 | * https://gnu.org/software/libtool/ |
@@ -267,17 +263,13 @@ If there is a problem with opus (for A/V) and you don't get a libtoxav, then try | |||
267 | export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig | 263 | export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig |
268 | ``` | 264 | ``` |
269 | 265 | ||
270 | <a name="windows" /> | 266 | ### Windows: |
271 | ###Windows: | ||
272 | |||
273 | <a name="windows-cross-compile" /> | ||
274 | 267 | ||
275 | ####Cross-compile | 268 | #### Cross-compile |
276 | 269 | ||
277 | It's a bit challenging to build Tox and all of its dependencies nativly on Windows, so we will show an easier, less error and headache prone method of building it -- cross-compiling. | 270 | It's a bit challenging to build Tox and all of its dependencies nativly on Windows, so we will show an easier, less error and headache prone method of building it -- cross-compiling. |
278 | 271 | ||
279 | <a name="windows-cross-compile-vm" /> | 272 | ##### Setting up a VM |
280 | #####Setting up a VM | ||
281 | 273 | ||
282 | We will assume that you don't have any VM running Linux around and will guide you from the ground up. | 274 | We will assume that you don't have any VM running Linux around and will guide you from the ground up. |
283 | 275 | ||
@@ -324,8 +316,7 @@ After the system is booted, go to **Devices** -> **Shared Clipboard** and select | |||
324 | 316 | ||
325 | Now that the virtual machine is all set up, let's move to getting build dependencies and setting up environment variables. | 317 | Now that the virtual machine is all set up, let's move to getting build dependencies and setting up environment variables. |
326 | 318 | ||
327 | <a name="windows-cross-compile-environment" /> | 319 | ##### Setting up the environment |
328 | #####Setting up the environment | ||
329 | 320 | ||
330 | First we will install all tools that we would need for building: | 321 | First we will install all tools that we would need for building: |
331 | ```bash | 322 | ```bash |
@@ -365,8 +356,7 @@ mkdir build | |||
365 | cd build | 356 | cd build |
366 | ``` | 357 | ``` |
367 | 358 | ||
368 | <a name="windows-cross-compile-compiling" /> | 359 | ##### Compiling |
369 | #####Compiling | ||
370 | 360 | ||
371 | Now we will build libraries needed for audio/video: VPX and Opus. | 361 | Now we will build libraries needed for audio/video: VPX and Opus. |
372 | 362 | ||
@@ -439,8 +429,7 @@ cp -r ../include/tox /media/sf_toxbuild/release/include | |||
439 | 429 | ||
440 | That's it. Now you should have `release/bin/libtox.dll`, `release/bin/libtox.dll.a` and `release/include/tox/<headers>` in your `toxbuild` directory on the Windows system. | 430 | That's it. Now you should have `release/bin/libtox.dll`, `release/bin/libtox.dll.a` and `release/include/tox/<headers>` in your `toxbuild` directory on the Windows system. |
441 | 431 | ||
442 | <a name="windows-native" /> | 432 | #### Native |
443 | ####Native | ||
444 | 433 | ||
445 | Note that the Native instructions are incomplete, in a sense that they miss instructions needed for adding audio/video support to Tox. You also might stumble upon some unknown MinGW+msys issues while trying to build it. | 434 | Note that the Native instructions are incomplete, in a sense that they miss instructions needed for adding audio/video support to Tox. You also might stumble upon some unknown MinGW+msys issues while trying to build it. |
446 | 435 | ||
@@ -475,21 +464,10 @@ make | |||
475 | make install | 464 | make install |
476 | ``` | 465 | ``` |
477 | 466 | ||
478 | <a name="Clients" /> | ||
479 | ####Clients: | ||
480 | While [Toxic](https://github.com/tox/toxic) is no longer in core, a list of Tox clients are located in our [wiki](https://wiki.tox.chat/doku.php?id=clients) | ||
481 | |||
482 | |||
483 | |||
484 | 467 | ||
468 | ## Additional | ||
485 | 469 | ||
486 | <a name="additional" /> | 470 | ### Advanced configure options: |
487 | ##Additional | ||
488 | |||
489 | |||
490 | |||
491 | <a name="aconf" /> | ||
492 | ###Advanced configure options: | ||
493 | 471 | ||
494 | - --prefix=/where/to/install | 472 | - --prefix=/where/to/install |
495 | - --with-libsodium-headers=/path/to/libsodium/include/ | 473 | - --with-libsodium-headers=/path/to/libsodium/include/ |
@@ -499,17 +477,14 @@ While [Toxic](https://github.com/tox/toxic) is no longer in core, a list of Tox | |||
499 | - --disable-tests build unit tests (default: auto) | 477 | - --disable-tests build unit tests (default: auto) |
500 | - --disable-av disable A/V support (default: auto) see: [libtoxav](#libtoxav) | 478 | - --disable-av disable A/V support (default: auto) see: [libtoxav](#libtoxav) |
501 | - --enable-ntox build nTox client (default: no) see: [nTox](#ntox) | 479 | - --enable-ntox build nTox client (default: no) see: [nTox](#ntox) |
502 | - --enable-daemon build DHT bootstrap daemon (default=no) see: [Bootstrap daemon](#bootstrapd) | 480 | - --enable-daemon build DHT bootstrap daemon (default=no) see: [Bootstrap daemon](#bootstrap-daemon) |
503 | - --enable-dht-bootstrap build DHT bootstrap utility (default=disabled) | 481 | - --enable-dht-bootstrap build DHT bootstrap utility (default=disabled) |
504 | - --enable-shared[=PKGS] build shared libraries [default=yes] | 482 | - --enable-shared[=PKGS] build shared libraries [default=yes] |
505 | - --enable-static[=PKGS] build static libraries [default=yes] | 483 | - --enable-static[=PKGS] build static libraries [default=yes] |
506 | 484 | ||
485 | ### A/V support: | ||
507 | 486 | ||
508 | <a name="av" /> | 487 | #### libtoxav: |
509 | ###A/V support: | ||
510 | |||
511 | <a name="libtoxav" /> | ||
512 | ####libtoxav: | ||
513 | 488 | ||
514 | 'libtoxav' is needed for A/V support and it's enabled by default. You can disable it by adding --disable-av argument to ./configure script like so: | 489 | 'libtoxav' is needed for A/V support and it's enabled by default. You can disable it by adding --disable-av argument to ./configure script like so: |
515 | ```bash | 490 | ```bash |
@@ -555,8 +530,7 @@ sudo make install | |||
555 | cd .. | 530 | cd .. |
556 | ``` | 531 | ``` |
557 | 532 | ||
558 | <a name="bootstrapd" /> | 533 | ### Bootstrap daemon: |
559 | ###Bootstrap daemon: | ||
560 | 534 | ||
561 | Daemon is disabled by default. You can enable it by adding --enable-daemon argument to ./configure script like so: | 535 | Daemon is disabled by default. You can enable it by adding --enable-daemon argument to ./configure script like so: |
562 | ```bash | 536 | ```bash |
@@ -584,8 +558,7 @@ Grab the following [package](http://www.hyperrealm.com/libconfig/), uncompress a | |||
584 | See this [readme](other/bootstrap_daemon/README.md) on how to set up the bootstrap daemon. | 558 | See this [readme](other/bootstrap_daemon/README.md) on how to set up the bootstrap daemon. |
585 | 559 | ||
586 | 560 | ||
587 | <a name="ntox" /> | 561 | ### nTox test cli: |
588 | ###nTox test cli: | ||
589 | 562 | ||
590 | nTox is disabled by default. You can enable it by adding --enable-ntox argument to ./configure script like so: | 563 | nTox is disabled by default. You can enable it by adding --enable-ntox argument to ./configure script like so: |
591 | ```bash | 564 | ```bash |
diff --git a/docs/av_api.md b/docs/av_api.md index 2f536ade..f94b0c5d 100644 --- a/docs/av_api.md +++ b/docs/av_api.md | |||
@@ -1,8 +1,8 @@ | |||
1 | #A/V API reference | 1 | # A/V API reference |
2 | 2 | ||
3 | ##Take toxmsi/phone.c as a reference | 3 | ## Take toxmsi/phone.c as a reference |
4 | 4 | ||
5 | ###Initialization: | 5 | ### Initialization: |
6 | 6 | ||
7 | ``` | 7 | ``` |
8 | phone_t* initPhone(uint16_t _listen_port, uint16_t _send_port); | 8 | phone_t* initPhone(uint16_t _listen_port, uint16_t _send_port); |
@@ -31,7 +31,7 @@ const uint8_t* _user_agent - string describing phone client version. | |||
31 | Return value: | 31 | Return value: |
32 | msi_session_t* - pointer to a newly created msi session handler. | 32 | msi_session_t* - pointer to a newly created msi session handler. |
33 | 33 | ||
34 | ###msi_session_t reference: | 34 | ### msi_session_t reference: |
35 | 35 | ||
36 | How to handle msi session: | 36 | How to handle msi session: |
37 | Controlling is done via callbacks and action handlers. | 37 | Controlling is done via callbacks and action handlers. |
@@ -91,7 +91,7 @@ int msi_reject ( msi_session_t* _session ); | |||
91 | Reject incomming call. | 91 | Reject incomming call. |
92 | 92 | ||
93 | 93 | ||
94 | ###Now for rtp: | 94 | ### Now for rtp: |
95 | 95 | ||
96 | You will need 2 sessions; one for audio one for video. | 96 | You will need 2 sessions; one for audio one for video. |
97 | You start them with: | 97 | You start them with: |
@@ -110,7 +110,7 @@ Return value: | |||
110 | rtp_session_t* - pointer to a newly created rtp session handler. | 110 | rtp_session_t* - pointer to a newly created rtp session handler. |
111 | ``` | 111 | ``` |
112 | 112 | ||
113 | ###How to handle rtp session: | 113 | ### How to handle rtp session: |
114 | Take a look at | 114 | Take a look at |
115 | ``` | 115 | ``` |
116 | void* phone_handle_media_transport_poll ( void* _hmtc_args_p ) in phone.c | 116 | void* phone_handle_media_transport_poll ( void* _hmtc_args_p ) in phone.c |
@@ -139,7 +139,7 @@ int rtp_send_msg ( rtp_session_t* _session, struct rtp_msg_s* _msg, void* _core_ | |||
139 | _core_handler is the same network handler as in msi_session_s struct. | 139 | _core_handler is the same network handler as in msi_session_s struct. |
140 | 140 | ||
141 | 141 | ||
142 | ##A/V initialization: | 142 | ## A/V initialization: |
143 | ``` | 143 | ``` |
144 | int init_receive_audio(codec_state *cs); | 144 | int init_receive_audio(codec_state *cs); |
145 | int init_receive_video(codec_state *cs); | 145 | int init_receive_video(codec_state *cs); |
@@ -157,7 +157,7 @@ The variable bps is the required bitrate in bits per second. | |||
157 | ``` | 157 | ``` |
158 | 158 | ||
159 | 159 | ||
160 | ###A/V encoding/decoding: | 160 | ### A/V encoding/decoding: |
161 | ``` | 161 | ``` |
162 | void *encode_video_thread(void *arg); | 162 | void *encode_video_thread(void *arg); |
163 | ``` | 163 | ``` |
diff --git a/other/bootstrap_daemon/README.md b/other/bootstrap_daemon/README.md index df7e72be..848f9fa1 100644 --- a/other/bootstrap_daemon/README.md +++ b/other/bootstrap_daemon/README.md | |||
@@ -1,29 +1,25 @@ | |||
1 | #Instructions | 1 | # Instructions |
2 | 2 | ||
3 | - [For `systemd` users](#systemd) | 3 | - [For `systemd` users](#for-systemd-users) |
4 | - [Setting up](#systemd-setting-up) | 4 | - [Setting up](#setting-up) |
5 | - [Updating](#systemd-updating) | 5 | - [Updating](#updating) |
6 | - [Troubleshooting](#systemd-troubleshooting) | 6 | - [Troubleshooting](#troubleshooting) |
7 | <br> | 7 | - [For `SysVinit` users](#for-sysvinit-users) |
8 | - [For `SysVinit` users](#sysvinit) | 8 | - [Setting up](#setting-up-1) |
9 | - [Setting up](#sysvinit-setting-up) | 9 | - [Updating](#updating-1) |
10 | - [Updating](#sysvinit-updating) | 10 | - [Troubleshooting](#troubleshooting-1) |
11 | - [Troubleshooting](#sysvinit-troubleshooting) | 11 | - [For `Docker` users](#for-docker-users) |
12 | <br> | 12 | - [Setting up](#setting-up-2) |
13 | - [For `Docker` users](#docker) | 13 | - [Updating](#updating-2) |
14 | - [Setting up](#docker-setting-up) | 14 | - [Troubleshooting](#troubleshooting-2) |
15 | - [Updating](#docker-updating) | ||
16 | - [Troubleshooting](#docker-troubleshooting) | ||
17 | 15 | ||
18 | 16 | ||
19 | These instructions are primarily tested on Debian Linux, Wheezy for SysVinit and Jessie for systemd, but they should work on other POSIX-compliant systems too. | 17 | These instructions are primarily tested on Debian Linux, Wheezy for SysVinit and Jessie for systemd, but they should work on other POSIX-compliant systems too. |
20 | 18 | ||
21 | 19 | ||
22 | <a name="systemd" /> | 20 | ## For `systemd` users |
23 | ##For `systemd` users | ||
24 | 21 | ||
25 | <a name="systemd-setting-up" /> | 22 | ### Setting up |
26 | ###Setting up | ||
27 | 23 | ||
28 | For security reasons we run the daemon under its own user. | 24 | For security reasons we run the daemon under its own user. |
29 | 25 | ||
@@ -68,8 +64,7 @@ Get your public key and check that the daemon initialized correctly: | |||
68 | sudo grep "tox-bootstrapd" /var/log/syslog | 64 | sudo grep "tox-bootstrapd" /var/log/syslog |
69 | ``` | 65 | ``` |
70 | 66 | ||
71 | <a name="systemd-updating" /> | 67 | ### Updating |
72 | ###Updating | ||
73 | 68 | ||
74 | You want to make sure that the daemon uses the newest toxcore, as there might have been some changes done to the DHT, so it's advised to update the daemon at least once every month. | 69 | You want to make sure that the daemon uses the newest toxcore, as there might have been some changes done to the DHT, so it's advised to update the daemon at least once every month. |
75 | 70 | ||
@@ -91,8 +86,8 @@ sudo systemctl start tox-bootstrapd.service | |||
91 | 86 | ||
92 | Note that `tox-bootstrapd.service` file might | 87 | Note that `tox-bootstrapd.service` file might |
93 | 88 | ||
94 | <a name="systemd-troubleshooting" /> | 89 | |
95 | ###Troubleshooting | 90 | ### Troubleshooting |
96 | 91 | ||
97 | - Check daemon's status: | 92 | - Check daemon's status: |
98 | ```sh | 93 | ```sh |
@@ -115,11 +110,11 @@ sudo journalctl -f _SYSTEMD_UNIT=tox-bootstrapd.service | |||
115 | - Make sure tox-bootstrapd location matches its path in tox-bootstrapd.service file. | 110 | - Make sure tox-bootstrapd location matches its path in tox-bootstrapd.service file. |
116 | 111 | ||
117 | 112 | ||
118 | <a name="sysvinit" /> | ||
119 | ##For `SysVinit` users | ||
120 | 113 | ||
121 | <a name="sysvinit-setting-up" /> | 114 | ## For `SysVinit` users |
122 | ###Setting up | 115 | |
116 | |||
117 | ### Setting up | ||
123 | 118 | ||
124 | For security reasons we run the daemon under its own user. | 119 | For security reasons we run the daemon under its own user. |
125 | 120 | ||
@@ -170,8 +165,8 @@ Get your public key and check that the daemon initialized correctly: | |||
170 | sudo grep "tox-bootstrapd" /var/log/syslog | 165 | sudo grep "tox-bootstrapd" /var/log/syslog |
171 | ``` | 166 | ``` |
172 | 167 | ||
173 | <a name="sysvinit-updating" /> | 168 | |
174 | ###Updating | 169 | ### Updating |
175 | 170 | ||
176 | You want to make sure that the daemon uses the newest toxcore, as there might have been some changes done to the DHT, so it's advised to update the daemon at least once every month. | 171 | You want to make sure that the daemon uses the newest toxcore, as there might have been some changes done to the DHT, so it's advised to update the daemon at least once every month. |
177 | 172 | ||
@@ -191,8 +186,7 @@ After all of this is done, simply start the daemon back again: | |||
191 | sudo service tox-bootstrapd start | 186 | sudo service tox-bootstrapd start |
192 | ``` | 187 | ``` |
193 | 188 | ||
194 | <a name="sysvinit-troubleshooting" /> | 189 | ### Troubleshooting |
195 | ###Troubleshooting | ||
196 | 190 | ||
197 | - Check daemon's status: | 191 | - Check daemon's status: |
198 | ```sh | 192 | ```sh |
@@ -213,11 +207,9 @@ sudo grep "tox-bootstrapd" /var/log/syslog | |||
213 | - Make sure tox-bootstrapd location matches its path in the `/etc/init.d/tox-bootstrapd` init script. | 207 | - Make sure tox-bootstrapd location matches its path in the `/etc/init.d/tox-bootstrapd` init script. |
214 | 208 | ||
215 | 209 | ||
216 | <a name="docker" /> | 210 | ## For `Docker` users: |
217 | ##For `Docker` users: | ||
218 | 211 | ||
219 | <a name="docker-setting-up" /> | 212 | ### Setting up |
220 | ###Setting up | ||
221 | 213 | ||
222 | If you are familiar with Docker and would rather run the daemon in a Docker container, run the following from this directory: | 214 | If you are familiar with Docker and would rather run the daemon in a Docker container, run the following from this directory: |
223 | 215 | ||
@@ -239,8 +231,7 @@ sudo docker logs tox-bootstrapd | |||
239 | 231 | ||
240 | Note that the Docker container runs a script which pulls a list of bootstrap nodes off https://nodes.tox.chat/ and adds them in the config file. | 232 | Note that the Docker container runs a script which pulls a list of bootstrap nodes off https://nodes.tox.chat/ and adds them in the config file. |
241 | 233 | ||
242 | <a name="docker-updating" /> | 234 | ### Updating |
243 | ###Updating | ||
244 | 235 | ||
245 | You want to make sure that the daemon uses the newest toxcore, as there might have been some changes done to the DHT, so it's advised to update the daemon at least once every month. | 236 | You want to make sure that the daemon uses the newest toxcore, as there might have been some changes done to the DHT, so it's advised to update the daemon at least once every month. |
246 | 237 | ||
@@ -259,8 +250,7 @@ sudo docker build -t tox-bootstrapd docker/ | |||
259 | sudo docker run -d --name tox-bootstrapd --restart always -v /var/lib/tox-bootstrapd/:/var/lib/tox-bootstrapd/ -p 443:443 -p 3389:3389 -p 33445:33445 -p 33445:33445/udp tox-bootstrapd | 250 | sudo docker run -d --name tox-bootstrapd --restart always -v /var/lib/tox-bootstrapd/:/var/lib/tox-bootstrapd/ -p 443:443 -p 3389:3389 -p 33445:33445 -p 33445:33445/udp tox-bootstrapd |
260 | ``` | 251 | ``` |
261 | 252 | ||
262 | <a name="docker-troubleshooting" /> | 253 | ### Troubleshooting |
263 | ###Troubleshooting | ||
264 | 254 | ||
265 | - Check if the container is running: | 255 | - Check if the container is running: |
266 | ```sh | 256 | ```sh |