The enable-gem command registers gem with project if not registered (#2817)

* The enable_gems command now registers the gem with the project if only registered with o3de_manifest.json

Updated the `enable_gems` command to register the gem with the project if the gem is not registered with either the project or the engine being used.
This allows the gem to be added to the build system if it wasn't registered before.

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Adding quoting around the invocation of the OpenProjectManager command

The --project-path parameter now is able to pass in a path with spaces
to the invocation of the Project Manager.

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
This commit is contained in:
lumberyard-employee-dm
2021-08-04 13:13:28 -05:00
committed by GitHub
parent 52e9083b9d
commit 21ca3a4aea
6 changed files with 183 additions and 23 deletions
+8 -1
View File
@@ -2901,7 +2901,14 @@ void CCryEditApp::OpenProjectManager(const AZStd::string& screen)
{
// provide the current project path for in case we want to update the project
AZ::IO::FixedMaxPathString projectPath = AZ::Utils::GetProjectPath();
const AZStd::string commandLineOptions = AZStd::string::format(" --screen %s --project-path %s", screen.c_str(), projectPath.c_str());
#if !AZ_TRAIT_OS_PLATFORM_APPLE && !AZ_TRAIT_OS_USE_WINDOWS_FILE_PATHS
const char* argumentQuoteString = R"(")";
#else
const char* argumentQuoteString = R"(\")";
#endif
const AZStd::string commandLineOptions = AZStd::string::format(R"( --screen %s --project-path %s%s%s)",
screen.c_str(),
argumentQuoteString, projectPath.c_str(), argumentQuoteString);
bool launchSuccess = AzFramework::ProjectManager::LaunchProjectManager(commandLineOptions);
if (!launchSuccess)
{