4 # This script allows you to create a Universal Binary of VLC.app. It requires
5 # pre-compiled binaries for Intel-, Intel64- and PowerPC-based Macs; no sources.
6 # PPC64 is not supported right now, but could be added with little effort.
7 # Using different OS X SDKs for both platforms is absolutely fine of course.
8 # All you need to do is CHANGE THE ROOTS and READ THE COMMENTS.
11 # INTELROOT == path to VLC.app compiled on an Intel-based Mac (e.g. jones).
12 # INTEL64ROOT == path to VLC.app compiled in 64bit mode (e.g. on jones with -m64).
13 # PPCROOT == path to VLC.app compiled on a PowerPC-based Mac (e.g. veda).
14 # PPCROOT=/Volumes/vlc-1.0.2/VLC.app
15 # Note that these roots only require read-access and won't be changed at all.
17 # UBROOT == path to a VLC.app bundle which will contain the Universal Binary.
19 SRCROOT=`dirname $0`/../../..
25 #############################################
28 INTELROOT=$SRCROOT/32bit/VLC.app
29 INTEL64ROOT=$SRCROOT/64bit/VLC.app
31 UBROOT=$SRCROOT/VLC.app
34 #############################################
36 echo "Creating VLC in $UBROOT"
38 cp -Rf $INTEL64ROOT $UBROOT
40 LIBS=Contents/MacOS/lib
41 PLUGINS=Contents/MacOS/plugins
42 FRAMEWORKS=Contents/Frameworks
43 rm -Rf $SRCROOT/VLC.app/$LIBS/*
44 rm -Rf $SRCROOT/VLC.app/Contents/MacOS/VLC
45 rm -Rf $SRCROOT/VLC.app/$PLUGINS/*
46 rm -Rf $SRCROOT/VLC.app/$FRAMEWORKS/Growl.framework/Versions/A/Growl
47 rm -Rf $SRCROOT/VLC.app/$FRAMEWORKS/BGHUDAppKit.framework/BGHUDAppKit
48 rm -Rf $SRCROOT/VLC.app/$FRAMEWORKS/BGHUDAppKit.framework/Versions/A/BGHUDAppKit
49 rm -Rf $SRCROOT/VLC.app/$FRAMEWORKS/Sparkle.framework/Versions/A/Sparkle
50 rm -Rf $SRCROOT/VLC.app/$FRAMEWORKS/Sparkle.framework/Resources/relaunch
56 if [ "x$PPCROOT" != "x" ]; then
57 if [ -e "$PPCROOT/$file" ]; then
58 files="$PPCROOT/$file $files"
61 if [ "x$INTELROOT" != "x" ]; then
62 if [ -e "$INTELROOT/$file" ]; then
63 files="$INTELROOT/$file $files"
66 if [ "x$INTEL64ROOT" != "x" ]; then
67 if [ -e "$INTEL64ROOT/$file" ]; then
68 files="$INTEL64ROOT/$file $files"
71 if [ "x$files" != "x" ]; then
72 lipo $files -create -output $UBROOT/$file
76 echo "Installing libs"
77 for i in `ls $INTELROOT/$LIBS/ | grep .dylib`
82 echo "Installing modules"
83 for i in `ls $INTELROOT/$PLUGINS/ | grep .dylib`
88 echo "Installing frameworks"
89 do_lipo $FRAMEWORKS/Growl.framework/Versions/A/Growl
90 do_lipo $FRAMEWORKS/BGHUDAppKit.framework/BGHUDAppKit
91 do_lipo $FRAMEWORKS/BGHUDAppKit.framework/Versions/A/BGHUDAppKit
92 do_lipo $FRAMEWORKS/Sparkle.framework/Versions/A/Sparkle
93 do_lipo $FRAMEWORKS/Sparkle.framework/Resources/relaunch
96 do_lipo Contents/MacOS/VLC
98 echo "Installing Extra modules"
100 # The following fixes modules, which aren't available on all platforms
101 do_lipo $LIBS/libSDL_image.0.dylib
102 do_lipo $LIBS/libtiff.3.dylib
103 do_lipo $LIBS/libtiff.3.dylib
104 do_lipo $PLUGINS/libsdl_image_plugin.dylib
105 do_lipo $PLUGINS/libquartztext_plugin.dylib
106 do_lipo $PLUGINS/libgoom_plugin.dylib
107 if [ "x$INTELROOT" != "x" ]; then
108 cp $INTELROOT/$PLUGINS/*mmx* $UBROOT/$PLUGINS/
109 cp $INTELROOT/$PLUGINS/*3dn* $UBROOT/$PLUGINS/
111 if [ "x$INTEL64ROOT" != "x" ]; then
112 cp $INTEL64ROOT/$PLUGINS/*sse* $UBROOT/$PLUGINS/
114 if [ "x$PPCROOT" != "x" ]; then
115 cp $PPCROOT/Contents/MacOS/modules/*altivec* $UBROOT/Contents/MacOS/modules/
116 cp $PPCROOT/Contents/MacOS/lib/libvlc.dylib $UBROOT/Contents/MacOS/lib/
117 cp $PPCROOT/Contents/MacOS/lib/libvlccore.dylib $UBROOT/Contents/MacOS/lib/
121 echo "Copying plugins.dat"
124 if [ "x$PPCROOT" != "x" ]; then
125 cp $PPCROOT/$PLUGINS/plugins-*.dat $UBROOT/$PLUGINS/
127 if [ "x$INTELROOT" != "x" ]; then
128 cp $INTELROOT/$PLUGINS/plugins-*.dat $UBROOT/$PLUGINS/
130 if [ "x$INTEL64ROOT" != "x" ]; then
131 cp $INTEL64ROOT/$PLUGINS/plugins-*.dat $UBROOT/$PLUGINS/
135 # Now, you need to copy the resulting UBROOT bundle into VLC's build directory
136 # and make sure it is named "VLC.app".
137 # Afterwards, run 'make package-macosx' and follow release_howto.txt in /doc