From 26dc68d67f6906c186912fbf00962f4aebe17d94 Mon Sep 17 00:00:00 2001 From: eddie-0815 Date: Wed, 9 Jan 2008 20:02:01 +0000 Subject: Added readme and scripts for building and patching ffmpeg on OS X. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@762 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/lib/ffmpeg/src/MacOSX/MacOSXReadMe.txt | 23 ++++++++++++++++++++++ Game/Code/lib/ffmpeg/src/MacOSX/build_ffmpeg.sh | 6 ++++++ .../lib/ffmpeg/src/MacOSX/copy_and_patch_dylibs.sh | 23 ++++++++++++++++++++++ 3 files changed, 52 insertions(+) create mode 100644 Game/Code/lib/ffmpeg/src/MacOSX/MacOSXReadMe.txt create mode 100755 Game/Code/lib/ffmpeg/src/MacOSX/build_ffmpeg.sh create mode 100755 Game/Code/lib/ffmpeg/src/MacOSX/copy_and_patch_dylibs.sh diff --git a/Game/Code/lib/ffmpeg/src/MacOSX/MacOSXReadMe.txt b/Game/Code/lib/ffmpeg/src/MacOSX/MacOSXReadMe.txt new file mode 100644 index 00000000..59e54e04 --- /dev/null +++ b/Game/Code/lib/ffmpeg/src/MacOSX/MacOSXReadMe.txt @@ -0,0 +1,23 @@ + +How to download an build ffmpeg for UltraStar Deluxe on Mac OS X: + +1. Open a terminal. + +2. cd into the Game/Code/lib/ffmpeg/src/MacOSX directory + +3. Run the following command: + +svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg + +4. The compile ffmpeg. I made a script for this: + +./build_ffmpeg.sh + +5. On OS X you have to patch the the dylibs. Run the following + script. It patches the dylibs and copies them to the + lib/ffmpeg dir: + +./copy_and_patch_dylibs.sh + + +You're done. diff --git a/Game/Code/lib/ffmpeg/src/MacOSX/build_ffmpeg.sh b/Game/Code/lib/ffmpeg/src/MacOSX/build_ffmpeg.sh new file mode 100755 index 00000000..bcb3ca1e --- /dev/null +++ b/Game/Code/lib/ffmpeg/src/MacOSX/build_ffmpeg.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +cd ffmpeg +./configure --enable-shared --disable-static --disable-mmx +make + diff --git a/Game/Code/lib/ffmpeg/src/MacOSX/copy_and_patch_dylibs.sh b/Game/Code/lib/ffmpeg/src/MacOSX/copy_and_patch_dylibs.sh new file mode 100755 index 00000000..064d2ecc --- /dev/null +++ b/Game/Code/lib/ffmpeg/src/MacOSX/copy_and_patch_dylibs.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +# Copy dylibs: +cp ffmpeg/libavcodec/libavcodec.51.dylib ../../libavcodec.dylib +cp ffmpeg/libavformat/libavformat.52.dylib ../../libavformat.dylib +cp ffmpeg/libavutil/libavutil.49.dylib ../../libavutil.dylib + +# Patching libavcodec: +install_name_tool -id @executable_path/libavcodec.dylib ../../libavcodec.dylib +install_name_tool -change /usr/local/lib/libavutil.dylib @executable_path/libavutil.dylib ../../libavcodec.dylib + +# Patching libavformat: +install_name_tool -id @executable_path/libavformat.dylib ../../libavformat.dylib +install_name_tool -change /usr/local/lib/libavutil.dylib @executable_path/libavutil.dylib ../../libavformat.dylib +install_name_tool -change /usr/local/lib/libavcodec.dylib @executable_path/libavcodec.dylib ../../libavformat.dylib + +# Patching libavcodec: +install_name_tool -id @executable_path/libavutil.dylib ../../libavutil.dylib + +# Printing result: +otool -L ../../libavutil.dylib +otool -L ../../libavcodec.dylib +otool -L ../../libavformat.dylib \ No newline at end of file -- cgit v1.2.3