Skip to content

Commit

Permalink
Merge remote-tracking branch 'mainline/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
FernetMenta committed Oct 22, 2017
2 parents d2fba45 + d68e7e3 commit 4e77658
Show file tree
Hide file tree
Showing 30 changed files with 402 additions and 107 deletions.
34 changes: 3 additions & 31 deletions .gitignore
Expand Up @@ -102,8 +102,6 @@ cmake_install.cmake
/addons/skin.estouchy/media/Makefile
/addons/skin.estouchy/media/Textures.xbt
/addons/skin.pm3-hd/media/Textures.xbt
/addons/script.module.pil/
/addons/script.module.pycryptodome/
/addons/audioencoder.*
/addons/pvr.*
/addons/adsp.*
Expand Down Expand Up @@ -234,11 +232,8 @@ lib/cpluff/stamp-h1
/project/Win32BuildSetup/dependencies/

# /project/BuildDependencies
/project/BuildDependencies/arm-uwp
/project/BuildDependencies/downloads
/project/BuildDependencies/downloads2
/project/BuildDependencies/include
/project/BuildDependencies/lib
/project/BuildDependencies/msys32
/project/BuildDependencies/msys64
/project/BuildDependencies/locals
Expand All @@ -250,33 +245,10 @@ lib/cpluff/stamp-h1
/project/BuildDependencies/bin/json-rpc
/project/BuildDependencies/mingwlibs
/project/BuildDependencies/x64
/project/BuildDependencies/x64-uwp
/project/BuildDependencies/win10-arm
/project/BuildDependencies/win10-x64
/project/BuildDependencies/win10-win32
/project/BuildDependencies/win32
/project/BuildDependencies/win32-uwp

# /system
/system/cpluff.dll
/system/EasyHook32.dll
/system/EasyHook64.dll
/system/libcurl.dll
/system/libeay32.dll
/system/ssh.dll
/system/sqlite3.dll
/system/libnfs.dll
/system/dnssd.dll
/system/cec.dll
/system/libxslt.dll
/system/ssleay32.dll
/system/libxml2.dll
/system/libass.dll
/system/libbluray*
/system/libcdio.dll
/system/libplist.dll
/system/shairplay.dll
/system/libmysql.dll
/system/python27.dll
/system/zlib.dll
/system/lcms2.dll

