aboutsummaryrefslogtreecommitdiff
path: root/project/Win32BuildSetup/buildmingwlibs.sh
diff options
context:
space:
mode:
Diffstat (limited to 'project/Win32BuildSetup/buildmingwlibs.sh')
-rw-r--r--project/Win32BuildSetup/buildmingwlibs.sh98
1 files changed, 65 insertions, 33 deletions
diff --git a/project/Win32BuildSetup/buildmingwlibs.sh b/project/Win32BuildSetup/buildmingwlibs.sh
index 6fdb9a521f..8043734f89 100644
--- a/project/Win32BuildSetup/buildmingwlibs.sh
+++ b/project/Win32BuildSetup/buildmingwlibs.sh
@@ -1,47 +1,62 @@
+#
+# buildmingwlibs.sh (v1.1) - updated to support ffmpeg bump to 1.2
+#
+
+WIN32SETUP=/xbmc/project/Win32BuildSetup
+ERRORFILE=$WIN32SETUP/errormingw
+PROMPTFILE=$WIN32SETUP/noprompt
+MAKECLEANFILE=$WIN32SETUP/makeclean
+MINGWLIBSOK=$WIN32SETUP/mingwlibsok
-ERRORFILE=/xbmc/project/Win32BuildSetup/errormingw
-NOPFILE=/xbmc/project/Win32BuildSetup/noprompt
-MAKECLEANFILE=/xbmc/project/Win32BuildSetup/makeclean
TOUCH=/bin/touch
RM=/bin/rm
-NOPROMPT=0
+PROMPT=0
MAKECLEAN=""
MAKEFLAGS=""
+#
+# Function declarations. (start)
+#
+
function throwerror ()
{
- $TOUCH $ERRORFILE
- echo failed to compile $1
- if [ $NOPROMPT == 0 ]; then
+ echo failed to compile $FILEPATH/$1 | tee -a $ERRORFILE
+
+ if [ $PROMPT == 1 ]; then
read
fi
}
-function setfilepath ()
-{
- FILEPATH=$1
-}
-
function checkfiles ()
{
- for i in $@; do
- FILE=$FILEPATH/$i
- if [ ! -f $FILE ]; then
- throwerror "$FILE"
- exit 1
- fi
+ for FILE in $@
+ do
+ if [ ! -f $FILE ]; then
+ rm -f $MINGWLIBSOK
+ throwerror "$FILE"
+ exit 1
+ fi
done
}
+#
+# Function declarations. (end)
+#
+
+
+
+#
+# Main...
+#
# cleanup
if [ -f $ERRORFILE ]; then
$RM $ERRORFILE
fi
-# check for noprompt
-if [ -f $NOPFILE ]; then
- $RM $NOPFILE
- NOPROMPT=1
+# check for prompt file
+if [ -f $PROMPTFILE ]; then
+ $RM $PROMPTFILE
+ PROMPT=1
fi
if [ -f $MAKECLEANFILE ]; then
@@ -56,28 +71,43 @@ fi
# compile our mingw dlls
echo "################################"
echo "## compiling mingw libs"
-echo "## NOPROMPT = $NOPROMPT"
+echo "## PROMPT = $PROMPT"
echo "## MAKECLEAN = $MAKECLEAN"
echo "################################"
echo "##### building ffmpeg dlls #####"
-cd /xbmc/lib/ffmpeg/
-sh ./build_xbmc_win32.sh $MAKECLEAN
-setfilepath /xbmc/system/players/dvdplayer
-checkfiles avcodec-53.dll avformat-53.dll avutil-51.dll postproc-52.dll swscale-2.dll avfilter-2.dll swresample-0.dll
-echo "##### building of ffmpeg dlls done #####"
+cd /xbmc/lib/ffmpeg
+if sh ./build_xbmc_win32.sh $MAKECLEAN
+then
+ echo "##### building of ffmpeg dlls done #####"
+else
+ throwerror "building the ffmpeg dlls failed!"
+ exit 1
+fi
+
+cd /xbmc/system/players/dvdplayer
+
+LIBAVCODEC=$(set -- avcodec-[0-9]*.dll; echo $1)
+LIBAVFORMAT=$(set -- avformat-[0-9]*.dll; echo $1)
+LIBAVUTIL=$(set -- avutil-[0-9]*.dll; echo $1)
+LIBAVFILTER=$(set -- avfilter-[0-9]*.dll; echo $1)
+LIBPOSTPROC=$(set -- postproc-[0-9]*.dll; echo $1)
+LIBSWSCALE=$(set -- swscale-[0-9]*.dll; echo $1)
+LIBSWRESAMPLE=$(set -- swresample-[0-9]*.dll; echo $1)
+
+checkfiles $LIBAVCODEC $LIBAVFORMAT $LIBAVUTIL $LIBAVFILTER $LIBPOSTPROC $LIBSWSCALE $LIBSWRESAMPLE
echo "##### building libdvd dlls #####"
cd /xbmc/lib/libdvd/
sh ./build-xbmc-win32.sh $MAKECLEAN
-setfilepath /xbmc/system/players/dvdplayer
+cd /xbmc/system/players/dvdplayer
checkfiles libdvdcss-2.dll libdvdnav.dll
echo "##### building of libdvd dlls done #####"
echo "##### building libmpeg2 dlls #####"
cd /xbmc/lib/libmpeg2/
sh ./make-xbmc-lib-win32.sh $MAKECLEAN
-setfilepath /xbmc/system/players/dvdplayer
+cd /xbmc/system/players/dvdplayer
checkfiles libmpeg2-0.dll
echo "##### building of libmpeg2 dlls done #####"
@@ -87,19 +117,21 @@ if [ "$MAKECLEAN" == "clean" ]; then
make -f Makefile.win32 clean
fi
make -f Makefile.win32 $MAKEFLAGS
-setfilepath /xbmc/system/players/paplayer
+cd /xbmc/system/players/paplayer
checkfiles timidity.dll
echo "##### building of timidity dlls done #####"
echo "##### building asap dlls #####"
cd /xbmc/lib/asap/win32
sh ./build_xbmc_win32.sh $MAKECLEAN
-setfilepath /xbmc/system/players/paplayer
+cd /xbmc/system/players/paplayer
checkfiles xbmc_asap.dll
echo "##### building of asap dlls done #####"
+touch $MINGWLIBSOK
+
# wait for key press
-if [ $NOPROMPT == 0 ]; then
+if [ $PROMPT == 1 ]; then
echo press a key to close the window
read
fi