From 1fd2dc1ee086d70b7c3db6a70ef4b41a98708c3d Mon Sep 17 00:00:00 2001 From: Eric Van Albert Date: Mon, 29 Jul 2019 23:22:33 -0400 Subject: [PATCH 1/6] Fix up debian dependencies, move icon file --- deploy/debian.sh | 50 ++++++++++++++++++++++++++++++ deploy/debian/compat | 1 + deploy/debian/control | 19 ++++++++++++ deploy/debian/install | 2 ++ deploy/debian/rules | 7 +++++ deploy/linux.sh | 2 +- deploy/mac.sh | 2 +- deploy/{icon.png => radiance.png} | Bin 8 files changed, 81 insertions(+), 2 deletions(-) create mode 100755 deploy/debian.sh create mode 100644 deploy/debian/compat create mode 100644 deploy/debian/control create mode 100644 deploy/debian/install create mode 100755 deploy/debian/rules rename deploy/{icon.png => radiance.png} (100%) diff --git a/deploy/debian.sh b/deploy/debian.sh new file mode 100755 index 00000000..0e883506 --- /dev/null +++ b/deploy/debian.sh @@ -0,0 +1,50 @@ +#!/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 + +mkdir -p "$2" + +SOURCE_DIR=$(readlink -e "$1") +BUILD_DIR=$(readlink -e "$2") + +echo "Source dir: $SOURCE_DIR" +echo "Build dir: $BUILD_DIR" + +UPSTREAM_VERSION=0.6.1 +PKG_VERSION=1 + +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 + +(cd "$BUILD_DIR/radiance_$UPSTREAM_VERSION" && debuild -i -us -uc -S) +(cd "$BUILD_DIR/radiance_$UPSTREAM_VERSION" && debuild -i -us -uc -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/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 From e0975bb2b6301dc983fd1b0b5e2142f4551090f8 Mon Sep 17 00:00:00 2001 From: Eric Van Albert Date: Mon, 29 Jul 2019 23:35:57 -0400 Subject: [PATCH 2/6] Allow debian.sh to take in additional arguments for key and version --- deploy/debian.sh | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/deploy/debian.sh b/deploy/debian.sh index 0e883506..5ec5159a 100755 --- a/deploy/debian.sh +++ b/deploy/debian.sh @@ -17,16 +17,29 @@ if [ -e "$2" ]; then 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" - -UPSTREAM_VERSION=0.6.1 -PKG_VERSION=1 +echo "Upstream version: $UPSTREAM_VERSION" +echo "Packaging version: $PKG_VERSION" +echo "Signing key: $SIGNING_KEY" set -x @@ -46,5 +59,11 @@ radiance ($UPSTREAM_VERSION-$PKG_VERSION) unstable; urgency=medium -- Eric Van Albert $(date -R) EOF -(cd "$BUILD_DIR/radiance_$UPSTREAM_VERSION" && debuild -i -us -uc -S) -(cd "$BUILD_DIR/radiance_$UPSTREAM_VERSION" && debuild -i -us -uc -b) +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) From 9612c3cae1816f21b962ae50621ef174bd1b4473 Mon Sep 17 00:00:00 2001 From: Eric Van Albert Date: Mon, 29 Jul 2019 23:52:51 -0400 Subject: [PATCH 3/6] Add MIT license --- deploy/debian/copyright | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 deploy/debian/copyright 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. From 71a4b79ccaf7dde2af2ca8293f9b5b96aa7396f4 Mon Sep 17 00:00:00 2001 From: Eric Van Albert Date: Tue, 30 Jul 2019 21:16:49 -0400 Subject: [PATCH 4/6] Upgrade Ubuntu on Travis to Bionic --- .travis.yml | 2 +- .travis/before_install.sh | 3 --- .travis/before_script.sh | 2 +- .travis/install.sh | 20 ++------------------ 4 files changed, 4 insertions(+), 23 deletions(-) diff --git a/.travis.yml b/.travis.yml index ef42a9a8..e8d652c6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ os: - linux - osx language: cpp -dist: trusty +dist: bionic sudo: required before_install: diff --git a/.travis/before_install.sh b/.travis/before_install.sh index 588b7b82..259b7cfb 100755 --- a/.travis/before_install.sh +++ b/.travis/before_install.sh @@ -5,8 +5,5 @@ 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..7f2d467a 100755 --- a/.travis/install.sh +++ b/.travis/install.sh @@ -11,24 +11,8 @@ 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 curl -L https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage > linuxdeployqt \ && chmod +x linuxdeployqt \ From 89b8aac139488dfdcb27cfda6d5c02903975d6ce Mon Sep 17 00:00:00 2001 From: Eric Van Albert Date: Tue, 30 Jul 2019 22:13:45 -0400 Subject: [PATCH 5/6] Tell Travis to build .deb file Fix paths in travis Pass in a version to build add -e flag to all scripts fix syntax, add doxygen fix path passed to debian.sh Add devscripts to travis for debian building Add fakeroot and attempt to deploy the artifact Default to 0~dev0 if no tag is present, and deploy the correct artifact (maybe) Fix some paths, maybe Flip conditional Add graphviz to dependencies for doxygen --- .travis.yml | 21 +++++++++++++++------ .travis/after_success.sh | 19 +++++++++++++++++++ .travis/before_install.sh | 2 +- .travis/install.sh | 5 +++-- 4 files changed, 38 insertions(+), 9 deletions(-) create mode 100755 .travis/after_success.sh diff --git a/.travis.yml b/.travis.yml index e8d652c6..ea64bdf5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 259b7cfb..7d6b908b 100755 --- a/.travis/before_install.sh +++ b/.travis/before_install.sh @@ -1,4 +1,4 @@ -#!/bin/bash -x +#!/bin/bash -ex if [[ $TRAVIS_OS_NAME == 'osx' ]] then diff --git a/.travis/install.sh b/.travis/install.sh index 7f2d467a..5b98176e 100755 --- a/.travis/install.sh +++ b/.travis/install.sh @@ -1,4 +1,4 @@ -#!/bin/bash -x +#!/bin/bash -ex if [[ $TRAVIS_OS_NAME == 'osx' ]] then @@ -12,7 +12,8 @@ then elif [[ $TRAVIS_OS_NAME == 'linux' ]] then sudo apt-get -qy install debhelper cmake qtbase5-dev qtdeclarative5-dev \ - qtquickcontrols2-5-dev libfftw3-dev libsamplerate0-dev portaudio19-dev libmpv-dev librtmidi-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 \ From 6de029bc66170bd2edbbf7016f41ba28c43b1f2e Mon Sep 17 00:00:00 2001 From: Eric Van Albert Date: Tue, 30 Jul 2019 23:40:11 -0400 Subject: [PATCH 6/6] remove 'brew install cmake' in OSX --- .travis/install.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis/install.sh b/.travis/install.sh index 5b98176e..8aaacb54 100755 --- a/.travis/install.sh +++ b/.travis/install.sh @@ -2,7 +2,6 @@ if [[ $TRAVIS_OS_NAME == 'osx' ]] then - brew install cmake brew install qt brew install fftw brew install libsamplerate