diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..5d2a5aa --- /dev/null +++ b/.travis.yml @@ -0,0 +1,67 @@ +language: cpp +compiler: gcc +dist: trusty +sudo: required + +notifications: + email: false + +addons: + apt: + sources: + - sourceline: 'ppa:beineri/opt-qt-5.10.1-trusty' + + packages: + - wget + - git + - cmake + - qt510base + - qt510declarative + +before_install: + - wget "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage" + - git clone https://github.com/KDE/extra-cmake-modules.git + - chmod a+x linuxdeployqt-continuous-x86_64.AppImage + +install: + - cd extra-cmake-modules/ && cmake . && make -j$(nproc) && sudo make -j$(nproc) install && cd .. + - sudo update-alternatives --install /usr/bin/qmake qmake /opt/qt510/bin/qmake 1 + +script: + - /opt/qt510/bin/qt510-env.sh + - export QT_SELECT=qt5 + - export PATH=$PATH:/opt/qt510/bin/ + - export QML_MODULES_FIND_DIRS="/opt/qt510/qml /usr/lib/x86_64-linux-gnu/qml" + - export VERSION=$(git rev-parse --short HEAD) + - sudo ldconfig -c /opt/qt510/lib/ /usr/lib/x86_64-linux-gnu/ + - cmake -DCMAKE_BUILD_TYPE=release -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_PREFIX_PATH="/opt/qt510/" + - make -j$(nproc) + - make -j$(nproc) DESTDIR=appdir install + - ARCH=x86_64 ./linuxdeployqt-continuous-x86_64.AppImage appdir/usr/share/applications/*.desktop -bundle-non-qt-libs + - ARCH=x86_64 ./linuxdeployqt-continuous-x86_64.AppImage appdir/usr/share/applications/*.desktop -appimage + +after_success: + - mkdir out + - mv ./paper*.AppImage ./out/ + - md5sum ./out/paper*.AppImage > ./out/MD5-$VERSION.txt + - curl --upload-file ./out/paper*.AppImage https://transfer.sh/ + +branches: + except: + - # Do not build tags that we create when we upload to GitHub Releases + - /^(?i:continuous)$/ + +before_deploy: + - if [ -z "$TRAVIS_TAG" ]; then export TRAVIS_TAG="continuous"; git tag -f $TRAVIS_TAG; fi + +deploy: + provider: releases + api_key: "$GITHUB_TOKEN" + file_glob: true + file: out/* + skip_cleanup: true + prerelease: true + overwrite: true + on: + repo: anupam-git/paper + branch: master diff --git a/CMakeLists.txt b/CMakeLists.txt index a923195..ccd44b5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,6 +9,7 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_AUTOMOC ON) set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_INSTALL_PREFIX /usr) include(FeatureSummary) @@ -18,4 +19,7 @@ add_definitions(-DPROJECT_VERSION="${PROJECT_VERSION}") add_definitions(-DPROJECT_DESCRIPTION="\\nPaper - A Random Wallpaper Application\\nA CLI Tool to set a random wallpaper from Unsplash.com") add_subdirectory(src) +install(FILES "paper.desktop" DESTINATION share/applications) +install(FILES "paper.svg" DESTINATION share/icons) + feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES) diff --git a/paper.desktop b/paper.desktop new file mode 100644 index 0000000..9390a9b --- /dev/null +++ b/paper.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Type=Application +Name=paper +Exec=paper +Icon=paper +Comment=A CLI Tool to set a random wallpaper from Unsplash.com +Terminal=true +Categories=Utility; diff --git a/paper.svg b/paper.svg new file mode 100644 index 0000000..9d39011 --- /dev/null +++ b/paper.svg @@ -0,0 +1,211 @@ + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 2946781..6b40d72 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -66,3 +66,5 @@ target_link_libraries( Qt5::Network ) +install(TARGETS ${PROJECT_NAME} DESTINATION bin) +