Mercurial > hg > tony
changeset 620:85ba31c30ea4
Merge
author | Chris Cannam |
---|---|
date | Thu, 10 Oct 2019 13:18:06 +0100 |
parents | fe1a77d4aeaa (current diff) e81a0dc79949 (diff) |
children | e06cbdc7301c |
files | .hgignore tonyapp.pro |
diffstat | 14 files changed, 316 insertions(+), 62 deletions(-) [+] |
line wrap: on
line diff
--- a/.hgignore Thu Oct 10 13:17:29 2019 +0100 +++ b/.hgignore Thu Oct 10 13:18:06 2019 +0100 @@ -51,3 +51,5 @@ test-svcore-* *.dmg .notarization-uuid +Dockerfile*.gen +
--- a/configure Thu Oct 10 13:17:29 2019 +0100 +++ b/configure Thu Oct 10 13:18:06 2019 +0100 @@ -8619,11 +8619,11 @@ fi fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: No Repoint executable found: assuming external libraries are already here" >&5 -$as_echo "$as_me: No Repoint executable found: assuming external libraries are already here" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: No Repoint executable found: assuming external components are already here" >&5 +$as_echo "$as_me: No Repoint executable found: assuming external components are already here" >&6;} if ! test -d vamp-plugin-sdk ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No vamp-plugin-sdk directory present, so external libraries might not have been updated" >&5 -$as_echo "$as_me: WARNING: No vamp-plugin-sdk directory present, so external libraries might not have been updated" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No vamp-plugin-sdk directory present, so external components might not have been updated" >&5 +$as_echo "$as_me: WARNING: No vamp-plugin-sdk directory present, so external components might not have been updated" >&2;} fi fi
--- a/configure.ac Thu Oct 10 13:17:29 2019 +0100 +++ b/configure.ac Thu Oct 10 13:18:06 2019 +0100 @@ -148,9 +148,9 @@ fi fi else - AC_MSG_NOTICE([No Repoint executable found: assuming external libraries are already here]) + AC_MSG_NOTICE([No Repoint executable found: assuming external components are already here]) if ! test -d vamp-plugin-sdk ; then - AC_MSG_WARN([No vamp-plugin-sdk directory present, so external libraries might not have been updated]) + AC_MSG_WARN([No vamp-plugin-sdk directory present, so external components might not have been updated]) fi fi
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/deploy/linux/AppRun Thu Oct 10 13:18:06 2019 +0100 @@ -0,0 +1,26 @@ +#!/bin/sh + +mydir=$(dirname "$0") +case "$mydir" in + /*) ;; + *) mydir="$PWD/$mydir";; +esac + +echo "AppImage root is $mydir" + +PATH="$mydir/usr/bin:$mydir/bin:$PATH" +export PATH + +LD_LIBRARY_PATH="$mydir/usr/lib:$mydir/usr/lib/x86_64-linux-gnu:$mydir/usr/lib64:$LD_LIBRARY_PATH" +export LD_LIBRARY_PATH + +QT_PLUGIN_PATH="$mydir/usr/lib/qt5/plugins/:$mydir/usr/lib/x86_64-linux-gnu/qt5/plugins/:$mydir/usr/lib64/qt5/plugins/:$QT_PLUGIN_PATH" +export QT_PLUGIN_PATH + +XDG_DATA_DIRS="$mydir/usr/share:$XDG_DATA_DIRS:/usr/local/share:/usr/share" +export XDG_DATA_DIRS + +GSETTINGS_SCHEMA_DIR="$mydir/usr/share/glib-2.0/schemas:$GSETTINGS_SCHEMA_DIR" +export GSETTINGS_SCHEMA_DIR + +exec "$mydir/usr/bin/tony" "$@"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/deploy/linux/build-and-test-appimage.sh Thu Oct 10 13:18:06 2019 +0100 @@ -0,0 +1,46 @@ +#!/bin/bash +# +# Docker required + +set -eu + +current=$(hg id | awk '{ print $1; }') + +case "$current" in + *+) echo "ERROR: Current working copy has been modified - unmodified copy required so we know we can check it out separately and obtain the same contents"; exit 2;; + *);; +esac + +echo +echo "Building appimage from revision $current..." + +dockerdir=deploy/linux/docker + +cat "$dockerdir"/Dockerfile_appimage.in | \ + perl -p -e "s/\[\[REVISION\]\]/$current/g" > \ + "$dockerdir"/Dockerfile_appimage.gen + +cat "$dockerdir"/Dockerfile_test_appimage.in | \ + perl -p -e "s/\[\[REVISION\]\]/$current/g" > \ + "$dockerdir"/Dockerfile_test_appimage.gen + +fgrep 'hg.sr.ht' ~/.ssh/known_hosts > "$dockerdir"/known_hosts +cp ~/.ssh/id_rsa_build "$dockerdir"/id_rsa_build +chmod 600 "$dockerdir"/known_hosts "$dockerdir"/id_rsa_build +trap "rm $dockerdir/known_hosts $dockerdir/id_rsa_build" 0 + +dockertag="cannam/tony-appimage-$current" + +sudo docker build -t "$dockertag" -f "$dockerdir"/Dockerfile_appimage.gen "$dockerdir" + +outdir="$dockerdir/output" +mkdir -p "$outdir" + +container=$(sudo docker create "$dockertag") + +sudo docker cp "$container":output-appimage.tar "$outdir" +sudo docker rm "$container" + +( cd "$outdir" ; tar xf output-appimage.tar && rm -f output-appimage.tar ) + +sudo docker build -f "$dockerdir"/Dockerfile_test_appimage.gen "$dockerdir"
--- a/deploy/linux/deb-skeleton/usr/share/applications/tony.desktop Thu Oct 10 13:17:29 2019 +0100 +++ b/deploy/linux/deb-skeleton/usr/share/applications/tony.desktop Thu Oct 10 13:18:06 2019 +0100 @@ -1,9 +1,9 @@ [Desktop Entry] -Name=Sonic Visualiser -Exec=sonic-visualiser %U -Keywords=audio; sound; visualiser; sonic; +Name=Tony +Exec=tony %U +Keywords=audio; sound Terminal=false Type=Application -Icon=sv-icon +Icon=tony-icon Categories=Audio;AudioVideo; -MimeType=application/x-sonicvisualiser;application/x-sonicvisualiser-layer;application/x-ogg;audio/mp3;audio/mpeg;audio/mpegurl;audio/x-flac;audio/x-mp3;audio/x-mpeg;audio/x-mpegurl;audio/x-wav;audio/wav;application/ogg;audio/x-vorbis+ogg; +MimeType=application/x-tony;application/x-ogg;audio/mp3;audio/mpeg;audio/mpegurl;audio/x-flac;audio/x-mp3;audio/x-mpeg;audio/x-mpegurl;audio/x-wav;audio/wav;application/ogg;audio/x-vorbis+ogg;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/deploy/linux/deploy-appimage.sh Thu Oct 10 13:18:06 2019 +0100 @@ -0,0 +1,122 @@ +#!/bin/bash + +set -eu + +program=tony +plugins="chp pyin" + +get_id() { + if [ -d .hg ]; then + hg id | sed 's/[+ ].*$//' + elif [ -d .git ]; then + git rev-parse --short HEAD + else + echo "WARNING: can't figure out revision from VCS metadata" 1>&2 + echo "unknown" + fi +} + +version=$(get_id) + +targetdir="${program}.AppDir" + +echo "Target dir is $targetdir" + +if [ -d "$targetdir" ]; then + echo "Target directory exists, not overwriting" + exit +fi + +mkdir "$targetdir" + +mkdir -p "$targetdir"/usr/bin +mkdir -p "$targetdir"/usr/lib/"$program" + +cp "$program" "$targetdir"/usr/bin/ + +for p in $plugins ; do + cp "$p.so" "$targetdir"/usr/lib/"$program"/ +done + +ldd /usr/lib/x86_64-linux-gnu/libpulse.so.0 || true + +add_dependencies() { + + local binary="$1" + + echo "ldd $binary yields:" + ldd "$binary" + + for lib in $(ldd "$binary" | grep '=> [^ ]*/lib/' | \ + sed 's/^.*=> //' | sed 's/ .*$//'); do + + base=$(basename "$lib") + if grep -v '^#' sv-dependency-builds/linux/appimage/excludelist | + grep -q "^$base$" ; then + echo "excluding: $lib" + continue + fi + + target="$targetdir/usr/lib/$(basename $lib)" + + mkdir -p "$(dirname $target)" + + if [ ! -f "$target" ]; then + + cp -Lv "$lib" "$target" + chmod +x "$target" + + add_dependencies "$lib" + + fi + done +} + +add_dependencies "$program" + +for p in $plugins ; do + add_dependencies "$p.so" +done + +qtplugins="gif icns ico jpeg tga tiff wbmp webp cocoa minimal offscreen xcb" +qtlibdirs="/usr/lib/x86_64-linux-gnu/qt5 /usr/lib/x86_64-linux-gnu/qt /usr/lib/qt5 /usr/lib/qt" + +QTDIR=${QTDIR:-} +if [ -n "$QTDIR" ]; then + qtlibdirs="$QTDIR $qtlibdirs" +fi + +for plug in $qtplugins; do + for libdir in $qtlibdirs; do + lib=$(find $libdir/plugins -name libq$plug.so -print 2>/dev/null || true) + if [ -n "$lib" ]; then + if [ -f "$lib" ]; then + subdir=$(basename $(dirname $lib)) + if [ t"$subdir" = t"plugins" ]; then + subdir="" + fi + target="$targetdir/usr/lib/qt5/plugins/$subdir/$(basename $lib)" + mkdir -p "$(dirname $target)" + cp -v "$lib" "$target" + chmod +x "$target" + add_dependencies "$lib" + break + fi + fi + done +done + +cp "$program.desktop" "$targetdir/" + +cp "icons/$program-icon.svg" "$targetdir/$program-icon.svg" + +cp "deploy/linux/AppRun" "$targetdir/" + +chmod +x "$targetdir/AppRun" + +# Do this with a separate extraction step, so as to make it work even +# in situations where FUSE is unavailable like in a Docker container +export ARCH=x86_64 +sv-dependency-builds/linux/appimage/appimagetool-x86_64.AppImage --appimage-extract +./squashfs-root/AppRun "$targetdir" "Tony-$version-x86_64.AppImage" +
--- a/deploy/linux/docker/32/Dockerfile Thu Oct 10 13:17:29 2019 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,24 +0,0 @@ -FROM 32bit/ubuntu:14.04 -MAINTAINER Chris Cannam <cannam@all-day-breakfast.com> -RUN apt-get update && apt-get install -y \ - build-essential \ - mercurial \ - qtbase5-dev qt5-default \ - libsndfile1-dev libsamplerate0-dev \ - libfftw3-dev \ - libbz2-dev \ - libjack-dev libjack0 libpulse-dev \ - libmad0-dev libid3tag0-dev \ - liboggz2-dev libfishsound1-dev \ - libasound2-dev \ - liblo-dev liblrdf0-dev libsord-dev libserd-dev \ - vamp-plugin-sdk librubberband-dev \ - libboost-dev libboost-test-dev \ - lintian \ - w3m -RUN hg clone -u v1.0-linuxbuild https://code.soundsoftware.ac.uk/hg/tony /opt/tony -WORKDIR /opt/tony -RUN ./configure && make -RUN make -C chp -f Makefile.linux -RUN make -C pyin -f Makefile.linux64 -RUN bash deploy/linux/deploy-deb.sh 1.0cc1-1 i386
--- a/deploy/linux/docker/64/Dockerfile Thu Oct 10 13:17:29 2019 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,24 +0,0 @@ -FROM ubuntu:14.04 -MAINTAINER Chris Cannam <cannam@all-day-breakfast.com> -RUN apt-get update && apt-get install -y \ - build-essential \ - mercurial \ - qtbase5-dev qt5-default \ - libsndfile1-dev libsamplerate0-dev \ - libfftw3-dev \ - libbz2-dev \ - libjack-dev libjack0 libpulse-dev \ - libmad0-dev libid3tag0-dev \ - liboggz2-dev libfishsound1-dev \ - libasound2-dev \ - liblo-dev liblrdf0-dev libsord-dev libserd-dev \ - vamp-plugin-sdk librubberband-dev \ - libboost-dev libboost-test-dev \ - lintian \ - w3m -RUN hg clone -u v1.0-linuxbuild https://code.soundsoftware.ac.uk/hg/tony /opt/tony -WORKDIR /opt/tony -RUN ./configure && make -RUN make -C chp -f Makefile.linux -RUN make -C pyin -f Makefile.linux64 -RUN bash deploy/linux/deploy-deb.sh 1.0cc1-1 amd64
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/deploy/linux/docker/Dockerfile_appimage.in Thu Oct 10 13:18:06 2019 +0100 @@ -0,0 +1,70 @@ +FROM ubuntu:14.04 +MAINTAINER Chris Cannam <cannam@all-day-breakfast.com> +RUN apt-get update && \ + apt-get install -y \ + software-properties-common \ + build-essential \ + libbz2-dev \ + libfftw3-dev \ + libfishsound1-dev \ + libid3tag0-dev \ + liblo-dev \ + liblrdf0-dev \ + libmad0-dev \ + liboggz2-dev \ + libopus-dev \ + libopusfile-dev \ + libpulse-dev \ + libasound2-dev \ + libjack-dev \ + libsamplerate-dev \ + libsndfile-dev \ + libsord-dev \ + libxml2-utils \ + libboost-all-dev \ + libgl1-mesa-dev \ + raptor-utils \ + librubberband-dev \ + git \ + mercurial \ + curl wget \ + mlton \ + autoconf automake libtool lintian + +# NB we do not install portaudio. We don't want to end up including it +# in the bundle, because it comes with a dependency on the JACK +# library which we don't want to bundle and can't assume people will +# have. However, we do install JACK because the Dynamic JACK mechanism +# should ensure we can detect, configure, and use that without +# actually linking against it. We also have Pulse as the default I/O. + +RUN apt-add-repository -y ppa:beineri/opt-qt-5.10.1-trusty +RUN apt-get update && \ + apt-get install -y \ + qt510base \ + qt510svg +RUN apt-get clean && rm -rf /var/lib/apt/lists/* + +RUN locale-gen en_US.UTF-8 +ENV LANG en_US.UTF-8 +ENV LANGUAGE en_US:en +ENV LC_ALL en_US.UTF-8 + +RUN hg clone -r[[REVISION]] https://code.soundsoftware.ac.uk/hg/tony + +WORKDIR /root + +COPY id_rsa_build .ssh/id_rsa_build +COPY known_hosts .ssh/known_hosts +RUN chmod 600 .ssh/id_rsa_build .ssh/known_hosts +RUN echo '{"accounts": {"sourcehut": "~breakfastquay"}}' > .repoint.json +RUN ( echo '[ui]' ; echo 'ssh = ssh -i /root/.ssh/id_rsa_build' ) > .hgrc + +WORKDIR /tony +ENV QTDIR /opt/qt510 +ENV PATH /opt/qt510/bin:$PATH +RUN ./configure +RUN make -j3 + +RUN deploy/linux/deploy-appimage.sh +RUN tar cvf output-appimage.tar *.AppImage && cp output-appimage.tar ..
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/deploy/linux/docker/Dockerfile_test_appimage.in Thu Oct 10 13:18:06 2019 +0100 @@ -0,0 +1,15 @@ +FROM centos:7 + +# Ensure that everything subsequent is re-run when a new revision is +# being built (rather than being cached) - so as to avoid potential +# mismatches between results of yum update and the package dependency +# installation itself +RUN echo [[REVISION]] + +RUN yum -y update +RUN yum -y groupinstall "X Window System" +RUN yum -y install wget +ADD output/Tony-[[REVISION]]-x86_64.AppImage Tony.AppImage +RUN chmod +x Tony.AppImage +RUN ./Tony.AppImage --appimage-extract +RUN ./squashfs-root/AppRun --version
--- a/repoint-lock.json Thu Oct 10 13:17:29 2019 +0100 +++ b/repoint-lock.json Thu Oct 10 13:18:06 2019 +0100 @@ -4,7 +4,7 @@ "pin": "0b6802e3b755" }, "svcore": { - "pin": "13bd41bd8a17" + "pin": "6eb3a76c74f7" }, "svgui": { "pin": "bfd8b22fd67c"
--- a/tony.desktop Thu Oct 10 13:17:29 2019 +0100 +++ b/tony.desktop Thu Oct 10 13:18:06 2019 +0100 @@ -4,6 +4,6 @@ Keywords=audio; sound; melody; singing; Terminal=false Type=Application -Icon=tony-128x128 +Icon=tony-icon Categories=Audio;AudioVideo; -MimeType=application/x-tony;application/x-ogg;audio/mp3;audio/mpeg;audio/mpegurl;audio/x-flac;audio/x-mp3;audio/x-mpeg;audio/x-mpegurl;audio/x-wav;audio/wav;application/ogg;audio/x-vorbis+ogg; +MimeType=application/x-tony;application/x-ogg;audio/mp3;audio/ogg;audio/mpeg;audio/mpegurl;audio/x-flac;audio/x-mp3;audio/x-mpeg;audio/x-mpegurl;audio/x-wav;audio/wav;application/ogg;audio/x-vorbis+ogg;
--- a/tonyapp.pro Thu Oct 10 13:17:29 2019 +0100 +++ b/tonyapp.pro Thu Oct 10 13:18:06 2019 +0100 @@ -17,6 +17,27 @@ linux*:TARGET = tony solaris*:TARGET = tony +linux* { + + tony_bins.path = $$PREFIX_PATH/bin/ + tony_bins.files = tony + tony_bins.CONFIG = no_check_exist + + tony_support.path = $$PREFIX_PATH/lib/tony/ + tony_support.files = chp.so pyin.so + tony_support.CONFIG = no_check_exist + + tony_desktop.path = $$PREFIX_PATH/share/applications/ + tony_desktop.files = tony.desktop + tony_desktop.CONFIG = no_check_exist + + tony_icon.path = $$PREFIX_PATH/share/icons/hicolor/scalable/apps/ + tony_icon.files = icons/tony-icon.svg + tony_icon.CONFIG = no_check_exist + + INSTALLS += tony_bins tony_support tony_desktop tony_icon +} + OBJECTS_DIR = o MOC_DIR = o