use another source of qt5.7

This commit is contained in:
Le Tan 2017-08-22 20:19:15 +08:00
parent 5c6c6ccb36
commit 1d0c80d5b5
2 changed files with 22 additions and 15 deletions

View File

@ -14,7 +14,7 @@ matrix:
branches:
only:
- dev
- master
before_install:
- if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test; fi
@ -25,6 +25,7 @@ install:
- if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then sudo -E apt-get -yq --no-install-suggests --no-install-recommends --force-yes install p7zip-full ; fi
- if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then sudo -E apt-get -yq --no-install-suggests --no-install-recommends --force-yes install chrpath ; fi
- if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then sudo -E apt-get -yq --no-install-suggests --no-install-recommends --force-yes install openssl libssl-dev ; fi
- if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then sudo -E apt-get -yq --no-install-suggests --no-install-recommends --force-yes install libgl1-mesa-dev ; fi
- if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then sudo -E apt-get -yq --no-install-suggests --no-install-recommends --force-yes install tree ; fi
- if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then sudo apt-get install -qq gcc-6; sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 100 ; fi
- if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then sudo apt-get install -qq g++-6; sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-6 100 ; fi
@ -46,7 +47,7 @@ deploy:
dry-run: false
on:
condition: $TRAVIS_OS_NAME = linux
branch: dev
branch: master
- provider: bintray
file: "./.macos_bintray.json"
user: tamlok
@ -55,4 +56,4 @@ deploy:
dry-run: false
on:
condition: $TRAVIS_OS_NAME = osx
branch: dev
branch: master

View File

@ -1,18 +1,18 @@
#!/bin/bash
project_dir=$(pwd)
qt_install_dir=/opt
cd ${qt_install_dir}
sudo wget https://github.com/adolby/qt-more-builds/releases/download/5.7/qt-opensource-5.7.0-linux-x86_64.7z
sudo 7z x qt-opensource-5.7.0-linux-x86_64.7z &> /dev/null
PATH=${qt_install_dir}/Qt/5.7/gcc_64/bin/:${PATH}
# Install qt5.7
sudo add-apt-repository ppa:beineri/opt-qt571-trusty -y
sudo apt-get update -qq
sudo apt-get -y install qt57base qt57webengine qt57webchannel qt57svg qt57location qt57tools qt57translations
source /opt/qt*/bin/qt*-env.sh
cd ${project_dir}
mkdir build
cd build
qmake -v
qmake CONFIG+=release -spec linux-g++-64 ../VNote.pro
make -j2
make -j$(nproc)
#
# Pack AppImage using linuxdeployqt
@ -21,21 +21,27 @@ mkdir dist
INSTALL_ROOT=${project_dir}/build/dist make install ; tree dist/
# Copy SVG module
mkdir -p dist/usr/plugins/iconengines
mkdir -p dist/usr/plugins/imageformats
cp "${qt_install_dir}"/Qt/5.7/gcc_64/plugins/iconengines/* dist/usr/plugins/iconengines/
cp "${qt_install_dir}"/Qt/5.7/gcc_64/plugins/imageformats/* dist/usr/plugins/imageformats/
mkdir -p ./dist/usr/plugins/iconengines
mkdir -p ./dist/usr/plugins/imageformats
cp /opt/qt57/plugins/iconengines/* ./dist/usr/plugins/iconengines/
cp /opt/qt57/plugins/imageformats/* ./dist/usr/plugins/imageformats/
# Copy other project files
cp "${project_dir}/README.md" "dist/README.md"
cp "${project_dir}/LICENSE" "dist/LICENSE"
echo ${version} > dist/version
echo "${TRAVIS_COMMIT}" >> dist/version
echo ${version} > ./dist/version
echo "${TRAVIS_COMMIT}" >> ./dist/version
# Get linuxdeployqt tool
wget -c "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage"
chmod a+x linuxdeployqt*.AppImage
unset QTDIR; unset QT_PLUGIN_PATH ; unset LD_LIBRARY_PATH
./linuxdeployqt*.AppImage ./dist/usr/share/applications/*.desktop -bundle-non-qt-libs
# Copy translations
cp /opt/qt57/translations/*_zh_CN.qm ./dist/usr/translations/
# Package it for the second time.
./linuxdeployqt*.AppImage ./dist/usr/share/applications/*.desktop -appimage
tree dist/