http://public.perforce.com/public/jam/index.html,
compile it with gcc in Cygwin, and put the jam executable somewhere on
your path.
-+ nasm (Only for x86. On Mac OS X Intel, Nasm CVS is required)
++ nasm (Only for x86. On Mac OS X Intel, Xcode 2.4.1 include it)
Cygwin setup:
There are a couple extra things required to make the code build for Cygwin.
Run `./configure && jam'. This will build every library HandBrake
requires, then HandBrake itself.
+
+
+Experimental UB build on MacOsX
+===============================
+
+Run `make'. This will build libmediafork, MediaFork and MediaForkCLI as Universal Binary.
+This build method use precompiled contrib libraries. Script to build those binaries are provided too.
+All the build is handled by Xcode 2.4.1, should work on powerPC and Intel Macs.
+
+
+
--- /dev/null
+#!/bin/sh
+# This script build the contrib libs
+# This used on MaxOs X to generate a universal version of the contrib libraries
+# The new building process for MediaFork is to download a precompiled universal contrib folder
+# and use them to build universal binaries of MediaFork
+# pri: 01/28/07
+# ########################################################################
+# Parameters:
+# Package Version (Version must be incremented to ensure that each of trunk/branches use the correct version)
+# IP of the other platform host
+# Username to connect with (passwordless must be setup between the 2 machines)
+#
+# ie: ./BuildContribsDarwin.sh 0001 192.168.0.150 toto
+#
+# #########################################################################
+# The script will connect to the other computer, download and build all of the contrib libraries
+# and in the same time download and compile the contrib libraries on the native system
+# My setup to do that is Mac Pro Intel as native and a Mac mini G4 ppc as foreign
+#
+# Native is the master computer, it sends compile commands to the foreign, get the library, then do a lipo
+# to assemble both versions and put a universal binary version of the library in contrib/lib folder
+#
+# Once all of the contrib libraries are builded, a contribbin-darwin-${version}.tar.gz file is created, this file must
+# be uploaded to the ftp server so Xcode will be able to build universal binaries of the MediaFork, MediaForkCLI and libmediafork
+#
+# ##########################################################################
+# SSH passwordless setup instructions
+# 1) log on native using terminal
+# 2) ssh-keygen -t rsa
+# 3) leave passphrase empty (hit return)
+# 4) copy the $HOME/.ssh/id_rsa.pub to foreign machine $HOME/.ssh/authorized_keys
+# ##########################################################################
+export VERSION=$1
+export IP=$2
+export USERNAME=$3
+export REPOS=svn://multics.dynalias.com/HandBrake/branches/MediaFork_0.8.0
+# ##########################################################################
+# Launch the build on the foreign system
+# ##########################################################################
+ssh $USERNAME@$IP "rm -rf MFBUILDTMP ; mkdir MFBUILDTMP ; svn co $REPOS MFBUILDTMP ; cd MFBUILDTMP ; ./configure ; cd contrib ; cp ../config.jam . ; ../jam ; touch BUILDTERMINATED" &
+./configure
+cd contrib
+rm -rf lib include *tar.gz bin share man native foreign
+cp ../config.jam .
+# Use the new UB jam to be shure to use the correct version to build libraries (native on each system)
+../jam
+mkdir native
+mv lib native
+mkdir lib
+mkdir foreign
+# wait until the foreign build is done :)
+wait
+echo the foreign build is done, transferring files to native computer:
+cd foreign
+mkdir lib
+cd lib
+scp $USERNAME@$IP:/Users/$USERNAME/MFBUILDTMP/contrib/lib/*a .
+for lib in `ls *.a`
+do
+ echo ... lipo: $lib
+ lipo -create $lib ../../native/lib/$lib -output ../../lib/$lib
+done;
+
+cd ../..
+echo $VERSION > DarwinContribVersion.txt
+echo Creating contribbin-darwin-$VERSION.tar.gz
+tar zcvf contribbin-darwin-$VERSION.tar.gz lib include DarwinContribVersion.txt
+echo Done....
+ls -l contribbin-darwin-$VERSION.tar.gz
+cd ..
+echo $VERSION > MacOsXContribBinariesVersion.txt
--- /dev/null
+#! /bin/sh
+
+# Incremented every time a new contrib package is available
+VERSION=`cat MacOsXContribBinariesVersion.txt`
+
+if [ -f contrib/DarwinContribVersion.txt ]; then
+ if [ "`cat contrib/DarwinContribVersion.txt`" = $VERSION ]; then
+ echo "Contribs are up to date."
+ exit 0
+ fi
+fi
+
+HOST=download.m0k.org
+FILE=contribbin-darwin-$VERSION.tar.gz
+URL=http://download.mediafork.dynalias.com/contrib/$FILE
+
+# Check for internet connectivity
+if ! host $HOST > /dev/null 2>&1; then
+ echo "Please connect to the Internet (could not resolve $HOST)."
+ exit 1
+fi
+
+# Look for something that can handle an HTTP download
+ WGET="curl -L -O"
+
+# Get and install the package
+echo "Getting contribs ($VERSION)..."
+( cd contrib && rm -f $FILE && $WGET $URL && rm -Rf lib include && \
+ tar xzf $FILE && ranlib lib/*.a ) || exit 1
+
+exit 0
+
SubDir TOP ;
-# libhb + contrib libraries
-HB_LIBS = libhb.a
+# libmediafork + contrib libraries
+MEDIAFORK_LIBS = libmediafork.a
contrib/lib/liba52.a contrib/lib/libavformat.a
contrib/lib/libavcodec.a contrib/lib/libavutil.a
contrib/lib/libdvdread.a
if $(OS) != CYGWIN
{
- HB_LIBS = $(HB_LIBS) contrib/lib/libdvdcss.a ;
+ MEDIAFORK_LIBS = $(MEDIAFORK_LIBS) contrib/lib/libdvdcss.a ;
}
# Interfaces
-TEST_BIN = HBTest ;
-TEST_SRC = test/test.c ;
+CLI_BIN = MediaForkCLI ;
+CLI_SRC = test/test.c ;
BEOS_BIN = HandBrake ;
BEOS_SRC = beos/HBApp.cpp beos/MainWindow.cpp beos/ScanWindow.cpp
beos/PicWindow.cpp beos/Stepper.cpp beos/QueueWindow.cpp ;
WX_BIN = wxHB ;
WX_SRC = wx/hbWizard.cpp wx/wxHB.cpp ;
-UI_BIN = $(TEST_BIN) $(BEOS_BIN) $(WX_BIN) ;
-UI_SRC = $(TEST_SRC) $(BEOS_SRC) $(WX_SRC) ;
+UI_BIN = $(CLI_BIN) $(BEOS_BIN) $(WX_BIN) ;
+UI_SRC = $(CLI_SRC) $(BEOS_SRC) $(WX_SRC) ;
# CLI app
-Main $(TEST_BIN) : $(TEST_SRC) ;
+# Don't build the CLI from here if MACOSX, let xcode build it :)
+if $(OS) != MACOSX
+{
+ Main $(CLI_BIN) : $(CLI_SRC) ;
+}
if $(OS) = BEOS
{
macosx/English.lproj/Express.nib/info.nib
macosx/English.lproj/Express.nib/keyedobjects.nib ;
- OSXApp HandBrake.app : $(OSX_SRC) $(HB_LIBS) ;
+ OSXApp MediaFork.app : $(OSX_SRC) $(MEDIAFORK_LIBS) ;
# Package
OSXPackage HandBrake-$(HB_VERSION)-OSX.zip : HandBrake.app ;
#Main $(WX_BIN) : $(WX_SRC) ;
}
-ObjectHdrs $(UI_SRC) : $(TOP)/libhb ;
-LinkLibraries $(UI_BIN) : $(HB_LIBS) ;
-
+if $(OS) != MACOSX
+{
+ ObjectHdrs $(UI_SRC) : $(TOP)/libmediafork ;
+ LinkLibraries $(UI_BIN) : $(MEDIAFORK_LIBS) ;
+}
# Packages
NotFile package ;
Depends package : $(HB_PACKAGES) ;
SubInclude TOP contrib ;
-SubInclude TOP libhb ;
-
+SubInclude TOP libmediafork ;
--- /dev/null
+SYSTEM = $(shell uname -s)
+
+# Special case for Mac OS X: everything is handled from the Xcode project
+ifeq ($(SYSTEM),Darwin)
+
+all:
+ (./DownloadMacOsXContribBinaries.sh ; cd macosx ; xcodebuild -alltargets -configuration UB build | sed '/^$$/d' )
+
+clean:
+ (cd macosx ; xcodebuild -alltargets -configuration UB clean | sed '/^$$/d' )
+
+mrproper:
+ (rm -rf contrib/*tar.gz contrib/include contrib/lib contrib/DarwinContribVersion.txt ; cd macosx ; xcodebuild -alltargets -configuration UB clean | sed '/^$$/d' )
+
+endif
EOF
echo
-echo "To build HandBrake, run:"
-echo " './jamintel' on a Mac Intel,"
-echo " './jam' on a PPC Mac,"
+echo "To build MediaFork, run:"
+echo " './jam' on a Mac (or 'make' to try the UB build method),"
echo " 'jam' on Linux or Windows."