├── .gitattributes ├── README.md ├── 0001-Fix-building-against-the-system-portaudio-library.patch ├── .gitignore └── .travis.yml /.gitattributes: -------------------------------------------------------------------------------- 1 | # Normalize line endings of all files that Git considers to be text 2 | * text=auto 3 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Audacity AppImage 2 | 3 | This project contains a [Travis CI](https://travis-ci.org) `.travis.yml` file that builds an [AppImage](https://appimage.org/) from the source code in the https://github.com/audacity/audacity repository and makes the AppImage builds available at https://github.com/probonopd/audacity/releases. 4 | 5 | **Please let the Audacity project know if you would like to see an officially supported Audacity AppImage.** 6 | 7 | ![audacity_logo_512px_white](https://user-images.githubusercontent.com/2480569/33625018-2da426a6-d9ee-11e7-8265-b719ce869424.png) 8 | 9 | __Mininum system requirement is a mainstream desktop Linux distribution with glibc 2.18 (2104 or later).__ 10 | 11 | Audacity® is free, open source, cross-platform audio software for multi-track recording and editing. For more information, see http://www.audacityteam.org/. 12 | -------------------------------------------------------------------------------- /0001-Fix-building-against-the-system-portaudio-library.patch: -------------------------------------------------------------------------------- 1 | >From 5f9482a191359f2c477763a36d2c865c5f186602 Mon Sep 17 00:00:00 2001 2 | From: Antonio Ospite 3 | Date: Tue, 7 Nov 2017 13:06:33 +0100 4 | Subject: [PATCH] Fix building against the system portaudio library 5 | X-Face: z*RaLf`X<@C75u6Ig9}{oW$H;1_\2t5)({*|jhM/Vb;]yA5\I~93>J<_`<4)A{':UrE 8 | 9 | Building against the system portaudio results in this error: 10 | 11 | ./src/AudioIO.cpp:983: undefined reference to `PaUtil_GetTime' 12 | audacity-AudioIO.o: In function `audacityAudioCallback(void const*, void*, 13 | unsigned long, PaStreamCallbackTimeInfo const*, unsigned long, void*)': 14 | ./src/AudioIO.cpp:4630: undefined reference to `PaUtil_GetTime' 15 | collect2: error: ld returned 1 exit status 16 | Makefile:2349: recipe for target 'audacity' failed 17 | make[3]: *** [audacity] Error 1 18 | 19 | This is because PaUtil_GetTime is declared as a C symbol in pa_util.h 20 | but is resolved as a C++ symbol at link time. 21 | 22 | Audacity fixes this in the local tree with this change: 23 | https://github.com/audacity/audacity/commit/38fd97b8e26060332ab3e9e000a8882326a70ba7 24 | 25 | However this is not general enough for the portaudio debian package. 26 | 27 | Since PaUtil_GetTime() is the only function causing problems, just copy 28 | over the code where it's used. 29 | --- 30 | src/AudioIO.cpp | 17 ++++++++++++++++- 31 | 1 file changed, 16 insertions(+), 1 deletion(-) 32 | 33 | diff --git a/src/AudioIO.cpp b/src/AudioIO.cpp 34 | index a78bd1cab..d5481838d 100644 35 | --- a/src/AudioIO.cpp 36 | +++ b/src/AudioIO.cpp 37 | @@ -452,8 +452,23 @@ writing audio. 38 | #define ROUND(x) (int) ((x)+0.5) 39 | //#include 40 | #include "../lib-src/portmidi/pm_common/portmidi.h" 41 | - #include "../lib-src/portaudio-v19/src/common/pa_util.h" 42 | #include "NoteTrack.h" 43 | + 44 | +PaTime PaUtil_GetTime( void ) 45 | +{ 46 | +#ifdef HAVE_MACH_ABSOLUTE_TIME 47 | + return mach_absolute_time() * machSecondsConversionScaler_; 48 | +#elif defined(HAVE_CLOCK_GETTIME) 49 | + struct timespec tp; 50 | + clock_gettime(CLOCK_REALTIME, &tp); 51 | + return (PaTime)(tp.tv_sec + tp.tv_nsec * 1e-9); 52 | +#else 53 | + struct timeval tv; 54 | + gettimeofday( &tv, NULL ); 55 | + return (PaTime) tv.tv_usec * 1e-6 + tv.tv_sec; 56 | +#endif 57 | +} 58 | + 59 | #endif 60 | 61 | #ifdef EXPERIMENTAL_AUTOMATED_INPUT_LEVEL_ADJUSTMENT 62 | -- 63 | 2.15.0 64 | 65 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Autotools generated files 2 | locale/Makefile.in 3 | Makefile 4 | aclocal.m4 5 | autom4te.cache 6 | config.status 7 | bin-stamp 8 | .deps 9 | .dirstamp 10 | lib-stamp 11 | libtool 12 | stamp-h* 13 | stamp-po 14 | *.stamp 15 | 16 | # Handcrafted makefiles 17 | !lib-src/expat/amiga/Makefile 18 | !lib-src/libnyquist/nyquist/sys/unix/*/Makefile 19 | !lib-src/lv2/Makefile 20 | !lib-src/mod-script-pipe/Makefile 21 | 22 | # Generated files by build system 23 | lib-src/expat/expat_config.h 24 | lib-src/libflac/doc/Doxyfile 25 | lib-src/libflac/config.h 26 | lib-src/libflac/test/common.sh 27 | lib-src/libid3tag/config.h 28 | lib-src/libid3tag/libid3tag.list 29 | lib-src/libmad/config.h 30 | lib-src/libmad/libmad.list 31 | lib-src/libmad/mad.h 32 | lib-src/libogg/config.h 33 | lib-src/libogg/include/ogg/config_types.h 34 | lib-src/libogg/libogg.spec 35 | lib-src/libsndfile/build-test-tarball.mk 36 | lib-src/libsndfile/doc/libsndfile.css 37 | lib-src/libsndfile/libsndfile.spec 38 | lib-src/libsndfile/man/sndfile-deinterleave.1 39 | lib-src/libsndfile/man/sndfile-metadata-set.1 40 | lib-src/libsndfile/src/config.h 41 | lib-src/libsndfile/src/sndfile.h 42 | lib-src/libsndfile/src/version-metadata.rc 43 | lib-src/libsndfile/tests/pedantic-header-test.sh 44 | lib-src/libsndfile/tests/test_wrapper.sh 45 | lib-src/libsoxr/soxr-config.h 46 | lib-src/libsoxr/src/libsoxr-dev.src 47 | lib-src/libsoxr/src/libsoxr.src 48 | lib-src/libsoxr/tests/ref-*.s32 49 | lib-src/libvorbis/config.h 50 | lib-src/libvorbis/doc/Doxyfile 51 | lib-src/libvorbis/libvorbis.spec 52 | lib-src/sbsms/libsbsms.spec 53 | lib-src/sbsms/src/config.h 54 | lib-src/soundtouch/include/soundtouch_config.h 55 | lib-src/twolame/doc/html/Doxyfile 56 | lib-src/twolame/libtwolame/config.h 57 | locale/POTFILES 58 | src/audacity.desktop 59 | src/RevisionIdent.h 60 | src/configunix.h 61 | src/configwin.h 62 | *.pc 63 | 64 | # CMake build output 65 | lib-src/libsoxr/CMakeCache.txt 66 | lib-src/libsoxr/*.cmake 67 | CMakeFiles/ 68 | CTestTestfile.cmake 69 | cmake_install.cmake 70 | 71 | # Waf build output 72 | lib-src/lv2/.buildvars 73 | lib-src/lv2/include/ 74 | lib-src/lv2/*/build/ 75 | lib-src/lv2/srcdir.mk 76 | .lock-waf_linux2_build 77 | 78 | # Mac build outputs 79 | mac/Audacity.xcodeproj/project.xcworkspace/contents.xcworkspacedata 80 | mac/Audacity.xcodeproj/project.xcworkspace/xcshareddata/Audacity.xccheckout 81 | mac/Makefile 82 | mac/confdefs.h 83 | mac/config.status 84 | mac/conftest.c 85 | mac/help/ 86 | mac/images/ 87 | mac/lib-src/ 88 | mac/libtool 89 | mac/po/ 90 | mac/src/ 91 | mac/tests/ 92 | 93 | # Doxygen output 94 | dox/ 95 | 96 | # Compiled Object files 97 | *.slo 98 | *.lo 99 | *.o 100 | *.obj 101 | *.pyc 102 | 103 | # Other unwanted files. 104 | *.suo 105 | *.sdf 106 | *.exp 107 | *.ilk 108 | *.pdb 109 | *.idb 110 | *.lastbuild 111 | *.log 112 | *.tlog 113 | *.ipch 114 | *.opensdf 115 | *.vcxproj.user 116 | 117 | # Precompiled Headers 118 | *.gch 119 | *.pch 120 | *.ncb 121 | 122 | # Compiled Dynamic libraries 123 | *.so 124 | *.dylib 125 | *.dll 126 | 127 | # Compiled translation files (GNU Machine Object) 128 | *.gmo 129 | 130 | # Compiled Static libraries 131 | *.lai 132 | *.la 133 | *.a 134 | *.lib 135 | 136 | # Executables 137 | *.exe 138 | *.app 139 | 140 | # Executable without extension 141 | /audacity 142 | src/audacity 143 | lib-src/expat/examples/elements 144 | lib-src/expat/examples/outline 145 | lib-src/expat/xmlwf/xmlwf 146 | lib-src/libflac/examples/c/decode/file/example_c_decode_file 147 | lib-src/libflac/examples/c/encode/file/example_c_encode_file 148 | lib-src/libflac/examples/cpp/decode/file/example_cpp_decode_file 149 | lib-src/libflac/examples/cpp/encode/file/example_cpp_encode_file 150 | lib-src/libflac/src/flac/flac 151 | lib-src/libflac/src/metaflac/metaflac 152 | lib-src/libflac/src/test_grabbag/cuesheet/test_cuesheet 153 | lib-src/libflac/src/test_grabbag/picture/test_picture 154 | lib-src/libflac/src/test_libFLAC++/test_libFLAC++ 155 | lib-src/libflac/src/test_libFLAC/test_libFLAC 156 | lib-src/libflac/src/test_seeking/test_seeking 157 | lib-src/libflac/src/test_streams/test_streams 158 | lib-src/libogg/src/test_bitwise 159 | lib-src/libogg/src/test_framing 160 | lib-src/libsndfile/src/G72x/g72x_test 161 | lib-src/libsndfile/src/test_main 162 | lib-src/libsoxr/examples/1a-lsr 163 | lib-src/libsoxr/examples/3-options-input-fn 164 | lib-src/libsoxr/tests/vector-cmp 165 | lib-src/libsoxr/tests/vector-gen 166 | lib-src/libvorbis/lib/test_sharedbook 167 | lib-src/portaudio-v19/bin/ 168 | lib-src/soundtouch/source/SoundStretch/soundstretch 169 | lib-src/twolame/frontend/twolame 170 | lib-src/twolame/simplefrontend/stwolame 171 | 172 | # Mac Specific 173 | .DS_Store 174 | xcuserdata 175 | *.xcconfig 176 | mac/build 177 | 178 | # Windows specific 179 | win/Debug 180 | win/Release 181 | win/Projects/*/Debug 182 | win/Projects/*/Release 183 | win/.vs/ 184 | 185 | # All those help files 186 | help/manual* 187 | 188 | # Misc 189 | src/RevisionIdent.h 190 | win/resetPrefs.txt 191 | 192 | # Emacs backup files 193 | *~ 194 | win/xaudacity.ico 195 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: cpp 2 | compiler: gcc 3 | sudo: require 4 | dist: trusty 5 | 6 | env: 7 | # JACK=yes FFMPEG=yes FLAC=no 8 | # JACK=no FFMPEG=yes FLAC=no 9 | # JACK=yes FFMPEG=no FLAC=no 10 | # JACK=no FFMPEG=no FLAC=no 11 | # JACK=yes FFMPEG=yes FLAC=yes 12 | # JACK=no FFMPEG=yes FLAC=yes 13 | - JACK=yes FFMPEG=no FLAC=yes 14 | - JACK=no FFMPEG=no FLAC=yes 15 | 16 | before_install: 17 | - git clone https://github.com/audacity/audacity --depth 1 --shallow-submodules 18 | - cd audacity 19 | - cp ../000* . 20 | - if [ "$JACK" == "yes" ] ; then patch -p1 < 0001-Fix-building-against-the-system-portaudio-library.patch ; fi # To be able to use --with-portaudio=system which is needed to pull in libjack.so.1 21 | - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test 22 | - sudo add-apt-repository -y ppa:jonathonf/ffmpeg-3 23 | - sudo apt-get update -qq 24 | - sudo apt-get install -y autogen libasound2-dev libavcodec-dev libexpat1-dev libflac++-dev libid3tag0-dev libjack-dev liblilv-dev libmad0-dev libmp3lame-dev libogg-dev libportsmf-dev libsbsms-dev libsndfile1-dev libsoundtouch-dev libsoxr-dev libsuil-dev libtwolame-dev libvorbis-dev lv2-dev portaudio19-dev vamp-plugin-sdk libavcodec-dev libavformat-dev libswscale-dev libavutil-dev libswresample-dev libwxgtk3.0-dev libgtk2.0-dev gettext libasound2-dev alsa-utils alsa-oss gcc-4.9 g++-4.9 cpp-4.9 25 | - git show -s --format="#define REV_LONG \"%H\"%n#define REV_TIME \"%cd\"%n" | tee ./src/RevisionIdent.h 26 | - export CXX="g++-4.9" CC="gcc-4.9" 27 | - FLAGS="-w -std=gnu++11" 28 | - export CFLAGS="$CFLAGS $FLAGS" 29 | - export CXXFLAGS="$CXXFLAGS $FLAGS" 30 | - g++-4.9 --version 31 | 32 | script: 33 | - # Despite libsbsms-dev, getting: 34 | - # configure: error: You requested using the system libraries for LIBSBSMS but they are not available 35 | - # when using --with-sbsms=system 36 | - # similarly, despite lv2-dev, getting: 37 | - # configure: error: You requested using the system libraries for LV2 but they are not available 38 | - # when using --with-lv2=system 39 | - if [ "$JACK" == "yes" ] ; then PORTAUDIO="--with-portaudio=system" ; else PORTAUDIO="--with-portaudio=local" ; fi 40 | - if [ "$FFMPEG" == "yes" ] ; then FFM="--with-ffmpeg=system" ; else FFM="--with-ffmpeg=local" ; fi 41 | - if [ "$FLAC" == "yes" ] ; then FLACS="--with-libflac=system" ; fi 42 | - if [ "$JACK" == "yes" ] || [ "$FFMPEG" == "yes" ] || [ "$FLAC" == "yes" ] ; then DYLD="--disable-dynamic-loading" ; fi 43 | - time ./configure --prefix=/usr $DYLD --with-lib-preference="local system" $FFM $PORTAUDIO $FLACS --with-soundtouch=system # --with-expat=system --with-lame=system --with-libid3tag=system --with-libmad=system --with-libsndfile=system --with-libsoxr=system --with-libtwolame=system --with-libvamp=system --with-libvorbis=system --with-portsmf=system 44 | - time make -j$(nproc) 45 | - make install DESTDIR=$(readlink -f appdir) ; find appdir/ 46 | - strip appdir/usr/bin/audacity # FIXME: "make install" should do this automatically 47 | - cp LICENSE.txt appdir/ 48 | - ( cd appdir/usr/share/audacity ; wget "https://github.com/probonopd/audacity/releases/download/manual/audacity-manual-2.2.1.zip" ; unzip *.zip ; rm *.zip ) 49 | - sed -i -e 's|^Exec=.*|Exec=audacity|g' appdir/usr/share/applications/audacity.desktop 50 | - wget -c -q "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage" 51 | - chmod a+x linuxdeployqt*.AppImage 52 | - unset QTDIR; unset QT_PLUGIN_PATH ; unset LD_LIBRARY_PATH 53 | - export VERSION=$(git rev-parse --short HEAD) # linuxdeployqt uses this for naming the file 54 | - if [ "$FFMPEG" == "yes" ] ; then sed -i -e 's|^Name=.*|& with FFMPEG|g' appdir/usr/share/applications/audacity.desktop ; fi 55 | - if [ "$FLAC" == "yes" ] ; then sed -i -e 's|^Name=.*|& with FLAC|g' appdir/usr/share/applications/audacity.desktop ; fi 56 | - if [ "$JACK" == "yes" ] ; then sed -i -e 's|^Name=.*|& for JACK|g' appdir/usr/share/applications/audacity.desktop ; fi 57 | - ./linuxdeployqt*.AppImage ./appdir/usr/share/applications/*.desktop -bundle-non-qt-libs 58 | # Workaround to increase compatibility with older systems; see https://github.com/darealshinji/AppImageKit-checkrt for details 59 | - mkdir -p appdir/usr/optional/ ; wget -c https://github.com/darealshinji/AppImageKit-checkrt/releases/download/continuous/exec-x86_64.so -O ./appdir/usr/optional/exec.so 60 | - mkdir -p appdir/usr/optional/libstdc++/ ; cp /usr/lib/x86_64-linux-gnu/libstdc++.so.6 ./appdir/usr/optional/libstdc++/ 61 | - ( cd appdir/usr/ ; ln -s share/audacity/* . ) # Audacity loads e.g., nyquist/ from cwd # FIXME; https://sourceforge.net/p/audacity/mailman/message/36304847/ 62 | - ( cd appdir ; rm AppRun ; wget -c https://github.com/darealshinji/AppImageKit-checkrt/releases/download/continuous/AppRun-patched-x86_64 -O AppRun ; chmod a+x AppRun) 63 | - if [ "$JACK" == "yes" ] ; then find ./appdir/ -ipath '*libjack*' -delete ; fi # The bundled libjack.so.1 refuses to work with the JACK on Ubuntu 17.10 64 | - NAME=$(grep '^Name=.*' appdir/usr/share/applications/audacity.desktop | cut -d "=" -f 2 | sed -e 's|\ |_|g') 65 | - ./linuxdeployqt*.AppImage ./appdir/usr/share/applications/*.desktop -appimage 66 | 67 | after_success: 68 | - find ./appdir -executable -type f -exec ldd {} \; | grep " => /usr" | cut -d " " -f 2-3 | sort | uniq 69 | - # curl --upload-file ./APPNAME*.AppImage https://transfer.sh/APPNAME-git.$(git rev-parse --short HEAD)-x86_64.AppImage 70 | - wget -c https://github.com/probonopd/uploadtool/raw/master/upload.sh 71 | - bash upload.sh ./Audacity*.AppImage* 72 | 73 | branches: 74 | except: 75 | - # Do not build tags that we create when we upload to GitHub Releases 76 | - /^(?i:continuous)$/ 77 | 78 | --------------------------------------------------------------------------------