Merge branch 'development' into Prism/ShowRepoList
This commit is contained in:
@@ -69,7 +69,8 @@ namespace AssetBundler
|
||||
assetInfo = AzToolsFramework::AssetSeedManager::GetAssetInfoById(
|
||||
seed.m_assetId,
|
||||
AzFramework::PlatformHelper::GetPlatformIndicesInterpreted(seed.m_platformFlags)[0],
|
||||
absolutePath);
|
||||
absolutePath,
|
||||
seed.m_assetRelativePath);
|
||||
platformList = QString(m_seedListManager->GetReadablePlatformList(seed).c_str());
|
||||
|
||||
m_additionalSeedInfoMap[seed.m_assetId].reset(new AdditionalSeedInfo(assetInfo.m_relativePath.c_str(), platformList));
|
||||
|
||||
@@ -411,7 +411,7 @@ bool AssetBuilderComponent::RunInResidentMode()
|
||||
m_running = true;
|
||||
|
||||
m_jobThreadDesc.m_name = "Builder Job Thread";
|
||||
m_jobThread = AZStd::thread(AZStd::bind(&AssetBuilderComponent::JobThread, this), &m_jobThreadDesc);
|
||||
m_jobThread = AZStd::thread(m_jobThreadDesc, AZStd::bind(&AssetBuilderComponent::JobThread, this));
|
||||
|
||||
AzFramework::EngineConnectionEvents::Bus::Handler::BusConnect(); // Listen for disconnects
|
||||
|
||||
|
||||
@@ -1063,10 +1063,10 @@ namespace AssetProcessor
|
||||
|
||||
AZStd::thread_desc threadDesc;
|
||||
threadDesc.m_name = "AssetCatalog Thread";
|
||||
AZStd::thread catalogThread([this]()
|
||||
AZStd::thread catalogThread(threadDesc, [this]()
|
||||
{
|
||||
m_data->m_assetCatalog->BuildRegistry();
|
||||
}, &threadDesc
|
||||
}
|
||||
);
|
||||
|
||||
AssetNotificationMessage message("some/path/image.png", AssetNotificationMessage::NotificationType::AssetChanged, AZ::Data::AssetType::CreateRandom(), "pc");
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "AssetProcessorManagerTest.h"
|
||||
#include "native/AssetManager/PathDependencyManager.h"
|
||||
#include <AzCore/Settings/SettingsRegistryMergeUtils.h>
|
||||
#include <AzToolsFramework/Asset/AssetProcessorMessages.h>
|
||||
#include <AzToolsFramework/ToolsFileUtils/ToolsFileUtils.h>
|
||||
|
||||
#include <AzTest/AzTest.h>
|
||||
@@ -4130,11 +4131,21 @@ struct LockedFileTest
|
||||
MOCK_METHOD2(SendResponse, size_t (unsigned, const AzFramework::AssetSystem::BaseAssetProcessorMessage&));
|
||||
MOCK_METHOD1(RemoveResponseHandler, void (unsigned));
|
||||
|
||||
size_t Send(unsigned, const AzFramework::AssetSystem::BaseAssetProcessorMessage&) override
|
||||
size_t Send(unsigned, const AzFramework::AssetSystem::BaseAssetProcessorMessage& message) override
|
||||
{
|
||||
if(m_callback)
|
||||
using SourceFileNotificationMessage = AzToolsFramework::AssetSystem::SourceFileNotificationMessage;
|
||||
switch (message.GetMessageType())
|
||||
{
|
||||
m_callback();
|
||||
case SourceFileNotificationMessage::MessageType:
|
||||
if (const auto sourceFileMessage = azrtti_cast<const SourceFileNotificationMessage*>(&message);
|
||||
sourceFileMessage != nullptr && sourceFileMessage->m_type == SourceFileNotificationMessage::NotificationType::FileRemoved
|
||||
&& m_callback)
|
||||
{
|
||||
m_callback();
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -74,8 +74,11 @@ namespace AssetProcessor
|
||||
AZ_TracePrintf(AssetProcessor::DebugChannel, "Extracting archive for job (%s, %s, %s) with fingerprint (%u).\n",
|
||||
builderParams.m_rcJob->GetJobEntry().m_pathRelativeToWatchFolder.toUtf8().data(), builderParams.m_rcJob->GetJobKey().toUtf8().data(),
|
||||
builderParams.m_rcJob->GetPlatformInfo().m_identifier.c_str(), builderParams.m_rcJob->GetOriginalFingerprint());
|
||||
bool success = false;
|
||||
AzToolsFramework::ArchiveCommands::Bus::BroadcastResult(success, &AzToolsFramework::ArchiveCommands::ExtractArchiveBlocking, archiveAbsFilePath.toUtf8().data(), builderParams.GetTempJobDirectory(), false);
|
||||
std::future<bool> extractResult;
|
||||
AzToolsFramework::ArchiveCommandsBus::BroadcastResult(extractResult,
|
||||
&AzToolsFramework::ArchiveCommandsBus::Events::ExtractArchive,
|
||||
archiveAbsFilePath.toUtf8().data(), builderParams.GetTempJobDirectory());
|
||||
bool success = extractResult.get();
|
||||
AZ_Error(AssetProcessor::DebugChannel, success, "Extracting archive operation failed.\n");
|
||||
return success;
|
||||
}
|
||||
@@ -106,12 +109,15 @@ namespace AssetProcessor
|
||||
return false;
|
||||
}
|
||||
|
||||
bool success = false;
|
||||
|
||||
AZ_TracePrintf(AssetProcessor::DebugChannel, "Creating archive for job (%s, %s, %s) with fingerprint (%u).\n",
|
||||
builderParams.m_rcJob->GetJobEntry().m_pathRelativeToWatchFolder.toUtf8().data(), builderParams.m_rcJob->GetJobKey().toUtf8().data(),
|
||||
builderParams.m_rcJob->GetPlatformInfo().m_identifier.c_str(), builderParams.m_rcJob->GetOriginalFingerprint());
|
||||
AzToolsFramework::ArchiveCommands::Bus::BroadcastResult(success, &AzToolsFramework::ArchiveCommands::CreateArchiveBlocking, archiveAbsFilePath.toUtf8().data(), builderParams.GetTempJobDirectory());
|
||||
|
||||
std::future<bool> createResult;
|
||||
AzToolsFramework::ArchiveCommandsBus::BroadcastResult(createResult,
|
||||
&AzToolsFramework::ArchiveCommandsBus::Events::CreateArchive,
|
||||
archiveAbsFilePath.toUtf8().data(), builderParams.GetTempJobDirectory());
|
||||
bool success = createResult.get();
|
||||
AZ_Error(AssetProcessor::DebugChannel, success, "Creating archive operation failed. \n");
|
||||
|
||||
if (success && sourceFileList.size())
|
||||
@@ -137,14 +143,16 @@ namespace AssetProcessor
|
||||
allSuccess = false;
|
||||
continue;
|
||||
}
|
||||
bool success{ false };
|
||||
AzToolsFramework::ArchiveCommands::Bus::BroadcastResult(success, &AzToolsFramework::ArchiveCommands::AddFileToArchiveBlocking, archivePath.toUtf8().data(), sourceDir.path().toUtf8().data(), thisProduct.c_str());
|
||||
std::future<bool> addResult;
|
||||
AzToolsFramework::ArchiveCommandsBus::BroadcastResult(addResult,
|
||||
&AzToolsFramework::ArchiveCommandsBus::Events::AddFileToArchive,
|
||||
archivePath.toUtf8().data(), sourceDir.path().toUtf8().data(), thisProduct.c_str());
|
||||
bool success = addResult.get();
|
||||
if (!success)
|
||||
{
|
||||
AZ_Warning(AssetProcessor::DebugChannel, false, "Failed to add %s to %s", thisProduct.c_str(), archivePath.toUtf8().data());
|
||||
allSuccess = false;
|
||||
}
|
||||
|
||||
}
|
||||
return allSuccess;
|
||||
}
|
||||
|
||||
@@ -164,7 +164,10 @@ namespace AssetUtilsInternal
|
||||
|
||||
AZ::SettingsRegistryMergeUtils::DumperSettings apDumperSettings;
|
||||
apDumperSettings.m_prettifyOutput = true;
|
||||
AZ_PUSH_DISABLE_WARNING(5233, "-Wunknown-warning-option") // Older versions of MSVC toolchain require to pass constexpr in the
|
||||
// capture. Newer versions issue unused warning
|
||||
apDumperSettings.m_includeFilter = [&AssetProcessorUserSettingsRootKey](AZStd::string_view path)
|
||||
AZ_POP_DISABLE_WARNING
|
||||
{
|
||||
// The AssetUtils only updates the following keys in the registry
|
||||
// Dump them all out to the setreg file
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include <ProjectUtils.h>
|
||||
#include <ProjectManagerDefs.h>
|
||||
#include <QProcessEnvironment>
|
||||
#include <QDir>
|
||||
|
||||
namespace O3DE::ProjectManager
|
||||
{
|
||||
@@ -18,7 +19,10 @@ namespace O3DE::ProjectManager
|
||||
|
||||
AZ::Outcome<QProcessEnvironment, QString> GetCommandLineProcessEnvironment()
|
||||
{
|
||||
return AZ::Success(QProcessEnvironment(QProcessEnvironment::systemEnvironment()));
|
||||
QProcessEnvironment currentEnvironment(QProcessEnvironment::systemEnvironment());
|
||||
currentEnvironment.insert("CC", "clang-12");
|
||||
currentEnvironment.insert("CXX", "clang++-12");
|
||||
return AZ::Success(currentEnvironment);
|
||||
}
|
||||
|
||||
AZ::Outcome<QString, QString> FindSupportedCompilerForPlatform()
|
||||
@@ -27,7 +31,7 @@ namespace O3DE::ProjectManager
|
||||
auto whichCMakeResult = ProjectUtils::ExecuteCommandResult("which", QStringList{ProjectCMakeCommand}, QProcessEnvironment::systemEnvironment());
|
||||
if (!whichCMakeResult.IsSuccess())
|
||||
{
|
||||
return AZ::Failure(QObject::tr("CMake not found. \n\n"
|
||||
return AZ::Failure(QObject::tr("CMake not found. <br><br>"
|
||||
"Make sure that the minimum version of CMake is installed and available from the command prompt. "
|
||||
"Refer to the <a href='https://o3de.org/docs/welcome-guide/setup/requirements/#cmake'>O3DE requirements</a> page for more information."));
|
||||
}
|
||||
@@ -45,10 +49,42 @@ namespace O3DE::ProjectManager
|
||||
return AZ::Success(supportClangCommand);
|
||||
}
|
||||
}
|
||||
return AZ::Failure(QObject::tr("Clang not found. \n\n"
|
||||
return AZ::Failure(QObject::tr("Clang not found. <br><br>"
|
||||
"Make sure that the clang is installed and available from the command prompt. "
|
||||
"Refer to the <a href='https://o3de.org/docs/welcome-guide/setup/requirements/#cmake'>O3DE requirements</a> page for more information."));
|
||||
}
|
||||
|
||||
|
||||
AZ::Outcome<void, QString> OpenCMakeGUI(const QString& projectPath)
|
||||
{
|
||||
AZ::Outcome processEnvResult = GetCommandLineProcessEnvironment();
|
||||
if (!processEnvResult.IsSuccess())
|
||||
{
|
||||
return AZ::Failure(processEnvResult.GetError());
|
||||
}
|
||||
|
||||
QString projectBuildPath = QDir(projectPath).filePath(ProjectBuildPathPostfix);
|
||||
AZ::Outcome projectBuildPathResult = GetProjectBuildPath(projectPath);
|
||||
if (projectBuildPathResult.IsSuccess())
|
||||
{
|
||||
projectBuildPath = projectBuildPathResult.GetValue();
|
||||
}
|
||||
|
||||
QProcess process;
|
||||
process.setProcessEnvironment(processEnvResult.GetValue());
|
||||
|
||||
// if the project build path is relative, it should be relative to the project path
|
||||
process.setWorkingDirectory(projectPath);
|
||||
|
||||
process.setProgram("cmake-gui");
|
||||
process.setArguments({ "-S", projectPath, "-B", projectBuildPath });
|
||||
if(!process.startDetached())
|
||||
{
|
||||
return AZ::Failure(QObject::tr("Failed to start CMake GUI"));
|
||||
}
|
||||
|
||||
return AZ::Success();
|
||||
}
|
||||
|
||||
} // namespace ProjectUtils
|
||||
} // namespace O3DE::ProjectManager
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include <ProjectUtils.h>
|
||||
|
||||
#include <QProcess>
|
||||
#include <QStandardPaths>
|
||||
|
||||
namespace O3DE::ProjectManager
|
||||
{
|
||||
@@ -61,5 +62,37 @@ namespace O3DE::ProjectManager
|
||||
|
||||
return AZ::Success(xcodeBuilderVersionNumber);
|
||||
}
|
||||
|
||||
AZ::Outcome<void, QString> OpenCMakeGUI(const QString& projectPath)
|
||||
{
|
||||
const QString cmakeHelp = QObject::tr("Please verify you've installed CMake.app from "
|
||||
"<a href=\"https://cmake.org\">cmake.org</a> or, if using HomeBrew, "
|
||||
"have installed it with <pre>brew install --cask cmake</pre>");
|
||||
QString cmakeAppPath = QStandardPaths::locate(QStandardPaths::ApplicationsLocation, "CMake.app", QStandardPaths::LocateDirectory);
|
||||
if (cmakeAppPath.isEmpty())
|
||||
{
|
||||
return AZ::Failure(QObject::tr("CMake.app not found.") + cmakeHelp);
|
||||
}
|
||||
|
||||
QString projectBuildPath = QDir(projectPath).filePath(ProjectBuildPathPostfix);
|
||||
AZ::Outcome result = GetProjectBuildPath(projectPath);
|
||||
if (result.IsSuccess())
|
||||
{
|
||||
projectBuildPath = result.GetValue();
|
||||
}
|
||||
|
||||
QProcess process;
|
||||
|
||||
// if the project build path is relative, it should be relative to the project path
|
||||
process.setWorkingDirectory(projectPath);
|
||||
process.setProgram("open");
|
||||
process.setArguments({"-a", "CMake", "--args", "-S", projectPath, "-B", projectBuildPath});
|
||||
if(!process.startDetached())
|
||||
{
|
||||
return AZ::Failure(QObject::tr("CMake.app failed to open.") + cmakeHelp);
|
||||
}
|
||||
|
||||
return AZ::Success();
|
||||
}
|
||||
} // namespace ProjectUtils
|
||||
} // namespace O3DE::ProjectManager
|
||||
|
||||
@@ -92,12 +92,43 @@ namespace O3DE::ProjectManager
|
||||
}
|
||||
}
|
||||
|
||||
return AZ::Failure(QObject::tr("Visual Studio 2019 version 16.9.2 or higher not found.\n\n"
|
||||
return AZ::Failure(QObject::tr("Visual Studio 2019 version 16.9.2 or higher not found.<br><br>"
|
||||
"Visual Studio 2019 is required to build this project."
|
||||
" Install any edition of <a href='https://visualstudio.microsoft.com/downloads/'>Visual Studio 2019</a>"
|
||||
" or update to a newer version before proceeding to the next step."
|
||||
" While installing configure Visual Studio with these <a href='https://o3de.org/docs/welcome-guide/setup/requirements/#visual-studio-configuration'>workloads</a>."));
|
||||
}
|
||||
|
||||
AZ::Outcome<void, QString> OpenCMakeGUI(const QString& projectPath)
|
||||
{
|
||||
AZ::Outcome processEnvResult = GetCommandLineProcessEnvironment();
|
||||
if (!processEnvResult.IsSuccess())
|
||||
{
|
||||
return AZ::Failure(processEnvResult.GetError());
|
||||
}
|
||||
|
||||
QString projectBuildPath = QDir(projectPath).filePath(ProjectBuildPathPostfix);
|
||||
AZ::Outcome projectBuildPathResult = GetProjectBuildPath(projectPath);
|
||||
if (projectBuildPathResult.IsSuccess())
|
||||
{
|
||||
projectBuildPath = projectBuildPathResult.GetValue();
|
||||
}
|
||||
|
||||
QProcess process;
|
||||
process.setProcessEnvironment(processEnvResult.GetValue());
|
||||
|
||||
// if the project build path is relative, it should be relative to the project path
|
||||
process.setWorkingDirectory(projectPath);
|
||||
|
||||
process.setProgram("cmake-gui");
|
||||
process.setArguments({ "-S", projectPath, "-B", projectBuildPath });
|
||||
if(!process.startDetached())
|
||||
{
|
||||
return AZ::Failure(QObject::tr("Failed to start CMake GUI"));
|
||||
}
|
||||
|
||||
return AZ::Success();
|
||||
}
|
||||
|
||||
} // namespace ProjectUtils
|
||||
} // namespace O3DE::ProjectManager
|
||||
|
||||
@@ -438,6 +438,11 @@ QTabBar::tab:focus {
|
||||
max-height:26px;
|
||||
}
|
||||
|
||||
#projectActionButton, #openEditorButton {
|
||||
min-height:26px;
|
||||
max-height:26px;
|
||||
}
|
||||
|
||||
#labelButtonOverlay {
|
||||
background-color: rgba(50,50,50,200);
|
||||
min-width:210px;
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect width="24" height="24" fill="#444444"/>
|
||||
<rect x="10" y="6" width="4" height="15" fill="black"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M12 2L22 22H2L12 2ZM13 20V18H11V20H13ZM13 7H11V16.0862H13V7Z" fill="#F0C32D"/>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 333 B After Width: | Height: | Size: 287 B |
@@ -88,6 +88,7 @@ namespace O3DE::ProjectManager
|
||||
QHBoxLayout* horizontalButtonLayout = new QHBoxLayout();
|
||||
horizontalButtonLayout->addSpacing(34);
|
||||
m_actionButton = new QPushButton(tr("Project Action"), this);
|
||||
m_actionButton->setObjectName("projectActionButton");
|
||||
m_actionButton->setVisible(false);
|
||||
horizontalButtonLayout->addWidget(m_actionButton);
|
||||
horizontalButtonLayout->addSpacing(34);
|
||||
@@ -198,6 +199,7 @@ namespace O3DE::ProjectManager
|
||||
QMenu* menu = new QMenu(this);
|
||||
menu->addAction(tr("Edit Project Settings..."), this, [this]() { emit EditProject(m_projectInfo.m_path); });
|
||||
menu->addAction(tr("Build"), this, [this]() { emit BuildProject(m_projectInfo); });
|
||||
menu->addAction(tr("Open CMake GUI..."), this, [this]() { emit OpenCMakeGUI(m_projectInfo); });
|
||||
menu->addSeparator();
|
||||
menu->addAction(tr("Open Project folder..."), this, [this]()
|
||||
{
|
||||
@@ -259,15 +261,39 @@ namespace O3DE::ProjectManager
|
||||
}
|
||||
|
||||
projectActionButton->setText(text);
|
||||
projectActionButton->setMenu(nullptr);
|
||||
m_actionButtonConnection = connect(projectActionButton, &QPushButton::clicked, lambda);
|
||||
}
|
||||
|
||||
void ProjectButton::SetProjectBuildButtonAction()
|
||||
void ProjectButton::ShowDefaultBuildButton()
|
||||
{
|
||||
m_projectImageLabel->GetWarningLabel()->setText(tr("Building project required."));
|
||||
m_projectImageLabel->GetWarningIcon()->setVisible(true);
|
||||
m_projectImageLabel->GetWarningLabel()->setVisible(true);
|
||||
SetProjectButtonAction(tr("Build Project"), [this]() { emit BuildProject(m_projectInfo); });
|
||||
QPushButton* projectActionButton = m_projectImageLabel->GetActionButton();
|
||||
projectActionButton->setVisible(true);
|
||||
projectActionButton->setText(tr("Build Project"));
|
||||
disconnect(m_actionButtonConnection);
|
||||
|
||||
QMenu* menu = new QMenu(this);
|
||||
QAction* autoBuildAction = menu->addAction(tr("Build Now"));
|
||||
connect( autoBuildAction, &QAction::triggered, this, [this](){ emit BuildProject(m_projectInfo); });
|
||||
|
||||
QAction* openCMakeAction = menu->addAction(tr("Open CMake GUI..."));
|
||||
connect( openCMakeAction, &QAction::triggered, this, [this](){ emit OpenCMakeGUI(m_projectInfo); });
|
||||
|
||||
projectActionButton->setMenu(menu);
|
||||
}
|
||||
|
||||
void ProjectButton::ShowBuildRequired()
|
||||
{
|
||||
ShowWarning(true, tr("Building project required"));
|
||||
ShowDefaultBuildButton();
|
||||
}
|
||||
|
||||
void ProjectButton::ShowWarning(bool show, const QString& warning)
|
||||
{
|
||||
m_projectImageLabel->GetWarningLabel()->setTextInteractionFlags(Qt::LinksAccessibleByMouse);
|
||||
m_projectImageLabel->GetWarningLabel()->setText(warning);
|
||||
m_projectImageLabel->GetWarningLabel()->setVisible(show);
|
||||
m_projectImageLabel->GetWarningIcon()->setVisible(show);
|
||||
}
|
||||
|
||||
void ProjectButton::SetBuildLogsLink(const QUrl& logUrl)
|
||||
@@ -279,18 +305,15 @@ namespace O3DE::ProjectManager
|
||||
{
|
||||
if (!logUrl.isEmpty())
|
||||
{
|
||||
m_projectImageLabel->GetWarningLabel()->setText(tr("Failed to build. Click to <a href=\"logs\">view logs</a>."));
|
||||
ShowWarning(show, tr("Failed to build. Click to <a href=\"logs\">view logs</a>."));
|
||||
}
|
||||
else
|
||||
{
|
||||
m_projectImageLabel->GetWarningLabel()->setText(tr("Project failed to build."));
|
||||
ShowWarning(show, tr("Project failed to build."));
|
||||
}
|
||||
|
||||
m_projectImageLabel->GetWarningLabel()->setTextInteractionFlags(Qt::LinksAccessibleByMouse);
|
||||
m_projectImageLabel->GetWarningIcon()->setVisible(show);
|
||||
m_projectImageLabel->GetWarningLabel()->setVisible(show);
|
||||
m_projectImageLabel->SetLogUrl(logUrl);
|
||||
SetProjectButtonAction(tr("Build Project"), [this]() { emit BuildProject(m_projectInfo); });
|
||||
SetBuildLogsLink(logUrl);
|
||||
ShowDefaultBuildButton();
|
||||
}
|
||||
|
||||
void ProjectButton::SetProjectBuilding()
|
||||
|
||||
@@ -82,9 +82,9 @@ namespace O3DE::ProjectManager
|
||||
void RestoreDefaultState();
|
||||
|
||||
void SetProjectButtonAction(const QString& text, AZStd::function<void()> lambda);
|
||||
void SetProjectBuildButtonAction();
|
||||
void SetBuildLogsLink(const QUrl& logUrl);
|
||||
void ShowBuildFailed(bool show, const QUrl& logUrl);
|
||||
void ShowBuildRequired();
|
||||
void SetProjectBuilding();
|
||||
|
||||
void SetLaunchButtonEnabled(bool enabled);
|
||||
@@ -99,10 +99,13 @@ namespace O3DE::ProjectManager
|
||||
void RemoveProject(const QString& projectName);
|
||||
void DeleteProject(const QString& projectName);
|
||||
void BuildProject(const ProjectInfo& projectInfo);
|
||||
void OpenCMakeGUI(const ProjectInfo& projectInfo);
|
||||
|
||||
private:
|
||||
void enterEvent(QEvent* event) override;
|
||||
void leaveEvent(QEvent* event) override;
|
||||
void ShowWarning(bool show, const QString& warning);
|
||||
void ShowDefaultBuildButton();
|
||||
|
||||
ProjectInfo m_projectInfo;
|
||||
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
#include <ProjectUtils.h>
|
||||
#include <ProjectManagerDefs.h>
|
||||
#include <PythonBindingsInterface.h>
|
||||
#include <AzCore/Settings/SettingsRegistryMergeUtils.h>
|
||||
#include <AzCore/IO/Path/Path.h>
|
||||
|
||||
#include <QFileDialog>
|
||||
#include <QDir>
|
||||
@@ -537,5 +539,33 @@ namespace O3DE::ProjectManager
|
||||
QString resultOutput = execProcess.readAllStandardOutput();
|
||||
return AZ::Success(resultOutput);
|
||||
}
|
||||
|
||||
AZ::Outcome<QString, QString> GetProjectBuildPath(const QString& projectPath)
|
||||
{
|
||||
auto registry = AZ::SettingsRegistry::Get();
|
||||
|
||||
// the project_build_path should be in the user settings registry inside the project folder
|
||||
AZ::IO::FixedMaxPath projectUserPath(projectPath.toUtf8().constData());
|
||||
projectUserPath /= AZ::SettingsRegistryInterface::DevUserRegistryFolder;
|
||||
if (!QDir(projectUserPath.c_str()).exists())
|
||||
{
|
||||
return AZ::Failure(QObject::tr("Failed to find the user registry folder %1").arg(projectUserPath.c_str()));
|
||||
}
|
||||
|
||||
AZ::SettingsRegistryInterface::Specializations specializations;
|
||||
if(!registry->MergeSettingsFolder(projectUserPath.Native(), specializations, AZ_TRAIT_OS_PLATFORM_CODENAME))
|
||||
{
|
||||
return AZ::Failure(QObject::tr("Failed to merge registry settings in user registry folder %1").arg(projectUserPath.c_str()));
|
||||
}
|
||||
|
||||
AZ::IO::FixedMaxPath projectBuildPath;
|
||||
if (!registry->Get(projectBuildPath.Native(), AZ::SettingsRegistryMergeUtils::ProjectBuildPath))
|
||||
{
|
||||
return AZ::Failure(QObject::tr("No project build path setting was found in the user registry folder %1").arg(projectUserPath.c_str()));
|
||||
}
|
||||
|
||||
return AZ::Success(QString(projectBuildPath.c_str()));
|
||||
}
|
||||
|
||||
} // namespace ProjectUtils
|
||||
} // namespace O3DE::ProjectManager
|
||||
|
||||
@@ -42,6 +42,8 @@ namespace O3DE::ProjectManager
|
||||
int commandTimeoutSeconds = ProjectCommandLineTimeoutSeconds);
|
||||
|
||||
AZ::Outcome<QProcessEnvironment, QString> GetCommandLineProcessEnvironment();
|
||||
AZ::Outcome<QString, QString> GetProjectBuildPath(const QString& projectPath);
|
||||
AZ::Outcome<void, QString> OpenCMakeGUI(const QString& projectPath);
|
||||
|
||||
} // namespace ProjectUtils
|
||||
} // namespace O3DE::ProjectManager
|
||||
|
||||
@@ -185,6 +185,15 @@ namespace O3DE::ProjectManager
|
||||
connect(projectButton, &ProjectButton::RemoveProject, this, &ProjectsScreen::HandleRemoveProject);
|
||||
connect(projectButton, &ProjectButton::DeleteProject, this, &ProjectsScreen::HandleDeleteProject);
|
||||
connect(projectButton, &ProjectButton::BuildProject, this, &ProjectsScreen::QueueBuildProject);
|
||||
connect(projectButton, &ProjectButton::OpenCMakeGUI, this,
|
||||
[this](const ProjectInfo& projectInfo)
|
||||
{
|
||||
AZ::Outcome result = ProjectUtils::OpenCMakeGUI(projectInfo.m_path);
|
||||
if (!result)
|
||||
{
|
||||
QMessageBox::critical(this, tr("Failed to open CMake GUI"), result.GetError(), QMessageBox::Ok);
|
||||
}
|
||||
});
|
||||
|
||||
return projectButton;
|
||||
}
|
||||
@@ -308,7 +317,7 @@ namespace O3DE::ProjectManager
|
||||
}
|
||||
else
|
||||
{
|
||||
projectIter.value()->SetProjectBuildButtonAction();
|
||||
projectIter.value()->ShowBuildRequired();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ void SRemoteThreadedObject::Start(const char* name)
|
||||
desc.m_name = name;
|
||||
|
||||
auto function = AZStd::bind(&SRemoteThreadedObject::ThreadFunction, this);
|
||||
m_thread = AZStd::thread(function, &desc);
|
||||
m_thread = AZStd::thread(desc, function);
|
||||
}
|
||||
|
||||
void SRemoteThreadedObject::WaitForThread()
|
||||
|
||||
@@ -558,7 +558,7 @@ namespace AZ
|
||||
AZStd::string instanceAlias = GetInstanceAlias(instance);
|
||||
|
||||
// Create a new unmodified prefab Instance for the nested slice instance.
|
||||
auto nestedInstance = AZStd::make_unique<AzToolsFramework::Prefab::Instance>();
|
||||
auto nestedInstance = AZStd::make_unique<AzToolsFramework::Prefab::Instance>(AZStd::move(instanceAlias));
|
||||
AzToolsFramework::Prefab::Instance::EntityList newEntities;
|
||||
if (!AzToolsFramework::Prefab::PrefabDomUtils::LoadInstanceFromPrefabDom(
|
||||
*nestedInstance, newEntities, nestedTemplate->get().GetPrefabDom()))
|
||||
@@ -742,7 +742,7 @@ namespace AZ
|
||||
instanceToTemplateInterface->GenerateDomForInstance(topLevelInstanceDomBefore, *topLevelInstance);
|
||||
|
||||
// Use the deterministic instance alias for this new instance
|
||||
AzToolsFramework::Prefab::Instance& addedInstance = topLevelInstance->AddInstance(AZStd::move(nestedInstance), instanceAlias);
|
||||
AzToolsFramework::Prefab::Instance& addedInstance = topLevelInstance->AddInstance(AZStd::move(nestedInstance));
|
||||
|
||||
AzToolsFramework::Prefab::PrefabDom topLevelInstanceDomAfter;
|
||||
instanceToTemplateInterface->GenerateDomForInstance(topLevelInstanceDomAfter, *topLevelInstance);
|
||||
|
||||
+6
-2
@@ -64,9 +64,11 @@ namespace TestImpact
|
||||
return !name.starts_with("DISABLED_") && name.find("/DISABLED_") == AZStd::string::npos;
|
||||
};
|
||||
|
||||
AZ_PUSH_DISABLE_WARNING(5233, "-Wunknown-warning-option") // Older versions of MSVC toolchain require to pass constexpr
|
||||
// in the capture. Newer versions issue unused warning
|
||||
const auto getDuration = [Keys](const AZ::rapidxml::xml_node<>* node)
|
||||
AZ_POP_DISABLE_WARNING
|
||||
{
|
||||
AZ_UNUSED(Keys);
|
||||
const AZStd::string duration = node->first_attribute(Keys[DurationKey])->value();
|
||||
return AZStd::chrono::milliseconds(static_cast<AZStd::sys_time_t>(AZStd::stof(duration) * 1000.f));
|
||||
};
|
||||
@@ -79,9 +81,11 @@ namespace TestImpact
|
||||
for (auto testcase_node = testsuite_node->first_node(Keys[TestCaseKey]); testcase_node;
|
||||
testcase_node = testcase_node->next_sibling())
|
||||
{
|
||||
AZ_PUSH_DISABLE_WARNING(5233, "-Wunknown-warning-option") // Older versions of MSVC toolchain require to pass constexpr in the capture.
|
||||
// Newer versions issue unused warning
|
||||
const auto getStatus = [Keys](const AZ::rapidxml::xml_node<>* node)
|
||||
AZ_POP_DISABLE_WARNING
|
||||
{
|
||||
AZ_UNUSED(Keys);
|
||||
const AZStd::string status = node->first_attribute(Keys[StatusKey])->value();
|
||||
if (status == Keys[RunKey])
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user