aboutsummaryrefslogtreecommitdiff
path: root/tools/buildsteps
diff options
context:
space:
mode:
authorWiSo <wiso@xbmc.org>2013-04-06 18:32:44 +0200
committerWiSo <wiso@xbmc.org>2013-04-06 23:25:39 +0200
commit0dfbd78a145c702ee90d63da249b03fd82ed1822 (patch)
treea63dda112ee525321898619e72969d93757f883c /tools/buildsteps
parent2ecbad75910413574db48c9465dd40bd504e4103 (diff)
added jenkins make files for mingw libs
Diffstat (limited to 'tools/buildsteps')
-rw-r--r--tools/buildsteps/win32/make-mingwlibs.bat50
-rw-r--r--tools/buildsteps/win32/make-mingwlibs.sh102
2 files changed, 152 insertions, 0 deletions
diff --git a/tools/buildsteps/win32/make-mingwlibs.bat b/tools/buildsteps/win32/make-mingwlibs.bat
new file mode 100644
index 0000000000..f72a15c923
--- /dev/null
+++ b/tools/buildsteps/win32/make-mingwlibs.bat
@@ -0,0 +1,50 @@
+@ECHO OFF
+rem batch file to compile mingw libs via BuildSetup
+
+rem set M$ env
+call "%VS100COMNTOOLS%..\..\VC\bin\vcvars32.bat"
+
+SET PROMPTLEVEL=prompt
+SET BUILDMODE=clean
+SET opt=rxvt
+FOR %%b in (%1, %2, %3) DO (
+ IF %%b==noprompt SET PROMPTLEVEL=noprompt
+ IF %%b==clean SET BUILDMODE=clean
+ IF %%b==noclean SET BUILDMODE=noclean
+ IF %%b==sh SET opt=sh
+)
+
+SET BS_DIR=%WORKSPACE%\project\Win32BuildSetup
+cd %BS_DIR%
+
+IF EXIST errormingw del errormingw > NUL
+
+rem compiles a bunch of mingw libs and not more
+IF %opt%==sh (
+ IF EXIST %WORKSPACE%\project\BuildDependencies\msys\bin\sh.exe (
+ ECHO starting sh shell
+ %WORKSPACE%\project\BuildDependencies\msys\bin\sh --login /xbmc/tools/buildsteps/win32/make-mingwlibs.sh
+ GOTO END
+ ) ELSE (
+ GOTO ENDWITHERROR
+ )
+)
+IF EXIST %WORKSPACE%\project\BuildDependencies\msys\bin\rxvt.exe (
+ ECHO starting rxvt shell
+ %WORKSPACE%\project\BuildDependencies\msys\bin\rxvt -backspacekey  -sl 2500 -sr -fn Courier-12 -tn msys -geometry 120x25 -title "building mingw dlls" -e /bin/sh --login /xbmc//xbmc/tools/buildsteps/win32/make-mingwlibs.sh
+ GOTO END
+)
+GOTO ENDWITHERROR
+
+:ENDWITHERROR
+ ECHO msys environment not found
+ EXIT /B 1
+
+:END
+ ECHO exiting msys environment
+ IF EXIST errormingw (
+ ECHO failed to build mingw libs
+ del errormingw > NUL
+ EXIT /B 1
+ )
+ EXIT /B 0 \ No newline at end of file
diff --git a/tools/buildsteps/win32/make-mingwlibs.sh b/tools/buildsteps/win32/make-mingwlibs.sh
new file mode 100644
index 0000000000..91e1bcb802
--- /dev/null
+++ b/tools/buildsteps/win32/make-mingwlibs.sh
@@ -0,0 +1,102 @@
+
+ERRORFILE=/xbmc/project/Win32BuildSetup/errormingw
+TOUCH=/bin/touch
+RM=/bin/rm
+NOPROMPT=0
+MAKECLEAN=""
+MAKEFLAGS=""
+
+function throwerror ()
+{
+ $TOUCH $ERRORFILE
+ echo failed to compile $1
+ if [ $NOPROMPT == 0 ]; 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
+ done
+}
+
+# cleanup
+if [ -f $ERRORFILE ]; then
+ $RM $ERRORFILE
+fi
+
+# check for noprompt
+if [ "$PROMPTLEVEL" == "noprompt" ]; then
+ NOPROMPT=1
+fi
+
+if [ "$BUILDMODE" == "clean" ]; then
+ MAKECLEAN="clean"
+fi
+
+if [ $NUMBER_OF_PROCESSORS > 1 ]; then
+ MAKEFLAGS=-j$NUMBER_OF_PROCESSORS
+fi
+
+# compile our mingw dlls
+echo "################################"
+echo "## compiling mingw libs"
+echo "## NOPROMPT = $NOPROMPT"
+echo "## MAKECLEAN = $MAKECLEAN"
+echo "## WORKSPACE = $WORKSPACE"
+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 #####"
+
+echo "##### building libdvd dlls #####"
+cd /xbmc/lib/libdvd/
+sh ./build-xbmc-win32.sh $MAKECLEAN
+setfilepath /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
+checkfiles libmpeg2-0.dll
+echo "##### building of libmpeg2 dlls done #####"
+
+echo "##### building timidity dlls #####"
+cd /xbmc/lib/timidity/
+if [ "$MAKECLEAN" == "clean" ]; then
+ make -f Makefile.win32 clean
+fi
+make -f Makefile.win32 $MAKEFLAGS
+setfilepath /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
+checkfiles xbmc_asap.dll
+echo "##### building of asap dlls done #####"
+
+# wait for key press
+if [ $NOPROMPT == 0 ]; then
+ echo press a key to close the window
+ read
+fi