Add "Install Plugin" button

Shows a wizard. Select a library file or zip file, and if you want to
install in user location or Qt Creator install.
For zip files it requires "unzip", "7z" or "cmake" in the PATH.

Change-Id: I191079046cbd2cb6ab181bc044a00488af41b349
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Eike Ziller
2020-01-21 14:17:05 +01:00
parent 6a07e2c341
commit a040bebe5d
4 changed files with 336 additions and 10 deletions

View File

@@ -356,8 +356,26 @@ QString ICore::cacheResourcePath()
QString ICore::installerResourcePath()
{
return QFileInfo(settings(QSettings::SystemScope)->fileName()).path() + '/'
+ Constants::IDE_ID;
return QFileInfo(settings(QSettings::SystemScope)->fileName()).path() + '/' + Constants::IDE_ID;
}
QString ICore::pluginPath()
{
return QDir::cleanPath(QCoreApplication::applicationDirPath() + '/' + RELATIVE_PLUGIN_PATH);
}
QString ICore::userPluginPath()
{
QString pluginPath = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation);
if (Utils::HostOsInfo::isAnyUnixHost() && !Utils::HostOsInfo::isMacHost())
pluginPath += "/data";
pluginPath += '/' + QLatin1String(Core::Constants::IDE_SETTINGSVARIANT_STR) + '/';
pluginPath += QLatin1String(Utils::HostOsInfo::isMacHost() ? Core::Constants::IDE_DISPLAY_NAME
: Core::Constants::IDE_ID);
pluginPath += "/plugins/";
pluginPath += QString::number(IDE_VERSION_MAJOR) + '.' + QString::number(IDE_VERSION_MINOR)
+ '.' + QString::number(IDE_VERSION_RELEASE);
return pluginPath;
}
/*!