From cfb3eb25d3188c6e91d8f42e35d6602b7a66a649 Mon Sep 17 00:00:00 2001 From: Maikel Llamaret Heredia Date: Wed, 27 Nov 2019 21:07:52 -0500 Subject: [PATCH] Add files via upload --- .travis.yml | 34 ++++++++++++++++++++++-- complete_appdir.sh | 17 ++++++++++++ travis.yml | 65 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 114 insertions(+), 2 deletions(-) create mode 100644 complete_appdir.sh create mode 100644 travis.yml diff --git a/.travis.yml b/.travis.yml index 5e808162..d895b59a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,7 +16,7 @@ install: - sudo add-apt-repository -y ppa:beineri/opt-qt-5.12.3-bionic - sudo apt update - sudo apt install build-essential g++ make ffmpeg sox mplayer libnotify-dev mesa-common-dev libglvnd-dev - - sudo apt install qt-latest + - sudo apt install qt-latest tree - echo "/opt/qt512/bin" | sudo tee /etc/xdg/qtchooser/default.conf - echo "/opt/qt512/lib" | sudo tee -a /etc/xdg/qtchooser/default.conf - qtchooser -print-env @@ -26,10 +26,40 @@ install: script: - qmake mystiq.pro - make + - sudo make install # notifications (only via telegram) notifications: email: true #webhooks: https://fathomless-fjord-24024.herokuapp.com/notify -# no deploy section for now. +# make the AppImage bundle +before_deploy: + # install AppImage toolchain + - wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage + - wget https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage + - wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage + - chmod +x *.AppImage + # build the AppDir + - make install INSTALL_ROOT=AppDir + # add extra tools + - ./complete_appdir.sh + # run the linuxdeploy script + - ./linuxdeploy-x86_64.AppImage --appdir=AppDir --plugin qt --output appimage + # listing the result + - ls -lh *.AppImage + +# deploy to Github +deploy: + # deploy on linux + - provider: releases + api_key: $OAUTHTOKEN + file_glob: true + draft: true + overwrite: true + skip_cleanup: true + on: + repo: llamaret/MystiQ + tags: true + file: "Mystiq*AppImage" + diff --git a/complete_appdir.sh b/complete_appdir.sh new file mode 100644 index 00000000..cb598b99 --- /dev/null +++ b/complete_appdir.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +# pass the tools to the image +TOOLS="ffmpeg ffplay ffprobe mplayer sox" +for s in `echo "$TOOLS" | xargs` ; do + echo "Installing media tools: $s" + cp -v /usr/bin/$s AppDir/usr/bin +done + +# copy all the icons +mkdir -p AppDir/usr/share/icons/hicolor +RES=`cd icons && ls | grep mystiq_| cut -d "_" -f 2 | cut -d "." -f 1` +for r in `echo $RES | xargs` ; do + target="AppDir/usr/share/icons/hicolor/$r/apps" + mkdir -p "$target" + cp -v icons/mystiq_$r.png "$target/mystiq.png" +done diff --git a/travis.yml b/travis.yml new file mode 100644 index 00000000..d895b59a --- /dev/null +++ b/travis.yml @@ -0,0 +1,65 @@ +# language target +language: cpp +compiler: gcc + +# main build matrix +matrix: + include: + - name: "Bionic Ubuntu Linux" + os: linux + dist: bionic + sudo: required + env: TARGETOS=bionic-linux + +# install, install QT5.12.3 from ppa +install: + - sudo add-apt-repository -y ppa:beineri/opt-qt-5.12.3-bionic + - sudo apt update + - sudo apt install build-essential g++ make ffmpeg sox mplayer libnotify-dev mesa-common-dev libglvnd-dev + - sudo apt install qt-latest tree + - echo "/opt/qt512/bin" | sudo tee /etc/xdg/qtchooser/default.conf + - echo "/opt/qt512/lib" | sudo tee -a /etc/xdg/qtchooser/default.conf + - qtchooser -print-env + - qmake -v + +# build & test scripts +script: + - qmake mystiq.pro + - make + - sudo make install + +# notifications (only via telegram) +notifications: + email: true + #webhooks: https://fathomless-fjord-24024.herokuapp.com/notify + +# make the AppImage bundle +before_deploy: + # install AppImage toolchain + - wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage + - wget https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage + - wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage + - chmod +x *.AppImage + # build the AppDir + - make install INSTALL_ROOT=AppDir + # add extra tools + - ./complete_appdir.sh + # run the linuxdeploy script + - ./linuxdeploy-x86_64.AppImage --appdir=AppDir --plugin qt --output appimage + # listing the result + - ls -lh *.AppImage + +# deploy to Github +deploy: + # deploy on linux + - provider: releases + api_key: $OAUTHTOKEN + file_glob: true + draft: true + overwrite: true + skip_cleanup: true + on: + repo: llamaret/MystiQ + tags: true + file: "Mystiq*AppImage" +