From 720e61410a7fc624d2677edc5af97d28714e88d0 Mon Sep 17 00:00:00 2001 From: Billy Robert O'Neal III Date: Thu, 9 Jul 2026 20:32:36 -0700 Subject: [PATCH] Restore z-applocal parity with deployment scripts The native implementation had drifted from applocal.ps1 and the deployment hooks installed by several ports. Bring each translated operation back in line with the PowerShell behavior: * Keep the parent of installed-bin-dir as the active configuration root and detect debug from that directory's leaf name. applocal.ps1 likewise sets g_install_root directly from installedDir's parent: https://github.com/microsoft/vcpkg/blob/40a9bd4ccdf5dc14ff76d4ed47d46a226ce84a83/scripts/buildsystems/msbuild/applocal.ps1#L7-L8 Consequently, probe OpenNI2, Azure Kinect, Magnum, and Qt hooks relative to that active root, and select bin/magnum-d for debug without adding a second debug component. These are the paths passed by the original hook dispatch: https://github.com/microsoft/vcpkg/blob/40a9bd4ccdf5dc14ff76d4ed47d46a226ce84a83/scripts/buildsystems/msbuild/applocal.ps1#L117-L127 * Normalize imported names before inserting them into m_searched, and use case-insensitive comparisons for hook DLL names, plugin extensions, and Qt wildcard prefixes. This matches PowerShell's case-insensitive hashtable, -like, and -match behavior: https://github.com/microsoft/vcpkg/blob/40a9bd4ccdf5dc14ff76d4ed47d46a226ce84a83/scripts/buildsystems/msbuild/applocal.ps1#L104-L111 https://github.com/microsoft/vcpkg/blob/40a9bd4ccdf5dc14ff76d4ed47d46a226ce84a83/ports/qt5-base/qtdeploy.ps1#L27-L110 * Filter OpenNI2 drivers to DLL and INI files rather than copying every file in the directory: https://github.com/microsoft/vcpkg/blob/40a9bd4ccdf5dc14ff76d4ed47d46a226ce84a83/ports/openni2/openni2deploy.ps1#L9-L14 * Filter Magnum plugins to DLL, CONF, and PDB files. Continue copying all three kinds, but recurse into dependencies only for DLLs because the native PE reader rejects CONF and PDB files while dumpbin simply yields no imports: https://github.com/microsoft/vcpkg/blob/40a9bd4ccdf5dc14ff76d4ed47d46a226ce84a83/ports/magnum/magnumdeploy.ps1#L12-L20 Match Magnum module names case-insensitively as PowerShell does: https://github.com/microsoft/vcpkg/blob/40a9bd4ccdf5dc14ff76d4ed47d46a226ce84a83/ports/magnum/magnumdeploy.ps1#L26-L39 * Resolve Qt plugin dependencies from the deployed plugin path rather than the installed source path, matching the argument passed to resolve by qtdeploy.ps1: https://github.com/microsoft/vcpkg/blob/40a9bd4ccdf5dc14ff76d4ed47d46a226ce84a83/ports/qt5-base/qtdeploy.ps1#L12-L21 * Copy the Qt QML tree into the destination qml directory instead of flattening its contents into the executable directory: https://github.com/microsoft/vcpkg/blob/40a9bd4ccdf5dc14ff76d4ed47d46a226ce84a83/ports/qt5-base/qtdeploy.ps1#L66-L74 * Keep Azure Kinect deployment rooted in the selected configuration, matching its hook: https://github.com/microsoft/vcpkg/blob/40a9bd4ccdf5dc14ff76d4ed47d46a226ce84a83/ports/azure-kinect-depth-engine/k4adeploy.ps1#L3-L9 Extend the applocal fixture with simultaneous release and debug trees and verify that each invocation selects the corresponding depth engine. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../applocal/plugins-debug/build.bat | 6 + .../plugins-debug/installed/bin/k4a.cpp | 8 ++ .../plugins-debug/installed/bin/k4a.h | 8 ++ .../depthengine_2_0.cpp | 11 ++ .../azure-kinect-sensor-sdk/k4adeploy.ps1 | 2 + .../end-to-end-tests-dir/z-applocalcpp.ps1 | 29 +++- src/vcpkg/commands.z-applocal.cpp | 126 +++++++++++------- 7 files changed, 137 insertions(+), 53 deletions(-) create mode 100644 azure-pipelines/e2e-projects/applocal/plugins-debug/installed/bin/k4a.cpp create mode 100644 azure-pipelines/e2e-projects/applocal/plugins-debug/installed/bin/k4a.h create mode 100644 azure-pipelines/e2e-projects/applocal/plugins-debug/installed/debug/tools/azure-kinect-sensor-sdk/depthengine_2_0.cpp create mode 100644 azure-pipelines/e2e-projects/applocal/plugins-debug/installed/debug/tools/azure-kinect-sensor-sdk/k4adeploy.ps1 diff --git a/azure-pipelines/e2e-projects/applocal/plugins-debug/build.bat b/azure-pipelines/e2e-projects/applocal/plugins-debug/build.bat index 380506ab8b..5ec5b6ae49 100644 --- a/azure-pipelines/e2e-projects/applocal/plugins-debug/build.bat +++ b/azure-pipelines/e2e-projects/applocal/plugins-debug/build.bat @@ -2,6 +2,12 @@ cd %~dp0 pushd installed\tools\azure-kinect-sensor-sdk cl /LD depthengine_2_0.cpp popd +pushd installed\debug\tools\azure-kinect-sensor-sdk +cl /LD depthengine_2_0.cpp +popd +pushd installed\bin +cl /LD k4a.cpp +popd pushd installed\debug\bin cl /LD k4a.cpp popd diff --git a/azure-pipelines/e2e-projects/applocal/plugins-debug/installed/bin/k4a.cpp b/azure-pipelines/e2e-projects/applocal/plugins-debug/installed/bin/k4a.cpp new file mode 100644 index 0000000000..48c11a5682 --- /dev/null +++ b/azure-pipelines/e2e-projects/applocal/plugins-debug/installed/bin/k4a.cpp @@ -0,0 +1,8 @@ +#define MYLIB_EXPORTS 1 + +#include +#include "k4a.h" + +void k4a::my_func() { + puts("hello world"); +} diff --git a/azure-pipelines/e2e-projects/applocal/plugins-debug/installed/bin/k4a.h b/azure-pipelines/e2e-projects/applocal/plugins-debug/installed/bin/k4a.h new file mode 100644 index 0000000000..dd0e75fb67 --- /dev/null +++ b/azure-pipelines/e2e-projects/applocal/plugins-debug/installed/bin/k4a.h @@ -0,0 +1,8 @@ +class +#if MYLIB_EXPORTS +__declspec(dllexport) +#endif +k4a { +public: + static void my_func(); +}; diff --git a/azure-pipelines/e2e-projects/applocal/plugins-debug/installed/debug/tools/azure-kinect-sensor-sdk/depthengine_2_0.cpp b/azure-pipelines/e2e-projects/applocal/plugins-debug/installed/debug/tools/azure-kinect-sensor-sdk/depthengine_2_0.cpp new file mode 100644 index 0000000000..24d328dd10 --- /dev/null +++ b/azure-pipelines/e2e-projects/applocal/plugins-debug/installed/debug/tools/azure-kinect-sensor-sdk/depthengine_2_0.cpp @@ -0,0 +1,11 @@ +#define MYLIB_EXPORTS 1 + +#include +class __declspec(dllexport) depthengine_2_0 { +public: + static void my_func(); +}; + +void depthengine_2_0::my_func() { + puts("hello world"); +} diff --git a/azure-pipelines/e2e-projects/applocal/plugins-debug/installed/debug/tools/azure-kinect-sensor-sdk/k4adeploy.ps1 b/azure-pipelines/e2e-projects/applocal/plugins-debug/installed/debug/tools/azure-kinect-sensor-sdk/k4adeploy.ps1 new file mode 100644 index 0000000000..107024a689 --- /dev/null +++ b/azure-pipelines/e2e-projects/applocal/plugins-debug/installed/debug/tools/azure-kinect-sensor-sdk/k4adeploy.ps1 @@ -0,0 +1,2 @@ +This file exists to tell z-applocal that the azure-kinect-sensor-sdk is installed and is not +intended to be an executable PowerShell script. diff --git a/azure-pipelines/end-to-end-tests-dir/z-applocalcpp.ps1 b/azure-pipelines/end-to-end-tests-dir/z-applocalcpp.ps1 index 67aa913ea0..a83c5bb3ba 100644 --- a/azure-pipelines/end-to-end-tests-dir/z-applocalcpp.ps1 +++ b/azure-pipelines/end-to-end-tests-dir/z-applocalcpp.ps1 @@ -55,11 +55,30 @@ if ($IsWindows) { Require-FileExists "$pluginsDir/k4a.dll" Require-FileExists "$pluginsDir/depthengine_2_0.dll" - # Tests deploy azure kinect sensor SDK plugins from debug directories + # Tests deploy azure kinect sensor SDK plugins from release and debug directories when both are present $pluginsDebugDir = "$TestingRoot/applocal/plugins-debug" Run-Vcpkg env "$pluginsDebugDir/build.bat" Require-FileNotExists "$pluginsDebugDir/k4a.dll" Require-FileNotExists "$pluginsDebugDir/depthengine_2_0.dll" + + $applocalOutput = Run-VcpkgAndCaptureOutput z-applocal ` + --target-binary=$pluginsDebugDir/main.exe ` + --installed-bin-dir=$pluginsDebugDir/installed/bin + Throw-IfFailed + if (-Not ($applocalOutput -match '.*\\applocal\\plugins-debug\\installed\\bin\\k4a\.dll -> .*\\applocal\\plugins-debug\\k4a\.dll.*')) + { + throw "z-applocal didn't copy dependent release binary" + } + + if (-Not ($applocalOutput -match '.*\\applocal\\plugins-debug\\installed\\tools\\azure-kinect-sensor-sdk\\depthengine_2_0\.dll -> .*\\applocal\\plugins-debug\\depthengine_2_0\.dll.*')) + { + throw "z-applocal didn't copy release xbox plugins" + } + + Require-FileExists "$pluginsDebugDir/k4a.dll" + Require-FileExists "$pluginsDebugDir/depthengine_2_0.dll" + Remove-Item -LiteralPath "$pluginsDebugDir/k4a.dll", "$pluginsDebugDir/depthengine_2_0.dll" + $applocalOutput = Run-VcpkgAndCaptureOutput z-applocal ` --target-binary=$pluginsDebugDir/main.exe ` --installed-bin-dir=$pluginsDebugDir/installed/debug/bin @@ -69,13 +88,13 @@ if ($IsWindows) { throw "z-applocal didn't copy dependent debug binary" } - if (-Not ($applocalOutput -match '.*\\applocal\\plugins-debug\\installed\\tools\\azure-kinect-sensor-sdk\\depthengine_2_0\.dll -> .*\\applocal\\plugins-debug\\depthengine_2_0\.dll.*')) + if (-Not ($applocalOutput -match '.*\\applocal\\plugins-debug\\installed\\debug\\tools\\azure-kinect-sensor-sdk\\depthengine_2_0\.dll -> .*\\applocal\\plugins-debug\\depthengine_2_0\.dll.*')) { - throw "z-applocal didn't copy xbox plugins" + throw "z-applocal didn't copy debug xbox plugins" } - Require-FileExists "$pluginsDir/k4a.dll" - Require-FileExists "$pluginsDir/depthengine_2_0.dll" + Require-FileExists "$pluginsDebugDir/k4a.dll" + Require-FileExists "$pluginsDebugDir/depthengine_2_0.dll" # Tests that nonexistent files are merely warnings $nonexistentDll = Join-Path $basicDir 'nonexisting.dll' diff --git a/src/vcpkg/commands.z-applocal.cpp b/src/vcpkg/commands.z-applocal.cpp index 1f3194b651..6fb69bfd62 100644 --- a/src/vcpkg/commands.z-applocal.cpp +++ b/src/vcpkg/commands.z-applocal.cpp @@ -74,15 +74,9 @@ namespace BinaryPathDecodedInfo decode_from_canonical_bin_dir(const Path& canonical_bin_dir) { - auto maybe_installed_root = canonical_bin_dir.parent_path(); - static constexpr StringLiteral debug_suffix = "\\debug"; - const bool is_debug = Strings::case_insensitive_ascii_ends_with(maybe_installed_root, debug_suffix); - if (is_debug) - { - maybe_installed_root = maybe_installed_root.substr(0, maybe_installed_root.size() - debug_suffix.size()); - } - - return BinaryPathDecodedInfo{maybe_installed_root, is_debug}; + Path installed_root = canonical_bin_dir.parent_path(); + const bool is_debug = Strings::case_insensitive_ascii_equals(installed_root.filename(), "debug"); + return BinaryPathDecodedInfo{installed_root, is_debug}; } struct AppLocalInvocation @@ -110,8 +104,7 @@ namespace m_fs.exists(m_installed / "tools/azure-kinect-sensor-sdk/k4adeploy.ps1", VCPKG_LINE_INFO)) , m_magnum_installed(m_fs.exists(m_installed / "bin/magnum/magnumdeploy.ps1", VCPKG_LINE_INFO) || m_fs.exists(m_installed / "bin/magnum-d/magnumdeploy.ps1", VCPKG_LINE_INFO)) - , m_qt_installed(m_fs.exists( - m_installed / (m_is_debug ? "debug/plugins/qtdeploy.ps1" : "plugins/qtdeploy.ps1"), VCPKG_LINE_INFO)) + , m_qt_installed(m_fs.exists(m_installed / "plugins/qtdeploy.ps1", VCPKG_LINE_INFO)) #if !defined(_WIN32) , m_temp_dir(m_fs.create_or_get_temp_directory(VCPKG_LINE_INFO)) #endif // ^^^ !_WIN32 @@ -140,12 +133,13 @@ namespace for (auto&& imported_name : imported_names) { - if (m_searched.find(imported_name) != m_searched.end()) + const auto normalized_imported_name = Strings::ascii_to_lowercase(imported_name); + if (m_searched.find(normalized_imported_name) != m_searched.end()) { Debug::println(" ", imported_name, "previously searched - Skip"); continue; } - m_searched.insert(imported_name); + m_searched.insert(normalized_imported_name); Path target_binary_dir = binary.parent_path(); Path installed_item_file_path = m_installed_bin_dir / imported_name; @@ -168,14 +162,13 @@ namespace if (m_magnum_installed) { deployMagnum(target_binary_dir, - m_installed / (m_is_debug ? "debug/bin/magnum-d" : "bin/magnum"), + m_installed / (m_is_debug ? "bin/magnum-d" : "bin/magnum"), imported_name); } if (m_qt_installed) { - deployQt( - m_deployment_dir, m_installed / (m_is_debug ? "debug/plugins" : "plugins"), imported_name); + deployQt(m_deployment_dir, m_installed / "plugins", imported_name); } resolve(m_deployment_dir / imported_name); @@ -198,7 +191,7 @@ namespace const Path& installed_dir, const std::string& target_binary_name) { - if (target_binary_name == "k4a.dll") + if (Strings::case_insensitive_ascii_equals(target_binary_name, "k4a.dll")) { std::string binary_name = "depthengine_2_0.dll"; Path inst_dir = installed_dir / "tools/azure-kinect-sensor-sdk"; @@ -213,7 +206,7 @@ namespace const Path& installed_dir, const std::string& target_binary_name) { - if (target_binary_name == "OpenNI2.dll") + if (Strings::case_insensitive_ascii_equals(target_binary_name, "OpenNI2.dll")) { Debug::println(" Deploying OpenNI2 Initialization"); deploy_binary(target_binary_dir, installed_dir / "bin/OpenNI2", "OpenNI.ini"); @@ -227,7 +220,12 @@ namespace for (auto&& c : children) { - deploy_binary(drivers, installed_dir / "bin/OpenNI2/Drivers", c.filename().to_string()); + const auto filename = c.filename(); + if (Strings::case_insensitive_ascii_ends_with(filename, ".dll") || + Strings::case_insensitive_ascii_ends_with(filename, ".ini")) + { + deploy_binary(drivers, installed_dir / "bin/OpenNI2/Drivers", filename); + } } } } @@ -251,8 +249,17 @@ namespace std::vector children = m_fs.get_files_non_recursive(magnum_plugins_dir / plugins_subdir_name, ec); for (auto c : children) { - deploy_binary(new_dir, magnum_plugins_dir / plugins_subdir_name, c.filename().to_string()); - resolve(c); + const auto filename = c.filename(); + const bool is_dll = Strings::case_insensitive_ascii_ends_with(filename, ".dll"); + if (is_dll || Strings::case_insensitive_ascii_ends_with(filename, ".conf") || + Strings::case_insensitive_ascii_ends_with(filename, ".pdb")) + { + deploy_binary(new_dir, magnum_plugins_dir / plugins_subdir_name, filename); + if (is_dll) + { + resolve(c); + } + } } } else @@ -267,22 +274,26 @@ namespace { Debug::println("Deploying magnum plugins"); - if (target_binary_name == "MagnumAudio.dll" || target_binary_name == "MagnumAudio-d.dll") + if (Strings::case_insensitive_ascii_equals(target_binary_name, "MagnumAudio.dll") || + Strings::case_insensitive_ascii_equals(target_binary_name, "MagnumAudio-d.dll")) { deployPluginsMagnum("audioimporters", target_binary_dir, magnum_plugins_dir); } - else if (target_binary_name == "MagnumText.dll" || target_binary_name == "MagnumText-d.dll") + else if (Strings::case_insensitive_ascii_equals(target_binary_name, "MagnumText.dll") || + Strings::case_insensitive_ascii_equals(target_binary_name, "MagnumText-d.dll")) { deployPluginsMagnum("fonts", target_binary_dir, magnum_plugins_dir); deployPluginsMagnum("fontconverters", target_binary_dir, magnum_plugins_dir); } - else if (target_binary_name == "MagnumTrade.dll" || target_binary_name == "MagnumTrade-d.dll") + else if (Strings::case_insensitive_ascii_equals(target_binary_name, "MagnumTrade.dll") || + Strings::case_insensitive_ascii_equals(target_binary_name, "MagnumTrade-d.dll")) { deployPluginsMagnum("importers", target_binary_dir, magnum_plugins_dir); deployPluginsMagnum("imageconverters", target_binary_dir, magnum_plugins_dir); deployPluginsMagnum("sceneconverters", target_binary_dir, magnum_plugins_dir); } - else if (target_binary_name == "MagnumShaderTools.dll" || target_binary_name == "MagnumShaderTools-d.dll") + else if (Strings::case_insensitive_ascii_equals(target_binary_name, "MagnumShaderTools.dll") || + Strings::case_insensitive_ascii_equals(target_binary_name, "MagnumShaderTools-d.dll")) { deployPluginsMagnum("shaderconverters", target_binary_dir, magnum_plugins_dir); } @@ -307,10 +318,10 @@ namespace for (auto&& c : children) { const auto c_filename = c.filename(); - if (c_filename.ends_with(".dll")) + if (Strings::case_insensitive_ascii_ends_with(c_filename, ".dll")) { deploy_binary(new_dir, qt_plugins_dir / plugins_subdir_name, c_filename); - resolve(c); + resolve(new_dir / c_filename); } } } @@ -324,7 +335,8 @@ namespace { Path bin_dir = Path(qt_plugins_dir.parent_path()) / "bin"; - if (target_binary_name == "Qt5Cored.dll" || target_binary_name == "Qt5Core.dll") + if (Strings::case_insensitive_ascii_equals(target_binary_name, "Qt5Cored.dll") || + Strings::case_insensitive_ascii_equals(target_binary_name, "Qt5Core.dll")) { std::error_code ec; if (!m_fs.exists(target_binary_dir / "qt.conf", ec)) @@ -332,7 +344,8 @@ namespace m_fs.write_contents(target_binary_dir / "qt.conf", "[Paths]\n", ec); } } - else if (target_binary_name == "Qt5Guid.dll" || target_binary_name == "Qt5Gui.dll") + else if (Strings::case_insensitive_ascii_equals(target_binary_name, "Qt5Guid.dll") || + Strings::case_insensitive_ascii_equals(target_binary_name, "Qt5Gui.dll")) { Debug::println(" Deploying platforms"); @@ -344,7 +357,8 @@ namespace for (auto&& c : children) { auto c_filename = c.filename(); - if (c_filename.starts_with("qwindows") && c_filename.ends_with(".dll")) + if (Strings::case_insensitive_ascii_starts_with(c_filename, "qwindows") && + Strings::case_insensitive_ascii_ends_with(c_filename, ".dll")) { deploy_binary(new_dir, qt_plugins_dir / "platforms", c_filename); } @@ -355,7 +369,8 @@ namespace deployPluginsQt("platforminputcontexts", target_binary_dir, qt_plugins_dir); deployPluginsQt("styles", target_binary_dir, qt_plugins_dir); } - else if (target_binary_name == "Qt5Networkd.dll" || target_binary_name == "Qt5Network.dll") + else if (Strings::case_insensitive_ascii_equals(target_binary_name, "Qt5Networkd.dll") || + Strings::case_insensitive_ascii_equals(target_binary_name, "Qt5Network.dll")) { deployPluginsQt("bearer", target_binary_dir, qt_plugins_dir); @@ -364,43 +379,49 @@ namespace for (auto&& c : children) { const auto c_filename = c.filename(); - if (c_filename.starts_with("libcrypto-") && c_filename.ends_with(".dll")) + if (Strings::case_insensitive_ascii_starts_with(c_filename, "libcrypto-") && + Strings::case_insensitive_ascii_ends_with(c_filename, ".dll")) { deploy_binary(target_binary_dir, bin_dir, c_filename); } - if (c_filename.starts_with("libssl-") && c_filename.ends_with(".dll")) + if (Strings::case_insensitive_ascii_starts_with(c_filename, "libssl-") && + Strings::case_insensitive_ascii_ends_with(c_filename, ".dll")) { deploy_binary(target_binary_dir, bin_dir, c_filename); } } } - else if (target_binary_name == "Qt5Sqld.dll" || target_binary_name == "Qt5Sql.dll") + else if (Strings::case_insensitive_ascii_equals(target_binary_name, "Qt5Sqld.dll") || + Strings::case_insensitive_ascii_equals(target_binary_name, "Qt5Sql.dll")) { deployPluginsQt("sqldrivers", target_binary_dir, qt_plugins_dir); } - else if (target_binary_name == "Qt5Multimediad.dll" || target_binary_name == "Qt5Multimedia.dll") + else if (Strings::case_insensitive_ascii_equals(target_binary_name, "Qt5Multimediad.dll") || + Strings::case_insensitive_ascii_equals(target_binary_name, "Qt5Multimedia.dll")) { deployPluginsQt("audio", target_binary_dir, qt_plugins_dir); deployPluginsQt("mediaservice", target_binary_dir, qt_plugins_dir); deployPluginsQt("playlistformats", target_binary_dir, qt_plugins_dir); } - else if (target_binary_name == "Qt5PrintSupportd.dll" || target_binary_name == "Qt5PrintSupport.dll") + else if (Strings::case_insensitive_ascii_equals(target_binary_name, "Qt5PrintSupportd.dll") || + Strings::case_insensitive_ascii_equals(target_binary_name, "Qt5PrintSupport.dll")) { deployPluginsQt("printsupport", target_binary_dir, qt_plugins_dir); } - else if (target_binary_name == "Qt5Qmld.dll" || target_binary_name == "Qt5Qml.dll") + else if (Strings::case_insensitive_ascii_equals(target_binary_name, "Qt5Qmld.dll") || + Strings::case_insensitive_ascii_equals(target_binary_name, "Qt5Qml.dll")) { std::error_code ec; if (!m_fs.exists(target_binary_dir / "qml", ec)) { if (m_fs.exists(bin_dir / "../qml", ec)) { - m_fs.copy_regular_recursive(bin_dir / "../qml", target_binary_dir, VCPKG_LINE_INFO); + m_fs.copy_regular_recursive(bin_dir / "../qml", target_binary_dir / "qml", VCPKG_LINE_INFO); } else if (m_fs.exists(bin_dir / "../../qml", ec)) { - m_fs.copy_regular_recursive(bin_dir / "../../qml", target_binary_dir, VCPKG_LINE_INFO); + m_fs.copy_regular_recursive(bin_dir / "../../qml", target_binary_dir / "qml", VCPKG_LINE_INFO); } else { @@ -432,7 +453,8 @@ namespace deployPluginsQt("scenegraph", target_binary_dir, qt_plugins_dir); deployPluginsQt("qmltooling", target_binary_dir, qt_plugins_dir); } - else if (target_binary_name == "Qt5Quickd.dll" || target_binary_name == "Qt5Quick.dll") + else if (Strings::case_insensitive_ascii_equals(target_binary_name, "Qt5Quickd.dll") || + Strings::case_insensitive_ascii_equals(target_binary_name, "Qt5Quick.dll")) { std::vector libs = {"Qt5QuickControls2.dll", "Qt5QuickControls2d.dll", @@ -454,36 +476,44 @@ namespace deployPluginsQt("scenegraph", target_binary_dir, qt_plugins_dir); deployPluginsQt("qmltooling", target_binary_dir, qt_plugins_dir); } - else if (target_binary_name.starts_with("Qt5Declarative") && target_binary_name.ends_with(".dll")) + else if (Strings::case_insensitive_ascii_starts_with(target_binary_name, "Qt5Declarative") && + Strings::case_insensitive_ascii_ends_with(target_binary_name, ".dll")) { deployPluginsQt("qml1tooling", target_binary_dir, qt_plugins_dir); } - else if (target_binary_name.starts_with("Qt5Positioning") && target_binary_name.ends_with(".dll")) + else if (Strings::case_insensitive_ascii_starts_with(target_binary_name, "Qt5Positioning") && + Strings::case_insensitive_ascii_ends_with(target_binary_name, ".dll")) { deployPluginsQt("position", target_binary_dir, qt_plugins_dir); } - else if (target_binary_name.starts_with("Qt5Location") && target_binary_name.ends_with(".dll")) + else if (Strings::case_insensitive_ascii_starts_with(target_binary_name, "Qt5Location") && + Strings::case_insensitive_ascii_ends_with(target_binary_name, ".dll")) { deployPluginsQt("geoservices", target_binary_dir, qt_plugins_dir); } - else if (target_binary_name.starts_with("Qt5Sensors") && target_binary_name.ends_with(".dll")) + else if (Strings::case_insensitive_ascii_starts_with(target_binary_name, "Qt5Sensors") && + Strings::case_insensitive_ascii_ends_with(target_binary_name, ".dll")) { deployPluginsQt("sensors", target_binary_dir, qt_plugins_dir); deployPluginsQt("sensorgestures", target_binary_dir, qt_plugins_dir); } - else if (target_binary_name.starts_with("Qt5WebEngineCore") && target_binary_name.ends_with(".dll")) + else if (Strings::case_insensitive_ascii_starts_with(target_binary_name, "Qt5WebEngineCore") && + Strings::case_insensitive_ascii_ends_with(target_binary_name, ".dll")) { deployPluginsQt("qtwebengine", target_binary_dir, qt_plugins_dir); } - else if (target_binary_name.starts_with("Qt53DRenderer") && target_binary_name.ends_with(".dll")) + else if (Strings::case_insensitive_ascii_starts_with(target_binary_name, "Qt53DRenderer") && + Strings::case_insensitive_ascii_ends_with(target_binary_name, ".dll")) { deployPluginsQt("sceneparsers", target_binary_dir, qt_plugins_dir); } - else if (target_binary_name.starts_with("Qt5TextToSpeech") && target_binary_name.ends_with(".dll")) + else if (Strings::case_insensitive_ascii_starts_with(target_binary_name, "Qt5TextToSpeech") && + Strings::case_insensitive_ascii_ends_with(target_binary_name, ".dll")) { deployPluginsQt("texttospeech", target_binary_dir, qt_plugins_dir); } - else if (target_binary_name.starts_with("Qt5SerialBus") && target_binary_name.ends_with(".dll")) + else if (Strings::case_insensitive_ascii_starts_with(target_binary_name, "Qt5SerialBus") && + Strings::case_insensitive_ascii_ends_with(target_binary_name, ".dll")) { deployPluginsQt("canbus", target_binary_dir, qt_plugins_dir); }