2020-11-04 06:57:03 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2020-11-04 15:50:17 +00:00
|
|
|
set -e
|
|
|
|
FullExecPath=$PWD
|
|
|
|
pushd `dirname $0` > /dev/null
|
|
|
|
FullScriptPath=`pwd`
|
|
|
|
popd > /dev/null
|
|
|
|
|
|
|
|
if [ ! -d "$FullScriptPath/../../../../DesktopPrivate" ]; then
|
|
|
|
echo ""
|
|
|
|
echo "This script is for building the production version of Telegram Desktop."
|
|
|
|
echo ""
|
|
|
|
echo "For building custom versions please visit the build instructions page at:"
|
|
|
|
echo "https://github.com/telegramdesktop/tdesktop/#build-instructions"
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
|
|
|
HomePath="$FullScriptPath/../.."
|
2020-11-04 06:57:03 +00:00
|
|
|
cd $HomePath
|
|
|
|
|
|
|
|
ProjectPath="$HomePath/../out"
|
|
|
|
ReleasePath="$ProjectPath/Release"
|
|
|
|
BinaryName="Telegram"
|
|
|
|
|
|
|
|
if [ ! -f "/usr/bin/cmake" ]; then
|
|
|
|
ln -s cmake3 /usr/bin/cmake
|
|
|
|
fi
|
|
|
|
|
2022-11-23 17:10:44 +00:00
|
|
|
./configure.sh
|
2020-11-04 06:57:03 +00:00
|
|
|
|
|
|
|
cd $ProjectPath
|
2022-11-23 17:10:44 +00:00
|
|
|
cmake --build . --config Release --target Telegram
|
2020-11-04 06:57:03 +00:00
|
|
|
cd $ReleasePath
|
|
|
|
|
|
|
|
echo "$BinaryName build complete!"
|
|
|
|
|
2023-09-22 07:51:47 +00:00
|
|
|
Error () {
|
|
|
|
cd $FullExecPath
|
|
|
|
echo "$1"
|
|
|
|
exit 1
|
|
|
|
}
|
2020-11-04 06:57:03 +00:00
|
|
|
|
2023-09-22 07:51:47 +00:00
|
|
|
if [ ! -f "$ReleasePath/$BinaryName" ]; then
|
|
|
|
Error "$BinaryName not found!"
|
2020-11-04 06:57:03 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ! -f "$ReleasePath/Updater" ]; then
|
2021-07-06 17:32:08 +00:00
|
|
|
Error "Updater not found!"
|
2020-11-04 06:57:03 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
rm -rf "$ReleasePath/root"
|
|
|
|
mkdir "$ReleasePath/root"
|
|
|
|
mv "$ReleasePath/$BinaryName" "$ReleasePath/root/"
|
|
|
|
mv "$ReleasePath/Updater" "$ReleasePath/root/"
|
|
|
|
mv "$ReleasePath/Packer" "$ReleasePath/root/"
|