mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-14 08:47:57 -05:00
Update ZCG new console output
This commit is contained in:
@ -88,6 +88,7 @@ bool CodeGenerator::GenerateCode(IDataRepository* repository)
|
||||
assets.push_back(info);
|
||||
}
|
||||
|
||||
const auto start = std::chrono::steady_clock::now();
|
||||
for (const auto& generationTask : m_args->m_generation_tasks)
|
||||
{
|
||||
auto templateName = generationTask.m_template_name;
|
||||
@ -107,7 +108,12 @@ bool CodeGenerator::GenerateCode(IDataRepository* repository)
|
||||
{
|
||||
auto context = RenderingContext::BuildContext(repository, asset);
|
||||
if (!GenerateCodeForTemplate(context.get(), foundTemplate->second.get()))
|
||||
{
|
||||
std::cout << "Failed to generate code for asset '" << asset->m_definition->GetFullName() << "' with preset '" << foundTemplate->first << "'\n";
|
||||
return false;
|
||||
}
|
||||
|
||||
std::cout << "Successfully generated code for asset '" << asset->m_definition->GetFullName() << "' with preset '" << foundTemplate->first << "'\n";
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -121,6 +127,11 @@ bool CodeGenerator::GenerateCode(IDataRepository* repository)
|
||||
return false;
|
||||
}
|
||||
}
|
||||
const auto end = std::chrono::steady_clock::now();
|
||||
if (m_args->m_verbose)
|
||||
{
|
||||
std::cout << "Generating code took " << std::chrono::duration_cast<std::chrono::milliseconds>(end - start).count() << "ms" << std::endl;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user