aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Fedchin <anightik@gmail.com>2017-10-18 17:18:06 +0300
committerAnton Fedchin <anightik@gmail.com>2017-10-20 16:31:41 +0300
commit33fae8ac053c0a17a4f14b9a49c795e96e39bb04 (patch)
tree304d7f299cae96c0363ebc672cb0a0c255266460
parent922a6bb1959befa982f8c37ea3336b018ffe12db (diff)
BuildDependencies: re-arrange packages on the fly for new format.
The structure of a package will be changed with the following rules: system/*.* -> /bin project/BuildDependencies/bin/*.* -> /bin project/BuildDependencies/include/*.* -> /include project/BuildDependencies/lib/*.* -> /lib project/BuildDependencies/win32/*.* -> /<root> project/BuildDependencies/x64/*.* -> /<root>
-rw-r--r--.gitignore28
-rw-r--r--project/BuildDependencies/scripts/get_formed.cmd26
-rw-r--r--tools/buildsteps/windows/download-dependencies.bat6
-rw-r--r--tools/buildsteps/windows/prepare-env.bat2
4 files changed, 27 insertions, 35 deletions
diff --git a/.gitignore b/.gitignore
index 8bb321edf0..64eee333f0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -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.*
@@ -237,8 +235,6 @@ lib/cpluff/stamp-h1
/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
@@ -254,30 +250,6 @@ lib/cpluff/stamp-h1
/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/*
diff --git a/project/BuildDependencies/scripts/get_formed.cmd b/project/BuildDependencies/scripts/get_formed.cmd
index 6b1b1bd040..520cd92b97 100644
--- a/project/BuildDependencies/scripts/get_formed.cmd
+++ b/project/BuildDependencies/scripts/get_formed.cmd
@@ -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)
diff --git a/tools/buildsteps/windows/download-dependencies.bat b/tools/buildsteps/windows/download-dependencies.bat
index ad03644759..d8e8ff3178 100644
--- a/tools/buildsteps/windows/download-dependencies.bat
+++ b/tools/buildsteps/windows/download-dependencies.bat
@@ -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"
@@ -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
diff --git a/tools/buildsteps/windows/prepare-env.bat b/tools/buildsteps/windows/prepare-env.bat
index 7443f9d256..773872772d 100644
--- a/tools/buildsteps/windows/prepare-env.bat
+++ b/tools/buildsteps/windows/prepare-env.bat
@@ -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