McuSupport: Evaluate environment variables in paths

Packages are created as defined in JSON. Some paths
contain variables. This creates dependencies between
packages. After all packages are created and collected
environment variables are evaluated in one pass. McuTarget
packages get updated.

This is needed because we shouldn't show the user paths
with variables in them. Also file picker wouldn't work.

There will be cmake variables support in separate commit.

Change-Id: Id210ea394f3f5bb5a14d87f3cf6a0a9a99e690bf
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
Piotr Mućko
2022-08-09 10:56:33 +02:00
parent 662281e837
commit cb24da01b3
9 changed files with 121 additions and 35 deletions

View File

@@ -90,6 +90,8 @@ public:
QWidget *widget() override;
const McuPackageVersionDetector *getVersionDetector() const override;
void setPath(const Utils::FilePath &);
private:
void updatePath();
void updateStatusUi();
@@ -100,7 +102,7 @@ private:
Utils::InfoLabel *m_infoLabel = nullptr;
const QString m_label;
const Utils::FilePath m_defaultPath;
Utils::FilePath m_defaultPath;
const Utils::FilePath m_detectionPath;
const QString m_settingsKey;
QScopedPointer<const McuPackageVersionDetector> m_versionDetector;