PR feedback - now allows for multiple specializations on the command-line, and changed the switch name to "specializations" to reflect that.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -23,7 +23,8 @@ void PrintHelp()
|
||||
AZ_Printf("Help", "Serialize Context Tool\n");
|
||||
AZ_Printf("Help", " <action> [-config] <action arguments>*\n");
|
||||
AZ_Printf("Help", " [opt] -config=<path>: optional path to application's config file. Default is 'config/editor.xml'.\n");
|
||||
AZ_Printf("Help", " [opt] -specialization=<prefix>: optional Registry project specialization, such as 'editor' or 'game'. Default is none. \n");
|
||||
AZ_Printf("Help", " [opt] -specializations=<prefix>: <comma or semicolon>-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");
|
||||
|
||||
Reference in New Issue
Block a user