diff --git a/.linux_bintray.json b/.linux_bintray.json new file mode 100644 index 00000000..240f9a0e --- /dev/null +++ b/.linux_bintray.json @@ -0,0 +1,30 @@ +{ + "package": { + "name": "vnote", + "repo": "vnote", + "subject": "tamlok", + "desc": "Continuous deployment by Travis-CI", + "website_url": "https://github.com/tamlok/vnote", + "issue_tracker_url": "https://github.com/tamlok/vnote/issues", + "vcs_url": "https://github.com/tamlok/vnote.git", + "github_use_tag_release_notes": false, + "github_release_notes_file": "", + "licenses": ["MIT"], + "labels": ["Markdown", "Note-Taking", "Office", "Utils", "Efficiency"], + "public_download_numbers": true, + "public_stats": true + }, + + "version": { + "name": "1.0", + "desc": "VNote v1.0", + "released": "2017-01-25", + "vcs_tag": "1.0", + "gpgSign": false + }, + + "files": + [{"includePattern": "build/distrib/(VNote_.*_linux_x86_64_portable.tar.gz)", "uploadPattern": "$1"}], + + "publish": true +} diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..c3569fda --- /dev/null +++ b/.travis.yml @@ -0,0 +1,38 @@ +dist: trusty +sudo: required +git: + depth: 1 +language: cpp +compiler: g++ +env: +- version="1.0" +addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - gcc-6 + - g++-6 +before_install: +- sudo apt-get -qq update +install: +- sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 100 +- sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-6 100 +- sudo -E apt-get -yq --no-install-suggests --no-install-recommends --force-yes install + p7zip-full +- sudo -E apt-get -yq --no-install-suggests --no-install-recommends --force-yes install + chrpath +- sudo -E apt-get -yq --no-install-suggests --no-install-recommends --force-yes install + tree +before_script: +- chmod +x .travis_linux.sh +script: +- TAG_NAME=${TRAVIS_TAG} CXX="g++-6" CC="gcc-6" ./.travis_linux.sh +deploy: + provider: bintray + file: "./.linux_bintray.json" + user: tamlok + key: + secure: vADlrYSusARnHxK3NTT3r1r6I/lrxyEuFKLOO73KXl6rvDywrrDDi6YsFekL14/o3clZKLOC8LbvA+4BKPVSoGTO4Dpx/i51fXphf+mMFB3QXSGnbqHm4+2ZnhCl62vfVlFeOPBLDO0KUBI8DCP0I+QogOUickXv3zYx69z6AudSxgjY7nPoN5jGSPgyId4r3o8Shrj1Fk1WtN6qciKyPne57v+jmvRlJTkoEfYkvwTRNMBlmaKy8Vj/CSoIvB8TH8bv3rhHLrN4o1QCwePdaX9G7xlImSpXqgRgzQVU3SRFN2bYTj5DZc1aFyA7iNOhmwgCLAN6OrqXyyJCbyywNhylfgad2rQANcfXiZw9ywooKEYafLDRuiK2G6Pk8m+R6Ded9JBoX9MSz/ZDxxfk4NmLO991wS7IK5aFTQfHZz5W8Tmh1rCphFwlDI/Rxs7ExbXu7INA8IhoLpOSmLIA5lfdC4fD8rv8mjy5gfpMkWlP8XATfi2eMH9uGj89aJa6xp7Bc2mfW3M71YHtYP/pyE/7Bk5vVonP8Cq9rK6OruMIUYtNmXoJnpte20ecSXj9yw7oTR27dhSx3XuAKOXiNpIau0CPxtXA5cSm5X0OS1Lt8RWrms0jp9Ch2dgxlNMpr0soF9DmwekhfHnVoOLyFBWBMDwvkx5TWij9FNAAJb4= + dry-run: true + on: master diff --git a/.travis_linux.sh b/.travis_linux.sh new file mode 100644 index 00000000..6e563c3b --- /dev/null +++ b/.travis_linux.sh @@ -0,0 +1,59 @@ +#!/bin/bash +project_dir=$(pwd) +qt_install_dir=/opt +version="${version}.${TRAVIS_BUILD_NUMBER}" + +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} + +cd ${project_dir} +mkdir build +cd build +qmake -v +qmake -config release -spec linux-g++-64 ../VNote.pro +make + +mkdir -p distrib/VNote +cd distrib/VNote + +# Copy VNote executable +cp ../../src/VNote ./ + +# Copy ICU libraries +cp "${qt_install_dir}/Qt/5.7/gcc_64/lib/libicui18n.so.56.1" "libicui18n.so.56" +cp "${qt_install_dir}/Qt/5.7/gcc_64/lib/libicuuc.so.56.1" "libicuuc.so.56" +cp "${qt_install_dir}/Qt/5.7/gcc_64/lib/libicudata.so.56.1" "libicudata.so.56" + +mkdir platforms +cp "${qt_install_dir}/Qt/5.7/gcc_64/plugins/platforms/libqxcb.so" "platforms/libqxcb.so" +cp "${qt_install_dir}/Qt/5.7/gcc_64/plugins/platforms/libqminimal.so" "platforms/libqminimal.so" + +cp "${qt_install_dir}/Qt/5.7/gcc_64/lib/libQt5WebEngineWidgets.so.5.7.0" "libQt5WebEngineWidgets.so.5" +cp "${qt_install_dir}/Qt/5.7/gcc_64/lib/libQt5WebEngineCore.so.5.7.0" "libQt5WebEngineCore.so.5" +cp "${qt_install_dir}/Qt/5.7/gcc_64/lib/libQt5Widgets.so.5.7.0" "libQt5Widgets.so.5" +cp "${qt_install_dir}/Qt/5.7/gcc_64/lib/libQt5WebChannel.so.5.7.0" "libQt5WebChannel.so.5" +cp "${qt_install_dir}/Qt/5.7/gcc_64/lib/libQt5Core.so.5.7.0" "libQt5Core.so.5" +cp "${qt_install_dir}/Qt/5.7/gcc_64/lib/libQt5Gui.so.5.7.0" "libQt5Gui.so.5" +cp "${qt_install_dir}/Qt/5.7/gcc_64/lib/libQt5DBus.so.5.7.0" "libQt5DBus.so.5" +cp "${qt_install_dir}/Qt/5.7/gcc_64/lib/libQt5XcbQpa.so.5.7.0" "libQt5XcbQpa.so.5" +cp "${qt_install_dir}/Qt/5.7/gcc_64/lib/libQt5Qml.so.5.7.0" "libQt5Qml.so.5" +cp "${qt_install_dir}/Qt/5.7/gcc_64/lib/libQt5Network.so.5.7.0" "libQt5Network.so.5" + +# Use chrpath to set up rpaths for Qt's libraries so they can find +# each other +chrpath -r \$ORIGIN/.. platforms/libqxcb.so +chrpath -r \$ORIGIN/.. platforms/libqminimal.so + +# Copy other project files +cp "${project_dir}/README.md" "README.md" +cp "${project_dir}/LICENSE" "LICENSE" +echo ${version} > version +echo "${TRAVIS_COMMIT}" >> version + +# Package portable executable +cd .. +tar -czvf VNote_${version}_linux_x86_64_portable.tar.gz VNote + +exit 0 diff --git a/README.md b/README.md index 5539c377..c594bee1 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,9 @@ VNote提供定期释出的稳定版本,以及总是保持最新的滚(wen)动( ## Linux +[![Build Status](https://travis-ci.org/tamlok/vnote.svg?branch=master)](https://travis-ci.org/tamlok/vnote) + +**NOT** ready yet! Please help yourself to compile and build it from sources. ## MacOS diff --git a/appveyor.yml b/appveyor.yml index 68b802a8..bf15ac2c 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -38,7 +38,8 @@ after_build: - copy "%APPVEYOR_BUILD_FOLDER%\build\src\release\VNote.exe" "distrib\VNote\VNote.exe" - copy "%APPVEYOR_BUILD_FOLDER%\README.md" "distrib\VNote\README.md" - copy "%APPVEYOR_BUILD_FOLDER%\LICENSE" "distrib\VNote\LICENSE.txt" - - echo %APPVEYOR_REPO_COMMIT% > "distrib\VNote\version.txt" + - echo %APPVEYOR_BUILD_VERSION% > "distrib\VNote\version.txt" + - echo %APPVEYOR_REPO_COMMIT% >> "distrib\VNote\version.txt" - cd distrib - 7z a vnote_win_x86_64_portable_%APPVEYOR_BUILD_VERSION%.zip VNote