From 7b3ca14be88ccf854fafc2ff686885f654afc573 Mon Sep 17 00:00:00 2001 From: Nodir Temirkhodjaev Date: Sun, 29 Aug 2021 20:04:03 +0300 Subject: [PATCH] Deploy: deployment.json: Sections per Config. --- deploy/deployment.json | 2 +- deploy/setup-deployment-win10.bat | 1 + deploy/setup-deployment-win7.bat | 1 + deploy/setup-deployment.ps1 | 15 ++++++++++++++- 4 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 deploy/setup-deployment-win10.bat create mode 100644 deploy/setup-deployment-win7.bat diff --git a/deploy/deployment.json b/deploy/deployment.json index be107cc7..7a5fc91f 100644 --- a/deploy/deployment.json +++ b/deploy/deployment.json @@ -22,7 +22,7 @@ "qt": [ "${QTPATH}/plugins/platforms | qwindows.dll | *d.dll" ], - "qt-tls?": [ + "qt-tls | Win10": [ "${QTPATH}/plugins/tls | schannelbackend.dll | *dd.dll" ] } diff --git a/deploy/setup-deployment-win10.bat b/deploy/setup-deployment-win10.bat new file mode 100644 index 00000000..5137ac86 --- /dev/null +++ b/deploy/setup-deployment-win10.bat @@ -0,0 +1 @@ +@%~dp0setup-deployment.bat -QtPath ".\build-qt\qtbase" -Config Win10 diff --git a/deploy/setup-deployment-win7.bat b/deploy/setup-deployment-win7.bat new file mode 100644 index 00000000..84bf9f8a --- /dev/null +++ b/deploy/setup-deployment-win7.bat @@ -0,0 +1 @@ +@%~dp0setup-deployment.bat -QtPath ".\build-qt-win7\qtbase" -Config Win7 diff --git a/deploy/setup-deployment.ps1 b/deploy/setup-deployment.ps1 index 229bd1f0..1365123b 100644 --- a/deploy/setup-deployment.ps1 +++ b/deploy/setup-deployment.ps1 @@ -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")