From 186c852aa646367e3965729333288f33f6146da7 Mon Sep 17 00:00:00 2001 From: mannol Date: Tue, 18 Feb 2014 00:35:26 +0100 Subject: Ugh --- .travis.yml | 27 +++++--- INSTALL.md | 218 ++++++++++++++++++++++++++++++++++++++++++++--------------- configure.ac | 33 +++++---- 3 files changed, 201 insertions(+), 77 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9d175564..bd5f6a59 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,21 +30,28 @@ 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 #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 + #- 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 - ./configure > /dev/null - make -j3 >/dev/null - sudo make install > /dev/null diff --git a/INSTALL.md b/INSTALL.md index e82fe5bf..387b83a1 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -7,6 +7,14 @@ - [Non-Homebrew](#non-homebrew) - [Windows](#windows) +- [Additional](#additional) + - [Advance configure] (#aconf) + - [A/V support](#av) + - [libtoxav] (#libtoxav) + - [Test phone] (#phone) + - [Bootstrap daemon] (#bootstrapd) + - [nTox] (#ntox) + ##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] + ###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] ####Non-homebrew: @@ -194,17 +168,6 @@ 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. @@ -246,6 +209,23 @@ autoreconf -i make make install ``` + + +####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) + + + + + + +##Additional + + + + +###Advance configure: + Advance configure options: - --prefix=/where/to/install - --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") - --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] - -####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/V support: + + +####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 .. +``` + + + +####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! + + + + + +###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 + + + + +###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 +``` + diff --git a/configure.ac b/configure.ac index 2b4fad78..066c919a 100644 --- a/configure.ac +++ b/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,25 +57,25 @@ AC_ARG_ENABLE([nacl], PKG_PROG_PKG_CONFIG -AC_ARG_ENABLE([av], - [AC_HELP_STRING([--disable-av], [build AV support libraries (default: auto)]) ], +AC_ARG_ENABLE([phone], + [AC_HELP_STRING([--enable-phone], [build test phone (default: auto)]) ], [ if test "x$enableval" = "xno"; then - BUILD_AV="no" BUILD_PHONE="no" elif test "x$enableval" = "xyes"; then - BUILD_AV="yes" + BUILD_PHONE="yes" fi ] ) -AC_ARG_ENABLE([phone], - [AC_HELP_STRING([--disable-phone], [build test phone (default: auto)]) ], +AC_ARG_ENABLE([av], + [AC_HELP_STRING([--disable-av], [build AV support libraries (default: auto)]) ], [ if test "x$enableval" = "xno"; then + BUILD_AV="no" BUILD_PHONE="no" elif test "x$enableval" = "xyes"; then - BUILD_PHONE="yes" + BUILD_AV="yes" fi ] ) @@ -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], [], -- cgit v1.2.3 From 63ad1cb4222606643cdeddef207dbd3e8f41b63f Mon Sep 17 00:00:00 2001 From: mannol Date: Tue, 18 Feb 2014 21:51:27 +0100 Subject: Fixed some stuff --- INSTALL.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 387b83a1..e7902149 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -8,7 +8,7 @@ - [Windows](#windows) - [Additional](#additional) - - [Advance configure] (#aconf) + - [Advanced configure options] (#aconf) - [A/V support](#av) - [libtoxav] (#libtoxav) - [Test phone] (#phone) @@ -147,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: @@ -160,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 @@ -172,7 +171,7 @@ make install 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 @@ -224,9 +223,8 @@ While [Toxic](https://github.com/tox/toxic) is no longer in core, a list of Tox -###Advance configure: +###Advanced configure options: -Advance configure options: - --prefix=/where/to/install - --with-libsodium-headers=/path/to/libsodium/include/ - --with-libsodium-libs=/path/to/sodiumtest/lib/ @@ -251,6 +249,7 @@ Advance configure options: ```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: @@ -278,6 +277,7 @@ make -j3 sudo make install cd .. ``` + libopus: ```bash wget http://downloads.xiph.org/releases/opus/opus-1.0.3.tar.gz @@ -319,7 +319,7 @@ make && make install cd .. ``` -You are ready to compile phone! +You are now ready to compile with phone! @@ -331,7 +331,7 @@ Daemon is disabled by default. You can enable it by adding --enable-daemon argum ```bash ./configure --enable-daemon ``` -There dependency required for bootstrap daemon: libconfig. +There is one dependency required for bootstrap daemon: libconfig. Install on fedora: ```bash @@ -359,7 +359,7 @@ nTox is disabled by default. You can enable it by adding --enable-ntox argument ```bash ./configure --enable-ntox ``` -There dependency required for nTox: libncurses. +There is one dependency required for nTox: libncurses. Install on fedora: ```bash -- cgit v1.2.3 From b267a36519123948aa530741947ec7d58745f594 Mon Sep 17 00:00:00 2001 From: mannol Date: Tue, 18 Feb 2014 22:05:48 +0100 Subject: No need for libconfig in travis --- .travis.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index bd5f6a59..a06b6b5d 100644 --- a/.travis.yml +++ b/.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 @@ -38,7 +38,7 @@ before_script: #- 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 -- cgit v1.2.3 From 7395bacd889bd29b2e1a7a8f806ed2a1fa2a336e Mon Sep 17 00:00:00 2001 From: mannol Date: Tue, 18 Feb 2014 22:07:18 +0100 Subject: Stupid mistake --- .travis.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index a06b6b5d..b79c8ede 100644 --- a/.travis.yml +++ b/.travis.yml @@ -56,13 +56,6 @@ before_script: - 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 - - make -j3 >/dev/null - - sudo make install > /dev/null - - cd .. #creating libraries links and updating cache - sudo ldconfig > /dev/null #installing check, needed for unit tests -- cgit v1.2.3