From bca45d2a71303dfb2b5220a17075705d5ef4b46c Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 24 May 2012 18:22:35 +0000 Subject: fixup 2.X osx_build script git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@12436 d708f5d6-7413-0410-9779-e7cbd77b26cf --- tools/osx_packaging/osx_build | 103 ++++++++++++++++++++++++------------------ 1 file changed, 58 insertions(+), 45 deletions(-) (limited to 'tools') diff --git a/tools/osx_packaging/osx_build b/tools/osx_packaging/osx_build index 8233868be6..c9379e4bd7 100755 --- a/tools/osx_packaging/osx_build +++ b/tools/osx_packaging/osx_build @@ -36,6 +36,10 @@ STRIP=1 PRINT_SYSDEPS= WITH_NLS= EXTERNAL_JACK= +BINNAME=Ardour2 +APPNAME=Ardour +BUILT_EXECUTABLE=ardour +GDK_LOADERS=gdk-pixbuf-2.0/2.10.0 while [ $# -gt 0 ] ; do echo "arg = $1" @@ -51,16 +55,17 @@ while [ $# -gt 0 ] ; do WITH_LADSPA=1; STRIP= ; PRODUCT_PKG_DIR=ArdourSAE ; - APPNAME=Ardour ; shift ;; --mixbus) MIXBUS=1; WITH_NLS=1 ; SAE= ; INTERNAL_JACK=; WITH_LADSPA=; - STRIP= ; - PRODUCT_PKG_DIR=MixBus; - APPNAME=Mixbus ; + STRIP=1 ; + PRODUCT_PKG_DIR=Mixbus2; + APPNAME=Mixbus2 ; + BINNAME=Mixbus2 ; + BUILT_EXECUTABLE=mixbus ; shift ;; --public) WITH_NLS=1 ; SAE= ; @@ -68,7 +73,6 @@ while [ $# -gt 0 ] ; do WITH_LADSPA=1; STRIP= ; PRODUCT_PKG_DIR=Ardour; - APPNAME=Ardour ; shift ;; --allinone) SAE= ; WITH_NLS= ; @@ -78,6 +82,8 @@ while [ $# -gt 0 ] ; do PRODUCT_PKG_DIR=Ardour ; shift ;; --test) SAE= ; INTERNAL_JACK=; WITH_LADSPA=; STRIP= ; shift ;; + + --old-stack) GDK_LOADERS=gtk-2.0/2.10.0 ; shift ;; # # specific build flags @@ -96,9 +102,14 @@ if [ x$EXTERNAL_JACK != x -a x$INTERNAL_JACK != x ] ; then echo "It makes no sense to package JACK internally and externally. Please pick one." fi -release_version=`grep -m 1 '^ardour_version' ../../SConstruct | cut -d' ' -f 3 | sed "s/'//g"` +if [ x$MIXBUS != x ] ; then + release_version=`grep -m 1 '^mixbus_version' ../../SConstruct | cut -d' ' -f 3 | sed "s/'//g"` +else + release_version=`grep -m 1 '^ardour_version' ../../SConstruct | cut -d' ' -f 3 | sed "s/'//g"` +fi svn_version=`grep -m 1 'svn_revision =' ../../libs/ardour/svn_revision.cc | cut -d' ' -f 6 | sed 's/[";]//g'` echo "Version is $release_version / $svn_version" + info_string="$release_version/$svn_version built on `hostname` by `whoami` on `date`" echo "Info string is $info_string" @@ -106,7 +117,7 @@ echo "Info string is $info_string" APPDIR=${APPNAME}.app APPROOT=$APPDIR/Contents -Frameworks=$APPROOT/Frameworks +Frameworks=$APPROOT/lib Resources=$APPROOT/Resources Plugins=$APPROOT/Plugins Surfaces=$APPROOT/Surfaces @@ -156,14 +167,12 @@ if test x$SAE != x ; then env="$envARDOUR_UI_CONFardour2_ui_sae.conf" env="$envARDOUR2_UI_RCardour2_ui_dark_sae.rc" elif test x$MIXBUS != x ; then - appname="Ardour2/Mixbus" + appname="Mixbus2" env="$envARDOUR_MIXBUStrue" # # current default for MIXBUS version is US keyboard layout without a keypad # env="$envARDOUR_KEYBOARD_LAYOUTus-nokeypad" - env="$envARDOUR_UI_CONFardour2_ui.conf" - env="$envARDOUR2_UI_RCardour2_ui_dark.rc" else appname="Ardour2" fi @@ -176,14 +185,15 @@ fi if test x$INTERNAL_JACK != x ; then env="$envARDOUR_INTERNAL_JACKtrue" else - env="$envPATH/usr/local/bin:/opt/bin:/usr/bin:/bin:/usr/sbin:/sbin" + env="$envPATH/usr/local/bin:/opt/bin" env="$envDYLIB_FALLBACK_LIBRARY_PATH/usr/local/lib:/opt/lib" fi -env="LSEnvironment$envARDOUR_BUNDLEDtrue" +env="LSEnvironmentARDOUR_BUNDLEDtrue$env" # edit plist sed -e "s?@ENV@?$env?g" \ + -e "s?@APPNAME@?$appname?g" \ -e "s?@VERSION@?$release_version/$svn_version?g" \ -e "s?@INFOSTRING@?$info_string?g" < Info.plist.in > Info.plist # and plist strings @@ -205,15 +215,15 @@ cp -R Resources $APPROOT # if test x$INTERNAL_JACK != x ; then - MAIN_EXECUTABLE=Ardour2 + MAIN_EXECUTABLE=$BINNAME else cp startup_script $APPROOT/MacOS/Ardour2 - chmod 775 $APPROOT/MacOS/Ardour2 - MAIN_EXECUTABLE=Ardour2.bin + chmod 775 $APPROOT/MacOS/$BINNAME + MAIN_EXECUTABLE=$BINNAME.bin fi -echo "Copying ardour executable ...." -cp ../../gtk2_ardour/ardour-$release_version $APPROOT/MacOS/$MAIN_EXECUTABLE +echo "Copying main executable ...." +cp ../../gtk2_ardour/$BUILT_EXECUTABLE-$release_version $APPROOT/MacOS/$MAIN_EXECUTABLE if test x$SAE != x ; then # cp ../../gtk2_ardour/evtest $APPROOT/MacOS/gtkevents cp Ardour2-SAE.icns $Resources/appIcon.icns @@ -223,7 +233,7 @@ else cp Ardour2.icns $Resources/appIcon.icns fi if test x$STRIP != x ; then - strip $APPROOT/MacOS/Ardour2 + strip $APPROOT/MacOS/$MAIN_EXECUTABLE fi if test x$INTERNAL_JACK != x ; then if [ -f /usr/local/lib/jack/jack_coreaudio.so ] ; then @@ -264,6 +274,17 @@ if test x$WITH_NLS != x ; then cp -r $GTKSTACK_ROOT/share/locale/$just_lang $Locale fi fi + if [ -d $ARDOURSTACK_ROOT/share/locale/$l ] ; then + echo "Copying ardour-dep i18n files for $l..." + cp -r $ARDOURSTACK_ROOT/share/locale/$l $Locale + else + # try with just the language spec + just_lang=`echo $l | sed 's/_[A-Z][A-Z]$//'` + if [ -d $ARDOURSTACK_ROOT/share/locale/$just_lang ] ; then + echo "Copying ardour-dep i18n files for $l..." + cp -r $ARDOURSTACK_ROOT/share/locale/$just_lang $Locale + fi + fi done else echo "Skipping NLS support" @@ -309,7 +330,7 @@ if test x$WITH_LADSPA != x ; then else plugdir=ladspa fi - if [ -d $plugdir -a x`ls $plugdir` != x ] ; then + if [ -d $plugdir -a "x$(ls $plugdir)" != x ] ; then echo "Copying `ls $plugdir | wc -l` plugins ..." cp -r $plugdir/* $Plugins fi @@ -317,7 +338,7 @@ fi # Control Surface shared libraries cp $BUILD_ROOT/libs/surfaces/*/libardour_*.dylib $Surfaces -cp $BUILD_ROOT/libs/surfaces/control_protocol/libardourcp*.dylib $Frameworks +mv $Surfaces/libardour_cp*.dylib $Frameworks # VAMP plugins that we use cp $BUILD_ROOT/libs/vamp-plugins/libardourvampplugins.dylib $Frameworks @@ -359,12 +380,7 @@ echo echo "Copying other stuff to $APPDIR ..." -cp ../../gtk2_ardour/ergonomic-us.bindings $Resources -cp ../../gtk2_ardour/mnemonic-us.bindings $Resources -cp ../../gtk2_ardour/SAE-de-keypad.bindings $Resources -cp ../../gtk2_ardour/SAE-de-nokeypad.bindings $Resources -cp ../../gtk2_ardour/SAE-us-keypad.bindings $Resources -cp ../../gtk2_ardour/SAE-us-nokeypad.bindings $Resources +cp ../../gtk2_ardour/*bindings $Resources cp ../../gtk2_ardour/ardour.menus $Resources cp ../../gtk2_ardour/ardour-sae.menus $Resources if test x$SAE != x ; then @@ -423,12 +439,12 @@ for exe in $executables; do if test x$INTERNAL_JACK != x ; then for lib in `otool -L $EXE | egrep "($GTKSTACK_ROOT|$ARDOURSTACK_ROOT|/opt/|/local/|libs/)" | awk '{print $1}'` ; do base=`basename $lib` - changes="$changes -change $lib @executable_path/../Frameworks/$base" + changes="$changes -change $lib @executable_path/../lib/$base" done else for lib in `otool -L $EXE | egrep "($GTKSTACK_ROOT|$ARDOURSTACK_ROOT|/opt/|/local/|libs/)" | awk '{print $1}' | grep -v 'libjack\.'` ; do base=`basename $lib` - changes="$changes -change $lib @executable_path/../Frameworks/$base" + changes="$changes -change $lib @executable_path/../lib/$base" done fi if test "x$changes" != "x" ; then @@ -448,12 +464,12 @@ for dylib in $JACK_SHARED_OBJECTS $Frameworks/*.dylib $Frameworks/modules/*.so $ if test x$INTERNAL_JACK != x ; then for lib in `otool -L $dylib | egrep "($GTKSTACK_ROOT|$ARDOURSTACK_ROOT|/opt/|/local/|libs/)" | awk '{print $1}'` ; do base=`basename $lib` - changes="$changes -change $lib @executable_path/../Frameworks/$base" + changes="$changes -change $lib @executable_path/../lib/$base" done else for lib in `otool -L $dylib | egrep "($GTKSTACK_ROOT|$ARDOURSTACK_ROOT|/opt/|/local/|libs/)" | awk '{print $1}' | grep -v 'libjack\.'` ; do base=`basename $lib` - changes="$changes -change $lib @executable_path/../Frameworks/$base" + changes="$changes -change $lib @executable_path/../lib/$base" done fi @@ -468,7 +484,7 @@ for dylib in $JACK_SHARED_OBJECTS $Frameworks/*.dylib $Frameworks/modules/*.so $ # now the change what the library thinks its own name is base=`basename $dylib` - install_name_tool -id @executable_path/../Frameworks/$base $dylib + install_name_tool -id @executable_path/../lib/$base $dylib fi done @@ -496,12 +512,7 @@ elif [ x$MIXBUS != x ] ; then echo "Creating Mixbus packaging directory" mv $APPDIR $PRODUCT_PKG_DIR/ cp MixBus_Install_QuickStart.pdf "$PRODUCT_PKG_DIR/Mixbus Install & Quick Start Guide.pdf" - - if [ -x $EXTERNAL_JACK != x ] ; then - cp $EXTERNAL_JACK $PRODUCT_PKG_DIR - fi - - # create dmg + else echo "Creating $APPNAME packaging directory" @@ -509,20 +520,22 @@ else fi -echo "Building DMG ..." +#echo bzipping ... +#ZIPFILE=$APPNAME-${release_version}-${svn_version}.bz2 +#tar cpf - $PRODUCT_PKG_DIR | bzip2 > $ZIPFILE + +#echo "Building DMG ..." -# UC_DMG=$APPNAME-${release_version}-${svn_version}-UC.dmg -# FINAL_DMG=$APPNAME-${release_version}-${svn_version}.dmg UC_DMG=$APPNAME-${release_version}-${svn_version}.dmg rm -f $UC_DMG -echo hdiutil create $UC_DMG -volname $APPNAME-$release_version -fs HFS+ -srcfolder $PRODUCT_PKG_DIR -hdiutil create $UC_DMG -volname $APPNAME-$release_version -fs HFS+ -srcfolder $PRODUCT_PKG_DIR +echo hdiutil create $UC_DMG -volname $APPNAME-${release_version} -fs HFS+ -srcfolder $PRODUCT_PKG_DIR +hdiutil create $UC_DMG -volname $APPNAME-${release_version} -fs HFS+ -srcfolder $PRODUCT_PKG_DIR # compress it -# echo "Compressing DMG ..." -# rm -f $FINAL_DMG -# hdiutil convert $UC_DMG -format UDBZ -o $FINAL_DMG +#echo "Compressing DMG ..." +#rm -f $FINAL_DMG +#hdiutil convert $UC_DMG -format UDBZ -o $FINAL_DMG echo "Done." -- cgit v1.2.3