From ae9b36c135ac17d1e3a22e626084b4a4e359717e Mon Sep 17 00:00:00 2001 From: mbalfour Date: Wed, 12 May 2021 08:56:49 -0500 Subject: [PATCH] PR feedback - now allows for multiple specializations on the command-line, and changed the switch name to "specializations" to reflect that. --- Code/Tools/SerializeContextTools/Application.cpp | 8 +++++--- Code/Tools/SerializeContextTools/main.cpp | 3 ++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Code/Tools/SerializeContextTools/Application.cpp b/Code/Tools/SerializeContextTools/Application.cpp index 72e68ebb1e..da0cca5ca6 100644 --- a/Code/Tools/SerializeContextTools/Application.cpp +++ b/Code/Tools/SerializeContextTools/Application.cpp @@ -64,10 +64,12 @@ namespace AZ AZ::SettingsRegistryInterface::Specializations projectSpecializations{ projectName }; // If a project specialization has been passed in via the command line, use it. - if (m_commandLine.HasSwitch("specialization")) + if (size_t specializationCount = m_commandLine.GetNumSwitchValues("specializations"); specializationCount > 0) { - AZStd::string specialization = m_commandLine.GetSwitchValue("specialization", 0); - projectSpecializations.Append(specialization); + for (size_t specializationIndex = 0; specializationIndex < specializationCount; ++specializationIndex) + { + projectSpecializations.Append(m_commandLine.GetSwitchValue("specializations", specializationIndex)); + } } // Otherwise, if a config file was passed in, auto-set the specialization based on the config file name. else diff --git a/Code/Tools/SerializeContextTools/main.cpp b/Code/Tools/SerializeContextTools/main.cpp index 4bff597d81..fb2dc442ed 100644 --- a/Code/Tools/SerializeContextTools/main.cpp +++ b/Code/Tools/SerializeContextTools/main.cpp @@ -23,7 +23,8 @@ void PrintHelp() AZ_Printf("Help", "Serialize Context Tool\n"); AZ_Printf("Help", " [-config] *\n"); AZ_Printf("Help", " [opt] -config=: optional path to application's config file. Default is 'config/editor.xml'.\n"); - AZ_Printf("Help", " [opt] -specialization=: optional Registry project specialization, such as 'editor' or 'game'. Default is none. \n"); + AZ_Printf("Help", " [opt] -specializations=: -separated list of optional Registry project\n"); + AZ_Printf("Help", " specializations, such as 'editor' or 'game' or 'editor;test'. Default is none. \n"); AZ_Printf("Help", "\n"); AZ_Printf("Help", " 'help': Print this help\n"); AZ_Printf("Help", " example: 'help'\n");