mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-05 13:59:52 +08:00
use another source of qt5.7
This commit is contained in:
parent
5c6c6ccb36
commit
1d0c80d5b5
@ -14,7 +14,7 @@ matrix:
|
|||||||
|
|
||||||
branches:
|
branches:
|
||||||
only:
|
only:
|
||||||
- dev
|
- master
|
||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
- if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test; fi
|
- 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 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 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 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 -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 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
|
- 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
|
dry-run: false
|
||||||
on:
|
on:
|
||||||
condition: $TRAVIS_OS_NAME = linux
|
condition: $TRAVIS_OS_NAME = linux
|
||||||
branch: dev
|
branch: master
|
||||||
- provider: bintray
|
- provider: bintray
|
||||||
file: "./.macos_bintray.json"
|
file: "./.macos_bintray.json"
|
||||||
user: tamlok
|
user: tamlok
|
||||||
@ -55,4 +56,4 @@ deploy:
|
|||||||
dry-run: false
|
dry-run: false
|
||||||
on:
|
on:
|
||||||
condition: $TRAVIS_OS_NAME = osx
|
condition: $TRAVIS_OS_NAME = osx
|
||||||
branch: dev
|
branch: master
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
project_dir=$(pwd)
|
project_dir=$(pwd)
|
||||||
qt_install_dir=/opt
|
|
||||||
|
|
||||||
cd ${qt_install_dir}
|
# Install qt5.7
|
||||||
sudo wget https://github.com/adolby/qt-more-builds/releases/download/5.7/qt-opensource-5.7.0-linux-x86_64.7z
|
sudo add-apt-repository ppa:beineri/opt-qt571-trusty -y
|
||||||
sudo 7z x qt-opensource-5.7.0-linux-x86_64.7z &> /dev/null
|
sudo apt-get update -qq
|
||||||
PATH=${qt_install_dir}/Qt/5.7/gcc_64/bin/:${PATH}
|
sudo apt-get -y install qt57base qt57webengine qt57webchannel qt57svg qt57location qt57tools qt57translations
|
||||||
|
source /opt/qt*/bin/qt*-env.sh
|
||||||
|
|
||||||
cd ${project_dir}
|
cd ${project_dir}
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
qmake -v
|
qmake -v
|
||||||
qmake CONFIG+=release -spec linux-g++-64 ../VNote.pro
|
qmake CONFIG+=release -spec linux-g++-64 ../VNote.pro
|
||||||
make -j2
|
make -j$(nproc)
|
||||||
|
|
||||||
#
|
#
|
||||||
# Pack AppImage using linuxdeployqt
|
# Pack AppImage using linuxdeployqt
|
||||||
@ -21,21 +21,27 @@ mkdir dist
|
|||||||
INSTALL_ROOT=${project_dir}/build/dist make install ; tree dist/
|
INSTALL_ROOT=${project_dir}/build/dist make install ; tree dist/
|
||||||
|
|
||||||
# Copy SVG module
|
# Copy SVG module
|
||||||
mkdir -p dist/usr/plugins/iconengines
|
mkdir -p ./dist/usr/plugins/iconengines
|
||||||
mkdir -p dist/usr/plugins/imageformats
|
mkdir -p ./dist/usr/plugins/imageformats
|
||||||
cp "${qt_install_dir}"/Qt/5.7/gcc_64/plugins/iconengines/* dist/usr/plugins/iconengines/
|
cp /opt/qt57/plugins/iconengines/* ./dist/usr/plugins/iconengines/
|
||||||
cp "${qt_install_dir}"/Qt/5.7/gcc_64/plugins/imageformats/* dist/usr/plugins/imageformats/
|
cp /opt/qt57/plugins/imageformats/* ./dist/usr/plugins/imageformats/
|
||||||
|
|
||||||
# Copy other project files
|
# Copy other project files
|
||||||
cp "${project_dir}/README.md" "dist/README.md"
|
cp "${project_dir}/README.md" "dist/README.md"
|
||||||
cp "${project_dir}/LICENSE" "dist/LICENSE"
|
cp "${project_dir}/LICENSE" "dist/LICENSE"
|
||||||
echo ${version} > dist/version
|
echo ${version} > ./dist/version
|
||||||
echo "${TRAVIS_COMMIT}" >> dist/version
|
echo "${TRAVIS_COMMIT}" >> ./dist/version
|
||||||
|
|
||||||
# Get linuxdeployqt tool
|
# Get linuxdeployqt tool
|
||||||
wget -c "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage"
|
wget -c "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage"
|
||||||
chmod a+x linuxdeployqt*.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
|
./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
|
./linuxdeployqt*.AppImage ./dist/usr/share/applications/*.desktop -appimage
|
||||||
|
|
||||||
tree dist/
|
tree dist/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user