Run get_python script when Python fails to load (#4482)

Signed-off-by: AMZN-alexpete <26804013+AMZN-alexpete@users.noreply.github.com>
This commit is contained in:
Alex Peterson
2021-10-05 11:26:54 -07:00
committed by GitHub
parent bf7ae12402
commit df419a0990
13 changed files with 202 additions and 11 deletions
@@ -11,5 +11,6 @@
namespace O3DE::ProjectManager
{
const QString ProjectBuildPathPostfix = ProjectBuildDirectoryName + "/linux";
const QString GetPythonScriptPath = "python/get_python.sh";
} // namespace O3DE::ProjectManager
@@ -86,5 +86,13 @@ namespace O3DE::ProjectManager
return AZ::Success();
}
AZ::Outcome<QString, QString> RunGetPythonScript(const QString& engineRoot)
{
return ExecuteCommandResultModalDialog(
QString("%1/python/get_python.sh").arg(engineRoot),
{},
QProcessEnvironment::systemEnvironment(),
QObject::tr("Running get_python script..."));
}
} // namespace ProjectUtils
} // namespace O3DE::ProjectManager
@@ -11,5 +11,6 @@
namespace O3DE::ProjectManager
{
const QString ProjectBuildPathPostfix = ProjectBuildDirectoryName + "/mac_xcode";
const QString GetPythonScriptPath = "python/get_python.sh";
} // namespace O3DE::ProjectManager
@@ -9,6 +9,7 @@
#include <QProcess>
#include <QStandardPaths>
#include <QDir>
namespace O3DE::ProjectManager
{
@@ -94,5 +95,14 @@ namespace O3DE::ProjectManager
return AZ::Success();
}
AZ::Outcome<QString, QString> RunGetPythonScript(const QString& engineRoot)
{
return ExecuteCommandResultModalDialog(
QString("%1/python/get_python.sh").arg(engineRoot),
{},
QProcessEnvironment::systemEnvironment(),
QObject::tr("Running get_python script..."));
}
} // namespace ProjectUtils
} // namespace O3DE::ProjectManager
@@ -10,5 +10,6 @@
namespace O3DE::ProjectManager
{
const QString ProjectBuildPathPostfix = ProjectBuildDirectoryName + "/windows_vs2019";
const QString GetPythonScriptPath = "python/get_python.bat";
} // namespace O3DE::ProjectManager
@@ -130,5 +130,14 @@ namespace O3DE::ProjectManager
return AZ::Success();
}
AZ::Outcome<QString, QString> RunGetPythonScript(const QString& engineRoot)
{
const QString batPath = QString("%1/python/get_python.bat").arg(engineRoot);
return ExecuteCommandResultModalDialog(
"cmd.exe",
QStringList{"/c", batPath},
QProcessEnvironment::systemEnvironment(),
QObject::tr("Running get_python script..."));
}
} // namespace ProjectUtils
} // namespace O3DE::ProjectManager