CMakePM: Copy auto package-manager to ${buildDir}/.qtc/ directory

By copying the ${IDE:ResourcePath}/package-manager to
${buildDir}/.qtc/ the problem with hardcoding paths
to old an Qt Creator version can no longer occur.

This also fixes the issue with remote projects by reffering
to the code residing on the host.

With the above issues fixed, enable "Package manager auto setup"
by default.

Change-Id: Ia49654a3b9059f83886e64d065019b2d55e9299c
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
Cristian Adam
2023-02-07 18:15:58 +01:00
parent f5bd330277
commit a6ccfb09e5
7 changed files with 31 additions and 13 deletions

View File

@@ -14,6 +14,7 @@
#include <projectexplorer/toolchain.h>
#include <utils/algorithm.h>
#include <utils/macroexpander.h>
#include <utils/qtcassert.h>
using namespace ProjectExplorer;
@@ -28,20 +29,20 @@ BuildDirParameters::BuildDirParameters(CMakeBuildSystem *buildSystem)
auto bc = buildSystem->cmakeBuildConfiguration();
QTC_ASSERT(bc, return);
const Utils::MacroExpander *expander = bc->macroExpander();
expander = bc->macroExpander();
const QStringList expandedArguments = Utils::transform(buildSystem->initialCMakeArguments(),
[expander](const QString &s) {
[this](const QString &s) {
return expander->expand(s);
});
initialCMakeArguments = Utils::filtered(expandedArguments,
[](const QString &s) { return !s.isEmpty(); });
configurationChangesArguments = Utils::transform(buildSystem->configurationChangesArguments(),
[expander](const QString &s) {
[this](const QString &s) {
return expander->expand(s);
});
additionalCMakeArguments = Utils::transform(buildSystem->additionalCMakeArguments(),
[expander](const QString &s) {
[this](const QString &s) {
return expander->expand(s);
});
const Target *t = bc->target();