Skip to content

Commit

Permalink
HandBrake 0.6.1
Browse files Browse the repository at this point in the history
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@14 b64f7644-9d1e-0410-96f1-a4d463321fa5
  • Loading branch information
handbrake committed Jan 14, 2006
1 parent 755fee5 commit 60925e4
Show file tree
Hide file tree
Showing 8 changed files with 159 additions and 144 deletions.
13 changes: 9 additions & 4 deletions BUILD
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
$Id: BUILD,v 1.4 2004/03/16 15:57:03 titer Exp $
$Id: BUILD,v 1.5 2004/03/29 00:28:39 titer Exp $

BUILD file for HandBrake <http://handbrake.m0k.org/>

Building HandBrake
==================

You can build HandBrake on BeOS, MacOS X and Linux. If you'd like to
port it to another OS, email me (titer@m0k.org).

Step 1: get jam
===============

Expand All @@ -23,12 +26,14 @@ Step 2 (optional): set custom compiler flags

If you want to optimize the build for a specific CPU, edit the Jamrules
file and modify the "OPTIM = ..." line by adding the needed flags.
In case you modify this line later, make sure you run `jam -a' in order
to force jam to rebuild everything with the new flags.

In case you modify this line later: `jam clean' does not remove the
compiled contrib librairies. Therefore, make sure you run
`jam clean-all; jam' or `jam -a' in order to force jam to rebuild
everything with the new flags.

Step 3: build
=============

