]> git.proxmox.com Git - ceph.git/blob - ceph/src/jaegertracing/opentelemetry-cpp/tools/vcpkg/ports/qt5-base/qtdeploy.ps1
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / jaegertracing / opentelemetry-cpp / tools / vcpkg / ports / qt5-base / qtdeploy.ps1
1 # This script is based on the implementation of windeployqt for qt5.7.1
2 #
3 # Qt's plugin deployment strategy is that each main Qt Module has a hardcoded
4 # set of plugin subdirectories. Each of these subdirectories is deployed in
5 # full if that Module is referenced.
6 #
7 # This hardcoded list is found inside qttools\src\windeployqt\main.cpp. For
8 # updating, inspect the symbols qtModuleEntries and qtModuleForPlugin.
9
10 # Note: this function signature and behavior is depended upon by applocal.ps1
11 function deployPluginsIfQt([string]$targetBinaryDir, [string]$QtPluginsDir, [string]$targetBinaryName) {
12 $baseDir = Split-Path $QtPluginsDir -parent
13 $binDir = "$baseDir\bin"
14
15 function deployPlugins([string]$pluginSubdirName) {
16 if (Test-Path "$QtPluginsDir\$pluginSubdirName") {
17 Write-Verbose " Deploying plugins directory '$pluginSubdirName'"
18 New-Item "$targetBinaryDir\plugins\$pluginSubdirName" -ItemType Directory -ErrorAction SilentlyContinue | Out-Null
19 Get-ChildItem "$QtPluginsDir\$pluginSubdirName\*.dll" | % {
20 deployBinary "$targetBinaryDir\plugins\$pluginSubdirName" "$QtPluginsDir\$pluginSubdirName" $_.Name
21 resolve "$targetBinaryDir\plugins\$pluginSubdirName\$($_.Name)"
22 }
23 } else {
24 Write-Verbose " Skipping plugins directory '$pluginSubdirName': doesn't exist"
25 }
26 }
27
28 # We detect Qt modules in use via the DLLs themselves. See qtModuleEntries in Qt to find the mapping.
29 if ($targetBinaryName -match "Qt5Cored?.dll") {
30 if (!(Test-Path "$targetBinaryDir\qt.conf")) {
31 "[Paths]" | Out-File -encoding ascii "$targetBinaryDir\qt.conf"
32 }
33 } elseif ($targetBinaryName -match "Qt5Guid?.dll") {
34 Write-Verbose " Deploying platforms"
35 New-Item "$targetBinaryDir\plugins\platforms" -ItemType Directory -ErrorAction SilentlyContinue | Out-Null
36 Get-ChildItem "$QtPluginsDir\platforms\qwindows*.dll" | % {
37 deployBinary "$targetBinaryDir\plugins\platforms" "$QtPluginsDir\platforms" $_.Name
38 }
39
40 deployPlugins "accessible"
41 deployPlugins "imageformats"
42 deployPlugins "iconengines"
43 deployPlugins "platforminputcontexts"
44 deployPlugins "styles"
45 } elseif ($targetBinaryName -match "Qt5Networkd?.dll") {
46 deployPlugins "bearer"
47 if (Test-Path "$binDir\libcrypto-1_1-x64.dll")
48 {
49 deployBinary "$targetBinaryDir" "$binDir" "libcrypto-1_1-x64.dll"
50 deployBinary "$targetBinaryDir" "$binDir" "libssl-1_1-x64.dll"
51 }
52 if (Test-Path "$binDir\libcrypto-1_1.dll")
53 {
54 deployBinary "$targetBinaryDir" "$binDir" "libcrypto-1_1.dll"
55 deployBinary "$targetBinaryDir" "$binDir" "libssl-1_1.dll"
56 }
57 } elseif ($targetBinaryName -match "Qt5Sqld?.dll") {
58 deployPlugins "sqldrivers"
59 } elseif ($targetBinaryName -match "Qt5Multimediad?.dll") {
60 deployPlugins "audio"
61 deployPlugins "mediaservice"
62 deployPlugins "playlistformats"
63 } elseif ($targetBinaryName -match "Qt5PrintSupportd?.dll") {
64 deployPlugins "printsupport"
65 } elseif ($targetBinaryName -match "Qt5Qmld?.dll") {
66 if(!(Test-Path "$targetBinaryDir\qml"))
67 {
68 if (Test-Path "$binDir\..\qml") {
69 cp -r "$binDir\..\qml" $targetBinaryDir
70 } elseif (Test-Path "$binDir\..\..\qml") {
71 cp -r "$binDir\..\..\qml" $targetBinaryDir
72 } else {
73 throw "FAILED"
74 }
75 }
76 } elseif ($targetBinaryName -match "Qt5Quickd?.dll") {
77 foreach ($a in @("Qt5QuickControls2", "Qt5QuickControls2d", "Qt5QuickShapes", "Qt5QuickShapesd", "Qt5QuickTemplates2", "Qt5QuickTemplates2d", "Qt5QmlWorkerScript", "Qt5QmlWorkerScriptd", "Qt5QuickParticles", "Qt5QuickParticlesd", "Qt5QuickWidgets", "Qt5QuickWidgetsd"))
78 {
79 if (Test-Path "$binDir\$a.dll")
80 {
81 deployBinary "$targetBinaryDir" "$binDir" "$a.dll"
82 }
83 }
84 deployPlugins "scenegraph"
85 deployPlugins "qmltooling"
86 } elseif ($targetBinaryName -like "Qt5Declarative*.dll") {
87 deployPlugins "qml1tooling"
88 } elseif ($targetBinaryName -like "Qt5Positioning*.dll") {
89 deployPlugins "position"
90 } elseif ($targetBinaryName -like "Qt5Location*.dll") {
91 deployPlugins "geoservices"
92 } elseif ($targetBinaryName -like "Qt5Sensors*.dll") {
93 deployPlugins "sensors"
94 deployPlugins "sensorgestures"
95 } elseif ($targetBinaryName -like "Qt5WebEngineCore*.dll") {
96 deployPlugins "qtwebengine"
97 } elseif ($targetBinaryName -like "Qt53DRenderer*.dll") {
98 deployPlugins "sceneparsers"
99 } elseif ($targetBinaryName -like "Qt5TextToSpeech*.dll") {
100 deployPlugins "texttospeech"
101 } elseif ($targetBinaryName -like "Qt5SerialBus*.dll") {
102 deployPlugins "canbus"
103 }
104 }