ub.sh
上传用户:kjfoods
上传日期:2020-07-06
资源大小:29949k
文件大小:4k
源码类别:

midi

开发平台:

Unix_Linux

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