mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-24 10:51:48 +08:00
[qt5-base][qtdeploy] Deploy plugin dependencies to the executable's folder.
This commit is contained in:
parent
d503a55412
commit
73e45b0ce2
@ -1,4 +1,4 @@
|
||||
Source: qt5-base
|
||||
Version: 5.9.2-4
|
||||
Version: 5.9.2-5
|
||||
Description: Qt5 Application Framework Base Module. Includes Core, GUI, Widgets, Networking, SQL, Concurrent and other essential qt components.
|
||||
Build-Depends: zlib, libjpeg-turbo, libpng, freetype, pcre2, harfbuzz, sqlite3, libpq, double-conversion, openssl
|
||||
|
@ -19,6 +19,7 @@ function deployPluginsIfQt([string]$targetBinaryDir, [string]$QtPluginsDir, [str
|
||||
New-Item "$targetBinaryDir\$pluginSubdirName" -ItemType Directory -ErrorAction SilentlyContinue | Out-Null
|
||||
Get-ChildItem "$QtPluginsDir\$pluginSubdirName\*.dll" | % {
|
||||
deployBinary "$targetBinaryDir\$pluginSubdirName" "$QtPluginsDir\$pluginSubdirName" $_.Name
|
||||
resolve $_
|
||||
}
|
||||
} else {
|
||||
Write-Verbose " Skipping plugins directory '$pluginSubdirName': doesn't exist"
|
||||
|
@ -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\$_"
|
||||
|
Loading…
Reference in New Issue
Block a user