Deploy: deployment.json: Sections per Config.

This commit is contained in:
Nodir Temirkhodjaev 2021-08-29 20:04:03 +03:00
parent b60c87713b
commit 7b3ca14be8
4 changed files with 17 additions and 2 deletions

View File

@ -22,7 +22,7 @@
"qt": [
"${QTPATH}/plugins/platforms | qwindows.dll | *d.dll"
],
"qt-tls?": [
"qt-tls | Win10": [
"${QTPATH}/plugins/tls | schannelbackend.dll | *dd.dll"
]
}

View File

@ -0,0 +1 @@
@%~dp0setup-deployment.bat -QtPath ".\build-qt\qtbase" -Config Win10

View File

@ -0,0 +1 @@
@%~dp0setup-deployment.bat -QtPath ".\build-qt-win7\qtbase" -Config Win7

View File

@ -2,7 +2,8 @@ param (
[string]$TargetPath = ".\build",
[string]$BuildPath = "..\build",
[string]$RootPath = "..",
[string]$QtPath = ".\build-qt\qtbase"
[string]$QtPath = ".\build-qt\qtbase",
[string]$Config = ""
)
echo "Setting up deployment files."
@ -27,6 +28,18 @@ for ($i = 0; $i -lt $targetDirs.length; $i++) {
for ($j = 0; $j -lt $sections.length; $j++) {
$sectionName = $sections[$j]
$sectionOptional = $sectionName -match '\?$'
if ($Config -And $sectionName.Contains('|')) {
$sectionParts = $sectionName.Split('|')
$sectionConf = $sectionParts[1].Trim().Split(' ')
if ($sectionConf -notcontains $Config) {
Write-Host -ForeGround Yellow " $sectionName (Skipped for $Config)"
continue
}
}
echo " $sectionName"
$files = @($jsonTargetDir."$sectionName")