# /system/players/VideoPlayer
/system/players/VideoPlayer/*
Expand Down
1 change: 1 addition & 0 deletions cmake/installdata/windows/addons.txt
@@ -1 +1,2 @@
addons/repository.pvr-win32.xbmc.org/*
project/BuildDependencies/${ARCH}/addons KEEP_DIR_STRUCTURE addons
1 change: 0 additions & 1 deletion cmake/installdata/windows/dlls.txt
@@ -1,4 +1,3 @@
system/*.dll .
project/BuildDependencies/${ARCH}/bin/libbluray*.jar .
project/BuildDependencies/${ARCH}/bin/*.dll .
project/BuildDependencies/mingwlibs/${ARCH}/bin/*.dll .
2 changes: 1 addition & 1 deletion cmake/modules/FindTexturePacker.cmake
Expand Up @@ -19,7 +19,7 @@ if(NOT TARGET TexturePacker::TexturePacker)
elseif(WIN32)
add_executable(TexturePacker::TexturePacker IMPORTED GLOBAL)
set_target_properties(TexturePacker::TexturePacker PROPERTIES
IMPORTED_LOCATION "${CMAKE_SOURCE_DIR}/tools/TexturePacker/TexturePacker.exe")
IMPORTED_LOCATION "${DEPENDENCIES_DIR}/tools/TexturePacker/TexturePacker.exe")
else()
if(WITH_TEXTUREPACKER)
get_filename_component(_tppath ${WITH_TEXTUREPACKER} ABSOLUTE)
Expand Down
1 change: 1 addition & 0 deletions cmake/scripts/common/Macros.cmake
Expand Up @@ -314,6 +314,7 @@ function(copy_files_from_filelist_to_buildtree pattern)
copy_file_to_buildtree(${CMAKE_SOURCE_DIR}/${file} DIRECTORY ${dest} ${DIR_OPTION})
endif()
endforeach()
set(DIR_OPTION)
endforeach()
endforeach()
endforeach()
Expand Down
22 changes: 8 additions & 14 deletions cmake/scripts/windows/ArchSetup.cmake
Expand Up @@ -17,14 +17,15 @@ set(CORE_MAIN_SOURCE ${CMAKE_SOURCE_DIR}/xbmc/platform/win32/WinMain.cpp)

# Precompiled headers fail with per target output directory. (needs CMake 3.1)
set(PRECOMPILEDHEADER_DIR ${PROJECT_BINARY_DIR}/${CORE_BUILD_CONFIG}/objs)

set(CMAKE_SYSTEM_NAME Windows)
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)
set(PYTHON_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/project/BuildDependencies/${ARCH}/include/python)
set(DEPS_FOLDER_RELATIVE project/BuildDependencies)
set(DEPENDENCIES_DIR ${CMAKE_SOURCE_DIR}/${DEPS_FOLDER_RELATIVE}/${ARCH})
set(MINGW_LIBS_DIR ${CMAKE_SOURCE_DIR}/${DEPS_FOLDER_RELATIVE}/mingwlibs/${ARCH})

list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${MINGW_LIBS_DIR})
list(APPEND CMAKE_SYSTEM_LIBRARY_PATH ${MINGW_LIBS_DIR}/bin)
list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${DEPENDENCIES_DIR})
set(PYTHON_INCLUDE_DIR ${DEPENDENCIES_DIR}/include/python)

# -------- Compiler options ---------

Expand Down Expand Up @@ -56,14 +57,7 @@ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SAFESEH:NO")

# For #pragma comment(lib X)
# TODO: It would certainly be better to handle these libraries via CMake modules.
if(${ARCH} STREQUAL win32)
link_directories(${CMAKE_SOURCE_DIR}/lib/win32/ffmpeg/bin
${CMAKE_SOURCE_DIR}/project/BuildDependencies/${ARCH}/lib
${CMAKE_SOURCE_DIR}/project/BuildDependencies/lib)
else()
link_directories(${CMAKE_SOURCE_DIR}/lib/win32/ffmpeg/bin
${CMAKE_SOURCE_DIR}/project/BuildDependencies/${ARCH}/lib)
endif()
link_directories(${DEPENDENCIES_DIR}/lib)

# Additional libraries
list(APPEND DEPLIBS d3d11.lib DInput8.lib DSound.lib winmm.lib Mpr.lib Iphlpapi.lib WS2_32.lib
Expand Down
Expand Up @@ -8,4 +8,5 @@
;PLEASE KEEP THIS LIST IN ALPHABETICAL ORDER!
doxygen-1.8.2-win32.7z
jsonschemabuilder-1.0.0-win32-3.7z
swig-3.0.10-win32.7z
texturepacker-1.1.1-win32.7z
40 changes: 40 additions & 0 deletions project/BuildDependencies/scripts/0_package.target-win10-arm.list
@@ -0,0 +1,40 @@
; package.list should contain all file names of packages which are already in the "new" package format (the package contains the paths to the libraries
; and headers relative to the XBMC root directory, stored in a zip container)
; example sqlite-3.7.12.1-win32.7z:
; -> (package name)\(relative path to file)
; -> sqlite-3.7.12.1-win32\project\BuildDependencies\lib\sqlite3.lib
; -> sqlite-3.7.12.1-win32\system\sqlite3.dll
; -> ...
;PLEASE KEEP THIS LIST IN ALPHABETICAL ORDER!
cpluff-0.1.3-win10-ARM-v140.7z
crossguid-fef89a4-win10-ARM-v140.7z
curl-7.52.1-win10-ARM-v140.7z
expat-2.2.0-win10-ARM-v140.7z
fmt-3.0.1-win10-ARM-v140.7z
freetype-2.8-win10-ARM-v140.7z
lcms2-2.8-win10-ARM-v140.7z
libaacs-0.9.0-win10-ARM-v140.7z
libass-0.13.6-win10-ARM-v140.7z
libbluray-1.0.1-win10-ARM-v140.7z
libcdio-0.94-win10-ARM-v140.7z
libfribidi-0.19.7-win10-ARM-v140.7z
libiconv-1.15-win10-ARM-v140.7z
libmicrohttpd-0.9.55-win10-ARM-v140.7z
libnfs-1.11.0-win10-ARM-v140.7z
libplist-1.12-win10-ARM-v140.7z
libssh-0.7.0-win10-ARM-v140.7z
libxml2-2.9.4-win10-ARM-v140.7z
libxslt-1.1.29-win10-ARM-v140.7z
lzo2-2.09-win10-ARM-v140.7z
mini_wdk-10.0.14393.0-win32.7z
openssl-1.0.2k-win10-ARM-v140.7z
pcre-8.40-win10-ARM-v140.7z
pillow-4.2.1-win10-ARM-v140.7z
pycryptodome-3.4.7-win10-ARM-v140.7z
python-2.7.13-win10-ARM-v140.7z
rapidjson-1.1.0-win32.7z
shairplay-ce80e00-win10-ARM-v140.7z
sqlite-3170000-win10-ARM-v140.7z
taglib-1.11.1-win10-ARM-v140.7z
tinyxml-2.6.2-win10-ARM-v140.7z
zlib-1.2.11-win10-ARM-v140.7z
@@ -0,0 +1,40 @@
; package.list should contain all file names of packages which are already in the "new" package format (the package contains the paths to the libraries
; and headers relative to the XBMC root directory, stored in a zip container)
; example sqlite-3.7.12.1-win32.7z:
; -> (package name)\(relative path to file)
; -> sqlite-3.7.12.1-win32\project\BuildDependencies\lib\sqlite3.lib
; -> sqlite-3.7.12.1-win32\system\sqlite3.dll
; -> ...
;PLEASE KEEP THIS LIST IN ALPHABETICAL ORDER!
cpluff-0.1.3-win10-Win32-v140.7z
crossguid-fef89a4-win10-Win32-v140.7z
curl-7.52.1-win10-Win32-v140.7z
expat-2.2.0-win10-Win32-v140.7z
fmt-3.0.1-win10-Win32-v140.7z
freetype-2.8-win10-Win32-v140.7z
lcms2-2.8-win10-Win32-v140.7z
libaacs-0.9.0-win10-Win32-v140.7z
libass-0.13.6-win10-Win32-v140.7z
libbluray-1.0.1-win10-Win32-v140.7z
libcdio-0.94-win10-Win32-v140.7z
libfribidi-0.19.7-win10-Win32-v140.7z
libiconv-1.15-win10-Win32-v140.7z
libmicrohttpd-0.9.55-win10-Win32-v140.7z
libnfs-1.11.0-win10-Win32-v140.7z
libplist-1.12-win10-Win32-v140.7z
libssh-0.7.0-win10-Win32-v140.7z
libxml2-2.9.4-win10-Win32-v140.7z
libxslt-1.1.29-win10-Win32-v140.7z
lzo2-2.09-win10-Win32-v140.7z
mini_wdk-10.0.14393.0-win32.7z
openssl-1.0.2k-win10-Win32-v140.7z
pcre-8.40-win10-Win32-v140.7z
pillow-4.2.1-win10-Win32-v140.7z
pycryptodome-3.4.7-win10-Win32-v140.7z
python-2.7.13-win10-Win32-v140.7z
rapidjson-1.1.0-win32.7z
shairplay-ce80e00-win10-Win32-v140.7z
sqlite-3170000-win10-Win32-v140.7z
taglib-1.11.1-win10-Win32-v140.7z
tinyxml-2.6.2-win10-Win32-v140.7z
zlib-1.2.11-win10-Win32-v140.7z
40 changes: 40 additions & 0 deletions project/BuildDependencies/scripts/0_package.target-win10-x64.list
@@ -0,0 +1,40 @@
; package.list should contain all file names of packages which are already in the "new" package format (the package contains the paths to the libraries
; and headers relative to the XBMC root directory, stored in a zip container)
; example sqlite-3.7.12.1-win32.7z:
; -> (package name)\(relative path to file)
; -> sqlite-3.7.12.1-win32\project\BuildDependencies\lib\sqlite3.lib
; -> sqlite-3.7.12.1-win32\system\sqlite3.dll
; -> ...
;PLEASE KEEP THIS LIST IN ALPHABETICAL ORDER!
cpluff-0.1.3-win10-x64-v140.7z
crossguid-fef89a4-win10-x64-v140.7z
curl-7.52.1-win10-x64-v140.7z
expat-2.2.0-win10-x64-v140.7z
fmt-3.0.1-win10-x64-v140.7z
freetype-2.8-win10-x64-v140.7z
lcms2-2.8-win10-x64-v140.7z
libaacs-0.9.0-win10-x64-v140.7z
libass-0.13.6-win10-x64-v140.7z
libbluray-1.0.1-win10-x64-v140.7z
libcdio-0.94-win10-x64-v140.7z
libfribidi-0.19.7-win10-x64-v140.7z
libiconv-1.15-win10-x64-v140.7z
libmicrohttpd-0.9.55-win10-x64-v140.7z
libnfs-1.11.0-win10-x64-v140.7z
libplist-1.12-win10-x64-v140.7z
libssh-0.7.0-win10-x64-v140.7z
libxml2-2.9.4-win10-x64-v140.7z
libxslt-1.1.29-win10-x64-v140.7z
lzo2-2.09-win10-x64-v140.7z
mini_wdk-10.0.14393.0-win32.7z
openssl-1.0.2k-win10-x64-v140.7z
pcre-8.40-win10-x64-v140.7z
pillow-4.2.1-win10-x64-v140.7z
pycryptodome-3.4.7-win10-x64-v140.7z
python-2.7.13-win10-x64-v140.7z
rapidjson-1.1.0-win32.7z
shairplay-ce80e00-win10-x64-v140.7z
sqlite-3170000-win10-x64-v140.7z
taglib-1.11.1-win10-x64-v140.7z
tinyxml-2.6.2-win10-x64-v140.7z
zlib-1.2.11-win10-x64-v140.7z
Expand Up @@ -42,7 +42,6 @@ python-2.7.13-win32-vc140-v3.7z
rapidjson-1.1.0-win32.7z
shairplay-0.9.0-win32-vc140-v2.7z
sqlite-3.10.2-win32-vc140.7z
swig-3.0.10-win32.7z
taglib-1.11.1_80df30-win32-vc140.7z
tinyxmlstl-2.6.2-win32-vc140-v2.7z
zlib-1.2.8-win32-vc140-v3.7z
Expand Up @@ -39,7 +39,6 @@ python-2.7.13-x64-vc140-v3.7z
rapidjson-1.1.0-win32.7z
shairplay-ce80e00-x64-vc140.7z
sqlite-3.17.0-x64-vc140.7z
swig-3.0.10-win32.7z
taglib-1.11.1-x64-vc140.7z
tinyxmlstl-2.6.2-x64-vc140.7z
zlib-1.2.11-x64-vc140.7z
26 changes: 26 additions & 0 deletions project/BuildDependencies/scripts/get_formed.cmd
Expand Up @@ -86,6 +86,32 @@ REM Remove any non-dir files in extracted ".\packagename\"
FOR /F %%f IN ('dir /B /A:-D "%~n1\*.*"') DO (del "%~n1\%%f" /F /Q || (ECHO %1^|Failed to pre-clean %~n1\%%f >> %FORMED_FAILED_LIST% && EXIT /B 4))
)

CALL :setSubStageName Re-arrange old-formed package %1 if necessary...
:: move project\BuildDependencies\*.* to root
dir /A:D "%~n1\project" >NUL 2>NUL && (
ROBOCOPY "%~n1\project\BuildDependencies\\" "%~n1\\" *.* /E /MOVE /njh /njs /ndl /nc /ns /nfl
dir /:D "%~n1\project\BuildDependencies" >NUL 2>NUL && (ECHO %1^|Failed to re-arrange package contents >> %FORMED_FAILED_LIST% && EXIT /B 5)
RD "%~n1\project" /S /Q
)

:: move system\*.* to bin
dir /A:D "%~n1\system" >NUL 2>NUL && (
ROBOCOPY "%~n1\system\\" "%~n1\bin" *.* /E /MOVE /njh /njs /ndl /nc /ns /nfl
dir /A:D "%~n1\system" >NUL 2>NUL && (ECHO %1^|Failed to re-arrange package contents >> %FORMED_FAILED_LIST% && EXIT /B 5)
)

:: move Win32\*.* to root
dir /A:D "%~n1\Win32" >NUL 2>NUL && (
ROBOCOPY "%~n1\Win32\\" "%~n1\\" *.* /E /MOVE /njh /njs /ndl /nc /ns /nfl
dir /A:D "%~n1\Win32" >NUL 2>NUL && (ECHO %1^|Failed to re-arrange package contents >> %FORMED_FAILED_LIST% && EXIT /B 5)
)

:: move x64\*.* to root
dir /A:D "%~n1\x64" >NUL 2>NUL && (
ROBOCOPY "%~n1\x64\\" "%~n1\\" *.* /E /MOVE /njh /njs /ndl /nc /ns /nfl
dir /A:D "%~n1\x64" >NUL 2>NUL && (ECHO %1^|Failed to re-arrange package contents >> %FORMED_FAILED_LIST% && EXIT /B 5)
)

CALL :setSubStageName Copying %1 to build tree...
REM Copy only content of extracted ".\packagename\"
XCOPY "%~n1\*" "%APP_PATH%\" /E /I /Y /F /R /H /K || (ECHO %1^|Failed to copy package contents to build tree >> %FORMED_FAILED_LIST% && EXIT /B 5)
Expand Down
2 changes: 1 addition & 1 deletion tools/buildsteps/windows/arm-uwp/download-dependencies.bat
@@ -1,5 +1,5 @@
@ECHO OFF

PUSHD %~dp0\..
CALL download-dependencies.bat arm-uwp
CALL download-dependencies.bat win10-arm
POPD
6 changes: 1 addition & 5 deletions tools/buildsteps/windows/download-dependencies.bat
Expand Up @@ -21,15 +21,13 @@ echo Downloading from mirror %KODI_MIRROR%

REM Locate the BuildDependencies directory, based on the path of this script
SET BUILD_DEPS_PATH=%WORKSPACE%\project\BuildDependencies
SET APP_PATH=%WORKSPACE%
SET APP_PATH=%WORKSPACE%\project\BuildDependencies\%TARGETPLATFORM%
SET TMP_PATH=%BUILD_DEPS_PATH%\scripts\tmp

REM Change to the BuildDependencies directory, if we're not there already
PUSHD %BUILD_DEPS_PATH%

REM Can't run rmdir and md back to back. access denied error otherwise.
IF EXIST lib rmdir lib /S /Q
IF EXIST include rmdir include /S /Q
IF EXIST %TMP_PATH% rmdir %TMP_PATH% /S /Q

SET DL_PATH="%BUILD_DEPS_PATH%\downloads"
Expand All @@ -38,8 +36,6 @@ SET ZIP=%BUILD_DEPS_PATH%\..\Win32BuildSetup\tools\7z\7za

IF NOT EXIST %DL_PATH% md %DL_PATH%

md lib
md include
md %TMP_PATH%

cd scripts
Expand Down
6 changes: 3 additions & 3 deletions tools/buildsteps/windows/download-msys2.bat
Expand Up @@ -262,9 +262,9 @@ if "%searchRes%"=="local64" GOTO installbase
echo.%instdir%\downloads2\ /var/cache/pacman/pkg
echo.%instdir%\win32\ /depends/win32
echo.%instdir%\x64\ /depends/x64
echo.%instdir%\arm-uwp\ /depends/arm-uwp
echo.%instdir%\win32-uwp\ /depends/win32-uwp
echo.%instdir%\x64-uwp\ /depends/x64-uwp
echo.%instdir%\win10-arm\ /depends/win10-arm
echo.%instdir%\win10-win32\ /depends/win10-win32
echo.%instdir%\win10-x64\ /depends/win10-x64
echo.%instdir%\..\..\ /xbmc
)>>%instdir%\%msys2%\etc\fstab.

Expand Down
2 changes: 1 addition & 1 deletion tools/buildsteps/windows/make-mingwlibs.sh
Expand Up @@ -51,7 +51,7 @@ if [[ $win10 = "no" ]]; then
export _WIN32_WINNT=0x0600
export NTDDI_VERSION=0x06000000
elif [[ $win10 = "yes" ]]; then
TRIPLET=$TRIPLET-uwp
TRIPLET=win10-$TRIPLET
fi

export TRIPLET ARCH TOOLS
Expand Down
2 changes: 0 additions & 2 deletions tools/buildsteps/windows/prepare-env.bat
Expand Up @@ -20,6 +20,4 @@ rem cleaning additional directories
ECHO delete build directories
IF EXIST %WORKSPACE%\project\Win32BuildSetup\dependencies rmdir %WORKSPACE%\project\Win32BuildSetup\dependencies /S /Q

IF EXIST %WORKSPACE%\project\BuildDependencies\include rmdir %WORKSPACE%\project\BuildDependencies\include /S /Q
IF EXIST %WORKSPACE%\project\BuildDependencies\lib rmdir %WORKSPACE%\project\BuildDependencies\lib /S /Q
IF EXIST %WORKSPACE%\project\BuildDependencies\msys rmdir %WORKSPACE%\project\BuildDependencies\msys /S /Q
@@ -1,5 +1,5 @@
@ECHO OFF

PUSHD %~dp0\..
CALL download-dependencies.bat win32-uwp
CALL download-dependencies.bat win10-win32
POPD
2 changes: 1 addition & 1 deletion tools/buildsteps/windows/x64-uwp/download-dependencies.bat
@@ -1,5 +1,5 @@
@ECHO OFF

PUSHD %~dp0\..
CALL download-dependencies.bat x64-uwp
CALL download-dependencies.bat win10-x64
POPD

0 comments on commit 4e77658

Please sign in to comment.