Fix Project Manager not finding CMake on Windows
Signed-off-by: AMZN-Phil <pconroy@amazon.com>
This commit is contained in:
@@ -117,18 +117,16 @@ namespace O3DE::ProjectManager
|
||||
// Show some kind of progress with very approximate estimates
|
||||
UpdateProgress(++m_progressEstimate);
|
||||
|
||||
auto currentEnvironmentRequest = ProjectUtils::GetCommandLineProcessEnvironment();
|
||||
auto currentEnvironmentRequest = ProjectUtils::SetupCommandLineProcessEnvironment();
|
||||
if (!currentEnvironmentRequest.IsSuccess())
|
||||
{
|
||||
QStringToAZTracePrint(currentEnvironmentRequest.GetError());
|
||||
return AZ::Failure(currentEnvironmentRequest.GetError());
|
||||
}
|
||||
QProcessEnvironment currentEnvironment = currentEnvironmentRequest.GetValue();
|
||||
|
||||
m_configProjectProcess = new QProcess(this);
|
||||
m_configProjectProcess->setProcessChannelMode(QProcess::MergedChannels);
|
||||
m_configProjectProcess->setWorkingDirectory(m_projectInfo.m_path);
|
||||
m_configProjectProcess->setProcessEnvironment(currentEnvironment);
|
||||
|
||||
auto cmakeGenerateArgumentsResult = ConstructCmakeGenerateProjectArguments(engineInfo.m_thirdPartyPath);
|
||||
if (!cmakeGenerateArgumentsResult.IsSuccess())
|
||||
@@ -181,7 +179,6 @@ namespace O3DE::ProjectManager
|
||||
m_buildProjectProcess = new QProcess(this);
|
||||
m_buildProjectProcess->setProcessChannelMode(QProcess::MergedChannels);
|
||||
m_buildProjectProcess->setWorkingDirectory(m_projectInfo.m_path);
|
||||
m_buildProjectProcess->setProcessEnvironment(currentEnvironment);
|
||||
|
||||
auto cmakeBuildArgumentsResult = ConstructCmakeBuildCommandArguments();
|
||||
if (!cmakeBuildArgumentsResult.IsSuccess())
|
||||
|
||||
@@ -520,12 +520,10 @@ namespace O3DE::ProjectManager
|
||||
AZ::Outcome<QString, QString> ExecuteCommandResultModalDialog(
|
||||
const QString& cmd,
|
||||
const QStringList& arguments,
|
||||
const QProcessEnvironment& processEnv,
|
||||
const QString& title)
|
||||
{
|
||||
QString resultOutput;
|
||||
QProcess execProcess;
|
||||
execProcess.setProcessEnvironment(processEnv);
|
||||
execProcess.setProcessChannelMode(QProcess::MergedChannels);
|
||||
|
||||
QProgressDialog dialog(title, QObject::tr("Cancel"), /*minimum=*/0, /*maximum=*/0);
|
||||
@@ -611,11 +609,9 @@ namespace O3DE::ProjectManager
|
||||
AZ::Outcome<QString, QString> ExecuteCommandResult(
|
||||
const QString& cmd,
|
||||
const QStringList& arguments,
|
||||
const QProcessEnvironment& processEnv,
|
||||
int commandTimeoutSeconds /*= ProjectCommandLineTimeoutSeconds*/)
|
||||
{
|
||||
QProcess execProcess;
|
||||
execProcess.setProcessEnvironment(processEnv);
|
||||
execProcess.setProcessChannelMode(QProcess::MergedChannels);
|
||||
execProcess.start(cmd, arguments);
|
||||
if (!execProcess.waitForStarted())
|
||||
|
||||
@@ -47,7 +47,6 @@ namespace O3DE::ProjectManager
|
||||
AZ::Outcome<QString, QString> ExecuteCommandResult(
|
||||
const QString& cmd,
|
||||
const QStringList& arguments,
|
||||
const QProcessEnvironment& processEnv,
|
||||
int commandTimeoutSeconds = ProjectCommandLineTimeoutSeconds);
|
||||
|
||||
/**
|
||||
@@ -61,10 +60,9 @@ namespace O3DE::ProjectManager
|
||||
AZ::Outcome<QString, QString> ExecuteCommandResultModalDialog(
|
||||
const QString& cmd,
|
||||
const QStringList& arguments,
|
||||
const QProcessEnvironment& processEnv,
|
||||
const QString& title);
|
||||
|
||||
AZ::Outcome<QProcessEnvironment, QString> GetCommandLineProcessEnvironment();
|
||||
AZ::Outcome<void, QString> SetupCommandLineProcessEnvironment();
|
||||
AZ::Outcome<QString, QString> GetProjectBuildPath(const QString& projectPath);
|
||||
AZ::Outcome<void, QString> OpenCMakeGUI(const QString& projectPath);
|
||||
AZ::Outcome<QString, QString> RunGetPythonScript(const QString& enginePath);
|
||||
|
||||
Reference in New Issue
Block a user