aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Fedchin <afedchin@ruswizards.com>2016-02-13 21:09:09 +0300
committerAnton Fedchin <afedchin@ruswizards.com>2016-02-23 22:22:16 +0300
commit869c798b346f05388a838a0f8bbfc01c2b044b66 (patch)
tree0f6e7eab0d846e7b447b4f9865191dec74e7d659
parent4a3fa567894eea1f676098e25c550e0f4cde1352 (diff)
[win32] Build libdvd libs from Kodi repos.
-rw-r--r--tools/buildsteps/win32/buildlibdvd.sh71
-rw-r--r--tools/buildsteps/win32/make-mingwlibs.sh6
2 files changed, 73 insertions, 4 deletions
diff --git a/tools/buildsteps/win32/buildlibdvd.sh b/tools/buildsteps/win32/buildlibdvd.sh
new file mode 100644
index 0000000000..7fddea02fd
--- /dev/null
+++ b/tools/buildsteps/win32/buildlibdvd.sh
@@ -0,0 +1,71 @@
+#!/bin/bash
+
+[[ -f buildhelpers.sh ]] &&
+ source buildhelpers.sh
+
+LIBDVDPREFIX=/xbmc/lib/libdvd
+PKG_CONFIG_PATH=$LIBDVDPREFIX/lib/pkgconfig
+export PKG_CONFIG_PATH
+
+do_load_autoconf() {
+ do_loaddeps $1
+ do_clean_get $MAKEFLAGS
+ do_print_status "$LIBNAME-$VERSION (${BITS})" "$blue_color" "Configuring"
+ do_autoreconf
+}
+
+#libdvdcss
+do_load_autoconf /xbmc/tools/depends/target/libdvdcss/DVDCSS-VERSION
+CC="gcc -static-libgcc" \
+./configure \
+ --prefix=$LIBDVDPREFIX \
+ CFLAGS="-DNDEBUG" \
+ --disable-doc \
+ --with-pic \
+ --build="$MINGW_CHOST"
+do_makelib $MAKEFLAGS
+
+strip -S $LIBDVDPREFIX/bin/libdvdcss-2.dll &&
+cp "$LIBDVDPREFIX/bin/libdvdcss-2.dll" /xbmc/system/players/VideoPlayer/
+
+#libdvdread
+do_load_autoconf /xbmc/tools/depends/target/libdvdread/DVDREAD-VERSION
+CC="gcc -static-libgcc" \
+./configure \
+ --prefix=$LIBDVDPREFIX \
+ --disable-shared \
+ --enable-static \
+ --with-libdvdcss \
+ CFLAGS="-DHAVE_DVDCSS_DVDCSS_H -D_XBMC -DNDEBUG -I$LIBDVDPREFIX/include" \
+ --build="$MINGW_CHOST"
+do_makelib $MAKEFLAGS
+
+#libdvdnav
+do_load_autoconf /xbmc/tools/depends/target/libdvdnav/DVDNAV-VERSION
+CC="gcc -static-libgcc" \
+./configure \
+ --prefix=$LIBDVDPREFIX \
+ --disable-shared \
+ --enable-static \
+ CFLAGS="-D_XBMC -DNDEBUG -I$LIBDVDPREFIX/include" \
+ --build="$MINGW_CHOST"
+do_makelib $MAKEFLAGS
+
+cd $LOCALBUILDDIR
+gcc \
+ -shared \
+ -o $LIBDVDPREFIX/bin/libdvdnav.dll \
+ -ldl \
+ libdvdread/src/*.o libdvdnav/src/*.o libdvdnav/src/vm/*.o $LIBDVDPREFIX/lib/libdvdcss.dll.a \
+ -Wl,--enable-auto-image-base \
+ -Xlinker --enable-auto-import \
+ -static-libgcc
+
+strip -S $LIBDVDPREFIX/bin/libdvdnav.dll &&
+cp $LIBDVDPREFIX/bin/libdvdnav.dll /xbmc/system/players/VideoPlayer/
+do_print_status "libdvd (${BITS})" "$green_color" "Done"
+
+#remove the bgprocessfile for signaling the process end
+if [ -f $BGPROCESSFILE ]; then
+ rm $BGPROCESSFILE
+fi \ No newline at end of file
diff --git a/tools/buildsteps/win32/make-mingwlibs.sh b/tools/buildsteps/win32/make-mingwlibs.sh
index f48d5dd1ea..075132eeaf 100644
--- a/tools/buildsteps/win32/make-mingwlibs.sh
+++ b/tools/buildsteps/win32/make-mingwlibs.sh
@@ -62,7 +62,7 @@ runBackgroundProcess() {
buildProcess() {
-cd $LOCALBUILDDIR
+cd /xbmc/tools/buildsteps/win32
# compile our mingw dlls
echo "-------------------------------------------------------------------------------"
@@ -79,7 +79,6 @@ echo -ne "\033]0;building FFmpeg $BITS\007"
echo "-------------------------------------------------"
echo " building FFmpeg $BITS"
echo "-------------------------------------------------"
-cd /xbmc/tools/buildsteps/win32
runBackgroundProcess "./buildffmpeg.sh $MAKECLEAN"
setfilepath /xbmc/system/players/VideoPlayer
checkfiles avcodec-56.dll avformat-56.dll avutil-54.dll postproc-53.dll swscale-3.dll avfilter-5.dll swresample-1.dll
@@ -91,8 +90,7 @@ echo -ne "\033]0;building libdvd $BITS\007"
echo "-------------------------------------------------"
echo " building libdvd $BITS"
echo "-------------------------------------------------"
-cd /xbmc/lib/libdvd/
-runBackgroundProcess "./build-xbmc-win32.sh $MAKECLEAN"
+runBackgroundProcess "./buildlibdvd.sh $MAKECLEAN"
setfilepath /xbmc/system/players/VideoPlayer
checkfiles libdvdcss-2.dll libdvdnav.dll
echo "-------------------------------------------------"