tdlight-java-natives/scripts/continuous-integration/github-workflows/install-dependencies.sh

71 lines
2.5 KiB
Bash
Raw Normal View History

#!/bin/bash -e
set -e
2020-12-26 14:35:09 +01:00
if [[ "$OPERATING_SYSTEM_NAME" == "linux" ]]; then
2020-12-26 15:56:33 +01:00
echo "==Linux===="
2021-06-22 16:25:59 +02:00
sudo apt-get update
2021-09-11 12:27:22 +02:00
sudo apt-get install -y make git gperf cmake \
2021-05-04 23:07:39 +02:00
ccache maven python3 python3-pip php-cli \
2021-09-11 12:27:22 +02:00
build-essential gcc-multilib g++-multilib
2021-03-16 13:09:45 +01:00
2020-12-26 14:35:09 +01:00
elif [[ "$OPERATING_SYSTEM_NAME" == "osx" ]]; then
2020-12-26 15:56:33 +01:00
echo "==OSX======"
export PYTHON=36
brew install swig;
#curl -LO https://raw.githubusercontent.com/GiovanniBussi/macports-ci/master/macports-ci;
#source ./macports-ci install;
#yes | sudo port install python$PYTHON;
#yes | sudo port install py$PYTHON-pip;
#sudo port select --set python3 python$PYTHON;
#sudo port select --set pip pip$PYTHON;
#pip install pyinstaller --user;
#export PATH=$PATH:$(python3 -c "import site; print(site.USER_BASE)")/bin;
brew install gperf openssl coreutils
2020-12-26 15:56:33 +01:00
## Precompile .tlo files because of a bug in travis/macOs
#cd ./implementations/tdlight/td/generate/tl-parser/
#echo "Configuring tl-parser"
#./configure
#echo "Compiling tl-parser"
#make
#cd ..
#echo "Running tl-parser on mtproto_api"
#./tl-parser/bin/tl-parser -v -e scheme/mtproto_api.tlo scheme/mtproto_api.tl
#echo "Running tl-parser on secret_api"
#./tl-parser/bin/tl-parser -v -e scheme/secret_api.tlo scheme/secret_api.tl
#echo "Running tl-parser on telegram_api"
#./tl-parser/bin/tl-parser -v -e scheme/telegram_api.tlo scheme/telegram_api.tl
#echo "Running tl-parser on td_api"
#./tl-parser/bin/tl-parser -v -e scheme/td_api.tlo scheme/td_api.tl
#echo "Done .tlo"
2020-12-26 14:35:09 +01:00
elif [[ "$OPERATING_SYSTEM_NAME" == "windows" ]]; then
2020-12-26 15:56:33 +01:00
echo "==Windows=="
2021-09-14 01:55:55 +02:00
choco install ccache
choco install make
2020-12-26 15:56:33 +01:00
#choco install windows-sdk-10.1
2021-09-14 01:55:55 +02:00
choco install visualstudio2019buildtools --version=16.10.4.0 --allow-downgrade --package-parameters "--passive"
choco install visualstudio2019-workload-vctools
2020-12-26 15:56:33 +01:00
#choco install openjdk11 --version=11.0.8.10
choco install maven --version=3.8.2 --allow-downgrade
2020-12-26 15:56:33 +01:00
choco install base64
2021-09-14 01:55:55 +02:00
choco install gperf
2020-12-26 15:56:33 +01:00
choco install strawberryperl
choco install nasm
#choco install php --version=7.4.9 --package-parameters='"/ThreadSafe ""/InstallDir:C:\PHP"""'
#choco install python3 --params "/InstallDir:C:\Python3"
2021-09-14 02:58:39 +02:00
#[ -d ./windowsenv/ ] && $(yes | rm -rf ./windowsenv/)
2021-09-11 12:27:22 +02:00
#[ -d $VCPKG_DIR ] && $(yes | rm -rf $VCPKG_DIR)
#git clone --depth=1 https://github.com/tdlight-team/windows-amd64-prebuilt-libraries.git windowsenv
#mv windowsenv/vcpkg $VCPKG_DIR
#cd $VCPKG_DIR
#./vcpkg integrate install
else
2020-12-26 15:56:33 +01:00
echo "Unrecognized os: $OPERATING_SYSTEM_NAME"
exit 1
fi
2021-09-14 02:13:12 +02:00
cd ./scripts/core/
./install-dependencies.sh
cd ../../