diff --git a/.travis.yml b/.travis.yml index ef42a9a8..ea64bdf5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ os: - linux - osx language: cpp -dist: trusty +dist: bionic sudo: required before_install: @@ -18,10 +18,9 @@ before_script: script: make -after_success: - - make doxygen-doc - - make bundle - #- ./radiance_cli -a +after_success: + - cd .. + - ./.travis/after_success.sh deploy: - provider: pages @@ -35,7 +34,7 @@ deploy: - provider: releases skip_cleanup: true api_key: $GITHUB_TOKEN - file: "Radiance.AppDir.tar.gz" + file: "build/Radiance.AppDir.tar.gz" on: tags: true all_branches: true @@ -45,9 +44,19 @@ deploy: - provider: releases skip_cleanup: true api_key: $GITHUB_TOKEN - file: "Radiance.dmg" + file: "build/Radiance.dmg" on: condition: "$TRAVIS_OS_NAME == osx" tags: true all_branches: true overwrite: true + + - provider: releases + skip_cleanup: true + api_key: $GITHUB_TOKEN + file: "deploy/build/radiance_$TRAVIS_TAG-1_amd64.deb" + on: + tags: true + all_branches: true + condition: "$TRAVIS_OS_NAME == linux" + overwrite: true diff --git a/.travis/after_success.sh b/.travis/after_success.sh new file mode 100755 index 00000000..2a1dd450 --- /dev/null +++ b/.travis/after_success.sh @@ -0,0 +1,19 @@ +#!/bin/bash -ex + +if [[ $TRAVIS_OS_NAME == 'osx' ]] +then + make bundle +elif [[ $TRAVIS_OS_NAME == 'linux' ]] +then + if [[ -z "$TRAVIS_TAG" ]] + then + VERSION="0~dev1" + else + VERSION="$TRAVIS_TAG" + fi + + deploy/debian.sh . deploy/build "$VERSION" 1 + + (cd build && make bundle) + (cd build && make doxygen-doc) +fi diff --git a/.travis/before_install.sh b/.travis/before_install.sh index 588b7b82..7d6b908b 100755 --- a/.travis/before_install.sh +++ b/.travis/before_install.sh @@ -1,12 +1,9 @@ -#!/bin/bash -x +#!/bin/bash -ex if [[ $TRAVIS_OS_NAME == 'osx' ]] then echo "osx before_install" elif [[ $TRAVIS_OS_NAME == 'linux' ]] then - sudo apt-add-repository -y ppa:ubuntu-toolchain-r/test - sudo apt-add-repository -y ppa:beineri/opt-qt591-trusty - sudo add-apt-repository -y ppa:mc3man/testing6 sudo apt-get -qy update fi diff --git a/.travis/before_script.sh b/.travis/before_script.sh index 28bc79e3..9f7163a7 100755 --- a/.travis/before_script.sh +++ b/.travis/before_script.sh @@ -5,5 +5,5 @@ then cmake -DCMAKE_PREFIX_PATH=/usr/local/opt/qt/ -DCMAKE_BUILD_TYPE=Release -DRADIANCE_SYSTEM_RESOURCES=../Resources/ .. elif [[ $TRAVIS_OS_NAME == 'linux' ]] then - cmake -DCMAKE_PREFIX_PATH=/opt/qt59/ -DCMAKE_BUILD_TYPE=Release -DRADIANCE_SYSTEM_RESOURCES=resources/ .. + cmake -DCMAKE_BUILD_TYPE=Release -DRADIANCE_SYSTEM_RESOURCES=resources/ .. fi diff --git a/.travis/install.sh b/.travis/install.sh index 43c4ebb4..8aaacb54 100755 --- a/.travis/install.sh +++ b/.travis/install.sh @@ -1,8 +1,7 @@ -#!/bin/bash -x +#!/bin/bash -ex if [[ $TRAVIS_OS_NAME == 'osx' ]] then - brew install cmake brew install qt brew install fftw brew install libsamplerate @@ -11,24 +10,9 @@ then brew install rtmidi elif [[ $TRAVIS_OS_NAME == 'linux' ]] then - sudo apt-get install -qq g++-6 - sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-6 90 - sudo apt-get -qy install doxygen graphviz qt59base qt59multimedia qt59quickcontrols qt59imageformats qt59quickcontrols2 qt59script libfftw3-dev libsamplerate0-dev libasound2-dev libmpv-dev - - git clone --quiet --depth=100 "https://github.com/EddieRingle/portaudio" ~/builds/portaudio \ - && pushd ~/builds/portaudio \ - && ./configure \ - && make \ - && sudo make install \ - && popd - - git clone --quiet --depth=100 "https://github.com/thestk/rtmidi" ~/builds/rtmidi \ - && pushd ~/builds/rtmidi \ - && ./autogen.sh \ - && ./configure \ - && make \ - && sudo make install \ - && popd + sudo apt-get -qy install debhelper cmake qtbase5-dev qtdeclarative5-dev \ + qtquickcontrols2-5-dev libfftw3-dev libsamplerate0-dev portaudio19-dev libmpv-dev librtmidi-dev \ + doxygen devscripts fakeroot graphviz curl -L https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage > linuxdeployqt \ && chmod +x linuxdeployqt \ diff --git a/deploy/debian.sh b/deploy/debian.sh new file mode 100755 index 00000000..5ec5159a --- /dev/null +++ b/deploy/debian.sh @@ -0,0 +1,69 @@ +#!/bin/bash + +set -e + +if [ -z "$1" ]; then + echo "You must specify the GIT root directory as the first argument" >&2 + exit 1 +fi + +if [ -z "$2" ]; then + echo "You must specify the build directory as the second argument" >&2 + exit 1 +fi + +if [ -e "$2" ]; then + echo "Build directory must not exist (it will be created)" >&2 + exit 1 +fi + +if [ -z "$3" ]; then + echo "You must specify an upstream version (e.g. 0.6.1) as the third argument" >&2 + exit 1 +fi + +if [ -z "$4" ]; then + echo "You must specify a packaging version (e.g. 1) as the fourth argument" >&2 + exit 1 +fi + +mkdir -p "$2" + +SOURCE_DIR=$(readlink -e "$1") +BUILD_DIR=$(readlink -e "$2") +UPSTREAM_VERSION=$3 +PKG_VERSION=$4 +SIGNING_KEY=$5 + +echo "Source dir: $SOURCE_DIR" +echo "Build dir: $BUILD_DIR" +echo "Upstream version: $UPSTREAM_VERSION" +echo "Packaging version: $PKG_VERSION" +echo "Signing key: $SIGNING_KEY" + +set -x + +git -C "$SOURCE_DIR" archive HEAD -o "$BUILD_DIR/radiance.tar.gz" +git -C "$SOURCE_DIR/BTrack" archive HEAD -o "$BUILD_DIR/btrack.tar.gz" +mkdir -p "$BUILD_DIR/radiance_$UPSTREAM_VERSION" +tar -C "$BUILD_DIR/radiance_$UPSTREAM_VERSION" -xf "$BUILD_DIR/radiance.tar.gz" +tar -C "$BUILD_DIR/radiance_$UPSTREAM_VERSION/BTrack" -xf "$BUILD_DIR/btrack.tar.gz" +tar -C "$BUILD_DIR" -zcf "$BUILD_DIR/radiance_$UPSTREAM_VERSION.orig.tar.gz" "radiance_$UPSTREAM_VERSION" +rm "$BUILD_DIR/radiance.tar.gz" "$BUILD_DIR/btrack.tar.gz" +cp -r "$SOURCE_DIR/deploy/debian" "$BUILD_DIR/radiance_$UPSTREAM_VERSION/debian" +cat <"$BUILD_DIR/radiance_$UPSTREAM_VERSION/debian/changelog" +radiance ($UPSTREAM_VERSION-$PKG_VERSION) unstable; urgency=medium + + * Automatically packaged for Debian + + -- Eric Van Albert $(date -R) +EOF + +if [ -z "$SIGNING_KEY" ]; then + KEYOPTS="-us -uc" +else + KEYOPTS="-k$SIGNING_KEY" +fi + +(cd "$BUILD_DIR/radiance_$UPSTREAM_VERSION" && debuild -i $KEYOPTS -S) +(cd "$BUILD_DIR/radiance_$UPSTREAM_VERSION" && debuild -i $KEYOPTS -b) diff --git a/deploy/debian/compat b/deploy/debian/compat new file mode 100644 index 00000000..f599e28b --- /dev/null +++ b/deploy/debian/compat @@ -0,0 +1 @@ +10 diff --git a/deploy/debian/control b/deploy/debian/control new file mode 100644 index 00000000..af0fb43b --- /dev/null +++ b/deploy/debian/control @@ -0,0 +1,19 @@ +Source: radiance +Section: video +Priority: optional +Maintainer: Eric Van Albert +Build-depends: debhelper (>= 9), cmake, qtbase5-dev, qtdeclarative5-dev, + qtquickcontrols2-5-dev, libfftw3-dev, libsamplerate0-dev, portaudio19-dev, libmpv-dev, librtmidi-dev +Standards-version: 4.1.14 +Homepage: https://radiance.video + +Package: radiance +Architecture: any +Depends: libqt5core5a, libqt5qml5, libqt5quick5, + libfftw3-3, libsamplerate0, libportaudio2, libmpv1, librtmidi4, + libopengl0, qtdeclarative5-models-plugin, qml-module-qt-labs-folderlistmodel, + qml-module-qtquick-controls, qml-module-qtquick-controls2, qml-module-qtquick-layouts, + ${shlibs:Depends}, ${misc:Depends} +Description: video art software designed for live performance + Radiance is video art software for VJs. It supports beat detection, + animated GIFs, YouTube videos, and OpenGL shader effects. diff --git a/deploy/debian/copyright b/deploy/debian/copyright new file mode 100644 index 00000000..dfcad5f5 --- /dev/null +++ b/deploy/debian/copyright @@ -0,0 +1,24 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: Radiance +Source: https://github.com/zbanks/radiance/ +Files: * +Copyright: 2019 Zach Banks + 2019 Eric Van Albert +License: MIT + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. diff --git a/deploy/debian/install b/deploy/debian/install new file mode 100644 index 00000000..e0161fbf --- /dev/null +++ b/deploy/debian/install @@ -0,0 +1,2 @@ +deploy/radiance.desktop usr/share/applications +deploy/radiance.png usr/share/pixmaps diff --git a/deploy/debian/rules b/deploy/debian/rules new file mode 100755 index 00000000..c3c67d0f --- /dev/null +++ b/deploy/debian/rules @@ -0,0 +1,7 @@ +#!/usr/bin/make -f + +%: + dh $@ + +override_dh_auto_configure: + dh_auto_configure -- -DRADIANCE_SYSTEM_RESOURCES=/usr/share/radiance/ diff --git a/deploy/linux.sh b/deploy/linux.sh index a3c14d01..a5662a96 100755 --- a/deploy/linux.sh +++ b/deploy/linux.sh @@ -27,7 +27,7 @@ mkdir -p "$APP" echo "Copying executable and desktop file..." cp -r "$BINARY" "$APP/radiance" cp -r "$SOURCE_DIR/deploy/radiance.desktop" "$APP/radiance.desktop" -cp -r "$SOURCE_DIR/deploy/icon.png" "$APP/radiance.png" +cp -r "$SOURCE_DIR/deploy/radiance.png" "$APP/radiance.png" echo "Copying resources..." mkdir -p "$APP/resources" diff --git a/deploy/mac.sh b/deploy/mac.sh index 2e03cb18..b2ef8340 100755 --- a/deploy/mac.sh +++ b/deploy/mac.sh @@ -55,7 +55,7 @@ for file in $(ls "$APP"/Contents/Frameworks/*.dylib); do done echo "Generating icon set..." -"$SOURCE_DIR/deploy/png2icns.sh" "$SOURCE_DIR/deploy/icon.png" +"$SOURCE_DIR/deploy/png2icns.sh" "$SOURCE_DIR/deploy/radiance.png" mv icon.icns "$APP/Contents/Resources/" echo "Bundle is done." diff --git a/deploy/icon.png b/deploy/radiance.png similarity index 100% rename from deploy/icon.png rename to deploy/radiance.png