2016-10-04 22:51:32 +03:00
|
|
|
#!/bin/sh
|
2016-10-04 23:53:23 +03:00
|
|
|
set -ev
|
2016-10-04 22:51:32 +03:00
|
|
|
|
2016-10-06 17:53:27 +03:00
|
|
|
#check env
|
2016-10-06 16:46:45 +03:00
|
|
|
df -h
|
|
|
|
|
2016-10-06 17:53:27 +03:00
|
|
|
ls $HOME/*
|
|
|
|
du -sh $HOME/*
|
|
|
|
|
2016-10-06 16:46:45 +03:00
|
|
|
#needed for headless qt installation
|
|
|
|
export QT_QPA_PLATFORM=minimal
|
|
|
|
|
2016-10-04 22:51:32 +03:00
|
|
|
#replace gcc4 with gcc5
|
2016-10-05 14:10:39 +03:00
|
|
|
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
|
2016-10-05 14:04:10 +03:00
|
|
|
sudo apt-get -qq update
|
|
|
|
sudo apt-get -y -qq install gcc-5 g++-5
|
2016-10-04 22:51:32 +03:00
|
|
|
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 90
|
|
|
|
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 90
|
|
|
|
|
|
|
|
#download and install qt
|
2016-10-06 03:15:20 +03:00
|
|
|
QT=qt-opensource-linux-x64-android-5.7.0.run
|
2016-10-07 19:03:28 +03:00
|
|
|
curl -sL --retry 6 --retry-delay 20 -o /tmp/$QT https://download.qt.io/official_releases/qt/5.7/5.7.0/$QT
|
2016-10-06 03:15:20 +03:00
|
|
|
chmod +x /tmp/$QT
|
|
|
|
/tmp/$QT --script $GOPATH/src/github.com/therecipe/qt/internal/ci/iscript.qs
|
|
|
|
rm -f /tmp/$QT
|
2016-10-05 13:46:59 +03:00
|
|
|
|
|
|
|
#download and install android sdk
|
2016-10-06 03:15:20 +03:00
|
|
|
SDK=android-sdk_r24.4.1-linux.tgz
|
2016-10-07 19:03:28 +03:00
|
|
|
curl -sL --retry 6 --retry-delay 20 -o /tmp/$SDK https://dl.google.com/android/$SDK
|
2016-10-06 04:28:49 +03:00
|
|
|
tar -xzf /tmp/$SDK -C $HOME
|
2016-10-06 03:15:20 +03:00
|
|
|
rm -f /tmp/$SDK
|
2016-10-05 13:46:59 +03:00
|
|
|
|
|
|
|
#install deps for android sdk
|
2016-10-06 04:28:49 +03:00
|
|
|
echo "y" | $HOME/android-sdk-linux/tools/android -s update sdk -f -u -a -t 1,2,4,31
|
2016-10-05 13:46:59 +03:00
|
|
|
|
|
|
|
#download and install android ndk
|
2016-10-06 03:15:20 +03:00
|
|
|
NDK=android-ndk-r12b-linux-x86_64.zip
|
2016-10-07 19:03:28 +03:00
|
|
|
curl -sL --retry 6 --retry-delay 20 -o /tmp/$NDK https://dl.google.com/android/repository/$NDK
|
2016-10-06 04:28:49 +03:00
|
|
|
unzip -qq /tmp/$NDK -d $HOME
|
2016-10-06 03:15:20 +03:00
|
|
|
rm -f /tmp/$NDK
|
2016-10-06 17:14:10 +03:00
|
|
|
|
2016-10-06 17:53:27 +03:00
|
|
|
#check env
|
2016-10-06 17:14:10 +03:00
|
|
|
df -h
|
|
|
|
|
|
|
|
ls $HOME/*
|
|
|
|
du -sh $HOME/*
|