Skip to content

Commit

Permalink
[jenkins] - do the mingw build in a backgroundthread and echo "." on …
Browse files Browse the repository at this point in the history
…the foreground thread for giving continuous output to the jenkins slave - should fix the disconnect issue on win32 slave
  • Loading branch information
Memphiz authored and Montellese committed Jun 11, 2013
1 parent bcb44ee commit 8f9058a
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 5 deletions.
5 changes: 4 additions & 1 deletion lib/asap/win32/build_xbmc_win32.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash

MAKEFLAGS=""
BGPROCESSFILE="$2"

if [ "$1" == "clean" ]
then
Expand All @@ -12,4 +13,6 @@ fi

make $MAKEFLAGS xbmc

cp xbmc_asap.dll /xbmc/system/players/paplayer/
cp xbmc_asap.dll /xbmc/system/players/paplayer/
#remove the bgprocessfile for signaling the process end
rm $BGPROCESSFILE
4 changes: 4 additions & 0 deletions lib/ffmpeg/build_xbmc_win32.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash

MAKEFLAGS=""
BGPROCESSFILE="$2"

if [ "$1" == "clean" ]
then
Expand Down Expand Up @@ -60,3 +61,6 @@ cp .libs/avfilter-3.dll /xbmc/system/players/dvdplayer/ &&
cp .libs/postproc-52.dll /xbmc/system/players/dvdplayer/ &&
cp .libs/swresample-0.dll /xbmc/system/players/dvdplayer/ &&
cp .libs/swscale-2.dll /xbmc/system/players/dvdplayer/

#remove the bgprocessfile for signaling the process end
rm $BGPROCESSFILE
3 changes: 3 additions & 0 deletions lib/libdvd/build-xbmc-win32.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

MAKECLEAN=0
MAKEFLAGS=""
BGPROCESSFILE=$2

if [ "$1" = "clean" ]
then
Expand Down Expand Up @@ -80,3 +81,5 @@ strip -S obj/libdvdnav.dll
cd ..
cp libdvdnav/obj/libdvdnav.dll /xbmc/system/players/dvdplayer/
echo "***** Done *****"
#remove the bgprocessfile for signaling the process end
rm $BGPROCESSFILE
4 changes: 4 additions & 0 deletions lib/libmpeg2/make-xbmc-lib-win32.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash

MAKEFLAGS=""
BGPROCESSFILE="$2"

if [ "$1" == "clean" ]
then
Expand All @@ -27,3 +28,6 @@ make $MAKEFLAGS &&

strip libmpeg2/.libs/*.dll &&
cp libmpeg2/.libs/*.dll /xbmc/system/players/dvdplayer/

#remove the bgprocessfile for signaling the process end
rm $BGPROCESSFILE
25 changes: 21 additions & 4 deletions project/Win32BuildSetup/buildmingwlibs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
ERRORFILE=/xbmc/project/Win32BuildSetup/errormingw
NOPFILE=/xbmc/project/Win32BuildSetup/noprompt
MAKECLEANFILE=/xbmc/project/Win32BuildSetup/makeclean
BGPROCESSFILE=/xbmc/project/Win32BuildSetup/bgprocess
TOUCH=/bin/touch
RM=/bin/rm
NOPROMPT=0
Expand Down Expand Up @@ -33,6 +34,20 @@ function checkfiles ()
done
}

function runBackgroundProcess ()
{
#start the process backgrounded
$TOUCH $BGPROCESSFILE
echo "backgrounding: sh $1 $BGPROCESSFILE & (workdir: $(PWD))"
sh $1 $BGPROCESSFILE &
echo "waiting on bgprocess..."
while [ -f $BGPROCESSFILE ]; do
echo -n "."
sleep 5
done
echo "done"
}

# cleanup
if [ -f $ERRORFILE ]; then
$RM $ERRORFILE
Expand All @@ -47,6 +62,8 @@ fi
if [ -f $MAKECLEANFILE ]; then
$RM $MAKECLEANFILE
MAKECLEAN="clean"
else
MAKECLEAN="noclean"
fi

if [ $NUMBER_OF_PROCESSORS > 1 ]; then
Expand All @@ -62,21 +79,21 @@ echo "################################"

echo "##### building ffmpeg dlls #####"
cd /xbmc/lib/ffmpeg/
sh ./build_xbmc_win32.sh $MAKECLEAN
runBackgroundProcess "./build_xbmc_win32.sh $MAKECLEAN"
setfilepath /xbmc/system/players/dvdplayer
checkfiles avcodec-54.dll avformat-54.dll avutil-52.dll postproc-52.dll swscale-2.dll avfilter-3.dll swresample-0.dll
echo "##### building of ffmpeg dlls done #####"

echo "##### building libdvd dlls #####"
cd /xbmc/lib/libdvd/
sh ./build-xbmc-win32.sh $MAKECLEAN
runBackgroundProcess "./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
runBackgroundProcess "./make-xbmc-lib-win32.sh $MAKECLEAN"
setfilepath /xbmc/system/players/dvdplayer
checkfiles libmpeg2-0.dll
echo "##### building of libmpeg2 dlls done #####"
Expand All @@ -93,7 +110,7 @@ echo "##### building of timidity dlls done #####"

echo "##### building asap dlls #####"
cd /xbmc/lib/asap/win32
sh ./build_xbmc_win32.sh $MAKECLEAN
runBackgroundProcess "./build_xbmc_win32.sh $MAKECLEAN"
setfilepath /xbmc/system/players/paplayer
checkfiles xbmc_asap.dll
echo "##### building of asap dlls done #####"
Expand Down

0 comments on commit 8f9058a

Please sign in to comment.