Run `jam'. This will build every library HandBrake requires, then
HandBrake itself.

77 changes: 43 additions & 34 deletions Jamfile
Original file line number Diff line number Diff line change
@@ -1,61 +1,70 @@
# $Id: Jamfile,v 1.41 2004/03/15 17:08:37 titer Exp $
# $Id: Jamfile,v 1.42 2004/03/29 00:28:39 titer Exp $
#
# This file is part of the HandBrake source code.
# Homepage: <http://handbrake.m0k.org/>.
# It may be used under the terms of the GNU General Public License.

SubDir TOP ;

HB_PACKAGES = ;
HB_LIBS = libhb.a liba52.a libavcodec.a libdvdplay.a libdvdread.a
libdvdcss.a libfaac.a libmp3lame.a libmp4v2.a libmpeg2.a
libvorbis.a libvorbisenc.a libogg.a libx264.a
libxvidcore.a ;
# libhb + contrib libraries
HB_LIBS = libhb.a liba52.a libavcodec.a libdvdplay.a libdvdread.a
libdvdcss.a libfaac.a libmp3lame.a libmp4v2.a libmpeg2.a
libvorbis.a libvorbisenc.a libogg.a libx264.a libxvidcore.a ;

# Interfaces
TEST_BIN = HBTest ;
TEST_SRC = test/test.c ;
BEOS_BIN = HandBrake ;
BEOS_SRC = beos/HBApp.cpp beos/HBWindow.cpp ;
GTK2_BIN = gtk2HB ;
GTK2_SRC = gtk2/main.c gtk2/callbacks.c gtk2/interface.c gtk2/support.c ;
GUI_BIN = $(TEST_BIN) $(BEOS_BIN) $(GTK2_BIN) ;
GUI_SRC = $(TEST_SRC) $(BEOS_SRC) $(GTK2_SRC) ;

# CLI app
ObjectCcFlags test/test.c : -I$(TOP)/core -g -Wall ;
LinkLibraries HBTest : $(HB_LIBS) ;
Main HBTest : test/test.c ;
Main $(TEST_BIN) : $(TEST_SRC) ;

# BeOS
if $(OS) = BEOS
{
SOURCES_BEOS = beos/HBApp.cpp beos/HBWindow.cpp ;
ObjectC++Flags $(SOURCES_BEOS) :
-I$(TOP)/core -I$(TOP)/beos/liblayout -g -Wall ;
LINKLIBS on HandBrake = $(LINKLIBS) -L$(TOP)/lib -llayout -lbe ;
LinkLibraries HandBrake : $(HB_LIBS) ;
# Main HandBrake : $(SOURCES_BEOS) ;
# Avoid multichar warnings caused by BeOS system headers
CCFLAGS = -Wno-multichar ;
C++FLAGS = -Wno-multichar ;

SystemLibraries HandBrake : -lbe ;
# BeOS GUI is broken at the moment
# Main HandBrake : $(SRC_BEOS) ;
}

# OS X
if $(OS) = MACOSX
{
# Build the app
OSXApp HandBrake.app ;
Depends HandBrake.app : $(HB_LIBS) macosx/Controller.h
macosx/Controller.mm macosx/PictureGLView.h
macosx/PictureGLView.mm ;
Depends all : HandBrake.app ;
# Needed to clean HandBrake.app
RM = rm -rf ;

OSX_SRC = macosx/Controller.h macosx/Controller.mm
macosx/PictureGLView.h macosx/PictureGLView.mm
macosx/TargetSizeField.h macosx/TargetSizeField.mm
macosx/main.mm ;

OSXApp HandBrake.app : $(OSX_SRC) $(HB_LIBS) ;

# Package
OSXPackage HandBrake-$(HB_VERSION)-OSX.zip ;
Depends HandBrake-$(HB_VERSION)-OSX.zip : HandBrake.app ;
HB_PACKAGES += HandBrake-$(HB_VERSION)-OSX.zip ;
OSXPackage HandBrake-$(HB_VERSION)-OSX.zip : HandBrake.app ;
PACKAGES += HandBrake-$(HB_VERSION)-OSX.zip ;
}

# GTK2
if $(OS) = LINUX
{
SOURCES_GTK2 = gtk2/main.c gtk2/callbacks.c gtk2/interface.c
gtk2/support.c ;
ObjectCcFlags $(SOURCES_GTK2) :
-I$(TOP)/core `pkg-config gtk+-2.0 --cflags` ;
LINKLIBS on gtk2HB = $(LINKLIBS) `pkg-config gtk+-2.0 --libs` ;
LinkLibraries gtk2HB : $(HB_LIBS) ;
Main gtk2HB : $(SOURCES_GTK2) ;
SystemLibraries $(TEST_BIN) : -lpthread ;
SystemLibraries $(GTK2_BIN) : -lpthread `pkg-config gtk+-2.0 --libs` ;
ObjectCcFlags $(GTK2_SRC) : `pkg-config gtk+-2.0 --cflags` ;
Main $(GTK2_BIN) : $(GTK2_SRC) ;
}

ObjectHdrs $(GUI_SRC) : $(TOP)/core ;
ObjectCcFlags $(GUI_SRC) : -g -Wall ;
ObjectC++Flags $(GUI_SRC) : -g -Wall ;
LinkLibraries $(GUI_BIN) : $(HB_LIBS) ;

# Packages
NotFile package ;
Depends package : $(HB_PACKAGES) ;
Expand Down
119 changes: 61 additions & 58 deletions Jamrules
Original file line number Diff line number Diff line change
@@ -1,41 +1,23 @@
# Compilers & flags
CC = gcc ;
C++ = g++ ;
CCFLAGS = $(CFLAGS) ;
C++FLAGS = $(CFLAGS) ;
AS = nasm -f elf ;
LINK = g++ ;
OPTIM = -O3 -funroll-loops ;
CC = gcc ;
C++ = g++ ;
AS = nasm -f elf ;
LINK = g++ ;
OPTIM = -O3 -funroll-loops ;

# HandBrake defines
HB_VERSION = 0.6.0 ;
HB_VERSION = 0.6.1 ;
DEFINES = HB_$(OS) HB_VERSION=\\\"$(HB_VERSION)\\\" ;
#DEFINES += HB_NOMMX ;
LANGUAGES = fr de it pl ru nl es pt ;

LANGUAGES = fr de it pl ru nl es pt ;
NotFile clean-contrib clean-all ;
Always clean-contrib ;
Depends clean-all : clean clean-contrib ;

# OS-specific
if $(OS) = BEOS
{
CCFLAGS += -Wno-multichar ;
C++FLAGS += -Wno-multichar ;
}
else if $(OS) = LINUX
{
LINKLIBS = -lpthread ;
}
else if $(OS) = MACOSX
{
# To clean HandBrake.app
RM = rm -rf ;
}

# Contrib* rules: mostly the same than Jambase rules, except
# * Targets aren't cleaned by jam clean (to prevent from deleting
# _Object: same as Jambase's Object, except
# * those aren't cleaned by 'jam clean' (to prevent from deleting
# every contrib library by accident)
# * ContribObject handles *.asm files
# * Temporary *.o files aren't removed
rule ContribObject
# * it handles *.asm files
rule _Object
{
MakeLocate $(<) : $(LOCATE_TARGET) ;
SEARCH on $(>) = $(SEARCH_SOURCE) ;
Expand All @@ -51,33 +33,28 @@ rule ContribObject
case .asm : As $(<) : $(>) ;
case .nas : As $(<) : $(>) ;
case .c : Cc $(<) : $(>) ;
case .C : C++ $(<) : $(>) ;
case .cc : C++ $(<) : $(>) ;
case .cpp : C++ $(<) : $(>) ;
case .f : Fortran $(<) : $(>) ;
case .l : Cc $(<) : $(<:S=.c) ;
Lex $(<:S=.c) : $(>) ;
case .s : As $(<) : $(>) ;
case .y : Cc $(<) : $(<:S=$(YACCGEN)) ;
Yacc $(<:S=$(YACCGEN)) : $(>) ;
case * : UserObject $(<) : $(>) ;
}
}
rule ContribObjects
# _Objects: use _Object
rule _Objects
{
local _i ;
for _i in [ FGristFiles $(<) ]
{
ContribObject $(_i:S=$(SUFOBJ)) : $(_i) ;
_Object $(_i:S=$(SUFOBJ)) : $(_i) ;
Depends obj : $(_i:S=$(SUFOBJ)) ;
}
}
rule ContribLibrary

# Simplified LibraryFromObjects which doesn't clean the target library
# nor the temporary .o files
rule _Library
{
local _l _s ;
_s = [ FGristFiles $(>:S=$(SUFOBJ)) ] ;
_l = $(<:S=$(SUFLIB)) ;
ContribObjects $(>) ;
_Objects $(>) ;
Depends obj : $(_s) ;
MakeLocate $(_l) $(_l)($(_s:BS)) : $(LOCATE_TARGET) ;
Depends $(_l) : $(_s) ;
Expand All @@ -86,40 +63,50 @@ rule ContribLibrary
Depends lib : $(_l) ;
}

# Custom Library rule: same as ContribLibrary, except 'jam clean'
# removes built objects
# ContribLibrary: library cleaned by 'jam clean-contrib'
rule ContribLibrary
{
_Library $(<) : $(>) ;
Clean clean-contrib : [ FGristFiles $(>:S=$(SUFOBJ)) ] ;
Clean clean-contrib : $(<:S=$(SUFLIB)) ;
}

# Library: library cleaned by 'jam clean'
rule Library
{
ContribLibrary $(<) : $(>) ;
_Library $(<) : $(>) ;
Clean clean : [ FGristFiles $(>:S=$(SUFOBJ)) ] ;
Clean clean : $(<:S=$(SUFLIB)) ;
}

# Build HandBrake.app using Xcode
rule OSXApp
{
Clean clean : $(1) macosx/build ;
BuildOSXApp $(1) ;
{
Depends exe : $(<) ;
Depends $(<) : $(>) ;
Clean clean : $(1) macosx/build ;
BuildOSXApp $(<) ;
}
actions BuildOSXApp
{
$(RM) $(1) && \
$(RM) $(<) && \
( cd macosx && xcodebuild ) && \
cp -r macosx/build/HandBrake.app $(1) && \
cp -r macosx/build/HandBrake.app $(<) && \
for i in $(LANGUAGES) ; do \
( cd $(1)/Contents/Resources && \
( cd $(<)/Contents/Resources && \
cp -r English.lproj $i.lproj && \
cp ../../../macosx/i18n/$i.strings \
$i.lproj/Localizable.strings ) \
done ;
}
rule OSXPackage
{
BuildOSXPackage $(1) ;
{
Depends $(<) : $(>) ;
BuildOSXPackage $(<) ;
}
actions BuildOSXPackage
{
rm -rf $(1) "HandBrake $(HB_VERSION)" && \
rm -rf $(<) "HandBrake $(HB_VERSION)" && \
mkdir "HandBrake $(HB_VERSION)" && \
cp AUTHORS "HandBrake $(HB_VERSION)/AUTHORS.txt" && \
cp COPYING "HandBrake $(HB_VERSION)/COPYING.txt" && \
Expand All @@ -128,7 +115,23 @@ actions BuildOSXPackage
( cd doc && ./genhtml.sh ) && \
cp doc/faq.html "HandBrake $(HB_VERSION)/FAQ.html" && \
cp -r HandBrake.app "HandBrake $(HB_VERSION)" && \
zip -9 -r $(1) "HandBrake $(HB_VERSION)" && \
zip -9 -r $(<) "HandBrake $(HB_VERSION)" && \
rm -rf "HandBrake $(HB_VERSION)"
}

rule SystemLibraries
{
LINKLIBS on [ FAppendSuffix $(<) : $(SUFEXE) ] += $(>) ;
}

# Jambase's ObjectHdrs doesn't seem to work when ObjectHdrs is called
# several times on a file, and it doesn't works for asm files. Fixed
# here.
rule ObjectHdrs
{
local s = [ FGristFiles $(<:S=$(SUFOBJ)) ] ;
HDRS on $(s) += $(>) ;
ASHDRS on $(s) += [ FIncludes $(>) ] ;
CCHDRS on $(s) += [ FIncludes $(>) ] ;
}

5 changes: 4 additions & 1 deletion NEWS
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
$Id: NEWS,v 1.12 2004/03/08 11:32:48 titer Exp $
$Id: NEWS,v 1.13 2004/03/29 00:28:39 titer Exp $

NEWS file for HandBrake <http://handbrake.m0k.org/>

Changes between 0.6.0 and 0.6.1
+ Fixed LPCM endianness issue

Changes between 0.5.2 and 0.6.0
+ MP4 and OGM output
+ AAC and Vorbis encoding
Expand Down
Loading

0 comments on commit 60925e4

Please sign in to comment.