3
3
# This script allows you to create a Universal Binary of VLC.app. It requires
4
# pre-compiled binaries for Intel- and PowerPC-based Macs; no sources.
5
# Exotic sub-platforms aka x86_64 or even ppc64 are not supported right now.
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
6
# Using different OS X SDKs for both platforms is absolutely fine of course.
7
7
# All you need to do is CHANGE THE ROOTS and READ THE COMMENTS.
10
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).
11
12
INTELROOT=/Applications/VLC.app
13
INTEL64ROOT=/Users/fpk/VLC-release.app
12
14
# PPCROOT == path to VLC.app compiled on a PowerPC-based Mac (e.g. veda).
13
PPCROOT=/Volumes/vlc-0.9.0-test3/VLC.app
14
# Note that these 2 roots only require read-access and won't be changed at all.
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.
16
18
# UBROOT == path to a VLC.app bundle which will contain the Universal Binary.
17
19
# Note that you should empty the following folders: lib, modules
18
# and remove the VLC binary in MacOS (just for sanity reasons)
19
UBROOT=/Users/fpk/VLC-release.app
20
# and remove the VLC binary in MacOS
21
UBROOT=/Users/fpk/VLC.app
21
23
for i in `ls $INTELROOT/Contents/MacOS/lib/`
24
lipo $INTELROOT/Contents/MacOS/lib/$i $PPCROOT/Contents/MacOS/lib/$i -create -output $UBROOT/Contents/MacOS/lib/$i
26
lipo $INTELROOT/Contents/MacOS/lib/$i $INTEL64ROOT/Contents/MacOS/lib/$i $PPCROOT/Contents/MacOS/lib/$i -create -output $UBROOT/Contents/MacOS/lib/$i
26
28
for i in `ls $INTELROOT/Contents/MacOS/modules/`
29
lipo $INTELROOT/Contents/MacOS/modules/$i $PPCROOT/Contents/MacOS/modules/$i -create -output $UBROOT/Contents/MacOS/modules/$i
31
lipo $INTELROOT/Contents/MacOS/modules/$i $INTEL64ROOT/Contents/MacOS/modules/$i $PPCROOT/Contents/MacOS/modules/$i -create -output $UBROOT/Contents/MacOS/modules/$i
31
lipo $INTELROOT/Contents/MacOS/VLC $PPCROOT/Contents/MacOS/VLC -create -output $UBROOT/Contents/MacOS/VLC
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
32
43
cp $INTELROOT/Contents/MacOS/modules/*mmx* $UBROOT/Contents/MacOS/modules/
33
44
cp $INTELROOT/Contents/MacOS/modules/*sse* $UBROOT/Contents/MacOS/modules/
34
45
cp $INTELROOT/Contents/MacOS/modules/*3dn* $UBROOT/Contents/MacOS/modules/
35
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/
37
# Now, you need to copy the resulting UBROOT folder into VLC's build directory
38
# and make sure it is actually named "VLC-release.app".
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".
39
52
# Afterwards, run 'make package-macosx' and follow release_howto.txt in /doc