2016-11-20 13:09:00 +00:00
|
|
|
#!/usr/bin/env bash
|
2016-08-28 19:36:51 +00:00
|
|
|
set -e
|
|
|
|
FullExecPath=$PWD
|
|
|
|
pushd `dirname $0` > /dev/null
|
|
|
|
FullScriptPath=`pwd`
|
|
|
|
popd > /dev/null
|
|
|
|
|
2017-04-19 09:44:07 +00:00
|
|
|
if [ -f "$FullScriptPath/../build/target" ]; then
|
|
|
|
while IFS='' read -r line || [[ -n "$line" ]]; do
|
|
|
|
BuildTarget="$line"
|
|
|
|
done < "$FullScriptPath/../build/target"
|
|
|
|
else
|
|
|
|
BuildTarget=""
|
|
|
|
fi
|
|
|
|
|
2016-09-09 06:15:11 +00:00
|
|
|
MySystem=`uname -s`
|
2016-08-28 19:36:51 +00:00
|
|
|
cd $FullScriptPath
|
2016-09-09 06:15:11 +00:00
|
|
|
|
|
|
|
if [ "$MySystem" == "Linux" ]; then
|
2017-05-18 09:04:39 +00:00
|
|
|
../../../Libraries/gyp/gyp --depth=. --generator-output=.. -Goutput_dir=../out -Dofficial_build_target=$BuildTarget Telegram.gyp --format=cmake
|
2016-09-09 06:15:11 +00:00
|
|
|
cd ../../out/Debug
|
2017-09-28 09:40:26 +00:00
|
|
|
cmake .
|
2016-09-15 10:50:43 +00:00
|
|
|
cd ../Release
|
2017-09-28 09:40:26 +00:00
|
|
|
cmake .
|
2016-09-09 06:15:11 +00:00
|
|
|
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
|
2018-04-07 08:47:08 +00:00
|
|
|
../../../Libraries/gyp/gyp --depth=. --generator-output=.. -Goutput_dir=../out -Gxcode_upgrade_check_project_version=930 -Dofficial_build_target=$BuildTarget Telegram.gyp --format=xcode
|
2016-09-09 06:15:11 +00:00
|
|
|
fi
|
|
|
|
|
2016-08-28 19:36:51 +00:00
|
|
|
cd ../..
|
|
|
|
|
|
|
|
cd $FullExecPath
|
|
|
|
exit
|
|
|
|
|