aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRechi <Rechi@users.noreply.github.com>2017-06-21 10:33:09 +0200
committerRechi <Rechi@users.noreply.github.com>2017-06-21 10:33:09 +0200
commitd4ef0d756fd1af0eecffce3f49a3cee86c6da1e2 (patch)
tree096fe868a567ae2498269e6a90d90c07cb6fcd5c
parent55fa60c74b3c36ade6079ab5b1ae39d2c94ec6ea (diff)
[windows][mingwlibs] change installdirectory to project/BuildDependencies/mingwlibs/$ARCHITECTURE
-rw-r--r--.gitignore20
-rw-r--r--cmake/installdata/windows/dlls.txt1
-rw-r--r--cmake/modules/FindLibDvd.cmake2
-rw-r--r--cmake/scripts/windows/ArchSetup.cmake5
-rw-r--r--tools/buildsteps/windows/buildffmpeg.sh17
-rw-r--r--tools/buildsteps/windows/buildhelpers.sh2
-rw-r--r--tools/buildsteps/windows/buildlibdvd.sh19
-rw-r--r--tools/buildsteps/windows/download-msys2.bat4
-rw-r--r--tools/buildsteps/windows/make-mingwlibs.sh11
-rw-r--r--tools/buildsteps/windows/prepare-env.bat4
10 files changed, 26 insertions, 59 deletions
diff --git a/.gitignore b/.gitignore
index 4071615709..e87f5701e4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -249,6 +249,7 @@ lib/cpluff/stamp-h1
/project/BuildDependencies/bin/swig
/project/BuildDependencies/bin/doxygen
/project/BuildDependencies/bin/json-rpc
+/project/BuildDependencies/mingwlibs
/project/BuildDependencies/x64
/project/BuildDependencies/win32
@@ -265,16 +266,7 @@ lib/cpluff/stamp-h1
/system/cec.dll
/system/libxslt.dll
/system/ssleay32.dll
-/system/avcodec-57.dll
-/system/avfilter-6.dll
-/system/avformat-57.dll
-/system/avutil-55.dll
-/system/postproc-54.dll
-/system/swscale-4.dll
-/system/swresample-2.dll
/system/libxml2.dll
-/system/libdvdcss-2.dll
-/system/libdvdnav.dll
/system/libass.dll
/system/libbluray*
/system/libcdio.dll
@@ -493,20 +485,10 @@ lib/cpluff/stamp-h1
/xbmc/windowing/Makefile
/xbmc/windowing/egl/Makefile
-# /lib/libdvd/
-/lib/libdvd/bin
-/lib/libdvd/include
-/lib/libdvd/lib
-/lib/libdvd/Makefile
-/lib/libdvd/share
-
#/lib/win32
/lib/win32/*.tar*
/lib/win32/pax_global_header
-#/lib/win32/ffmpeg
-/lib/win32/ffmpeg/
-
/lib/libUPnP/Makefile
# /portable_data
diff --git a/cmake/installdata/windows/dlls.txt b/cmake/installdata/windows/dlls.txt
index bfd9011ad8..e6ea5fff30 100644
--- a/cmake/installdata/windows/dlls.txt
+++ b/cmake/installdata/windows/dlls.txt
@@ -2,3 +2,4 @@ system/*.dll .
project/BuildDependencies/${ARCH}/bin/libbluray*.jar .
project/Win32BuildSetup/dependencies/python27.dll .
project/BuildDependencies/${ARCH}/bin/*.dll .
+project/BuildDependencies/mingwlibs/${ARCH}/bin/*.dll .
diff --git a/cmake/modules/FindLibDvd.cmake b/cmake/modules/FindLibDvd.cmake
index eeb416c2a5..86af89ce65 100644
--- a/cmake/modules/FindLibDvd.cmake
+++ b/cmake/modules/FindLibDvd.cmake
@@ -203,7 +203,7 @@ if(NOT WIN32)
endif()
else()
# Dynamically loaded on Windows
- find_path(LIBDVD_INCLUDE_DIR dvdcss/dvdcss.h PATHS ${CMAKE_SOURCE_DIR}/lib/libdvd/include)
+ find_path(LIBDVD_INCLUDE_DIR dvdcss/dvdcss.h)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(LibDvd REQUIRED_VARS LIBDVD_INCLUDE_DIR)
diff --git a/cmake/scripts/windows/ArchSetup.cmake b/cmake/scripts/windows/ArchSetup.cmake
index 1ab16113e7..63bf8d79d5 100644
--- a/cmake/scripts/windows/ArchSetup.cmake
+++ b/cmake/scripts/windows/ArchSetup.cmake
@@ -19,9 +19,8 @@ set(CORE_MAIN_SOURCE ${CMAKE_SOURCE_DIR}/xbmc/platform/win32/WinMain.cpp)
set(PRECOMPILEDHEADER_DIR ${PROJECT_BINARY_DIR}/${CORE_BUILD_CONFIG}/objs)
set(CMAKE_SYSTEM_NAME Windows)
-list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${CMAKE_SOURCE_DIR}/lib/win32)
-list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${CMAKE_SOURCE_DIR}/lib/win32/ffmpeg)
-list(APPEND CMAKE_SYSTEM_LIBRARY_PATH ${CMAKE_SOURCE_DIR}/lib/win32/ffmpeg/bin)
+list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${CMAKE_SOURCE_DIR}/project/BuildDependencies/mingwlibs/${ARCH})
+list(APPEND CMAKE_SYSTEM_LIBRARY_PATH ${CMAKE_SOURCE_DIR}/project/BuildDependencies/mingwlibs/${ARCH}/bin)
list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${CMAKE_SOURCE_DIR}/project/BuildDependencies/${ARCH})
list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${CMAKE_SOURCE_DIR}/project/BuildDependencies)
diff --git a/tools/buildsteps/windows/buildffmpeg.sh b/tools/buildsteps/windows/buildffmpeg.sh
index 0ca6eacefe..7950533621 100644
--- a/tools/buildsteps/windows/buildffmpeg.sh
+++ b/tools/buildsteps/windows/buildffmpeg.sh
@@ -10,18 +10,7 @@ FFMPEG_DEFAULT_OPTS=""
FFMPEG_TARGET_OS=mingw32
do_loaddeps $FFMPEG_VERSION_FILE
-FFMPEGDESTDIR=/xbmc/lib/win32/$LIBNAME
-
-if [ "$(pathChanged $FFMPEGDESTDIR $FFMPEG_VERSION_FILE /xbmc/project/BuildDependencies/DownloadMingwBuildEnv.bat /xbmc/tools/buildsteps/windows)" == "0" ]
-then
- cp $FFMPEGDESTDIR/bin/*.dll /xbmc/system/
- if [ -f $BGPROCESSFILE ]; then
- rm $BGPROCESSFILE
- fi
- exit
-else
- git clean -dffx $FFMPEGDESTDIR
-fi
+FFMPEGDESTDIR=$PREFIX
do_getFFmpegConfig() {
if [[ -f "$FFMPEG_CONFIG_FILE" ]]; then
@@ -158,6 +147,4 @@ do_print_status "$LIBNAME-$VERSION (${BITS})" "$blue_color" "Configuring"
--disable-static --enable-shared $FFMPEG_OPTS_SHARED \
--extra-cflags="$extra_cflags" --extra-ldflags="$extra_ldflags"
-do_makelib &&
-cp $FFMPEGDESTDIR/bin/*.dll /xbmc/system/ &&
-tagSuccessFulBuild $FFMPEGDESTDIR $FFMPEG_VERSION_FILE /xbmc/project/BuildDependencies/DownloadMingwBuildEnv.bat /xbmc/tools/buildsteps/windows
+do_makelib
diff --git a/tools/buildsteps/windows/buildhelpers.sh b/tools/buildsteps/windows/buildhelpers.sh
index 2b6cefaeb3..9a611b4574 100644
--- a/tools/buildsteps/windows/buildhelpers.sh
+++ b/tools/buildsteps/windows/buildhelpers.sh
@@ -162,7 +162,7 @@ function getBuildHash ()
shift 1
local hashStr
hashStr="$(git rev-list HEAD --max-count=1 -- $checkPath $@)"
- hashStr="$hashStr $@ $BITS $tools"
+ hashStr="$hashStr $@ $BITS $TOOLS"
echo $hashStr
}
diff --git a/tools/buildsteps/windows/buildlibdvd.sh b/tools/buildsteps/windows/buildlibdvd.sh
index 9dc33069bc..7e1756adb6 100644
--- a/tools/buildsteps/windows/buildlibdvd.sh
+++ b/tools/buildsteps/windows/buildlibdvd.sh
@@ -3,22 +3,10 @@
[[ -f buildhelpers.sh ]] &&
source buildhelpers.sh
-LIBDVDPREFIX=/xbmc/lib/libdvd
+LIBDVDPREFIX=$PREFIX
PKG_CONFIG_PATH=$LIBDVDPREFIX/lib/pkgconfig
export PKG_CONFIG_PATH
-if [ "$(pathChanged $LIBDVDPREFIX /xbmc/tools/depends/target/libdvdcss/DVDCSS-VERSION /xbmc/tools/depends/target/libdvdread/DVDREAD-VERSION /xbmc/tools/depends/target/libdvdnav/DVDNAV-VERSION /xbmc/project/BuildDependencies/DownloadMingwBuildEnv.bat /xbmc/tools/buildsteps/windows)" == "0" ]
-then
- cp "$LIBDVDPREFIX/bin/libdvdcss-2.dll" /xbmc/system/
- cp $LIBDVDPREFIX/bin/libdvdnav.dll /xbmc/system/
- if [ -f $BGPROCESSFILE ]; then
- rm $BGPROCESSFILE
- fi
- exit
-else
- git clean -dffx $LIBDVDPREFIX
-fi
-
do_load_autoconf() {
do_loaddeps $1
do_clean_get $MAKEFLAGS
@@ -37,8 +25,7 @@ CC="gcc -static-libgcc" \
--build="$MINGW_CHOST"
do_makelib $MAKEFLAGS
-strip -S $LIBDVDPREFIX/bin/libdvdcss-2.dll &&
-cp "$LIBDVDPREFIX/bin/libdvdcss-2.dll" /xbmc/system/
+strip -S $LIBDVDPREFIX/bin/libdvdcss-2.dll
#libdvdread
do_load_autoconf /xbmc/tools/depends/target/libdvdread/DVDREAD-VERSION
@@ -74,6 +61,4 @@ gcc \
-static-libgcc
strip -S $LIBDVDPREFIX/bin/libdvdnav.dll &&
-cp $LIBDVDPREFIX/bin/libdvdnav.dll /xbmc/system/ &&
-tagSuccessFulBuild $LIBDVDPREFIX /xbmc/tools/depends/target/libdvdcss/DVDCSS-VERSION /xbmc/tools/depends/target/libdvdread/DVDREAD-VERSION /xbmc/tools/depends/target/libdvdnav/DVDNAV-VERSION /xbmc/project/BuildDependencies/DownloadMingwBuildEnv.bat /xbmc/tools/buildsteps/windows
do_print_status "libdvd (${BITS})" "$green_color" "Done"
diff --git a/tools/buildsteps/windows/download-msys2.bat b/tools/buildsteps/windows/download-msys2.bat
index 9452206e7c..6f3f9e8949 100644
--- a/tools/buildsteps/windows/download-msys2.bat
+++ b/tools/buildsteps/windows/download-msys2.bat
@@ -440,6 +440,8 @@ if %build32%==yes (
echo.
echo.BITS='32bit'
echo.export BITS
+ echo.ARCHITECTURE='win32'
+ echo.export ARCHITECTURE
)>>%instdir%\local32\etc\profile.local
)
@@ -493,6 +495,8 @@ if %build64%==yes (
echo.
echo.BITS='64bit'
echo.export BITS
+ echo.ARCHITECTURE='x64'
+ echo.export ARCHITECTURE
)>>%instdir%\local64\etc\profile.local
)
diff --git a/tools/buildsteps/windows/make-mingwlibs.sh b/tools/buildsteps/windows/make-mingwlibs.sh
index af82d746cb..b37fc9fa74 100644
--- a/tools/buildsteps/windows/make-mingwlibs.sh
+++ b/tools/buildsteps/windows/make-mingwlibs.sh
@@ -1,3 +1,5 @@
+[[ -f $(dirname $0)/buildhelpers.sh ]] &&
+ source $(dirname $0)/buildhelpers.sh
Win32BuildSetup=/xbmc/project/Win32BuildSetup
ERRORFILE=$Win32BuildSetup/errormingw
@@ -46,6 +48,12 @@ checkfiles() {
}
buildProcess() {
+export PREFIX=/xbmc/project/BuildDependencies/mingwlibs/$ARCHITECTURE
+if [ "$(pathChanged $PREFIX /xbmc/tools/buildsteps/windows /xbmc/tools/depends/target/*/*-VERSION)" == "0" ]; then
+ return
+fi
+
+git clean -dffx $PREFIX
cd /xbmc/tools/buildsteps/windows
# compile our mingw dlls
@@ -64,7 +72,7 @@ echo "-------------------------------------------------"
echo " building FFmpeg $BITS"
echo "-------------------------------------------------"
./buildffmpeg.sh
-setfilepath /xbmc/system
+setfilepath $PREFIX/bin
checkfiles avcodec-57.dll avformat-57.dll avutil-55.dll postproc-54.dll swscale-4.dll avfilter-6.dll swresample-2.dll
echo "-------------------------------------------------"
echo " building of FFmpeg $BITS done..."
@@ -86,6 +94,7 @@ echo "compile mingw libs $BITS done..."
echo
echo "-------------------------------------------------------------------------------"
+tagSuccessFulBuild $PREFIX /xbmc/tools/buildsteps/windows /xbmc/tools/depends/target/*/*-VERSION
}
run_builds() {
diff --git a/tools/buildsteps/windows/prepare-env.bat b/tools/buildsteps/windows/prepare-env.bat
index 8a0a1efd0e..7443f9d256 100644
--- a/tools/buildsteps/windows/prepare-env.bat
+++ b/tools/buildsteps/windows/prepare-env.bat
@@ -13,8 +13,8 @@ IF EXIST %WORKSPACE%\project\Win32BuildSetup\BUILD_WIN32 rmdir %WORKSPACE%\proje
rem we assume git in path as this is a requirement
rem git clean the untracked files and directories
rem but keep the downloaded dependencies
-ECHO running git clean -xffd -e "lib/libdvd" -e "lib/win32/ffmpeg" -e "project/BuildDependencies/downloads" -e "project/BuildDependencies/downloads2" -e "project/Win32BuildSetup/dependencies/vcredist"
-git clean -xffd -e "lib/libdvd" -e "lib/win32/ffmpeg" -e "project/BuildDependencies/downloads" -e "project/BuildDependencies/downloads2" -e "project/Win32BuildSetup/dependencies/vcredist"
+ECHO running git clean -xffd -e "project/BuildDependencies/downloads" -e "project/BuildDependencies/downloads2" -e "project/BuildDependencies/mingwlibs" -e "project/Win32BuildSetup/dependencies/vcredist"
+git clean -xffd -e "project/BuildDependencies/downloads" -e "project/BuildDependencies/downloads2" -e "project/BuildDependencies/mingwlibs" -e "project/Win32BuildSetup/dependencies/vcredist"
rem cleaning additional directories
ECHO delete build directories