From aedf85c96514c58c6067de5884801e38f31d9693 Mon Sep 17 00:00:00 2001 From: John Preston Date: Thu, 4 May 2017 14:15:21 +0300 Subject: [PATCH] Update opus library to v1.2-alpha2 version. --- Telegram/gyp/telegram_mac.gypi | 3 ++- Telegram/gyp/telegram_win.gypi | 29 +++++++++++++---------------- docs/building-cmake.md | 14 +++++++++----- docs/building-msvc.md | 5 +++-- docs/building-qtcreator.md | 8 ++++++-- docs/building-xcode-old.md | 20 ++++++-------------- docs/building-xcode.md | 32 +++++++------------------------- 7 files changed, 46 insertions(+), 65 deletions(-) diff --git a/Telegram/gyp/telegram_mac.gypi b/Telegram/gyp/telegram_mac.gypi index aae416834..c3bce7f5f 100644 --- a/Telegram/gyp/telegram_mac.gypi +++ b/Telegram/gyp/telegram_mac.gypi @@ -31,7 +31,6 @@ '-lssl', '-lcrypto', '/usr/local/lib/liblzma.a', - '/usr/local/lib/libopus.a', ], }, 'include_dirs': [ @@ -68,6 +67,7 @@ '-lcrashpad_client', '-lcrashpad_util', '/usr/local/macold/lib/libz.a', + '/usr/local/macold/lib/libopus.a', '/usr/local/macold/lib/libopenal.a', '/usr/local/macold/lib/libiconv.a', '/usr/local/macold/lib/libavcodec.a', @@ -131,6 +131,7 @@ 'xcode_settings': { 'OTHER_LDFLAGS': [ '/usr/local/lib/libz.a', + '/usr/local/lib/libopus.a', '/usr/local/lib/libopenal.a', '/usr/local/lib/libiconv.a', '/usr/local/lib/libavcodec.a', diff --git a/Telegram/gyp/telegram_win.gypi b/Telegram/gyp/telegram_win.gypi index 23ffd5400..95b81cd1d 100644 --- a/Telegram/gyp/telegram_win.gypi +++ b/Telegram/gyp/telegram_win.gypi @@ -29,20 +29,17 @@ '<(libs_loc)/ffmpeg', ], 'libraries': [ - 'libeay32', - 'ssleay32', - 'Crypt32', - 'zlibstat', - 'LzmaLib', - 'UxTheme', - 'DbgHelp', - 'lib_exif', - 'OpenAL32', - 'common', - 'opus', - 'celt', - 'silk_common', - 'silk_float', + '-llibeay32', + '-lssleay32', + '-lCrypt32', + '-lzlibstat', + '-lLzmaLib', + '-lUxTheme', + '-lDbgHelp', + '-llib_exif', + '-lOpenAL32', + '-lcommon', + '-lopus', 'lib/common', 'lib/exception_handler', 'lib/crash_generation_client', @@ -67,7 +64,7 @@ '<(libs_loc)/openssl_debug/Debug/lib', '<(libs_loc)/lzma/C/Util/LzmaLib/Debug', '<(libs_loc)/libexif-0.6.20/win32/Debug', - '<(libs_loc)/opus/win32/VS2010/Win32/Debug', + '<(libs_loc)/opus/win32/VS2015/Win32/Debug', '<(libs_loc)/openal-soft/build/Debug', '<(libs_loc)/zlib-1.2.8/contrib/vstudio/vc11/x86/ZlibStatDebug', '<(libs_loc)/breakpad/src/client/windows/Debug', @@ -81,7 +78,7 @@ '<(libs_loc)/openssl/Release/lib', '<(libs_loc)/lzma/C/Util/LzmaLib/Release', '<(libs_loc)/libexif-0.6.20/win32/Release', - '<(libs_loc)/opus/win32/VS2010/Win32/Release', + '<(libs_loc)/opus/win32/VS2015/Win32/Release', '<(libs_loc)/openal-soft/build/Release', '<(libs_loc)/zlib-1.2.8/contrib/vstudio/vc11/x86/ZlibStatRelease', '<(libs_loc)/breakpad/src/client/windows/Release', diff --git a/docs/building-cmake.md b/docs/building-cmake.md index cd5e993d8..14b22935d 100644 --- a/docs/building-cmake.md +++ b/docs/building-cmake.md @@ -39,16 +39,20 @@ Extract to **/home/user/TBuild/Libraries** In Terminal go to **/home/user/TBuild/Libraries/zlib-1.2.8** and run: - ./configure - make - sudo make install + ./configure + make + sudo make install Install audio libraries -#### Opus codec 1.1 +#### Opus codec -Download [opus-1.1 sources](http://downloads.xiph.org/releases/opus/opus-1.1.tar.gz) from http://www.opus-codec.org/downloads, extract to **/home/user/TBuild/Libraries**, go to **/home/user/TBuild/Libraries/opus-1.1** and run +In Terminal go to **/home/user/TBuild/Libraries** and run + git clone https://github.com/xiph/opus + cd opus + git checkout v1.2-alpha2 + ./autogen.sh ./configure make sudo make install diff --git a/docs/building-msvc.md b/docs/building-msvc.md index ee1d6229c..db0ea2622 100644 --- a/docs/building-msvc.md +++ b/docs/building-msvc.md @@ -149,10 +149,11 @@ Go to **D:\\TBuild\\Libraries** and run Go to **D:\\TBuild\\Libraries** and run git clone https://github.com/telegramdesktop/opus.git + git checkout ffmpeg_fix #### Building libraries -* Open in VS2015 **D:\\TBuild\\Libraries\\opus\\win32\\VS2010\\opus.sln** +* Open in VS2015 **D:\\TBuild\\Libraries\\opus\\win32\\VS2015\\opus.sln** * Build Debug configuration * Build Release configuration (it will be required in **FFmpeg** build!) @@ -183,7 +184,7 @@ While still running the VS2015 x86 Native Tools Command Prompt, go to **D:\\msys PKG_CONFIG_PATH="/mingw64/lib/pkgconfig:$PKG_CONFIG_PATH" - ./configure --toolchain=msvc --disable-programs --disable-doc --disable-everything --enable-protocol=file --enable-libopus --enable-decoder=aac --enable-decoder=aac_latm --enable-decoder=aasc --enable-decoder=flac --enable-decoder=gif --enable-decoder=h264 --enable-decoder=mp1 --enable-decoder=mp1float --enable-decoder=mp2 --enable-decoder=mp2float --enable-decoder=mp3 --enable-decoder=mp3adu --enable-decoder=mp3adufloat --enable-decoder=mp3float --enable-decoder=mp3on4 --enable-decoder=mp3on4float --enable-decoder=mpeg4 --enable-decoder=msmpeg4v2 --enable-decoder=msmpeg4v3 --enable-decoder=wavpack --enable-decoder=opus --enable-decoder=pcm_alaw --enable-decoder=pcm_alaw_at --enable-decoder=pcm_f32be --enable-decoder=pcm_f32le --enable-decoder=pcm_f64be --enable-decoder=pcm_f64le --enable-decoder=pcm_lxf --enable-decoder=pcm_mulaw --enable-decoder=pcm_mulaw_at --enable-decoder=pcm_s16be --enable-decoder=pcm_s16be_planar --enable-decoder=pcm_s16le --enable-decoder=pcm_s16le_planar --enable-decoder=pcm_s24be --enable-decoder=pcm_s24daud --enable-decoder=pcm_s24le --enable-decoder=pcm_s24le_planar --enable-decoder=pcm_s32be --enable-decoder=pcm_s32le --enable-decoder=pcm_s32le_planar --enable-decoder=pcm_s64be --enable-decoder=pcm_s64le --enable-decoder=pcm_s8 --enable-decoder=pcm_s8_planar --enable-decoder=pcm_u16be --enable-decoder=pcm_u16le --enable-decoder=pcm_u24be --enable-decoder=pcm_u24le --enable-decoder=pcm_u32be --enable-decoder=pcm_u32le --enable-decoder=pcm_u8 --enable-decoder=pcm_zork --enable-decoder=vorbis --enable-decoder=wmalossless --enable-decoder=wmapro --enable-decoder=wmav1 --enable-decoder=wmav2 --enable-decoder=wmavoice --enable-encoder=libopus --enable-hwaccel=h264_d3d11va --enable-hwaccel=h264_dxva2 --enable-parser=aac --enable-parser=aac_latm --enable-parser=flac --enable-parser=h264 --enable-parser=mpeg4video --enable-parser=mpegaudio --enable-parser=opus --enable-parser=vorbis --enable-demuxer=aac --enable-demuxer=flac --enable-demuxer=gif --enable-demuxer=h264 --enable-demuxer=mov --enable-demuxer=mp3 --enable-demuxer=ogg --enable-demuxer=wav --enable-muxer=ogg --enable-muxer=opus --extra-ldflags="-libpath:/d/TBuild/Libraries/opus/win32/VS2010/Win32/Release celt.lib silk_common.lib silk_float.lib" + ./configure --toolchain=msvc --disable-programs --disable-doc --disable-everything --enable-protocol=file --enable-libopus --enable-decoder=aac --enable-decoder=aac_latm --enable-decoder=aasc --enable-decoder=flac --enable-decoder=gif --enable-decoder=h264 --enable-decoder=mp1 --enable-decoder=mp1float --enable-decoder=mp2 --enable-decoder=mp2float --enable-decoder=mp3 --enable-decoder=mp3adu --enable-decoder=mp3adufloat --enable-decoder=mp3float --enable-decoder=mp3on4 --enable-decoder=mp3on4float --enable-decoder=mpeg4 --enable-decoder=msmpeg4v2 --enable-decoder=msmpeg4v3 --enable-decoder=wavpack --enable-decoder=opus --enable-decoder=pcm_alaw --enable-decoder=pcm_alaw_at --enable-decoder=pcm_f32be --enable-decoder=pcm_f32le --enable-decoder=pcm_f64be --enable-decoder=pcm_f64le --enable-decoder=pcm_lxf --enable-decoder=pcm_mulaw --enable-decoder=pcm_mulaw_at --enable-decoder=pcm_s16be --enable-decoder=pcm_s16be_planar --enable-decoder=pcm_s16le --enable-decoder=pcm_s16le_planar --enable-decoder=pcm_s24be --enable-decoder=pcm_s24daud --enable-decoder=pcm_s24le --enable-decoder=pcm_s24le_planar --enable-decoder=pcm_s32be --enable-decoder=pcm_s32le --enable-decoder=pcm_s32le_planar --enable-decoder=pcm_s64be --enable-decoder=pcm_s64le --enable-decoder=pcm_s8 --enable-decoder=pcm_s8_planar --enable-decoder=pcm_u16be --enable-decoder=pcm_u16le --enable-decoder=pcm_u24be --enable-decoder=pcm_u24le --enable-decoder=pcm_u32be --enable-decoder=pcm_u32le --enable-decoder=pcm_u8 --enable-decoder=pcm_zork --enable-decoder=vorbis --enable-decoder=wmalossless --enable-decoder=wmapro --enable-decoder=wmav1 --enable-decoder=wmav2 --enable-decoder=wmavoice --enable-encoder=libopus --enable-hwaccel=h264_d3d11va --enable-hwaccel=h264_dxva2 --enable-parser=aac --enable-parser=aac_latm --enable-parser=flac --enable-parser=h264 --enable-parser=mpeg4video --enable-parser=mpegaudio --enable-parser=opus --enable-parser=vorbis --enable-demuxer=aac --enable-demuxer=flac --enable-demuxer=gif --enable-demuxer=h264 --enable-demuxer=mov --enable-demuxer=mp3 --enable-demuxer=ogg --enable-demuxer=wav --enable-muxer=ogg --enable-muxer=opus --extra-ldflags="-libpath:/d/TBuild/Libraries/opus/win32/VS2015/Win32/Release" make make install diff --git a/docs/building-qtcreator.md b/docs/building-qtcreator.md index 90a46935c..3115fb2d2 100644 --- a/docs/building-qtcreator.md +++ b/docs/building-qtcreator.md @@ -48,10 +48,14 @@ In Terminal go to **/home/user/TBuild/Libraries/zlib-1.2.8** and run: Install audio libraries -#### Opus codec 1.1 +#### Opus codec -Download [opus-1.1 sources](http://downloads.xiph.org/releases/opus/opus-1.1.tar.gz) from http://www.opus-codec.org/downloads, extract to **/home/user/TBuild/Libraries**, go to **/home/user/TBuild/Libraries/opus-1.1** and run +In Terminal go to **/home/user/TBuild/Libraries** and run + git clone https://github.com/xiph/opus + cd opus + git checkout v1.2-alpha2 + ./autogen.sh ./configure make sudo make install diff --git a/docs/building-xcode-old.md b/docs/building-xcode-old.md index 3c857b625..a1c98db24 100644 --- a/docs/building-xcode-old.md +++ b/docs/building-xcode-old.md @@ -126,21 +126,13 @@ In Terminal go to **/Users/user/TBuild/Libraries/openal-soft/build** and there r #### Opus codec -Download sources [opus-1.1.tar.gz](http://downloads.xiph.org/releases/opus/opus-1.1.tar.gz) from http://www.opus-codec.org/downloads/, extract to **/Users/user/TBuild/Libraries** and rename to have **/Users/user/TBuild/Libraries/opus/configure** +In Terminal go to **/Users/user/TBuild/Libraries/macold** and there run -##### Building libraries - -Download [pkg-config 0.28](http://pkgconfig.freedesktop.org/releases/pkg-config-0.28.tar.gz) from http://pkg-config.freedesktop.org, extract it to **/Users/user/TBuild/Libraries** - -In Terminal go to **/Users/user/TBuild/Libraries/pkg-config-0.28** and run - - ./configure --with-internal-glib - make - sudo make install - -then go to **/Users/user/TBuild/Libraries/opus** and there run - - ./configure + git clone https://github.com/xiph/opus + cd opus + git checkout v1.2-alpha2 + ./autogen.sh + CFLAGS="-mmacosx-version-min=10.6" CPPFLAGS="-mmacosx-version-min=10.6" LDFLAGS="-mmacosx-version-min=10.6" ./configure --prefix=/usr/local/macold make sudo make install diff --git a/docs/building-xcode.md b/docs/building-xcode.md index 8c8684781..98146959d 100644 --- a/docs/building-xcode.md +++ b/docs/building-xcode.md @@ -105,38 +105,20 @@ In Terminal go to **/Users/user/TBuild/Libraries/libexif-0.6.20** and there run Get sources by git – in Terminal go to **/Users/user/TBuild/Libraries** and run git clone git://repo.or.cz/openal-soft.git - -to have **/Users/user/TBuild/Libraries/openal-soft/CMakeLists.txt** - -##### Building library - -In Terminal go to **/Users/user/TBuild/Libraries/openal-soft/build** and there run - + cd openal-soft/build cmake -D LIBTYPE:STRING=STATIC -D CMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.8 .. make sudo make install #### Opus codec -##### Get the source code -* Download sources [opus-1.1.tar.gz](http://downloads.xiph.org/releases/opus/opus-1.1.tar.gz) from http://www.opus-codec.org/downloads/ -* Extract them to **/Users/user/TBuild/Libraries** -* Rename opus-1.1 to opus to have **/Users/user/TBuild/Libraries/opus/configure** +In Terminal go to **/Users/user/TBuild/Libraries** and there run -##### Building library - -* Download [pkg-config 0.28](http://pkgconfig.freedesktop.org/releases/pkg-config-0.28.tar.gz) from http://pkg-config.freedesktop.org -* Extract it to **/Users/user/TBuild/Libraries** - -In Terminal go to **/Users/user/TBuild/Libraries/pkg-config-0.28** and run: - - ./configure --with-internal-glib - make - sudo make install - -then go to **/Users/user/TBuild/Libraries/opus** and run: - - ./configure + git clone https://github.com/xiph/opus + cd opus + git checkout v1.2-alpha2 + ./autogen.sh + CFLAGS="-mmacosx-version-min=10.8" CPPFLAGS="-mmacosx-version-min=10.8" LDFLAGS="-mmacosx-version-min=10.8" ./configure make sudo make install