mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-01-07 07:09:57 +00:00
21b1ba1f88
To be able to run on the same distributions as before we need to have the same GLIBC version dependency as in Ubuntu 12.04, which is 2.15. For that we need to remove all usages of GLIBC features from 2.16 and above. Currently there are three methods used, so they're wrapped in a separate static library, linux_glibc_wraps. It is a separate library because it must be compiled without '-flto' flag, otherwise the inline __asm__ is not working and we get unresolved symbols.
39 lines
1.1 KiB
Bash
Executable File
39 lines
1.1 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
set -e
|
|
FullExecPath=$PWD
|
|
pushd `dirname $0` > /dev/null
|
|
FullScriptPath=`pwd`
|
|
popd > /dev/null
|
|
|
|
if [ -f "$FullScriptPath/../build/target" ]; then
|
|
while IFS='' read -r line || [[ -n "$line" ]]; do
|
|
BuildTarget="$line"
|
|
done < "$FullScriptPath/../build/target"
|
|
else
|
|
BuildTarget=""
|
|
fi
|
|
|
|
MySystem=`uname -s`
|
|
cd $FullScriptPath
|
|
|
|
if [ "$MySystem" == "Linux" ]; then
|
|
../../../Libraries/gyp/gyp --depth=. --generator-output=.. -Goutput_dir=../out -Dofficial_build_target=$BuildTarget Telegram.gyp --format=cmake
|
|
cd ../../out/Debug
|
|
cmake .
|
|
cd ../Release
|
|
cmake .
|
|
cd ../../Telegram/gyp
|
|
else
|
|
#gyp --depth=. --generator-output=../.. -Goutput_dir=out Telegram.gyp --format=ninja
|
|
#gyp --depth=. --generator-output=../.. -Goutput_dir=out Telegram.gyp --format=xcode-ninja
|
|
#gyp --depth=. --generator-output=../.. -Goutput_dir=out Telegram.gyp --format=xcode
|
|
# use patched gyp with Xcode project generator
|
|
../../../Libraries/gyp/gyp --depth=. --generator-output=.. -Goutput_dir=../out -Gxcode_upgrade_check_project_version=900 -Dofficial_build_target=$BuildTarget Telegram.gyp --format=xcode
|
|
fi
|
|
|
|
cd ../..
|
|
|
|
cd $FullExecPath
|
|
exit
|
|
|