banshee r4725 - in trunk/banshee/build/osx: . app-bundle-data/Contents/MacOS



Author: abock
Date: Thu Oct 23 00:44:25 2008
New Revision: 4725
URL: http://svn.gnome.org/viewvc/banshee?rev=4725&view=rev

Log:
Added some launcher scripts for the gstreamer tools, implemented relocation

Added:
   trunk/banshee/build/osx/app-bundle-data/Contents/MacOS/gst-inspect   (contents, props changed)
   trunk/banshee/build/osx/app-bundle-data/Contents/MacOS/gst-launch   (contents, props changed)
   trunk/banshee/build/osx/app-bundle-data/Contents/MacOS/runtime.env
Modified:
   trunk/banshee/build/osx/TODO
   trunk/banshee/build/osx/app-bundle-data/Contents/MacOS/banshee
   trunk/banshee/build/osx/build-deps.sh
   trunk/banshee/build/osx/collect-deps.sh
   trunk/banshee/build/osx/make-app-bundle.sh

Modified: trunk/banshee/build/osx/TODO
==============================================================================
--- trunk/banshee/build/osx/TODO	(original)
+++ trunk/banshee/build/osx/TODO	Thu Oct 23 00:44:25 2008
@@ -1,6 +1,5 @@
 FIXME/TODO Items for build-deps.sh:
 
-	* Do we really need to run autogen.sh? Probably are okay with just configure
 	* Allow specifying inclusion or exclusion targets in target sets
 	* Allow specifying actions for targets (i.e. make clean, make all, etc.)
 	* Maybe do not always rebuild targets; mark when a target succeeds and skip?

Modified: trunk/banshee/build/osx/app-bundle-data/Contents/MacOS/banshee
==============================================================================
--- trunk/banshee/build/osx/app-bundle-data/Contents/MacOS/banshee	(original)
+++ trunk/banshee/build/osx/app-bundle-data/Contents/MacOS/banshee	Thu Oct 23 00:44:25 2008
@@ -1,18 +1,11 @@
 #!/bin/bash
 
+BUNDLE_ROOT=$(dirname $0)
+source $BUNDLE_ROOT/runtime.env
+
 MONO_EXE=Nereid.exe
-MONO_FRAMEWORK_PATH=/Library/Frameworks/Mono.framework/Versions/Current
 MONO=$MONO_FRAMEWORK_PATH/bin/mono
 
-SELF_PATH=$(dirname $0)
-[[ ${SELF_PATH:0:1} = / ]] && BIN_PATH=$SELF_PATH || BIN_PATH="$(pwd)/$SELF_PATH"
-
-OSX_VERSION=$(uname -r | cut -f1 -d.)
-
-export GST_REGISTRY_FORK=no
-export DYLD_FALLBACK_LIBRARY_PATH=$BIN_PATH:$MONO_FRAMEWORK_PATH/lib:/usr/lib:/lib${DYLD_FALLBACK_LIBRARY_PATH+:$DYLD_FALLBACK_LIBRARY_PATH}
-export MONO_PATH=$BIN_PATH/glib-sharp-workaround
-
 [ -n "$BANSHEE_DEBUG" ] && BANSHEE_DEBUG="--debug"
 [ -n "$BANSHEE_TRACE" ] && BANSHEE_TRACE="--trace=$BANSHEE_TRACE"
 [ -n "$BANSHEE_PROFILE" ] && BANSHEE_PROFILE="--profile=$BANSHEE_PROFILE"

Added: trunk/banshee/build/osx/app-bundle-data/Contents/MacOS/gst-inspect
==============================================================================
--- (empty file)
+++ trunk/banshee/build/osx/app-bundle-data/Contents/MacOS/gst-inspect	Thu Oct 23 00:44:25 2008
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+BUNDLE_ROOT=$(dirname $0)
+source $BUNDLE_ROOT/runtime.env
+$BUNDLE_ROOT/gst-inspect-0.10 $@
+

Added: trunk/banshee/build/osx/app-bundle-data/Contents/MacOS/gst-launch
==============================================================================
--- (empty file)
+++ trunk/banshee/build/osx/app-bundle-data/Contents/MacOS/gst-launch	Thu Oct 23 00:44:25 2008
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+BUNDLE_ROOT=$(dirname $0)
+source $BUNDLE_ROOT/runtime.env
+$BUNDLE_ROOT/gst-launch-0.10 $@
+

