LYN-2537 AssetBundler updates (#426)
* LYN-2537 Updated the AssetBundler code to looks for the AssetSeedList files within the Assets/Engine directory Updated the MissingDependencyScanner GetXMLDependenciesFile functions to use the Assets/Engine directory as well Also fixed the MissingDependencyScanner to properly located dependency xml files within gem directories * Adding back input argument validation for the AssetBundler command options. Also added an application_options settings registry file that contains the list of valid command options for the ComponentApplication * Adding missing end of file newline for applications_options.setreg * Fixed the AssetBundler help output for the bundleSeed command
This commit is contained in:
committed by
GitHub
parent
15c2203e01
commit
bcbe1bfef7
@@ -20,30 +20,32 @@ AZ_POP_DISABLE_WARNING
|
||||
#include "native/AssetDatabase/AssetDatabase.h"
|
||||
#include "native/assetprocessor.h"
|
||||
#include <AzCore/Component/TickBus.h>
|
||||
#include <AzCore/IO/FileIO.h>
|
||||
#include <AzCore/IO/Path/Path.h>
|
||||
#include <AzCore/std/smart_ptr/make_shared.h>
|
||||
#include <AzCore/std/smart_ptr/shared_ptr.h>
|
||||
#include <AzCore/std/string/wildcard.h>
|
||||
#include <AzCore/Utils/Utils.h>
|
||||
#include <AzCore/XML/rapidxml.h>
|
||||
#include <AzFramework/API/ApplicationAPI.h>
|
||||
#include <AzFramework/FileTag/FileTag.h>
|
||||
#include <AzFramework/FileTag/FileTagBus.h>
|
||||
#include <AzFramework/IO/LocalFileIO.h>
|
||||
|
||||
namespace AssetProcessor
|
||||
{
|
||||
const char* EngineFolder = "Engine";
|
||||
constexpr auto EngineFolder = AZ::IO::FixedMaxPath("Assets") / "Engine";
|
||||
|
||||
AZStd::string GetXMLDependenciesFile(const AZStd::string& fullPath, const AZStd::vector<AzFramework::GemInfo>& gemInfoList, AZStd::string& tokenName)
|
||||
{
|
||||
AZ::IO::Path xmlDependenciesFileFullPath;
|
||||
tokenName = EngineFolder;
|
||||
tokenName = EngineFolder.String();
|
||||
for (const AzFramework::GemInfo& gemElement : gemInfoList)
|
||||
{
|
||||
for (const AZ::IO::Path& absoluteSourcePath : gemElement.m_absoluteSourcePaths)
|
||||
{
|
||||
if (AZ::StringFunc::StartsWith(fullPath, absoluteSourcePath.Native()) || AZ::StringFunc::Equal(absoluteSourcePath.Native(), fullPath))
|
||||
if (AZ::IO::PathView(fullPath).IsRelativeTo(absoluteSourcePath))
|
||||
{
|
||||
xmlDependenciesFileFullPath = absoluteSourcePath;
|
||||
xmlDependenciesFileFullPath /= AzFramework::GemInfo::GetGemAssetFolder();
|
||||
xmlDependenciesFileFullPath /= AZStd::string::format("%s_Dependencies.xml", gemElement.m_gemName.c_str());;
|
||||
if (AZ::IO::FileIOBase::GetInstance()->Exists(xmlDependenciesFileFullPath.c_str()))
|
||||
@@ -57,7 +59,7 @@ namespace AssetProcessor
|
||||
|
||||
// if we are here than either the %gemName%_Dependencies.xml file does not exists or the user inputted path is not inside a gems folder,
|
||||
// in both the cases we will return the engine dependencies file
|
||||
xmlDependenciesFileFullPath = AZ::IO::FileIOBase::GetInstance()->GetAlias("@devroot@");
|
||||
xmlDependenciesFileFullPath = AZ::Utils::GetEnginePath();
|
||||
xmlDependenciesFileFullPath /= EngineFolder;
|
||||
xmlDependenciesFileFullPath /= "Engine_Dependencies.xml";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user