3 # This script allows you to create a Universal Binary of VLC.app. It requires
4 # pre-compiled binaries for Intel-, Intel64- and PowerPC-based Macs; no sources.
5 # PPC64 is not supported right now, but could be added with little effort.
6 # Using different OS X SDKs for both platforms is absolutely fine of course.
7 # All you need to do is CHANGE THE ROOTS and READ THE COMMENTS.
10 # INTELROOT == path to VLC.app compiled on an Intel-based Mac (e.g. jones).
11 # INTEL64ROOT == path to VLC.app compiled in 64bit mode (e.g. on jones with -m64).
12 INTELROOT=/Applications/VLC.app
13 INTEL64ROOT=/Users/fpk/VLC-release.app
14 # PPCROOT == path to VLC.app compiled on a PowerPC-based Mac (e.g. veda).
15 PPCROOT=/Volumes/vlc-1.0.2/VLC.app
16 # Note that these roots only require read-access and won't be changed at all.
18 # UBROOT == path to a VLC.app bundle which will contain the Universal Binary.
19 # Note that you should empty the following folders: lib, modules
20 # and remove the VLC binary in MacOS
21 UBROOT=/Users/fpk/VLC.app
23 for i in `ls $INTELROOT/Contents/MacOS/lib/`
26 lipo $INTELROOT/Contents/MacOS/lib/$i $INTEL64ROOT/Contents/MacOS/lib/$i $PPCROOT/Contents/MacOS/lib/$i -create -output $UBROOT/Contents/MacOS/lib/$i
28 for i in `ls $INTELROOT/Contents/MacOS/modules/`
31 lipo $INTELROOT/Contents/MacOS/modules/$i $INTEL64ROOT/Contents/MacOS/modules/$i $PPCROOT/Contents/MacOS/modules/$i -create -output $UBROOT/Contents/MacOS/modules/$i
33 lipo $INTELROOT/Contents/MacOS/VLC $INTEL64ROOT/Contents/MacOS/VLC $PPCROOT/Contents/MacOS/VLC -create -output $UBROOT/Contents/MacOS/VLC
35 # The following fixes modules, which aren't available on all platforms
36 lipo $INTELROOT/Contents/MacOS/lib/libSDL_image.0.dylib $PPCROOT/Contents/MacOS/lib/libSDL_image.0.dylib -create -output $UBROOT/Contents/MacOS/lib/libSDL_image.0.dylib
37 lipo $INTELROOT/Contents/MacOS/lib/libSDL-1.3.0.dylib $PPCROOT/Contents/MacOS/lib/libSDL-1.3.0.dylib -create -output $UBROOT/Contents/MacOS/lib/libSDL-1.3.0.dylib
38 lipo $INTELROOT/Contents/MacOS/lib/libjpeg.7.dylib $PPCROOT/Contents/MacOS/lib/libjpeg.7.dylib -create -output $UBROOT/Contents/MacOS/lib/libjpeg.7.dylib
39 lipo $INTELROOT/Contents/MacOS/lib/libtiff.3.dylib $PPCROOT/Contents/MacOS/lib/libtiff.3.dylib -create -output $UBROOT/Contents/MacOS/lib/libtiff.3.dylib
40 lipo $INTELROOT/Contents/MacOS/modules/libsdl_image_plugin.dylib $PPCROOT/Contents/MacOS/modules/libsdl_image_plugin.dylib -create -output $UBROOT/Contents/MacOS/modules/libsdl_image_plugin.dylib
41 lipo $INTELROOT/Contents/MacOS/modules/libquartztext_plugin.dylib $PPCROOT/Contents/MacOS/modules/libquartztext_plugin.dylib -create -output $UBROOT/Contents/MacOS/modules/libquartztext_plugin.dylib
42 lipo $INTELROOT/Contents/MacOS/modules/libgoom_plugin.dylib $PPCROOT/Contents/MacOS/modules/libgoom_plugin.dylib -create -output $UBROOT/Contents/MacOS/modules/libgoom_plugin.dylib
43 cp $INTELROOT/Contents/MacOS/modules/*mmx* $UBROOT/Contents/MacOS/modules/
44 cp $INTELROOT/Contents/MacOS/modules/*sse* $UBROOT/Contents/MacOS/modules/
45 cp $INTELROOT/Contents/MacOS/modules/*3dn* $UBROOT/Contents/MacOS/modules/
46 cp $PPCROOT/Contents/MacOS/modules/*altivec* $UBROOT/Contents/MacOS/modules/
47 cp $PPCROOT/Contents/MacOS/lib/libvlc.dylib $UBROOT/Contents/MacOS/lib/
48 cp $PPCROOT/Contents/MacOS/lib/libvlccore.dylib $UBROOT/Contents/MacOS/lib/
50 # Now, you need to copy the resulting UBROOT bundle into VLC's build directory
51 # and make sure it is named "VLC-release.app".
52 # Afterwards, run 'make package-macosx' and follow release_howto.txt in /doc