diff options
author | Todd Naugle <toddn@glw.com> | 2011-02-25 22:05:15 +0000 |
---|---|---|
committer | Todd Naugle <toddn@glw.com> | 2011-02-25 22:05:15 +0000 |
commit | e18cebd6d716d5a24960eb0c834db6a22cc2d67f (patch) | |
tree | 575f5d126f2f3ee168e8570bc89830d65398ebb6 | |
parent | 5d86418fd2294f7b573eb8e41dca2bbb6ef37a3a (diff) |
merge in changes from 2.0 ongoing. Includes the build type in the package name and other fixes from 2.0
git-svn-id: svn://localhost/ardour2/branches/3.0@8962 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r-- | tools/linux_packaging/ardour.sh.in | 24 | ||||
-rwxr-xr-x | tools/linux_packaging/build | 62 | ||||
-rwxr-xr-x | tools/linux_packaging/install.sh | 19 | ||||
-rwxr-xr-x | tools/linux_packaging/package | 42 | ||||
-rwxr-xr-x | tools/linux_packaging/stage2.run | 42 | ||||
-rw-r--r-- | tools/linux_packaging/uninstall.sh.in | 18 |
6 files changed, 159 insertions, 48 deletions
diff --git a/tools/linux_packaging/ardour.sh.in b/tools/linux_packaging/ardour.sh.in index 4ba1a48945..72c70380c5 100644 --- a/tools/linux_packaging/ardour.sh.in +++ b/tools/linux_packaging/ardour.sh.in @@ -1,5 +1,22 @@ #!/bin/sh +while [ $# -gt 0 ] ; do + echo "arg = $1" + case $1 in + + -d) + DEBUG="T"; + shift ;; + *) + #catch all for unknown arguments + echo "" + echo "!!! ERROR !!! - Unknown argument $1" + echo "" + exit 1 + ;; + esac +done + #LD_LIBRARY_PATH needs to be set (empty) so that epa can swap between the original and the bundled version export LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} @@ -34,7 +51,12 @@ export LD_LIBRARY_PATH=$INSTALL_DIR/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} sed "s?@ROOTDIR@/modules?$LIB_DIR/modules?" < $ETC_DIR/pango.modules.in > $USER_ARDOUR_DIR/pango.modules sed "s?@ROOTDIR@/loaders?$LIB_DIR/loaders?" < $ETC_DIR/gdk-pixbuf.loaders.in > $USER_ARDOUR_DIR/gdk-pixbuf.loaders -exec $INSTALL_DIR/bin/ardour-3.0 "$@" +if [ "T" = "$DEBUG" ]; then + export ARDOUR_INSIDE_GDB=1 + exec gdb $INSTALL_DIR/bin/ardour-3.0 "$@" +else + exec $INSTALL_DIR/bin/ardour-3.0 "$@" +fi diff --git a/tools/linux_packaging/build b/tools/linux_packaging/build index 24770145d5..2ff0fd0093 100755 --- a/tools/linux_packaging/build +++ b/tools/linux_packaging/build @@ -5,6 +5,11 @@ . ./buildenv # script for pulling together a Linux app bundle. +# +# This will create a bundle for a single architecture. +# Execute this scirpt on both x86 and x86_64 and then use +# package to merge the 2 bundles into a final package with the +# installer. MIXBUS= WITH_LADSPA=0 @@ -12,7 +17,8 @@ STRIP=1 PRINT_SYSDEPS= WITH_NLS= EXTERNAL_JACK= -VENDOR=Ardour +VENDOR=Ardour ; +BUILDTYPE="" if [ $# -eq 0 ] ; then echo "" @@ -35,7 +41,7 @@ while [ $# -gt 0 ] ; do MIXBUS=1; WITH_NLS=1 ; WITH_LADSPA=; - STRIP= ; + STRIP=1; APPNAME=Mixbus ; VENDOR=Harrison ; shift ;; @@ -48,7 +54,7 @@ while [ $# -gt 0 ] ; do --allinone) WITH_NLS= ; WITH_LADSPA=1; - STRIP= ; + STRIP=1; shift ;; --test) WITH_LADSPA=; STRIP= ; shift ;; @@ -98,13 +104,35 @@ case `uname -m` in ;; esac +# Figure out the Build Type +if grep -q "DEBUG = True" ../../build/c4che/default.cache.py; then + DEBUG="T" +else + DEBUG="F" +fi + +if [ x$DEBUG != x ]; then + if [ x$STRIP != x ]; then + BUILDTYPE="strip" + else + BUILDTYPE="dbg" + fi +fi + # the waf build tree to use when copying built/generated files BUILD_ROOT=../../build/default # setup directory structure -APPDIR=${APPNAME}_${ARCH}-${release_version}_${svn_version} +if [ -z "${BUILDTYPE}" ]; then + APPDIR=${APPNAME}_${ARCH}-${release_version}_${svn_version} + APP_VER_NAME=${APPNAME}-${release_version}_${svn_version} +else + APPDIR=${APPNAME}_${ARCH}-${release_version}_${svn_version}-${BUILDTYPE} + APP_VER_NAME=${APPNAME}-${release_version}_${svn_version}-${BUILDTYPE} +fi + APPBIN=$APPDIR/bin APPLIB=$APPDIR/lib Libraries=$APPLIB @@ -151,6 +179,7 @@ mkdir -p $Locale mkdir -p $Surfaces mkdir -p $Panners mkdir -p $Shared/templates +mkdir -p $Shared/doc # maybe set variables ENVIRONMENT=environment @@ -253,9 +282,9 @@ GTKROOT=`pkg-config --libs-only-L gtk+-2.0 | sed -e "s/-L//" -e "s/[[:space:]]// if [ ! -z "$GTKROOT" ]; then echo "Found GTKROOT using pkg-config" elif [ -d /usr/lib/gtk-2.0 ]; then - GTKROOT="/usr/lib/gtk-2.0" + GTKROOT="/usr/lib" elif [ -d /usr/local/lib/gtk-2.0 ]; then - GTKROOT="/usr/local/lib/gtk-2.0" + GTKROOT="/usr/local/lib" else echo "" echo "!!! ERROR !!! - Unable to locate gtk-2.0 directory. Packager will exit" @@ -287,9 +316,9 @@ PANGOROOT=`pkg-config --libs-only-L pango | sed -e "s/-L//" -e "s/[[:space:]]//g if [ ! -z "$PANGOROOT" ]; then echo "Found PANGOROOT using pkg-config" elif [ -d /usr/lib/pango ]; then - PANGOROOT="/usr/lib/pango" + PANGOROOT="/usr/lib" elif [ -d /usr/local/lib/pango ]; then - PANGOROOT="/usr/local/lib/pango" + PANGOROOT="/usr/local/lib" else echo "" echo "!!! ERROR !!! - Unable to locate pango directory. Packager will exit" @@ -530,8 +559,7 @@ done # # Add the uninstaller # -APP_VER_NAME=${APPNAME}-${release_version}_${svn_version} -sed -e "s/%REPLACE_PGM%/${APPNAME}/" -e "s/%REPLACE_VENDOR%/${VENDOR}/" -e "s/%REPLACE_VERSION%/${release_version}/" -e "s/%REPLACE_BUILD%/${svn_version}/" < uninstall.sh.in > $APPBIN/${APP_VER_NAME}.uninstall.sh +sed -e "s/%REPLACE_PGM%/${APPNAME}/" -e "s/%REPLACE_VENDOR%/${VENDOR}/" -e "s/%REPLACE_VERSION%/${release_version}/" -e "s/%REPLACE_BUILD%/${svn_version}/" -e "s/%REPLACE_TYPE%/${BUILDTYPE}/" < uninstall.sh.in > $APPBIN/${APP_VER_NAME}.uninstall.sh chmod a+x $APPBIN/${APP_VER_NAME}.uninstall.sh #Sanity Check file @@ -542,22 +570,12 @@ else exit 1 fi -# -# and now ... the final package -# - -if [ x$MIXBUS != x ] ; then - - # Mixbus packaging - - echo "Creating Mixbus packaging directory" - cp MixBus_Install_QuickStart.pdf "$APPDIR/Mixbus Install & Quick Start Guide.pdf" -fi - echo "Building tarball ..." rm -f $APPDIR.tar.bz2 tar -cjf $APPDIR.tar.bz2 $APPDIR +rm -rf $APPDIR/ + echo "Done." diff --git a/tools/linux_packaging/install.sh b/tools/linux_packaging/install.sh index 43e86b2fb2..33863ee646 100755 --- a/tools/linux_packaging/install.sh +++ b/tools/linux_packaging/install.sh @@ -3,14 +3,23 @@ # Make sure we have a terminal for the user to see and then run # the real install script. -if [ -z $WINDOWID ]; then +# Some systems don't correctly set the PWD when a script is double-clicked, +# so go ahead and figure out our path and make sure we are in that directory. + +SAVED_PWD=$PWD +PKG_PATH=$(dirname $(readlink -f $0)) +cd ${PKG_PATH} + +if [ -z "$TERM" ] || [ "$TERM" = "dumb" ]; then if which xterm > /dev/null; then - exec xterm -e ./stage2.run + exec xterm -e ${PKG_PATH}/.stage2.run elif which gnome-terminal > /dev/null; then - exec gnome-terminal -e ./stage2.run + exec gnome-terminal -e ${PKG_PATH}/.stage2.run elif which konsole > /dev/null; then - exec konsole -e ./stage2.run + exec konsole -e ${PKG_PATH}/.stage2.run fi else - ./stage2.run + ${PKG_PATH}/.stage2.run fi + +cd ${SAVED_PWD} diff --git a/tools/linux_packaging/package b/tools/linux_packaging/package index f405ad386b..be4ad86418 100755 --- a/tools/linux_packaging/package +++ b/tools/linux_packaging/package @@ -1,6 +1,12 @@ #!/bin/bash -# bundle +# package + +# This will collect up the x86 and x86_64 bundles created by build +# and package them together with an installer script. + +STRIP=1 +BUILDTYPE="" if [ $# -eq 0 ] ; then echo "" @@ -29,6 +35,8 @@ while [ $# -gt 0 ] ; do APPNAME=Ardour ; shift ;; + --nostrip) STRIP= ; shift ;; + *) #catch all for unknown arguments echo "" @@ -42,9 +50,32 @@ done release_version=`grep -m 1 '^VERSION' ../../wscript | awk '{print $3}' | sed "s/'//g"` svn_version=`grep -m 1 'svn_revision =' ../../libs/ardour/svn_revision.cc | cut -d"'" -f 2` -X86_BUILD="${APPNAME}_x86-${release_version}_${svn_version}.tar.bz2" -X86_64_BUILD="${APPNAME}_x86_64-${release_version}_${svn_version}.tar.bz2" -PACKAGE="${APPNAME}-${release_version}_${svn_version}" +# Figure out the Build Type +if grep -q "DEBUG = True" ../../build/c4che/default.cache.py; then + DEBUG="T" +else + DEBUG="F" +fi + +if [ x$DEBUG != x ]; then + if [ x$STRIP != x ]; then + BUILDTYPE="strip" + else + BUILDTYPE="dbg" + fi +fi + + +if [ -z ${BUILDTYPE} ]; then + X86_BUILD="${APPNAME}_x86-${release_version}_${svn_version}.tar.bz2" + X86_64_BUILD="${APPNAME}_x86_64-${release_version}_${svn_version}.tar.bz2" + PACKAGE="${APPNAME}-${release_version}_${svn_version}" +else + X86_BUILD="${APPNAME}_x86-${release_version}_${svn_version}-${BUILDTYPE}.tar.bz2" + X86_64_BUILD="${APPNAME}_x86_64-${release_version}_${svn_version}-${BUILDTYPE}.tar.bz2" + PACKAGE="${APPNAME}-${release_version}_${svn_version}-${BUILDTYPE}" +fi + if [ ! -e ${X86_BUILD} ]; then echo "" @@ -71,7 +102,8 @@ mkdir ${PACKAGE} mv ${X86_BUILD} ${PACKAGE} mv ${X86_64_BUILD} ${PACKAGE} cp install.sh ${PACKAGE} -cp stage2.run ${PACKAGE} +cp stage2.run ${PACKAGE}/.stage2.run +cp README ${PACKAGE} echo "Creating tarball..." tar -czf ${PACKAGE}.tar.gz ${PACKAGE} diff --git a/tools/linux_packaging/stage2.run b/tools/linux_packaging/stage2.run index 9dbd17f7b7..2ea1625011 100755 --- a/tools/linux_packaging/stage2.run +++ b/tools/linux_packaging/stage2.run @@ -99,6 +99,11 @@ SystemInstall () # Main ######################################################################## +# If you double click a script, some systems don't get the PWD correct. +# Force it to be correct +PKG_PATH=$(dirname $(readlink -f $0)) +cd ${PKG_PATH} + echo "" echo "Welcome to the ${PGM_NAME} installer" echo "" @@ -214,11 +219,20 @@ fi ################################ PGM_VERSION=$(echo ${BUNDLE_DIR} | awk 'BEGIN { FS = "-" } ; { print $2 }' | awk 'BEGIN { FS = "_"} ; { print $1}') PGM_BUILD=$(echo ${BUNDLE_DIR} | awk 'BEGIN { FS = "-" } ; { print $2 }' | awk 'BEGIN { FS = "_"} ; { print $2}') -PGM_FULL_NAME="${PGM_NAME}-${PGM_VERSION}_${PGM_BUILD}" +PGM_BUILDTYPE=$(echo ${BUNDLE_DIR} | awk 'BEGIN { FS = "-" } ; { print $3 }') -ICON_NAME="${PGM_VENDOR}-${PGM_NAME}_${PGM_VERSION}" #no dash since it seperates vendor from program -MENU_FILE="${PGM_VENDOR}-${PGM_NAME}_${PGM_VERSION}.desktop" #no dash since it seperates vendor from program -DESKTOP_LINK_FILE="${PGM_NAME}_${PGM_VERSION}.desktop" +if [ -z ${PGM_BUILDTYPE} ]; +then + PGM_FULL_NAME="${PGM_NAME}-${PGM_VERSION}_${PGM_BUILD}" + ICON_NAME="${PGM_VENDOR}-${PGM_NAME}_${PGM_VERSION}" #no dash between name and version since dash seperates vendor from program + MENU_FILE="${PGM_VENDOR}-${PGM_NAME}_${PGM_VERSION}.desktop" #no dash between name and version since dash seperates vendor from program + DESKTOP_LINK_FILE="${PGM_NAME}_${PGM_VERSION}.desktop" +else + PGM_FULL_NAME="${PGM_NAME}-${PGM_VERSION}_${PGM_BUILD}-${PGM_BUILDTYPE}" + ICON_NAME="${PGM_VENDOR}-${PGM_NAME}_${PGM_VERSION}_${PGM_BUILDTYPE}" #no dash between name and version since dash seperates vendor from program + MENU_FILE="${PGM_VENDOR}-${PGM_NAME}_${PGM_VERSION}_${PGM_BUILDTYPE}.desktop" #no dash between name and version since dash seperates vendor from program + DESKTOP_LINK_FILE="${PGM_NAME}_${PGM_VERSION}_${PGM_BUILDTYPE}.desktop" +fi PGM_EXEC_PATH="${INSTALL_DEST_BASE}/${PGM_FULL_NAME}/bin/${PGM_EXEC_FILE}" ICON_PATH="${INSTALL_DEST_BASE}/${PGM_FULL_NAME}/etc/icons" @@ -256,6 +270,7 @@ then echo "Running uninstaller $i" ${i} + sudo rm -f ${i} fi done fi @@ -278,10 +293,15 @@ echo "Version=1.0" >> /tmp/${MENU_FILE} echo "Type=Application" >> /tmp/${MENU_FILE} echo "Terminal=false" >> /tmp/${MENU_FILE} echo "Exec=${PGM_EXEC_PATH}" >> /tmp/${MENU_FILE} -echo "Name=${PGM_NAME}-${PGM_VERSION}" >> /tmp/${MENU_FILE} +if [ -z ${PGM_BUILDTYPE} ]; +then + echo "Name=${PGM_NAME}-${PGM_VERSION}" >> /tmp/${MENU_FILE} +else + echo "Name=${PGM_NAME}-${PGM_VERSION}-${PGM_BUILDTYPE}" >> /tmp/${MENU_FILE} +fi echo "Icon=${ICON_NAME}" >> /tmp/${MENU_FILE} echo "Comment=Digital Audio Workstation" >> /tmp/${MENU_FILE} -echo "Categories=AudioVideo;Audio;Recorder;" >> /tmp/${MENU_FILE} +echo "Categories=AudioVideo;AudioEditing;Audio;Recorder;" >> /tmp/${MENU_FILE} chmod ugo+rx /tmp/${MENU_FILE} sudo mv /tmp/${MENU_FILE} ${MENU_FILE_PATH}/. @@ -301,7 +321,8 @@ then fi sudo xdg-desktop-menu install ${MENU_FILE_PATH}/${MENU_FILE} - + sudo xdg-desktop-menu forceupdate --mode system # Some systems need an extra kick + echo "" echo "Creating a desktop link for ${PGM_NAME}" cp ${MENU_FILE_PATH}/${MENU_FILE} ~/Desktop/${DESKTOP_LINK_FILE} @@ -354,8 +375,9 @@ fi if ! which qjackctl > /dev/null; then echo "" - echo "The program QjackCtl is missing from this system. QjackCtl is an extremely useful tool" - echo "for any system that runs JACK applications like Ardour. We recommend that you install it." + echo "The program QjackCtl is missing from this system." + echo "QjackCtl is an extremely useful tool for any system that runs JACK applications like $PGM_NAME." + echo "We recommend that you install it." echo "" ANSWER=$(VaildateYesNoQuestion "Install QjackCtl using system software repository?") @@ -512,6 +534,6 @@ then fi echo "" -read -p "Press ENTER to close this window:" BLAH +read -p "Press ENTER to exit installer:" BLAH diff --git a/tools/linux_packaging/uninstall.sh.in b/tools/linux_packaging/uninstall.sh.in index 0e15b3d02c..468a4035fa 100644 --- a/tools/linux_packaging/uninstall.sh.in +++ b/tools/linux_packaging/uninstall.sh.in @@ -12,16 +12,24 @@ PGM_NAME="%REPLACE_PGM%" PGM_VENDOR="%REPLACE_VENDOR%" PGM_VERSION="%REPLACE_VERSION%" PGM_BUILD="%REPLACE_BUILD%" +PGM_BUILDTYPE="%REPLACE_TYPE%" INSTALL_DEST_BASE=/opt #### Derived Variables #### -PGM_PATH=${INSTALL_DEST_BASE}/${PGM_NAME}-${PGM_VERSION}_${PGM_BUILD} +if [ -z "${PGM_BUILDTYPE}" ]; then + PGM_PATH=${INSTALL_DEST_BASE}/${PGM_NAME}-${PGM_VERSION}_${PGM_BUILD} + ICON_NAME="${PGM_VENDOR}-${PGM_NAME}_${PGM_VERSION}" #no dash between name and version since dash seperates vendor from program + MENU_FILE="${PGM_VENDOR}-${PGM_NAME}_${PGM_VERSION}.desktop" #no dash between name and version since dash seperates vendor from program + DESKTOP_LINK_FILE="${PGM_NAME}_${PGM_VERSION}.desktop" +else + PGM_PATH=${INSTALL_DEST_BASE}/${PGM_NAME}-${PGM_VERSION}_${PGM_BUILD}-${PGM_BUILDTYPE} + ICON_NAME="${PGM_VENDOR}-${PGM_NAME}_${PGM_VERSION}_${PGM_BUILDTYPE}" #no dash between name and version since dash seperates vendor from program + MENU_FILE="${PGM_VENDOR}-${PGM_NAME}_${PGM_VERSION}_${PGM_BUILDTYPE}.desktop" #no dash between name and version since dash seperates vendor from program + DESKTOP_LINK_FILE="${PGM_NAME}_${PGM_VERSION}_${PGM_BUILDTYPE}.desktop" +fi -ICON_NAME="${PGM_VENDOR}-${PGM_NAME}_${PGM_VERSION}" #no dash between name and version since seperates vendor from program -MENU_FILE="${PGM_VENDOR}-${PGM_NAME}_${PGM_VERSION}.desktop" #no dash between name and version since seperates vendor from program -DESKTOP_LINK_FILE="${PGM_NAME}_${PGM_VERSION}.desktop" MENU_FILE_PATH="${PGM_PATH}/share/${MENU_FILE}" @@ -76,7 +84,7 @@ then # delete the old package sudo rm -rf ${PGM_PATH} - sudo rm -f $0 + sudo rm -f $0 else echo "" echo "!!! FAILURE !!! - install path ${PGM_PATH} does not exist." |