summaryrefslogtreecommitdiffstats
path: root/BUILD
diff options
context:
space:
mode:
authorhandbrake <[email protected]>2007-01-03 01:11:09 +0000
committerhandbrake <[email protected]>2007-01-03 01:11:09 +0000
commit79de879241d42814c3db4f897ad6a632ebe42a7f (patch)
tree44ac1a61c3b493e5cc2f99322a4ade200a6c29e3 /BUILD
parent4a04f3ecd4d15ad7a47bc797e991f412c426b05f (diff)
Changes to make HandBrake build on Windows using the Cygwin environment:
root configure file: I added this to the "case $SYSTEM in" switch statement: CYGWIN_NT*) DEFINES="$DEFINES SYS_CYGWIN USE_PTHREAD" LINKLIBS="$LINKLIBS -lpthread" ;; Also, for each existing OS type that is using -lpthread, I added USE_PTHREAD to their DEFINES. Then libhb/ports.c was changed to use pthread code based on the value of USE_PTHREAD, instead of checking each different OS value that used pthreading, so it's a bit easier to read and maintain. root Jamfile: Jam doesn't seem to understand CYGWIN, so $(OS) is defined as UNKNOWN. Check for this, and if this it true then set $(OS) to CYGWIN. Since CSS doesn't work (yet) on CYGWIN/Windows, I also changed Jamfile to not include libdvdcss.a in the library list for CYGWIN. contrib/Jamfile: For CYGWIN, don't build libdvdcss, and don't specify it's path for libdvdread. There are also a few changes to use new patchfiles for Cygwin for a few of the libraries. x264: Change configure script so that it doesn't include -mno-cygwin flags for CYGWIN platform. Created patchfile patch-x264-cygwin.patch for this, which is used by Jamfile. The -mno-cygwin flags cause the library not to link correctly with HBTest.exe. The -mno-cygwin flag is used to create an object file or library that doesn't depend on cygwin1.dll if you're using MinGW, but I'm not (yet). libxvidcore: Change configure script so that it doesn't include -mno-cygwin flags for CYGWIN platform. Change configure script so that it uses libxvidcore.a as the lib name instead of xvidcore.a for CYGWIN. Created patchfile patch-xvidcore-cygwin.patch that contains the 2 above changes and is used by Jamfile. Renamed patch-xvidcore.patch to patch-xvidcore-macosx.patch and updated Jamfile as appropriate -- an attempt to keep the patches being applied only when needed for a particular platform. ffmpeg: libavcodec/mpegaudiodec.c uses llrint(), which apparently isn't availble with Cygwin, so I changed the file to use lrint() which is available. llrint() returns a long long, lrint() returns a long. In the places where llrint() was being called, the return value of llrint() was being assigned to an element in an array of unsigned ints, so llrint() (long long) shouldn't be needed, and lrint() (long) should be fine. Created patchfile patch-ffmpeg-cygwin.patch that contains this change, and is used by Jamfile. libhb/ports.c: Commented out a number of things that were broken with the current SYS_CYGWIN code. The most notable change was to not use Windows threading for CYGWIN, and instead use pthreading. All the places where the OS type was being checked to determine whether or not to use pthreading were changed so that the USE_PTHREAD define is checked instead. There seems to be some problem with the Windows threading code in ports.c, because if I enable it then x264 encodes will either crash or lock-up HBTest.exe. Perhaps this is related to mixing threading models, since x264 is compiled with pthread support, and so maybe mixing pthread with Windows threading in the same process is a bad thing. test/test.c: Need to #include sys/time.h, time.h, unistd.h to compile. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@84 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'BUILD')
-rw-r--r--BUILD21
1 files changed, 19 insertions, 2 deletions
diff --git a/BUILD b/BUILD
index 9031c1400..b6822950b 100644
--- a/BUILD
+++ b/BUILD
@@ -5,8 +5,8 @@ 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 ([email protected]).
+You can build HandBrake on BeOS, MacOS X, Linux, and on Windows using Cygwin.
+If you'd like to port it to another OS, email me ([email protected]).
Step 1: get needed tools
========================
@@ -20,8 +20,25 @@ Step 1: get needed tools
On OS X, you cannot use the modified jam shipped with the developer
tools, use this one instead:
<http://download.m0k.org/handbrake/jam-2.5rc3-OSX.zip>.
+ On Cygwin, get the jam source from
+ 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)
+Cygwin setup:
+ There are a couple extra things required to make the code build for Cygwin.
+ Make sure you have /bin and /usr/bin on your path *first*, before
+ the Windows paths. Otherwise the Cygwin find.exe won't be used, and
+ lame won't build.
+ Also, I have not tried to build this with MinGW, I've only built it with
+ the Cygwin environment, so you should build with Cygwin gcc and dev tools.
+ Unfortunately this means you need to have cygwin1.dll around to run the
+ HBTest.exe program, but that's the way it is for now, until I get time
+ to try building it with MinGW. If you want to try making it work with
+ MinGW, then go for it!
+
+
Step 2: build
=============