[qt5-base] Update qtdeploy.ps1 to generate qt.conf, qml, and qtquick. Fixes #2857.

This commit is contained in:
Robert Schumacher 2018-10-22 17:20:34 -07:00
parent 8d62a87448
commit a1fe9544fd
4 changed files with 36 additions and 15 deletions

View File

@ -1,4 +1,4 @@
Source: qt5-base
Version: 5.11.1-2
Version: 5.11.1-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

View File

@ -6,7 +6,7 @@ Libraries = debug/lib
Binaries = debug/tools/qt5
LibraryExecutables = debug/tools/qt5
Plugins = debug/plugins
Qml2Imports = qml
Qml2Imports = debug/qml
Data = share/qt5/debug
ArchData = share/qt5/debug
HostData = share/qt5/debug

View File

@ -9,17 +9,16 @@
# Note: this function signature and behavior is depended upon by applocal.ps1
function deployPluginsIfQt([string]$targetBinaryDir, [string]$QtPluginsDir, [string]$targetBinaryName) {
$baseDir = Split-Path $QtPluginsDir -parent
$binDir = "$baseDir\bin"
function deployPlugins([string]$pluginSubdirName) {
if (Test-Path "$QtPluginsDir\$pluginSubdirName") {
Write-Verbose " Deploying plugins directory '$pluginSubdirName'"
New-Item "$targetBinaryDir\$pluginSubdirName" -ItemType Directory -ErrorAction SilentlyContinue | Out-Null
New-Item "$targetBinaryDir\plugins\$pluginSubdirName" -ItemType Directory -ErrorAction SilentlyContinue | Out-Null
Get-ChildItem "$QtPluginsDir\$pluginSubdirName\*.dll" | % {
deployBinary "$targetBinaryDir\$pluginSubdirName" "$QtPluginsDir\$pluginSubdirName" $_.Name
resolve $_
deployBinary "$targetBinaryDir\plugins\$pluginSubdirName" "$QtPluginsDir\$pluginSubdirName" $_.Name
resolve "$targetBinaryDir\plugins\$pluginSubdirName\$($_.Name)"
}
} else {
Write-Verbose " Skipping plugins directory '$pluginSubdirName': doesn't exist"
@ -27,33 +26,55 @@ function deployPluginsIfQt([string]$targetBinaryDir, [string]$QtPluginsDir, [str
}
# We detect Qt modules in use via the DLLs themselves. See qtModuleEntries in Qt to find the mapping.
if ($targetBinaryName -like "Qt5Gui*.dll") {
if ($targetBinaryName -match "Qt5Cored?.dll") {
if (!(Test-Path "$targetBinaryDir\qt.conf")) {
"[Paths]" | Out-File -encoding ascii "$targetBinaryDir\qt.conf"
}
} elseif ($targetBinaryName -match "Qt5Guid?.dll") {
Write-Verbose " Deploying platforms"
New-Item "$targetBinaryDir\platforms" -ItemType Directory -ErrorAction SilentlyContinue | Out-Null
New-Item "$targetBinaryDir\plugins\platforms" -ItemType Directory -ErrorAction SilentlyContinue | Out-Null
Get-ChildItem "$QtPluginsDir\platforms\qwindows*.dll" | % {
deployBinary "$targetBinaryDir\platforms" "$QtPluginsDir\platforms" $_.Name
deployBinary "$targetBinaryDir\plugins\platforms" "$QtPluginsDir\platforms" $_.Name
}
deployPlugins "accessible"
deployPlugins "imageformats"
deployPlugins "iconengines"
deployPlugins "platforminputcontexts"
} elseif ($targetBinaryName -like "Qt5Network*.dll") {
} elseif ($targetBinaryName -match "Qt5Networkd?.dll") {
deployPlugins "bearer"
if (Test-Path "$binDir\libeay32.dll")
{
deployBinary "$targetBinaryDir" "$binDir" "libeay32.dll"
deployBinary "$targetBinaryDir" "$binDir" "ssleay32.dll"
}
} elseif ($targetBinaryName -like "Qt5Sql*.dll") {
} elseif ($targetBinaryName -match "Qt5Sqld?.dll") {
deployPlugins "sqldrivers"
} elseif ($targetBinaryName -like "Qt5Multimedia*.dll") {
} elseif ($targetBinaryName -match "Qt5Multimediad?.dll") {
deployPlugins "audio"
deployPlugins "mediaservice"
deployPlugins "playlistformats"
} elseif ($targetBinaryName -like "Qt5PrintSupport*.dll") {
} elseif ($targetBinaryName -match "Qt5PrintSupportd?.dll") {
deployPlugins "printsupport"
} elseif ($targetBinaryName -like "Qt5Quick*.dll") {
} elseif ($targetBinaryName -match "Qt5Qmld?.dll") {
if(!(Test-Path "$targetBinaryDir\qml"))
{
if (Test-Path "$binDir\..\qml") {
cp -r "$binDir\..\qml" $targetBinaryDir
} elseif (Test-Path "$binDir\..\..\qml") {
cp -r "$binDir\..\..\qml" $targetBinaryDir
} else {
throw "FAILED"
}
}
} elseif ($targetBinaryName -match "Qt5Quickd?.dll") {
foreach ($a in @("Qt5QuickControls2", "Qt5QuickControls2d", "Qt5QuickTemplates2", "Qt5QuickTemplates2d"))
{
if (Test-Path "$binDir\$a.dll")
{
deployBinary "$targetBinaryDir" "$binDir" "$a.dll"
}
}
deployPlugins "scenegraph"
deployPlugins "qmltooling"
} elseif ($targetBinaryName -like "Qt5Declarative*.dll") {

View File

@ -62,7 +62,7 @@ function resolve([string]$targetBinary) {
$g_searched.Set_Item($_, $true)
if (Test-Path "$installedDir\$_") {
deployBinary $baseTargetBinaryDir $installedDir "$_"
if (Test-Path function:\deployPluginsIfQt) { deployPluginsIfQt $targetBinaryDir "$g_install_root\plugins" "$_" }
if (Test-Path function:\deployPluginsIfQt) { deployPluginsIfQt $baseTargetBinaryDir "$g_install_root\plugins" "$_" }
if (Test-Path function:\deployOpenNI2) { deployOpenNI2 $targetBinaryDir "$g_install_root" "$_" }
if (Test-Path function:\deployPluginsIfMagnum) {
if ($g_is_debug) {