Added: trunk/banshee/build/osx/app-bundle-data/Contents/MacOS/runtime.env
==============================================================================
--- (empty file)
+++ trunk/banshee/build/osx/app-bundle-data/Contents/MacOS/runtime.env	Thu Oct 23 00:44:25 2008
@@ -0,0 +1,11 @@
+[[ ${BUNDLE_ROOT:0:1} = / ]] && BIN_PATH=$BUNDLE_ROOT || BIN_PATH="$(pwd)/$BUNDLE_ROOT"
+
+OSX_VERSION=$(uname -r | cut -f1 -d.)
+MONO_FRAMEWORK_PATH=/Library/Frameworks/Mono.framework/Versions/Current
+
+#export GST_REGISTRY_FORK=no
+export GST_PLUGIN_SYSTEM_PATH=$BIN_PATH/gstreamer-0.10
+export DYLD_FALLBACK_LIBRARY_PATH=$BIN_PATH:$MONO_FRAMEWORK_PATH/lib:/usr/lib:/lib${DYLD_FALLBACK_LIBRARY_PATH+:$DYLD_FALLBACK_LIBRARY_PATH}
+export MONO_PATH=$BIN_PATH/glib-sharp-workaround
+
+

Modified: trunk/banshee/build/osx/build-deps.sh
==============================================================================
--- trunk/banshee/build/osx/build-deps.sh	(original)
+++ trunk/banshee/build/osx/build-deps.sh	Thu Oct 23 00:44:25 2008
@@ -134,10 +134,6 @@
 done
 
 popd &>/dev/null
-
-echo "Collecting dependencies for bundle..."
-./collect-deps.sh
-
 popd &>/dev/null
 
 test -f $BUILD_LOG && rm $BUILD_LOG

Modified: trunk/banshee/build/osx/collect-deps.sh
==============================================================================
--- trunk/banshee/build/osx/collect-deps.sh	(original)
+++ trunk/banshee/build/osx/collect-deps.sh	Thu Oct 23 00:44:25 2008
@@ -12,10 +12,11 @@
 
 LIB_PREFIX=$BUILD_PREFIX/lib
 
-#cp $BUILD_PREFIX/bin/{gst-launch,gst-inspect}-0.10 $BUNDLE &>/dev/null
+# Copy all runtime dependencies for bundling
+cp $BUILD_PREFIX/bin/{gst-launch,gst-inspect}-0.10 $BUNDLE &>/dev/null
 find $LIB_PREFIX -name *.dylib -type f -exec cp {} $BUNDLE \; &>/dev/null
-#find $LIB_PREFIX/gstreamer-0.10 -name *.so -type f -exec cp {} $BUNDLE/gstreamer-0.10 \; &>/dev/null
-#find $LIB_PREFIX/mono -name *.dll* -not -name *policy* -type f -exec cp {} $BUNDLE \; &>/dev/null
+find $LIB_PREFIX/gstreamer-0.10 -name *.so -type f -exec cp {} $BUNDLE/gstreamer-0.10 \; &>/dev/null
+find $LIB_PREFIX/mono -name *.dll* -not -name *policy* -type f -exec cp {} $BUNDLE \; &>/dev/null
 
 pushd $BUNDLE &>/dev/null
 
@@ -25,15 +26,21 @@
 done
 
 # Relocate libraries
-for dep in $(find . -type f -name \*.dylib -o -name \*.so); do
+for dep in $(find . -type f \( -name \*.dylib -o -name \*.so -o -name gst-\* \)); do
+	echo -n "Processing $dep: "
+	relocs=0
+	
 	link_deps=$(otool -L $dep | cut -f2 | cut -f1 -d' ')
-	echo "Processing $dep for relocation..."
+	dep_id=./$(basename $(otool -D $dep | tail -n1))
+
 	for link_dep in $link_deps; do
 		if [ "x${link_dep:0:${#LIB_PREFIX}}" = "x$LIB_PREFIX" ]; then
-			echo "--> $link_dep"
-			install_name_tool -change $link_dep $(basename $link_dep) $dep
-		fi	
+			install_name_tool -change $link_dep ./$(basename $link_dep) -id $dep_id $dep
+			relocs=$(($relocs + 1))
+		fi
 	done
+
+	echo "$relocs relocations"
 done
 
 popd &>/dev/null

Modified: trunk/banshee/build/osx/make-app-bundle.sh
==============================================================================
--- trunk/banshee/build/osx/make-app-bundle.sh	(original)
+++ trunk/banshee/build/osx/make-app-bundle.sh	Thu Oct 23 00:44:25 2008
@@ -2,6 +2,8 @@
 
 pushd $(dirname $0) &>/dev/null
 
+./collect-deps.sh
+
 rm -rf Banshee.app
 cp -rf app-bundle-data Banshee.app
 
@@ -11,9 +13,5 @@
 cp -rf ../../bin/* $DEST
 cp -rf glib-sharp-workaround $DEST
 
-zip -r Banshee.zip Banshee.app
-
-rm -rf Banshee.app
-
 popd &>/dev/null
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]