mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Ugh
This commit is contained in:
parent
34a5fc8b47
commit
186c852aa6
27
.travis.yml
27
.travis.yml
|
@ -30,21 +30,28 @@ before_script:
|
||||||
- sudo make install > /dev/null
|
- sudo make install > /dev/null
|
||||||
- cd ..
|
- cd ..
|
||||||
#installing libsdl1.2, needed for displaying video frames
|
#installing libsdl1.2, needed for displaying video frames
|
||||||
- wget http://www.libsdl.org/release/SDL-1.2.15.tar.gz > /dev/null
|
#- wget http://www.libsdl.org/release/SDL-1.2.15.tar.gz > /dev/null
|
||||||
- tar -xvzf SDL-1.2.15.tar.gz > /dev/null
|
#- tar -xvzf SDL-1.2.15.tar.gz > /dev/null
|
||||||
- cd SDL-1.2.15
|
#- cd SDL-1.2.15
|
||||||
- ./configure > /dev/null
|
#- ./configure > /dev/null
|
||||||
- make -j3 /dev/null
|
#- make -j3 /dev/null
|
||||||
- sudo make install > /dev/null
|
#- sudo make install > /dev/null
|
||||||
- cd ..
|
#- cd ..
|
||||||
#installing libopenal, needed for audio capture/playback
|
#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
|
#installing yasm, needed for compiling ffmpeg
|
||||||
- sudo apt-get install yasm > /dev/null
|
- sudo apt-get install yasm > /dev/null
|
||||||
#installing ffmpeg, needed for capturing and encoding/decoding video
|
#installing ffmpeg, needed for capturing and encoding/decoding video
|
||||||
- wget https://www.ffmpeg.org/releases/ffmpeg-2.0.2.tar.gz > /dev/null
|
#- wget https://www.ffmpeg.org/releases/ffmpeg-2.0.2.tar.gz > /dev/null
|
||||||
- tar -xvzf ffmpeg-2.0.2.tar.gz > /dev/null
|
#- tar -xvzf ffmpeg-2.0.2.tar.gz > /dev/null
|
||||||
- cd ffmpeg-2.0.2
|
#- 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
|
||||||
- ./configure > /dev/null
|
- ./configure > /dev/null
|
||||||
- make -j3 >/dev/null
|
- make -j3 >/dev/null
|
||||||
- sudo make install > /dev/null
|
- sudo make install > /dev/null
|
||||||
|
|
218
INSTALL.md
218
INSTALL.md
|
@ -7,6 +7,14 @@
|
||||||
- [Non-Homebrew](#non-homebrew)
|
- [Non-Homebrew](#non-homebrew)
|
||||||
- [Windows](#windows)
|
- [Windows](#windows)
|
||||||
|
|
||||||
|
- [Additional](#additional)
|
||||||
|
- [Advance configure] (#aconf)
|
||||||
|
- [A/V support](#av)
|
||||||
|
- [libtoxav] (#libtoxav)
|
||||||
|
- [Test phone] (#phone)
|
||||||
|
- [Bootstrap daemon] (#bootstrapd)
|
||||||
|
- [nTox] (#ntox)
|
||||||
|
|
||||||
<a name="installation" />
|
<a name="installation" />
|
||||||
##Installation
|
##Installation
|
||||||
|
|
||||||
|
@ -20,18 +28,14 @@ Note: package fetching commands may vary by OS.
|
||||||
On Ubuntu:
|
On Ubuntu:
|
||||||
|
|
||||||
```bash
|
```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
|
sudo apt-get install build-essential libtool autotools-dev automake checkinstall check git 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
|
|
||||||
```
|
```
|
||||||
|
|
||||||
On Fedora:
|
On Fedora:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
yum groupinstall "Development Tools"
|
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:
|
On SunOS:
|
||||||
|
@ -73,22 +77,13 @@ make check
|
||||||
sudo make install
|
sudo make install
|
||||||
cd ..
|
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:
|
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
|
echo '/usr/local/lib/' | sudo tee -a /etc/ld.so.conf.d/locallib.conf
|
||||||
sudo ldconfig
|
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:
|
Then clone this repo and generate makefile:
|
||||||
```bash
|
```bash
|
||||||
git clone git://github.com/irungentoo/ProjectTox-Core.git
|
git clone git://github.com/irungentoo/ProjectTox-Core.git
|
||||||
|
@ -98,17 +93,7 @@ autoreconf -i
|
||||||
make
|
make
|
||||||
sudo make install
|
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" />
|
<a name="osx" />
|
||||||
###OS X:
|
###OS X:
|
||||||
|
@ -153,17 +138,6 @@ make
|
||||||
make install
|
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" />
|
<a name="non-homebrew" />
|
||||||
####Non-homebrew:
|
####Non-homebrew:
|
||||||
|
@ -194,17 +168,6 @@ autoreconf -i
|
||||||
make
|
make
|
||||||
make install
|
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
|
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.
|
(or the wrong version gets installed) and make your life more annoying.
|
||||||
|
@ -246,6 +209,23 @@ autoreconf -i
|
||||||
make
|
make
|
||||||
make install
|
make install
|
||||||
```
|
```
|
||||||
|
|
||||||
|
<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" />
|
||||||
|
###Advance configure:
|
||||||
|
|
||||||
Advance configure options:
|
Advance configure options:
|
||||||
- --prefix=/where/to/install
|
- --prefix=/where/to/install
|
||||||
- --with-libsodium-headers=/path/to/libsodium/include/
|
- --with-libsodium-headers=/path/to/libsodium/include/
|
||||||
|
@ -253,11 +233,141 @@ Advance configure options:
|
||||||
- --enable-silent-rules less verbose build output (undo: "make V=1")
|
- --enable-silent-rules less verbose build output (undo: "make V=1")
|
||||||
- --disable-silent-rules verbose build output (undo: "make V=0")
|
- --disable-silent-rules verbose build output (undo: "make V=0")
|
||||||
- --disable-tests build unit tests (default: auto)
|
- --disable-tests build unit tests (default: auto)
|
||||||
- --disable-ntox build nTox client (default: auto)
|
- --disable-av disable A/V support (default: auto) see: [libtoxav](#libtoxav)
|
||||||
- --disable-dht-bootstrap-daemon build DHT bootstrap daemon (default: auto)
|
- --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-shared[=PKGS] build shared libraries [default=yes]
|
||||||
- --enable-static[=PKGS] build static libraries [default=yes]
|
- --enable-static[=PKGS] build static libraries [default=yes]
|
||||||
|
|
||||||
<a name="Clients" />
|
|
||||||
####Clients:
|
<a name="av" />
|
||||||
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/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 ready to compile 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 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 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}"
|
prefix="${ac_default_prefix}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
BUILD_DHT_BOOTSTRAP_DAEMON="yes"
|
BUILD_DHT_BOOTSTRAP_DAEMON="no"
|
||||||
BUILD_NTOX="yes"
|
BUILD_NTOX="no"
|
||||||
BUILD_TESTS="yes"
|
BUILD_TESTS="yes"
|
||||||
BUILD_AV="yes"
|
BUILD_AV="yes"
|
||||||
BUILD_PHONE="yes"
|
BUILD_PHONE="no"
|
||||||
BUILD_TESTING="yes"
|
BUILD_TESTING="yes"
|
||||||
|
|
||||||
NCURSES_FOUND="no"
|
NCURSES_FOUND="no"
|
||||||
|
@ -57,6 +57,17 @@ AC_ARG_ENABLE([nacl],
|
||||||
|
|
||||||
PKG_PROG_PKG_CONFIG
|
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_ARG_ENABLE([av],
|
||||||
[AC_HELP_STRING([--disable-av], [build AV support libraries (default: auto)]) ],
|
[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_ARG_ENABLE([tests],
|
||||||
[AC_HELP_STRING([--disable-tests], [build unit tests (default: auto)]) ],
|
[AC_HELP_STRING([--disable-tests], [build unit tests (default: auto)]) ],
|
||||||
[
|
[
|
||||||
|
@ -92,7 +92,7 @@ AC_ARG_ENABLE([tests],
|
||||||
)
|
)
|
||||||
|
|
||||||
AC_ARG_ENABLE([ntox],
|
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
|
if test "x$enableval" = "xno"; then
|
||||||
BUILD_NTOX="no"
|
BUILD_NTOX="no"
|
||||||
|
@ -102,8 +102,8 @@ AC_ARG_ENABLE([ntox],
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
AC_ARG_ENABLE([dht-bootstrap-daemon],
|
AC_ARG_ENABLE([daemon],
|
||||||
[AC_HELP_STRING([--disable-dht-bootstrap-daemon], [build DHT bootstrap daemon (default: auto)]) ],
|
[AC_HELP_STRING([--enable-daemon], [build DHT bootstrap daemon (default: auto)]) ],
|
||||||
[
|
[
|
||||||
if test "x$enableval" = "xno"; then
|
if test "x$enableval" = "xno"; then
|
||||||
BUILD_DHT_BOOTSTRAP_DAEMON="no"
|
BUILD_DHT_BOOTSTRAP_DAEMON="no"
|
||||||
|
@ -345,6 +345,7 @@ AC_TYPE_UINT64_T
|
||||||
AC_TYPE_UINT8_T
|
AC_TYPE_UINT8_T
|
||||||
AC_C_BIGENDIAN
|
AC_C_BIGENDIAN
|
||||||
|
|
||||||
|
|
||||||
# Checks for library functions.
|
# Checks for library functions.
|
||||||
AC_FUNC_FORK
|
AC_FUNC_FORK
|
||||||
AC_CHECK_FUNCS([gettimeofday memset socket strchr malloc])
|
AC_CHECK_FUNCS([gettimeofday memset socket strchr malloc])
|
||||||
|
@ -430,6 +431,12 @@ if test "x$BUILD_PHONE" = "xyes"; then
|
||||||
)
|
)
|
||||||
fi
|
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
|
if test "x$BUILD_AV" = "xyes"; then
|
||||||
PKG_CHECK_MODULES([OPUS], [opus],
|
PKG_CHECK_MODULES([OPUS], [opus],
|
||||||
[],
|
[],
|
||||||
|
|
Loading…
Reference in New Issue
Block a user