aboutsummaryrefslogtreecommitdiff
path: root/scripts/buildsystems
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2017-03-31 04:27:03 -0700
committerRobert Schumacher <roschuma@microsoft.com>2017-03-31 06:35:23 -0700
commit558d54dd4e86055c336e1d5f677407631edf1917 (patch)
treeb67ad0728965e963fcf15e7cf5ffcc110c54557e /scripts/buildsystems
parentbbaf4d77e7c9936c51cb498ac345b318207e8771 (diff)
downloadvcpkg-558d54dd4e86055c336e1d5f677407631edf1917.tar.gz
vcpkg-558d54dd4e86055c336e1d5f677407631edf1917.zip
[qt5] Add qtdeploy.ps1 to enhance applocal.ps1 when Qt is in use.
Diffstat (limited to 'scripts/buildsystems')
-rw-r--r--scripts/buildsystems/msbuild/applocal.ps122
1 files changed, 16 insertions, 6 deletions
diff --git a/scripts/buildsystems/msbuild/applocal.ps1 b/scripts/buildsystems/msbuild/applocal.ps1
index aef22bb50..21e42d479 100644
--- a/scripts/buildsystems/msbuild/applocal.ps1
+++ b/scripts/buildsystems/msbuild/applocal.ps1
@@ -2,14 +2,17 @@
param([string]$targetBinary, [string]$installedDir, [string]$tlogFile)
$g_searched = @{}
+# Note: installedDir is actually the bin\ directory.
+$g_install_root = Split-Path $installedDir -parent
-function deployBinary([string]$targetBinaryDir, [string]$targetBinaryName) {
+# Note: this function signature is depended upon by the qtdeploy.ps1 script introduced in 5.7.1-7
+function deployBinary([string]$targetBinaryDir, [string]$SourceDir, [string]$targetBinaryName) {
if (Test-Path "$targetBinaryDir\$targetBinaryName") {
- Write-Verbose " ${targetBinaryName}: already present - Only recurse"
+ Write-Verbose " ${targetBinaryName}: already present"
}
else {
- Copy-Item "$installedDir\$targetBinaryName" $targetBinaryDir
- Write-Verbose " ${targetBinaryName}: Copying $installedDir\$targetBinaryName"
+ Write-Verbose " ${targetBinaryName}: Copying $SourceDir\$targetBinaryName"
+ Copy-Item "$SourceDir\$targetBinaryName" $targetBinaryDir
}
"$targetBinaryDir\$targetBinaryName"
if ($tlogFile) { Add-Content $tlogFile "$targetBinaryDir\$targetBinaryName" }
@@ -38,8 +41,9 @@ function resolve([string]$targetBinary) {
}
$g_searched.Set_Item($_, $true)
if (Test-Path "$installedDir\$_") {
- deployBinary($targetBinaryDir, $_)
- resolve("$targetBinaryDir\$_")
+ deployBinary $targetBinaryDir $installedDir "$_"
+ if (Test-Path function:\deployPluginsIfQt) { deployPluginsIfQt $targetBinaryDir "$g_install_root\plugins" "$_" }
+ resolve "$targetBinaryDir\$_"
} else {
Write-Verbose " ${_}: $installedDir\$_ not found"
}
@@ -47,5 +51,11 @@ function resolve([string]$targetBinary) {
Write-Verbose "Done Resolving $targetBinary."
}
+# Note: This is a hack to make Qt5 work.
+# Introduced with Qt package version 5.7.1-7
+if (Test-Path "$g_install_root\plugins\qtdeploy.ps1") {
+ . "$g_install_root\plugins\qtdeploy.ps1"
+}
+
resolve($targetBinary)
Write-Verbose $($g_searched | out-string) \ No newline at end of file