Skip to content

Commit

Permalink
Merge pull request xbmc#12328 from Rechi/mingwlibs
Browse files Browse the repository at this point in the history
[windows][mingwlibs] change installdirectory
  • Loading branch information
Rechi authored Jun 22, 2017
2 parents 132e6e8 + 40457d7 commit 1de7be4
Show file tree
Hide file tree
Showing 11 changed files with 28 additions and 193 deletions.
20 changes: 1 addition & 19 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions cmake/installdata/windows/dlls.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 .
2 changes: 1 addition & 1 deletion cmake/modules/FindLibDvd.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 2 additions & 3 deletions cmake/scripts/windows/ArchSetup.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
105 changes: 0 additions & 105 deletions lib/libdvd/Makefile.in

This file was deleted.

22 changes: 2 additions & 20 deletions tools/buildsteps/windows/buildffmpeg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -158,11 +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

#remove the bgprocessfile for signaling the process end
if [ -f $BGPROCESSFILE ]; then
rm $BGPROCESSFILE
fi
do_makelib
2 changes: 1 addition & 1 deletion tools/buildsteps/windows/buildhelpers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
24 changes: 2 additions & 22 deletions tools/buildsteps/windows/buildlibdvd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -74,11 +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"

#remove the bgprocessfile for signaling the process end
if [ -f $BGPROCESSFILE ]; then
rm $BGPROCESSFILE
fi
4 changes: 4 additions & 0 deletions tools/buildsteps/windows/download-msys2.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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
)

Expand Down Expand Up @@ -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
)

Expand Down
32 changes: 12 additions & 20 deletions tools/buildsteps/windows/make-mingwlibs.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
[[ -f $(dirname $0)/buildhelpers.sh ]] &&
source $(dirname $0)/buildhelpers.sh

Win32BuildSetup=/xbmc/project/Win32BuildSetup
ERRORFILE=$Win32BuildSetup/errormingw
NOPFILE=$Win32BuildSetup/noprompt
MAKECLEANFILE=$Win32BuildSetup/makeclean
BGPROCESSFILE=$Win32BuildSetup/bgprocess
TOUCH=/bin/touch
RM=/bin/rm
NOPROMPT=0
Expand Down Expand Up @@ -48,20 +47,13 @@ checkfiles() {
done
}

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


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
Expand All @@ -79,8 +71,8 @@ echo -ne "\033]0;building FFmpeg $BITS\007"
echo "-------------------------------------------------"
echo " building FFmpeg $BITS"
echo "-------------------------------------------------"
runBackgroundProcess "./buildffmpeg.sh $MAKECLEAN"
setfilepath /xbmc/system
./buildffmpeg.sh
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..."
Expand All @@ -90,8 +82,7 @@ echo -ne "\033]0;building libdvd $BITS\007"
echo "-------------------------------------------------"
echo " building libdvd $BITS"
echo "-------------------------------------------------"
runBackgroundProcess "./buildlibdvd.sh $MAKECLEAN"
setfilepath /xbmc/system
./buildlibdvd.sh
checkfiles libdvdcss-2.dll libdvdnav.dll
echo "-------------------------------------------------"
echo " building of libdvd $BITS done..."
Expand All @@ -103,6 +94,7 @@ echo "compile mingw libs $BITS done..."
echo
echo "-------------------------------------------------------------------------------"

tagSuccessFulBuild $PREFIX /xbmc/tools/buildsteps/windows /xbmc/tools/depends/target/*/*-VERSION
}

run_builds() {
Expand Down
4 changes: 2 additions & 2 deletions tools/buildsteps/windows/prepare-env.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1de7be4

Please sign in to comment.