]> git.sesse.net Git - vlc/blob - extras/package/macosx/ub.sh
macosx: add preliminary hash file for Sparkle support
[vlc] / extras / package / macosx / ub.sh
1 #!/bin/bash
2
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.
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.
8 # Happy releasing!
9
10 # INTELROOT == path to VLC.app compiled on an Intel-based Mac (e.g. jones).
11 INTELROOT=/Applications/VLC.app
12 # 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
16 # UBROOT    == path to a VLC.app bundle which will contain the Universal Binary.
17 # 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
21 for i in `ls $INTELROOT/Contents/MacOS/lib/`
22 do
23         echo $i
24         lipo $INTELROOT/Contents/MacOS/lib/$i $PPCROOT/Contents/MacOS/lib/$i -create -output $UBROOT/Contents/MacOS/lib/$i
25 done
26 for i in `ls $INTELROOT/Contents/MacOS/modules/`
27 do
28         echo $i
29         lipo $INTELROOT/Contents/MacOS/modules/$i $PPCROOT/Contents/MacOS/modules/$i -create -output $UBROOT/Contents/MacOS/modules/$i
30 done
31 lipo $INTELROOT/Contents/MacOS/VLC $PPCROOT/Contents/MacOS/VLC -create -output $UBROOT/Contents/MacOS/VLC
32 cp $INTELROOT/Contents/MacOS/modules/*mmx* $UBROOT/Contents/MacOS/modules/
33 cp $INTELROOT/Contents/MacOS/modules/*sse* $UBROOT/Contents/MacOS/modules/
34 cp $INTELROOT/Contents/MacOS/modules/*3dn* $UBROOT/Contents/MacOS/modules/
35 cp $PPCROOT/Contents/MacOS/modules/*altivec* $UBROOT/Contents/MacOS/modules/
36
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".
39 # Afterwards, run 'make package-macosx' and follow release_howto.txt in /doc