Skip to content

Commit

Permalink
Windows build env update by Ralph
Browse files Browse the repository at this point in the history
git-svn-id: https://dvbcut.svn.sourceforge.net/svnroot/dvbcut/trunk@39 36490176-9c1c-0410-b649-dbf2af5787bf
  • Loading branch information
too-tired committed Jun 12, 2007
1 parent a54d977 commit 8b6705d
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 24 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2007-06-12 Michael Riepe <[email protected]>

* Windows build script & README update by Ralph Glasstetter.

2007-06-03 Michael Riepe <[email protected]>

* src/mpegmuxer.cpp: fix size calculation.
Expand Down
48 changes: 33 additions & 15 deletions README.MingGW
Original file line number Diff line number Diff line change
@@ -1,22 +1,40 @@
For compiling the windows version of DVBcut, you need

- MingGW and MSYS
- QT-3 for windows (http://qtwin.sourceforge.net/qt3-win32). The files
must be located in ../qt-3 (relative to this file).

For compiling windows version you need
- MingGW And MSYS
- QT-3 for windows http://qtwin.sourceforge.net/qt3-win32. The files must be in ../qt-3 (relative to this file)
Optionally for 2sec-audio playback one needs

To compile launch mingw.sh
- libraries libmad.a, liba52.a (from package a52dec) and libao.a
installed under /usr/local. These can easily be built/installed from
source packages by doing the usual "./configure; make; make install",
libao needs to be V0.8.8 or newer and "./configure --disable-shared"
to get a static library.

Changes made for windows on lastest svn sources
- using off64_t instead of off_t
- using O_BINARY mode on ::open
- cursor manager changes
- one change in ui files (qt complain when compiling it)
- using shell script for compiling instead on Scons (mingw.sh)
- adding files for emulating some missing functions (ex mmap). There are in import directory.
Newer DVBcut versions (>v0.5.4) also require

- libmpeg2.a (from mpeg2dec) installed under /usr/local (which also
compiles easily from source).

After adapting the path to your mingw installation in ./import/stdlib.h
simply launch "./mingw.sh" to compile DVBcut.

For playing, You will need MPlayer 1.0rc1 (http://www.mplayerhq.hu) for Windows.
If you play files >2.4G you will need to replace off_t by off64_t in all Mplayer sources and to use _lseeki64 instead lseek in stream_files.c.
MPplayer have been compiled with ./configure --disable-gui --charset=noconv --enable-directx
You will need directx files for mingw (http://www.videolan.org/vlc/dx7headers.tgz)
For playing video, you will need MPlayer 1.0rc1 for Windows
(http://www.mplayerhq.hu). You will also need the DirectX header
files for mingw (http://www.videolan.org/vlc/dx7headers.tgz).

Note: If you want to be able to play files >2.4G, replace off_t with
off64_t in all MPlayer sources and use _lseeki64() instead of lseek()
in stream_files.c.

Compile MPlayer with

./configure --disable-gui --charset=noconv --enable-directx
make
make install

Precompiled mplayer binaries with large file support (and other stuff)
can be downloaded from http://oss.netfarm.it/mplayer-win32.php.
Precompiled DVBcut binaries for Windows are available at
http://www.glasstetter.net/dvbcut/.
22 changes: 13 additions & 9 deletions mingw.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
TOP=$(pwd)
which gcc
if true; then
echo "*** Building FFMPEG..."
(cd ffmpeg.src;./configure --prefix=$TOP/ffmpeg --enable-mingw32 --enable-gpl --disable-decoders --enable-memalign-hack --disable-encoders --disable-ffplay --disable-ffserver --disable-vhook --disable-zlib --disable-network --disable-dv1394 --disable-bktr --disable-v4l --disable-audio-beos --disable-audio-oss --enable-codec=mpeg2encoder --enable-codec=mp2_encoder --enable-codec=ac3_decoder --enable-codec=ac3_encoder --enable-a52 --disable-mmx --disable-debug)

make -C ffmpeg.src installlib
make -C ffmpeg.src clean
fi
Expand All @@ -19,28 +19,32 @@ if ! uic -o $BASE.h $BASE.ui; then exit 1; fi
if ! uic -impl $BASE.h -o $BASE.cpp $BASE.ui; then exit 1; fi
done

for i in *.h; do echo $i ;
moc -o moc_$(basename $i .h).cpp $i;
for i in *.h; do
echo $i
moc -o moc_$(basename $i .h).cpp $i
done

#pour la partie qt on passe sous mingw
SOURCES="avframe.cpp differenceimageprovider.cpp buffer.cpp dvbcut.cpp eventlistitem.cpp exportdialog.cpp imageprovider.cpp index.cpp lavfmuxer.cpp logoutput.cpp main.cpp mpegmuxer.cpp mpgfile.cpp playaudio.cpp progressstatusbar.cpp progresswindow.cpp psfile.cpp pts.cpp streamdata.cpp tsfile.cpp dvbcutbase.cpp mplayererrorbase.cpp progresswindowbase.cpp exportdialogbase.cpp settings.cpp $(ls moc*.cpp) ../import/stdlib.cpp"
SOURCES="avframe.cpp differenceimageprovider.cpp buffer.cpp dvbcut.cpp eventlistitem.cpp exception.cpp exportdialog.cpp imageprovider.cpp index.cpp lavfmuxer.cpp logoutput.cpp main.cpp mpegmuxer.cpp mpgfile.cpp playaudio.cpp progressstatusbar.cpp progresswindow.cpp psfile.cpp pts.cpp streamdata.cpp tsfile.cpp dvbcutbase.cpp mplayererrorbase.cpp progresswindowbase.cpp exportdialogbase.cpp settings.cpp $(ls moc*.cpp) ../import/stdlib.cpp"
OPT=-O2
for i in $SOURCES; do
OBJ=$(basename $i .cpp).o
echo $i
if ! g++ $OPT -I ../ffmpeg/include -I ../import -I . -DQT3_SUPPORT -I $MQT/include/Qt -I $MQT/include/QtCore -I $MQT/include/QtGui -I $MQT/include/Qt3Support -I $MQT/include $i -c ; then
echo "*** Compiling $i..."
if ! g++ $OPT -I ../ffmpeg/include -I ../import -I /usr/local/include -I . -DQT3_SUPPORT -DHAVE_LIB_MAD -DHAVE_LIB_A52 -DHAVE_LIB_AO -I $MQT/include/Qt -I $MQT/include/QtCore -I $MQT/include/QtGui -I $MQT/include/Qt3Support -I $MQT/include $i -c ; then
exit 1;
fi


done
fi
g++ $OPT *.o -o ../bin/dvbcut.exe -L $MQT/lib -L../ffmpeg/lib -lavformat -lavcodec -lavutil -lqt-mt

echo "*** Linking..."
g++ $OPT *.o -o ../bin/dvbcut.exe -L $MQT/lib -L../ffmpeg/lib -L/usr/local/lib -lavformat -lavcodec -lavutil -lqt-mt -lmad -la52 -lao -lwinmm -lmpeg2

# make clean...(someone should write a real Makefile)
rm *.o
rm moc_*
for i in $UI;do
BASE=$(basename $i .ui)
rm $BASE.h $BASE.cpp
BASE=$(basename $i .ui)
rm $BASE.h $BASE.cpp
done

0 comments on commit 8b6705d

Please sign in to comment.