mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Merge pull request #742 from mannol1/master
Updated files with latest changes
This commit is contained in:
commit
bd973152cc
44
.travis.yml
44
.travis.yml
|
@ -14,13 +14,13 @@ before_script:
|
|||
- sudo make install >/dev/null
|
||||
- cd ..
|
||||
#installing libconfig, needed for DHT_bootstrap_daemon
|
||||
- wget http://www.hyperrealm.com/libconfig/libconfig-1.4.9.tar.gz > /dev/null
|
||||
- tar -xvzf libconfig-1.4.9.tar.gz > /dev/null
|
||||
- cd libconfig-1.4.9
|
||||
- ./configure > /dev/null
|
||||
- make -j3 > /dev/null
|
||||
- sudo make install > /dev/null
|
||||
- cd ..
|
||||
#- wget http://www.hyperrealm.com/libconfig/libconfig-1.4.9.tar.gz > /dev/null
|
||||
#- tar -xvzf libconfig-1.4.9.tar.gz > /dev/null
|
||||
#- cd libconfig-1.4.9
|
||||
#- ./configure > /dev/null
|
||||
#- make -j3 > /dev/null
|
||||
#- sudo make install > /dev/null
|
||||
#- cd ..
|
||||
#installing libopus, needed for audio encoding/decoding
|
||||
- wget http://downloads.xiph.org/releases/opus/opus-1.0.3.tar.gz > /dev/null
|
||||
- tar xzvf opus-1.0.3.tar.gz > /dev/null
|
||||
|
@ -30,25 +30,25 @@ before_script:
|
|||
- sudo make install > /dev/null
|
||||
- cd ..
|
||||
#installing libsdl1.2, needed for displaying video frames
|
||||
- wget http://www.libsdl.org/release/SDL-1.2.15.tar.gz > /dev/null
|
||||
- tar -xvzf SDL-1.2.15.tar.gz > /dev/null
|
||||
- cd SDL-1.2.15
|
||||
- ./configure > /dev/null
|
||||
- make -j3 /dev/null
|
||||
- sudo make install > /dev/null
|
||||
- cd ..
|
||||
#- wget http://www.libsdl.org/release/SDL-1.2.15.tar.gz > /dev/null
|
||||
#- tar -xvzf SDL-1.2.15.tar.gz > /dev/null
|
||||
#- cd SDL-1.2.15
|
||||
#- ./configure > /dev/null
|
||||
#- make -j3 /dev/null
|
||||
#- sudo make install > /dev/null
|
||||
#- cd ..
|
||||
#installing libopenal, needed for audio capture/playback
|
||||
- sudo apt-get install libopenal-dev > /dev/null
|
||||
#- sudo apt-get install libopenal-dev > /dev/null
|
||||
#installing yasm, needed for compiling ffmpeg
|
||||
- sudo apt-get install yasm > /dev/null
|
||||
#installing ffmpeg, needed for capturing and encoding/decoding video
|
||||
- wget https://www.ffmpeg.org/releases/ffmpeg-2.0.2.tar.gz > /dev/null
|
||||
- tar -xvzf ffmpeg-2.0.2.tar.gz > /dev/null
|
||||
- cd ffmpeg-2.0.2
|
||||
- ./configure > /dev/null
|
||||
- make -j3 >/dev/null
|
||||
- sudo make install > /dev/null
|
||||
- cd ..
|
||||
#- wget https://www.ffmpeg.org/releases/ffmpeg-2.0.2.tar.gz > /dev/null
|
||||
#- tar -xvzf ffmpeg-2.0.2.tar.gz > /dev/null
|
||||
#- cd ffmpeg-2.0.2
|
||||
#- ./configure > /dev/null
|
||||
#- make -j3 >/dev/null
|
||||
#- sudo make install > /dev/null
|
||||
#- cd ..
|
||||
#installing vpx
|
||||
- git clone http://git.chromium.org/webm/libvpx.git > /dev/null
|
||||
- cd libvpx
|
||||
|
|
226
INSTALL.md
226
INSTALL.md
|
@ -7,6 +7,14 @@
|
|||
- [Non-Homebrew](#non-homebrew)
|
||||
- [Windows](#windows)
|
||||
|
||||
- [Additional](#additional)
|
||||
- [Advanced configure options] (#aconf)
|
||||
- [A/V support](#av)
|
||||
- [libtoxav] (#libtoxav)
|
||||
- [Test phone] (#phone)
|
||||
- [Bootstrap daemon] (#bootstrapd)
|
||||
- [nTox] (#ntox)
|
||||
|
||||
<a name="installation" />
|
||||
##Installation
|
||||
|
||||
|
@ -20,18 +28,14 @@ Note: package fetching commands may vary by OS.
|
|||
On Ubuntu:
|
||||
|
||||
```bash
|
||||
sudo apt-get install build-essential libtool autotools-dev automake libconfig-dev ncurses-dev checkinstall check git libswscale-dev libsdl-dev libopenal-dev libopus-dev libvpx-dev yasm
|
||||
```
|
||||
If you get the "Unable to locate package libopus-dev" message, add the following ppa
|
||||
```bash
|
||||
sudo add-apt-repository ppa:ubuntu-sdk-team/ppa && sudo apt-get update && sudo apt-get dist-upgrade
|
||||
sudo apt-get install build-essential libtool autotools-dev automake checkinstall check git yasm
|
||||
```
|
||||
|
||||
On Fedora:
|
||||
|
||||
```bash
|
||||
yum groupinstall "Development Tools"
|
||||
yum install libtool autoconf automake libconfig-devel ncurses-devel check check-devel
|
||||
yum install libtool autoconf automake check check-devel
|
||||
```
|
||||
|
||||
On SunOS:
|
||||
|
@ -73,22 +77,13 @@ make check
|
|||
sudo make install
|
||||
cd ..
|
||||
```
|
||||
|
||||
If your default prefix is /usr/local and you happen to get an error that says "error while loading shared libraries: libtoxcore.so.0: cannot open shared object file: No such file or directory", then you can try running ```sudo ldconfig```. If that doesn't fix it, run:
|
||||
```
|
||||
echo '/usr/local/lib/' | sudo tee -a /etc/ld.so.conf.d/locallib.conf
|
||||
sudo ldconfig
|
||||
```
|
||||
|
||||
You also need recent [FFmpeg](https://git.videolan.org/?p=ffmpeg.git) libraries:
|
||||
```bash
|
||||
git clone git://source.ffmpeg.org/ffmpeg.git
|
||||
cd ffmpeg
|
||||
git checkout n2.0.2
|
||||
./configure --prefix=`pwd`/install --disable-programs
|
||||
make && make install
|
||||
cd ..
|
||||
```
|
||||
|
||||
Then clone this repo and generate makefile:
|
||||
```bash
|
||||
git clone git://github.com/irungentoo/ProjectTox-Core.git
|
||||
|
@ -98,17 +93,7 @@ autoreconf -i
|
|||
make
|
||||
sudo make install
|
||||
```
|
||||
Advance configure options:
|
||||
- --prefix=/where/to/install
|
||||
- --with-libsodium-headers=/path/to/libsodium/include/
|
||||
- --with-libsodium-libs=/path/to/sodiumtest/lib/
|
||||
- --enable-silent-rules less verbose build output (undo: "make V=1")
|
||||
- --disable-silent-rules verbose build output (undo: "make V=0")
|
||||
- --disable-tests build unit tests (default: auto)
|
||||
- --disable-ntox build nTox client (default: auto)
|
||||
- --disable-dht-bootstrap-daemon build DHT bootstrap daemon (default: auto)
|
||||
- --enable-shared[=PKGS] build shared libraries [default=yes]
|
||||
- --enable-static[=PKGS] build static libraries [default=yes]
|
||||
|
||||
|
||||
<a name="osx" />
|
||||
###OS X:
|
||||
|
@ -153,17 +138,6 @@ make
|
|||
make install
|
||||
```
|
||||
|
||||
Advance configure options:
|
||||
- --prefix=/where/to/install
|
||||
- --with-libsodium-headers=/path/to/libsodium/include/
|
||||
- --with-libsodium-libs=/path/to/sodiumtest/lib/
|
||||
- --enable-silent-rules less verbose build output (undo: "make V=1")
|
||||
- --disable-silent-rules verbose build output (undo: "make V=0")
|
||||
- --disable-tests build unit tests (default: auto)
|
||||
- --disable-ntox build nTox client (default: auto)
|
||||
- --disable-dht-bootstrap-daemon build DHT bootstrap daemon (default: auto)
|
||||
- --enable-shared[=PKGS] build shared libraries [default=yes]
|
||||
- --enable-static[=PKGS] build static libraries [default=yes]
|
||||
|
||||
<a name="non-homebrew" />
|
||||
####Non-homebrew:
|
||||
|
@ -173,7 +147,6 @@ Grab the following packages:
|
|||
* https://gnu.org/software/autoconf/
|
||||
* https://gnu.org/software/automake/
|
||||
* https://github.com/jedisct1/libsodium
|
||||
* http://www.hyperrealm.com/libconfig/
|
||||
* http://check.sourceforge.net/
|
||||
|
||||
Uncompress and install them all. Make sure to follow the README as the instructions change, but they all follow the same pattern below:
|
||||
|
@ -186,7 +159,7 @@ sudo make install
|
|||
|
||||
In your local TOX repository:
|
||||
|
||||
Then generate the makefile:
|
||||
Then generate makefile, build and install tox:
|
||||
```bash
|
||||
cd ProjectTox-Core
|
||||
autoreconf -i
|
||||
|
@ -194,22 +167,11 @@ autoreconf -i
|
|||
make
|
||||
make install
|
||||
```
|
||||
Advance configure options:
|
||||
- --prefix=/where/to/install
|
||||
- --with-libsodium-headers=/path/to/libsodium/include/
|
||||
- --with-libsodium-libs=/path/to/sodiumtest/lib/
|
||||
- --enable-silent-rules less verbose build output (undo: "make V=1")
|
||||
- --disable-silent-rules verbose build output (undo: "make V=0")
|
||||
- --disable-tests build unit tests (default: auto)
|
||||
- --disable-ntox build nTox client (default: auto)
|
||||
- --disable-dht-bootstrap-daemon build DHT bootstrap daemon (default: auto)
|
||||
- --enable-shared[=PKGS] build shared libraries [default=yes]
|
||||
- --enable-static[=PKGS] build static libraries [default=yes]
|
||||
|
||||
Do not install them from macports (or any dependencies for that matter) as they get shoved in the wrong directory
|
||||
(or the wrong version gets installed) and make your life more annoying.
|
||||
|
||||
Another thing you may want to install is the latest gcc, this caused me a few problems as XCode from 4.3
|
||||
Another thing: you may want to install is the latest gcc. This caused me a few problems as XCode from 4.3
|
||||
no longer includes gcc and instead uses LLVM-GCC, a nice install guide can be found at
|
||||
http://caiustheory.com/install-gcc-421-apple-build-56663-with-xcode-42
|
||||
|
||||
|
@ -246,18 +208,166 @@ autoreconf -i
|
|||
make
|
||||
make install
|
||||
```
|
||||
Advance configure options:
|
||||
|
||||
<a name="Clients" />
|
||||
####Clients:
|
||||
While [Toxic](https://github.com/tox/toxic) is no longer in core, a list of Tox clients are located in our [wiki](http://wiki.tox.im/client)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="additional" />
|
||||
##Additional
|
||||
|
||||
|
||||
|
||||
<a name="aconf" />
|
||||
###Advanced configure options:
|
||||
|
||||
- --prefix=/where/to/install
|
||||
- --with-libsodium-headers=/path/to/libsodium/include/
|
||||
- --with-libsodium-libs=/path/to/sodiumtest/lib/
|
||||
- --enable-silent-rules less verbose build output (undo: "make V=1")
|
||||
- --disable-silent-rules verbose build output (undo: "make V=0")
|
||||
- --disable-tests build unit tests (default: auto)
|
||||
- --disable-ntox build nTox client (default: auto)
|
||||
- --disable-dht-bootstrap-daemon build DHT bootstrap daemon (default: auto)
|
||||
- --disable-av disable A/V support (default: auto) see: [libtoxav](#libtoxav)
|
||||
- --enable-phone build phone (default: no) see: [Test phone](#phone)
|
||||
- --enable-ntox build nTox client (default: no) see: [nTox](#ntox)
|
||||
- --enable-daemon build DHT bootstrap daemon (default: no) see: [Bootstrap daemon](#bootstrapd)
|
||||
- --enable-shared[=PKGS] build shared libraries [default=yes]
|
||||
- --enable-static[=PKGS] build static libraries [default=yes]
|
||||
|
||||
<a name="Clients" />
|
||||
####Clients:
|
||||
While [Toxic](https://github.com/tox/toxic) is no longer in core, a list of Tox clients are located in our [wiki](http://wiki.tox.im/client)
|
||||
|
||||
<a name="av" />
|
||||
###A/V support:
|
||||
|
||||
<a name="libtoxav" />
|
||||
####libtoxav:
|
||||
|
||||
'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:
|
||||
```bash
|
||||
./configure --disable-av
|
||||
```
|
||||
|
||||
There are 2 dependencies required for libtoxav: libopus and libvpx. If they are not installed A/V support is dropped.
|
||||
|
||||
Install on fedora:
|
||||
```bash
|
||||
yum install libopus-devel libvpx-devel
|
||||
```
|
||||
|
||||
Install on ubuntu:
|
||||
```bash
|
||||
sudo apt-get install libopus-dev libvpx-dev
|
||||
```
|
||||
If you get the "Unable to locate package libopus-dev" message, add the following ppa and try again:
|
||||
```bash
|
||||
sudo add-apt-repository ppa:ubuntu-sdk-team/ppa && sudo apt-get update && sudo apt-get dist-upgrade
|
||||
```
|
||||
|
||||
Install from source (example for most unix-like OS's):
|
||||
|
||||
libvpx:
|
||||
```bash
|
||||
git clone http://git.chromium.org/webm/libvpx.git
|
||||
cd libvpx
|
||||
./configure
|
||||
make -j3
|
||||
sudo make install
|
||||
cd ..
|
||||
```
|
||||
|
||||
libopus:
|
||||
```bash
|
||||
wget http://downloads.xiph.org/releases/opus/opus-1.0.3.tar.gz
|
||||
tar xvzf opus-1.0.3.tar.gz
|
||||
cd opus-1.0.3
|
||||
./configure
|
||||
make -j3
|
||||
sudo make install
|
||||
cd ..
|
||||
```
|
||||
|
||||
|
||||
<a name="phone" />
|
||||
####Test phone:
|
||||
|
||||
Test phone is disabled by default. You can enable it by adding --enable-phone argument to ./configure script like so:
|
||||
```bash
|
||||
./configure --enable-phone
|
||||
```
|
||||
It can be compiled with or without video capturing enabled. There are 4 dependencies for phone: openal, ffmpeg, sdl and swscale. If any of the later 3 are not installed video support is dropped.
|
||||
|
||||
Install on fedora:
|
||||
```bash
|
||||
yum install libopenal-devel libswscale-devel SDL*
|
||||
```
|
||||
|
||||
Install on ubuntu:
|
||||
```bash
|
||||
sudo apt-get install libopenal-dev libswscale-dev libsdl-dev
|
||||
```
|
||||
|
||||
Now grap recent [FFmpeg](https://git.videolan.org/?p=ffmpeg.git) libraries and install them:
|
||||
```bash
|
||||
git clone git://source.ffmpeg.org/ffmpeg.git
|
||||
cd ffmpeg
|
||||
git checkout n2.0.2
|
||||
./configure --prefix=`pwd`/install --disable-programs
|
||||
make && make install
|
||||
cd ..
|
||||
```
|
||||
|
||||
You are now ready to compile with phone!
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="bootstrapd" />
|
||||
###Bootstrap daemon:
|
||||
|
||||
Daemon is disabled by default. You can enable it by adding --enable-daemon argument to ./configure script like so:
|
||||
```bash
|
||||
./configure --enable-daemon
|
||||
```
|
||||
There is one dependency required for bootstrap daemon: libconfig.
|
||||
|
||||
Install on fedora:
|
||||
```bash
|
||||
yum install libconfig-devel
|
||||
```
|
||||
|
||||
Install on ubuntu:
|
||||
```bash
|
||||
sudo apt-get install libconfig-dev
|
||||
```
|
||||
|
||||
OS X homebrew:
|
||||
```
|
||||
brew install libconfig
|
||||
```
|
||||
OS X non-homebrew:
|
||||
Grab the following [package] (http://www.hyperrealm.com/libconfig/), uncompress and install
|
||||
|
||||
|
||||
|
||||
<a name="ntox" />
|
||||
###nTox test cli:
|
||||
|
||||
nTox is disabled by default. You can enable it by adding --enable-ntox argument to ./configure script like so:
|
||||
```bash
|
||||
./configure --enable-ntox
|
||||
```
|
||||
There is one dependency required for nTox: libncurses.
|
||||
|
||||
Install on fedora:
|
||||
```bash
|
||||
yum install ncurses-devel
|
||||
```
|
||||
|
||||
Install on ubuntu:
|
||||
```bash
|
||||
sudo apt-get install ncurses-dev
|
||||
```
|
||||
|
||||
|
|
41
configure.ac
41
configure.ac
|
@ -32,11 +32,11 @@ if test "x${prefix}" = "xNONE"; then
|
|||
prefix="${ac_default_prefix}"
|
||||
fi
|
||||
|
||||
BUILD_DHT_BOOTSTRAP_DAEMON="yes"
|
||||
BUILD_NTOX="yes"
|
||||
BUILD_DHT_BOOTSTRAP_DAEMON="no"
|
||||
BUILD_NTOX="no"
|
||||
BUILD_TESTS="yes"
|
||||
BUILD_AV="yes"
|
||||
BUILD_PHONE="yes"
|
||||
BUILD_PHONE="no"
|
||||
BUILD_TESTING="yes"
|
||||
|
||||
NCURSES_FOUND="no"
|
||||
|
@ -57,6 +57,17 @@ AC_ARG_ENABLE([nacl],
|
|||
|
||||
PKG_PROG_PKG_CONFIG
|
||||
|
||||
AC_ARG_ENABLE([phone],
|
||||
[AC_HELP_STRING([--enable-phone], [build test phone (default: auto)]) ],
|
||||
[
|
||||
if test "x$enableval" = "xno"; then
|
||||
BUILD_PHONE="no"
|
||||
elif test "x$enableval" = "xyes"; then
|
||||
BUILD_PHONE="yes"
|
||||
fi
|
||||
]
|
||||
)
|
||||
|
||||
AC_ARG_ENABLE([av],
|
||||
[AC_HELP_STRING([--disable-av], [build AV support libraries (default: auto)]) ],
|
||||
[
|
||||
|
@ -69,17 +80,6 @@ AC_ARG_ENABLE([av],
|
|||
]
|
||||
)
|
||||
|
||||
AC_ARG_ENABLE([phone],
|
||||
[AC_HELP_STRING([--disable-phone], [build test phone (default: auto)]) ],
|
||||
[
|
||||
if test "x$enableval" = "xno"; then
|
||||
BUILD_PHONE="no"
|
||||
elif test "x$enableval" = "xyes"; then
|
||||
BUILD_PHONE="yes"
|
||||
fi
|
||||
]
|
||||
)
|
||||
|
||||
AC_ARG_ENABLE([tests],
|
||||
[AC_HELP_STRING([--disable-tests], [build unit tests (default: auto)]) ],
|
||||
[
|
||||
|
@ -92,7 +92,7 @@ AC_ARG_ENABLE([tests],
|
|||
)
|
||||
|
||||
AC_ARG_ENABLE([ntox],
|
||||
[AC_HELP_STRING([--disable-ntox], [build nTox client (default: auto)]) ],
|
||||
[AC_HELP_STRING([--enable-ntox], [build nTox client (default: auto)]) ],
|
||||
[
|
||||
if test "x$enableval" = "xno"; then
|
||||
BUILD_NTOX="no"
|
||||
|
@ -102,8 +102,8 @@ AC_ARG_ENABLE([ntox],
|
|||
]
|
||||
)
|
||||
|
||||
AC_ARG_ENABLE([dht-bootstrap-daemon],
|
||||
[AC_HELP_STRING([--disable-dht-bootstrap-daemon], [build DHT bootstrap daemon (default: auto)]) ],
|
||||
AC_ARG_ENABLE([daemon],
|
||||
[AC_HELP_STRING([--enable-daemon], [build DHT bootstrap daemon (default: auto)]) ],
|
||||
[
|
||||
if test "x$enableval" = "xno"; then
|
||||
BUILD_DHT_BOOTSTRAP_DAEMON="no"
|
||||
|
@ -345,6 +345,7 @@ AC_TYPE_UINT64_T
|
|||
AC_TYPE_UINT8_T
|
||||
AC_C_BIGENDIAN
|
||||
|
||||
|
||||
# Checks for library functions.
|
||||
AC_FUNC_FORK
|
||||
AC_CHECK_FUNCS([gettimeofday memset socket strchr malloc])
|
||||
|
@ -430,6 +431,12 @@ if test "x$BUILD_PHONE" = "xyes"; then
|
|||
)
|
||||
fi
|
||||
|
||||
#If all dependencies are here add support video define for phone.c
|
||||
if test "x$BUILD_PHONE" == "xyes"; then
|
||||
#Set FFMpeg define
|
||||
AC_DEFINE([TOX_FFMPEG], [1], [Support video])
|
||||
fi
|
||||
|
||||
if test "x$BUILD_AV" = "xyes"; then
|
||||
PKG_CHECK_MODULES([OPUS], [opus],
|
||||
[],
|
||||
|
|
Loading…
Reference in New Issue
Block a user