Skip to content
Browse files

added jenkins make files for mingw libs

  • Loading branch information...
1 parent 2ecbad7 commit 0dfbd78a145c702ee90d63da249b03fd82ed1822 @wsoltys wsoltys committed Apr 6, 2013
Showing with 152 additions and 0 deletions.
  1. +50 −0 tools/buildsteps/win32/make-mingwlibs.bat
  2. +102 −0 tools/buildsteps/win32/make-mingwlibs.sh
View
50 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
View
102 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

0 comments on commit 0dfbd78

Please sign in to comment.
Something went wrong with that request. Please try again.