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/build32/VLC-release.app
29 INTEL64ROOT=$SRCROOT/build64/VLC-release.app
31 UBROOT=$SRCROOT/build-fat/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 rm -Rf $SRCROOT/build-fat/VLC.app/$LIBS/*
43 rm -Rf $SRCROOT/build-fat/VLC.app/Contents/MacOS/VLC
44 rm -Rf $SRCROOT/build-fat/VLC.app/$PLUGINS/*
50 if [ "x$PPCROOT" != "x" ]; then
51 if [ -e "$PPCROOT/$file" ]; then
52 files="$PPCROOT/$file $files"
55 if [ "x$INTELROOT" != "x" ]; then
56 if [ -e "$INTELROOT/$file" ]; then
57 files="$INTELROOT/$file $files"
60 if [ "x$INTEL64ROOT" != "x" ]; then
61 if [ -e "$INTEL64ROOT/$file" ]; then
62 files="$INTEL64ROOT/$file $files"
65 if [ "x$files" != "x" ]; then
66 lipo $files -create -output $UBROOT/$file
70 echo "Installing libs"
71 for i in `ls $INTELROOT/$LIBS/ | grep .dylib`
76 echo "Installing modules"
77 for i in `ls $INTELROOT/$PLUGINS/ | grep .dylib`
84 do_lipo Contents/MacOS/VLC
86 echo "Installing Extra modules"
88 # The following fixes modules, which aren't available on all platforms
89 do_lipo $LIBS/libSDL_image.0.dylib
90 do_lipo $LIBS/libtiff.3.dylib
91 do_lipo $LIBS/libtiff.3.dylib
92 do_lipo $PLUGINS/libsdl_image_plugin.dylib
93 do_lipo $PLUGINS/libquartztext_plugin.dylib
94 do_lipo $PLUGINS/libgoom_plugin.dylib
95 if [ "x$INTELROOT" != "x" ]; then
96 cp $INTELROOT/$PLUGINS/*mmx* $UBROOT/$PLUGINS/
97 cp $INTELROOT/$PLUGINS/*3dn* $UBROOT/$PLUGINS/
99 if [ "x$INTEL64ROOT" != "x" ]; then
100 cp $INTEL64ROOT/$PLUGINS/*sse* $UBROOT/$PLUGINS/
102 if [ "x$PPCROOT" != "x" ]; then
103 cp $PPCROOT/Contents/MacOS/modules/*altivec* $UBROOT/Contents/MacOS/modules/
104 cp $PPCROOT/Contents/MacOS/lib/libvlc.dylib $UBROOT/Contents/MacOS/lib/
105 cp $PPCROOT/Contents/MacOS/lib/libvlccore.dylib $UBROOT/Contents/MacOS/lib/
109 echo "Copying plugins.dat"
112 if [ "x$PPCROOT" != "x" ]; then
113 cp $PPCROOT/$PLUGINS/plugins-*.dat $UBROOT/$PLUGINS/
115 if [ "x$INTELROOT" != "x" ]; then
116 cp $INTELROOT/$PLUGINS/plugins-*.dat $UBROOT/$PLUGINS/
118 if [ "x$INTEL64ROOT" != "x" ]; then
119 cp $INTEL64ROOT/$PLUGINS/plugins-*.dat $UBROOT/$PLUGINS/
123 # Now, you need to copy the resulting UBROOT bundle into VLC's build directory
124 # and make sure it is named "VLC-release.app".
125 # Afterwards, run 'make package-macosx' and follow release_howto.txt in /doc