Core: Add IDE:Executable variable

Change-Id: Ic191562bbfea0b3f0998c0e71c11d7316644937c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Marcus Tillmanns
2024-05-31 16:08:14 +02:00
parent cf1aa1d1bb
commit 57826bcab6

View File

@@ -251,6 +251,9 @@ bool CorePlugin::initialize(const QStringList &arguments, QString *errorMessage)
expander->registerVariable("HostOs:ExecutableSuffix",
Tr::tr("The platform executable suffix."),
[] { return QString(Utils::HostOsInfo::withExecutableSuffix("")); });
expander->registerFileVariables("IDE:Executable",
Tr::tr("The path to the running %1 itself.").arg(QGuiApplication::applicationDisplayName()),
[]() { return FilePath::fromUserInput(QCoreApplication::applicationFilePath()); });
expander->registerVariable("IDE:ResourcePath",
Tr::tr("The directory where %1 finds its pre-installed resources.")
.arg(QGuiApplication::applicationDisplayName()),