diff options
| author | Robert Schumacher <roschuma@microsoft.com> | 2018-02-07 19:00:11 -0800 |
|---|---|---|
| committer | Robert Schumacher <roschuma@microsoft.com> | 2018-02-08 13:25:45 -0800 |
| commit | 73e45b0ce2b4132a24708a0359c76927ed418e15 (patch) | |
| tree | 7ad1c64d52e39787e7d9245dda1f6924a30c5536 /scripts | |
| parent | d503a55412b3fa1b2b96ae0719286ee593f3d732 (diff) | |
| download | vcpkg-73e45b0ce2b4132a24708a0359c76927ed418e15.tar.gz vcpkg-73e45b0ce2b4132a24708a0359c76927ed418e15.zip | |
[qt5-base][qtdeploy] Deploy plugin dependencies to the executable's folder.
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/buildsystems/msbuild/applocal.ps1 | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/scripts/buildsystems/msbuild/applocal.ps1 b/scripts/buildsystems/msbuild/applocal.ps1 index 0b56356a0..3f0f2ef37 100644 --- a/scripts/buildsystems/msbuild/applocal.ps1 +++ b/scripts/buildsystems/msbuild/applocal.ps1 @@ -24,6 +24,19 @@ function deployBinary([string]$targetBinaryDir, [string]$SourceDir, [string]$tar if ($tlogFile) { Add-Content $tlogFile "$targetBinaryDir\$targetBinaryName" } } + +Write-Verbose "Resolving base path $targetBinary..." +try +{ + $baseBinaryPath = Resolve-Path $targetBinary -erroraction stop + $baseTargetBinaryDir = Split-Path $baseBinaryPath -parent +} +catch [System.Management.Automation.ItemNotFoundException] +{ + return +} + +# Note: this function signature is depended upon by the qtdeploy.ps1 script function resolve([string]$targetBinary) { Write-Verbose "Resolving $targetBinary..." try @@ -47,10 +60,10 @@ function resolve([string]$targetBinary) { } $g_searched.Set_Item($_, $true) if (Test-Path "$installedDir\$_") { - deployBinary $targetBinaryDir $installedDir "$_" + deployBinary $baseTargetBinaryDir $installedDir "$_" if (Test-Path function:\deployPluginsIfQt) { deployPluginsIfQt $targetBinaryDir "$g_install_root\plugins" "$_" } if (Test-Path function:\deployOpenNI2) { deployOpenNI2 $targetBinaryDir "$g_install_root" "$_" } - resolve "$targetBinaryDir\$_" + resolve "$baseTargetBinaryDir\$_" } elseif (Test-Path "$targetBinaryDir\$_") { Write-Verbose " ${_}: $_ not found in vcpkg; locally deployed" resolve "$targetBinaryDir\$_" |
