Merge pull request #6988 from aws-lumberyard-dev/Atom/guthadam/atom_tools_startup_disabling_unused_gems

Atom Tools: disabling auto load of unused gems in some atom tools
This commit is contained in:
Guthrie Adams
2022-01-19 09:37:49 -06:00
committed by GitHub
5 changed files with 143 additions and 5 deletions
@@ -38,5 +38,5 @@ namespace AtomToolsFramework
QFileInfo GetOpenFileInfo(const AZStd::vector<AZ::Data::AssetType>& assetTypes);
QFileInfo GetUniqueFileInfo(const QString& initialPath);
QFileInfo GetDuplicationFileInfo(const QString& initialPath);
bool LaunchTool(const QString& baseName, const QString& extension, const QStringList& arguments);
bool LaunchTool(const QString& baseName, const QStringList& arguments);
} // namespace AtomToolsFramework
@@ -168,13 +168,13 @@ namespace AtomToolsFramework
return duplicateFileInfo;
}
bool LaunchTool(const QString& baseName, const QString& extension, const QStringList& arguments)
bool LaunchTool(const QString& baseName, const QStringList& arguments)
{
AZ::IO::FixedMaxPath engineRoot = AZ::Utils::GetEnginePath();
AZ_Assert(!engineRoot.empty(), "Cannot query Engine Path");
AZ::IO::FixedMaxPath launchPath = AZ::IO::FixedMaxPath(AZ::Utils::GetExecutableDirectory())
/ (baseName + extension).toUtf8().constData();
AZ::IO::FixedMaxPath launchPath =
AZ::IO::FixedMaxPath(AZ::Utils::GetExecutableDirectory()) / (baseName + AZ_TRAIT_OS_EXECUTABLE_EXTENSION).toUtf8().constData();
return QProcess::startDetached(launchPath.c_str(), arguments, engineRoot.c_str());
}