diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2013-12-03 11:51:25 -0500 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2013-12-03 11:51:25 -0500 |
commit | 8648a8a13b04549362f14a0738947d997ef1abc7 (patch) | |
tree | 702652b49789b13d647c4c93df985f65361a4118 /tools | |
parent | c428ec14b923928690492cab0428f8fad45f7658 (diff) | |
parent | ae6b0b9f1ab02ab949eaf741b98e69bdab487e92 (diff) |
fix up wscript/build issues in exportvis after merge with master
Diffstat (limited to 'tools')
-rw-r--r-- | tools/define_versions.sh | 25 | ||||
-rwxr-xr-x | tools/linux_packaging/build | 21 | ||||
-rwxr-xr-x | tools/linux_packaging/package | 16 | ||||
-rwxr-xr-x | tools/nofuzz.sh | 14 | ||||
-rwxr-xr-x | tools/osx_packaging/osx_build | 74 |
5 files changed, 104 insertions, 46 deletions
diff --git a/tools/define_versions.sh b/tools/define_versions.sh index 6f5c17773c..654617a253 100644 --- a/tools/define_versions.sh +++ b/tools/define_versions.sh @@ -2,15 +2,24 @@ # this is sourced by build and package, and executed from within build/{osx,linux}_packaging # -major_version=`grep -m 1 '^MAJOR = ' ../../wscript | awk '{print $3}' | sed "s/'//g"` -minor_version=`grep -m 1 '^MINOR = ' ../../wscript | awk '{print $3}' | sed "s/'//g"` -release_version=${major_version}.${minor_version} -r=`cut -d'"' -f2 < ../../libs/ardour/revision.cc | sed -e 1d -e "s/[0-9][0-9]*\.[0-9][0-9]*-//"` -if echo $r | grep -q -e - ; then - revcount=`echo $r | cut -d- -f1` +if uname -a | grep arwin >/dev/null 2>&1 ; then + EXTENDED_RE=-E +else + EXTENDED_RE=-r +fi + +GIT_REV_REGEXP='([0-9][0-9]*)\.([0-9][0-9]*)-?([0-9][0-9]*)?-?([a-z0-9]*)' + +major_version=`cut -d'"' -f2 < ../../libs/ardour/revision.cc | sed $EXTENDED_RE -e 1d -e "s/$GIT_REV_REGEXP/\1/"` +minor_version=`cut -d'"' -f2 < ../../libs/ardour/revision.cc | sed $EXTENDED_RE -e 1d -e "s/$GIT_REV_REGEXP/\2/"` +r=`cut -d'"' -f2 < ../../libs/ardour/revision.cc | sed $EXTENDED_RE -e 1d -e "s/$GIT_REV_REGEXP/\3/"` +commit=`cut -d'"' -f2 < ../../libs/ardour/revision.cc | sed $EXTENDED_RE -e 1d -e "s/$GIT_REV_REGEXP/\4/"` + +if [ "x$r" != "x" ] ; then + revcount=$r fi -commit=`echo $r | cut -d- -f2` -version=${release_version}${revcount:+.$revcount} + +release_version=${major_version}.${minor_version}${revcount:+.$revcount} # # Figure out the Build Type diff --git a/tools/linux_packaging/build b/tools/linux_packaging/build index 3bf793a637..e8cc4d53b2 100755 --- a/tools/linux_packaging/build +++ b/tools/linux_packaging/build @@ -97,8 +97,12 @@ fi . ../define_versions.sh -echo "Version is $version / $commit" -info_string="$version ($commit) built on `hostname` by `whoami` on `date`" +echo "Version is $release_version" +if [ "x$commit" != "x" ] ; then + info_string="$release_version ($commit) built on `hostname` by `whoami` on `date`" +else + info_string="$release_version built on `hostname` by `whoami` on `date`" +fi echo "Info string is $info_string" # Figure out our CPU type @@ -134,11 +138,11 @@ fi # setup directory structure if [ -z "${BUILDTYPE}" ]; then - APPDIR=${APPNAME}_${ARCH}-${version} - APP_VER_NAME=${APPNAME}-${version} + APPDIR=${APPNAME}_${ARCH}-${release_version} + APP_VER_NAME=${APPNAME}-${release_version} else - APPDIR=${APPNAME}_${ARCH}-${version}-${BUILDTYPE} - APP_VER_NAME=${APPNAME}-${version}-${BUILDTYPE} + APPDIR=${APPNAME}_${ARCH}-${release_version}-${BUILDTYPE} + APP_VER_NAME=${APPNAME}-${release_version}-${BUILDTYPE} fi APPBIN=$APPDIR/bin @@ -534,6 +538,9 @@ cp -R ../../gtk2_ardour/splash.png $Shared cp -R ../../gtk2_ardour/small-splash.png $Shared cp -R ../../gtk2_ardour/ArdourMono.ttf $Shared +# install bundled LV2s to <app>/lib/LV2/ +cp -R $BUILD_ROOT/libs/LV2 $APPLIB/ + # go through and recursively remove any .svn dirs in the bundle for svndir in `find $APPDIR -name .svn -type d`; do rm -rf $svndir @@ -566,7 +573,7 @@ fi # # Add the uninstaller # -sed -e "s/%REPLACE_PGM%/${APPNAME}/" -e "s/%REPLACE_VENDOR%/${VENDOR}/" -e "s/%REPLACE_VERSION%/${version}/" -e "s/%REPLACE_TYPE%/${BUILDTYPE}/" < 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_TYPE%/${BUILDTYPE}/" < uninstall.sh.in > $APPBIN/${APP_VER_NAME}.uninstall.sh chmod a+x $APPBIN/${APP_VER_NAME}.uninstall.sh #Sanity Check file diff --git a/tools/linux_packaging/package b/tools/linux_packaging/package index 259a2a22da..5fc6aee1f7 100755 --- a/tools/linux_packaging/package +++ b/tools/linux_packaging/package @@ -56,8 +56,8 @@ if [ x$DEBUG = xT ]; then BUILDTYPE="dbg" fi -X86_BUNDLE="${APPNAME}_x86-${version}" -X86_64_BUNDLE="${APPNAME}_x86_64-${version}" +X86_BUNDLE="${APPNAME}_x86-${release_version}" +X86_64_BUNDLE="${APPNAME}_x86_64-${release_version}" if [ ! -z ${BUILDTYPE} ]; then X86_BUNDLE="${X86_BUNDLE}-${BUILDTYPE}" @@ -112,22 +112,22 @@ fi if [ -z ${BUILDTYPE} ]; then if [ "${SINGLE_ARCH}" = "T" ]; then if [ "${X86_BUNDLE_OK}" = "T" ]; then - PACKAGE="${APPNAME}_32bit-${version}" + PACKAGE="${APPNAME}_32bit-${release_version}" else - PACKAGE="${APPNAME}_64bit-${version}" + PACKAGE="${APPNAME}_64bit-${release_version}" fi else - PACKAGE="${APPNAME}-${version}" + PACKAGE="${APPNAME}-${release_version}" fi else if [ "${SINGLE_ARCH}" = "T" ]; then if [ "${X86_BUNDLE_OK}" = "T" ]; then - PACKAGE="${APPNAME}_32bit-${version}-${BUILDTYPE}" + PACKAGE="${APPNAME}_32bit-${release_version}-${BUILDTYPE}" else - PACKAGE="${APPNAME}_64bit-${version}-${BUILDTYPE}" + PACKAGE="${APPNAME}_64bit-${release_version}-${BUILDTYPE}" fi else - PACKAGE="${APPNAME}-${version}-${BUILDTYPE}" + PACKAGE="${APPNAME}-${release_version}-${BUILDTYPE}" fi fi diff --git a/tools/nofuzz.sh b/tools/nofuzz.sh new file mode 100755 index 0000000000..cf0a1ac8aa --- /dev/null +++ b/tools/nofuzz.sh @@ -0,0 +1,14 @@ +#!/bin/sh +## this script should be run from the top-level source dir +## it remove all fuzzy and obsolte translations and wraps +## long lines. +## +## update .po and .pot files: + ./waf i18n_pot + +TEMPFILE=`mktemp` +for file in `git ls-files | grep -e '.po$'`; do + cp $file $TEMPFILE + msgattrib -o $file --no-fuzzy --no-obsolete $TEMPFILE +done +rm $TEMPFILE diff --git a/tools/osx_packaging/osx_build b/tools/osx_packaging/osx_build index bab4906f2e..fcf1febe84 100755 --- a/tools/osx_packaging/osx_build +++ b/tools/osx_packaging/osx_build @@ -75,8 +75,12 @@ if test -z "$PRODUCT_PKG_DIR" -o -z "$APPNAME"; then fi . ../define_versions.sh -echo "Version is $release_version / $revision" -info_string="$version built on `hostname` by `whoami` on `date`" +echo "Version is $release_version" +if [ "x$commit" != "x" ] ; then + info_string="$release_version ($commit) built on `hostname` by `whoami` on `date`" +else + info_string="$release_version built on `hostname` by `whoami` on `date`" +fi echo "Info string is $info_string" # setup directory structure @@ -177,12 +181,12 @@ env="<key>LSEnvironment</key><dict>$env<key>ARDOUR_BUNDLED</key><string>true</st # edit plist sed -e "s?@ENV@?$env?g" \ - -e "s?@VERSION@?$release_version/$revision?g" \ + -e "s?@VERSION@?$release_version?g" \ -e "s?@INFOSTRING@?$info_string?g" < Info.plist.in > Info.plist # and plist strings sed -e "s?@APPNAME@?$appname?" \ -e "s?@ENV@?$env?g" \ - -e "s?@VERSION@?$release_version/$revision?g" \ + -e "s?@VERSION@?$release_version?g" \ -e "s?@INFOSTRING@?$info_string?g" < InfoPlist.strings.in > Resources/InfoPlist.strings || exit 1 # copy static files @@ -219,21 +223,42 @@ fi # copy locale files if test x$WITH_NLS != x ; then echo "NLS support ..." - echo "I hope you remembered to run scons msgupdate!" + echo "I hope you remembered to run waf i18n" LINGUAS= - for file in $BUILD_ROOT/gtk2_ardour/*.mo - do - lang=`basename $file | sed 's/\.mo//'` - mkdir -p $Locale/$lang/LC_MESSAGES - cp $file $Locale/$lang/LC_MESSAGES/gtk2_ardour.mo - LINGUAS="$LINGUAS $lang" - done - for file in $BUILD_ROOT/libs/ardour/*.mo - do - lang=`basename $file | sed 's/\.mo//'` - mkdir -p $Locale/$lang/LC_MESSAGES - cp $file $Locale/$lang/LC_MESSAGES/libardour.mo + + for pkg in gtk2_ardour libs/ardour libs/gtkmm2ext ; do + files=`find ../../$pkg -name "*.mo"` + + # + # the package name is appended with a number so that + # it can be parallel installed during a regular install + # with older (and newer) versions. it is just the major + # number of the release (i.e. leading digits) + # + + vsuffix=`echo $release_version | sed 's/^\([0-9][0-9]*\).*/\1/'` + + if [ -z "$files" ]; then + echo "" + echo "!!!! WARNING !!!! - Did not find any .mo files in ../../$pkg" + echo "" + fi + + for file in $files + do + echo $file + lang=`basename $file | sed 's/\.mo//'` + mkdir -p $Locale/$lang/LC_MESSAGES + cp $file $Locale/$lang/LC_MESSAGES/`basename $pkg`$vsuffix.mo + echo copy $file to $Locale/$lang/LC_MESSAGES/`basename $pkg`$vsuffix.mo + if echo $LINGUAS | grep $lang >/dev/null 2>&1 ; then + : + else + LINGUAS="$LINGUAS $lang" + fi + done done + for l in $LINGUAS do if [ -d $GTKSTACK_ROOT/share/locale/$l ] ; then @@ -351,7 +376,7 @@ cp $ARDOURSTACK_ROOT/lib/suil-0/lib* $Frameworks while [ true ] ; do missing=false - for file in $APPROOT/MacOS/* $Frameworks/* $Frameworks/modules/* $Panners/*.dylib $Surfaces/*.dylib $Plugins/*.so ; do + for file in $APPROOT/MacOS/* $Frameworks/* $Frameworks/modules/* $Panners/*.dylib $Backends/*.dylib $Surfaces/*.dylib $Plugins/*.so ; do if ! file $file | grep -qs Mach-O ; then continue fi @@ -417,6 +442,9 @@ for svndir in `find $APPDIR -name .svn -type dir`; do rm -rf $svndir done +# install bundled LV2s to <app>/Contents/lib/LV2/ +cp -R $BUILD_ROOT/libs/LV2 $Frameworks/ + # now fix up the executables echo "Fixing up executable dependency names ..." executables=$MAIN_EXECUTABLE @@ -438,7 +466,7 @@ done echo "Fixing up library names ..." # now do the same for all the libraries we include -for libdir in $Frameworks $Frameworks/modules $Surfaces $Panners ; do +for libdir in $Frameworks $Frameworks/modules $Surfaces $Panners $Backends ; do libbase=`basename $libdir` @@ -545,10 +573,10 @@ fi echo "Building DMG ..." -# UC_DMG=$APPNAME-${release_version}-${revision}-UC.dmg -# FINAL_DMG=$APPNAME-${release_version}-${revision}.dmg -UC_DMG=$APPNAME-$version.dmg -VOLNAME=$APPNAME-$version +# UC_DMG=$APPNAME-${release_version}-UC.dmg +# FINAL_DMG=$APPNAME-${release_version}.dmg +UC_DMG=$APPNAME-$release_version.dmg +VOLNAME=$APPNAME-$release_version # TODO use mktemp export TMPDIR=`pwd` |