Integrating github/staging through commit ab87ed9
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
#include <AzCore/Module/ModuleManagerBus.h>
|
||||
#include <AzCore/Slice/SliceSystemComponent.h>
|
||||
#include <AzCore/std/string/conversions.h>
|
||||
#include <AzCore/StringFunc/StringFunc.h>
|
||||
#include <AzCore/UserSettings/UserSettingsComponent.h>
|
||||
#include <AzCore/Utils/Utils.h>
|
||||
|
||||
@@ -31,7 +32,6 @@
|
||||
#include <AzFramework/FileTag/FileTagComponent.h>
|
||||
#include <AzFramework/Input/System/InputSystemComponent.h>
|
||||
#include <AzFramework/Platform/PlatformDefaults.h>
|
||||
#include <AzFramework/StringFunc/StringFunc.h>
|
||||
#include <AzFramework/Components/AzFrameworkConfigurationSystemComponent.h>
|
||||
|
||||
#include <AzToolsFramework/Archive/ArchiveComponent.h>
|
||||
@@ -66,7 +66,7 @@ namespace AssetBundler
|
||||
AzToolsFramework::AssetFileInfoListComparison::Reflect(context);
|
||||
AzToolsFramework::AssetBundleSettings::Reflect(context);
|
||||
|
||||
AZ::IO::FileIOBase* fileIO = AZ::IO::FileIOBase::GetInstance();
|
||||
[[maybe_unused]] AZ::IO::FileIOBase* fileIO = AZ::IO::FileIOBase::GetInstance();
|
||||
AZ_Assert(fileIO != nullptr, "AZ::IO::FileIOBase must be ready for use.\n");
|
||||
|
||||
m_assetSeedManager = AZStd::make_unique<AzToolsFramework::AssetSeedManager>();
|
||||
@@ -86,7 +86,7 @@ namespace AssetBundler
|
||||
|
||||
bool ApplicationManager::Run()
|
||||
{
|
||||
const AzFramework::CommandLine* parser = GetCommandLine();
|
||||
const AZ::CommandLine* parser = GetCommandLine();
|
||||
|
||||
bool shouldPrintHelp = ShouldPrintHelp(parser);
|
||||
|
||||
@@ -196,7 +196,7 @@ namespace AssetBundler
|
||||
// Get Generic Command Info
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
CommandType ApplicationManager::GetCommandType(const AzFramework::CommandLine* parser, [[maybe_unused]] bool suppressErrors)
|
||||
CommandType ApplicationManager::GetCommandType(const AZ::CommandLine* parser, [[maybe_unused]] bool suppressErrors)
|
||||
{
|
||||
// Verify that the user has only typed in one sub-command
|
||||
size_t numMiscValues = parser->GetNumMiscValues();
|
||||
@@ -247,12 +247,12 @@ namespace AssetBundler
|
||||
}
|
||||
}
|
||||
|
||||
bool ApplicationManager::ShouldPrintHelp(const AzFramework::CommandLine* parser)
|
||||
bool ApplicationManager::ShouldPrintHelp(const AZ::CommandLine* parser)
|
||||
{
|
||||
return parser->HasSwitch(AssetBundler::HelpFlag) || parser->HasSwitch(AssetBundler::HelpFlagAlias);
|
||||
}
|
||||
|
||||
bool ApplicationManager::ShouldPrintVerbose(const AzFramework::CommandLine* parser)
|
||||
bool ApplicationManager::ShouldPrintVerbose(const AZ::CommandLine* parser)
|
||||
{
|
||||
return parser->HasSwitch(AssetBundler::VerboseFlag);
|
||||
}
|
||||
@@ -368,17 +368,10 @@ namespace AssetBundler
|
||||
// Store Detailed Command Info
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
AZ::Outcome<SeedsParams, AZStd::string> ApplicationManager::ParseSeedsCommandData(const AzFramework::CommandLine* parser)
|
||||
AZ::Outcome<SeedsParams, AZStd::string> ApplicationManager::ParseSeedsCommandData(const AZ::CommandLine* parser)
|
||||
{
|
||||
using namespace AzToolsFramework;
|
||||
|
||||
auto validateArgsOutcome = ValidateInputArgs(parser, m_allSeedsArgs);
|
||||
if (!validateArgsOutcome.IsSuccess())
|
||||
{
|
||||
OutputHelpSeeds();
|
||||
return AZ::Failure(validateArgsOutcome.TakeError());
|
||||
}
|
||||
|
||||
SeedsParams params;
|
||||
|
||||
params.m_ignoreFileCase = parser->HasSwitch(IgnoreFileCaseFlag);
|
||||
@@ -467,15 +460,8 @@ namespace AssetBundler
|
||||
return AZStd::string::format(FailureMessage, arg1, arg2);
|
||||
}
|
||||
|
||||
AZ::Outcome<AssetListsParams, AZStd::string> ApplicationManager::ParseAssetListsCommandData(const AzFramework::CommandLine* parser)
|
||||
AZ::Outcome<AssetListsParams, AZStd::string> ApplicationManager::ParseAssetListsCommandData(const AZ::CommandLine* parser)
|
||||
{
|
||||
auto validateArgsOutcome = ValidateInputArgs(parser, m_allAssetListsArgs);
|
||||
if (!validateArgsOutcome.IsSuccess())
|
||||
{
|
||||
OutputHelpAssetLists();
|
||||
return AZ::Failure(validateArgsOutcome.TakeError());
|
||||
}
|
||||
|
||||
AssetListsParams params;
|
||||
|
||||
// Read in Platform arg
|
||||
@@ -537,15 +523,8 @@ namespace AssetBundler
|
||||
return AZ::Success(params);
|
||||
}
|
||||
|
||||
AZ::Outcome<ComparisonRulesParams, AZStd::string> ApplicationManager::ParseComparisonRulesCommandData(const AzFramework::CommandLine* parser)
|
||||
AZ::Outcome<ComparisonRulesParams, AZStd::string> ApplicationManager::ParseComparisonRulesCommandData(const AZ::CommandLine* parser)
|
||||
{
|
||||
auto validateArgsOutcome = ValidateInputArgs(parser, m_allComparisonRulesArgs);
|
||||
if (!validateArgsOutcome.IsSuccess())
|
||||
{
|
||||
OutputHelpComparisonRules();
|
||||
return AZ::Failure(validateArgsOutcome.TakeError());
|
||||
}
|
||||
|
||||
ScopedTraceHandler traceHandler;
|
||||
ComparisonRulesParams params;
|
||||
|
||||
@@ -572,7 +551,7 @@ namespace AssetBundler
|
||||
break;
|
||||
case 1:
|
||||
params.m_comparisonRulesStepAction = ComparisonRulesStepAction::Add;
|
||||
params.m_destinationLine = static_cast<size_t>(AzFramework::StringFunc::ToInt(parser->GetSwitchValue(AddComparisonStepArg, 0).c_str()));
|
||||
params.m_destinationLine = static_cast<size_t>(AZ::StringFunc::ToInt(parser->GetSwitchValue(AddComparisonStepArg, 0).c_str()));
|
||||
break;
|
||||
default:
|
||||
return AZ::Failure(AZStd::string::format("Invalid command: \"--%s\" cannot have more than one input value.", AddComparisonStepArg));
|
||||
@@ -604,7 +583,7 @@ namespace AssetBundler
|
||||
}
|
||||
|
||||
params.m_comparisonRulesStepAction = ComparisonRulesStepAction::Remove;
|
||||
params.m_initialLine = static_cast<size_t>(AzFramework::StringFunc::ToInt(parser->GetSwitchValue(RemoveComparisonStepArg, 0).c_str()));
|
||||
params.m_initialLine = static_cast<size_t>(AZ::StringFunc::ToInt(parser->GetSwitchValue(RemoveComparisonStepArg, 0).c_str()));
|
||||
}
|
||||
|
||||
// Read in Move Comparison Step arg
|
||||
@@ -625,8 +604,8 @@ namespace AssetBundler
|
||||
}
|
||||
|
||||
params.m_comparisonRulesStepAction = ComparisonRulesStepAction::Move;
|
||||
params.m_initialLine = static_cast<size_t>(AzFramework::StringFunc::ToInt(parser->GetSwitchValue(MoveComparisonStepArg, 0).c_str()));
|
||||
params.m_destinationLine = static_cast<size_t>(AzFramework::StringFunc::ToInt(parser->GetSwitchValue(MoveComparisonStepArg, 1).c_str()));
|
||||
params.m_initialLine = static_cast<size_t>(AZ::StringFunc::ToInt(parser->GetSwitchValue(MoveComparisonStepArg, 0).c_str()));
|
||||
params.m_destinationLine = static_cast<size_t>(AZ::StringFunc::ToInt(parser->GetSwitchValue(MoveComparisonStepArg, 1).c_str()));
|
||||
}
|
||||
|
||||
// Read in Edit Comparison Step arg
|
||||
@@ -642,12 +621,12 @@ namespace AssetBundler
|
||||
if (parser->GetNumSwitchValues(EditComparisonStepArg) != 1)
|
||||
{
|
||||
return AZ::Failure(AZStd::string::format(
|
||||
"Invalid command: \"--%s\" requires exatly one input value (the line number of the Comparison Step you wish to edit)",
|
||||
"Invalid command: \"--%s\" requires exactly one input value (the line number of the Comparison Step you wish to edit)",
|
||||
EditComparisonStepArg));
|
||||
}
|
||||
|
||||
params.m_comparisonRulesStepAction = ComparisonRulesStepAction::Edit;
|
||||
params.m_initialLine = static_cast<size_t>(AzFramework::StringFunc::ToInt(parser->GetSwitchValue(EditComparisonStepArg, 0).c_str()));
|
||||
params.m_initialLine = static_cast<size_t>(AZ::StringFunc::ToInt(parser->GetSwitchValue(EditComparisonStepArg, 0).c_str()));
|
||||
|
||||
// When editing a Comparison Step, we can only accept one input for every value type
|
||||
auto parseComparisonTypesForEditOutcome = ParseComparisonTypesAndPatternsForEditCommand(parser, params);
|
||||
@@ -686,7 +665,7 @@ namespace AssetBundler
|
||||
return AZ::Success(params);
|
||||
}
|
||||
|
||||
AZ::Outcome<void, AZStd::string> ApplicationManager::ParseComparisonTypesAndPatterns(const AzFramework::CommandLine* parser, ComparisonRulesParams& params)
|
||||
AZ::Outcome<void, AZStd::string> ApplicationManager::ParseComparisonTypesAndPatterns(const AZ::CommandLine* parser, ComparisonRulesParams& params)
|
||||
{
|
||||
int filePatternsConsumed = 0;
|
||||
size_t numComparisonTypes = parser->GetNumSwitchValues(ComparisonTypeArg);
|
||||
@@ -770,7 +749,7 @@ namespace AssetBundler
|
||||
return AZ::Success();
|
||||
}
|
||||
|
||||
AZ::Outcome<void, AZStd::string> ApplicationManager::ParseComparisonTypesAndPatternsForEditCommand(const AzFramework::CommandLine* parser, ComparisonRulesParams& params)
|
||||
AZ::Outcome<void, AZStd::string> ApplicationManager::ParseComparisonTypesAndPatternsForEditCommand(const AZ::CommandLine* parser, ComparisonRulesParams& params)
|
||||
{
|
||||
if (parser->HasSwitch(ComparisonTypeArg))
|
||||
{
|
||||
@@ -855,7 +834,7 @@ namespace AssetBundler
|
||||
return AZ::Success();
|
||||
}
|
||||
|
||||
AZ::Outcome<void, AZStd::string> ApplicationManager::ParseComparisonRulesFirstAndSecondInputArgs(const AzFramework::CommandLine* parser, ComparisonRulesParams& params)
|
||||
AZ::Outcome<void, AZStd::string> ApplicationManager::ParseComparisonRulesFirstAndSecondInputArgs(const AZ::CommandLine* parser, ComparisonRulesParams& params)
|
||||
{
|
||||
if (params.m_comparisonTypeList.size() > 1 && (parser->HasSwitch(ComparisonFirstInputArg) || parser->HasSwitch(ComparisonSecondInputArg)))
|
||||
{
|
||||
@@ -926,15 +905,8 @@ namespace AssetBundler
|
||||
return AZ::Success();
|
||||
}
|
||||
|
||||
AZ::Outcome<ComparisonParams, AZStd::string> ApplicationManager::ParseCompareCommandData(const AzFramework::CommandLine* parser)
|
||||
AZ::Outcome<ComparisonParams, AZStd::string> ApplicationManager::ParseCompareCommandData(const AZ::CommandLine* parser)
|
||||
{
|
||||
auto validateArgsOutcome = ValidateInputArgs(parser, m_allCompareArgs);
|
||||
if (!validateArgsOutcome.IsSuccess())
|
||||
{
|
||||
OutputHelpCompare();
|
||||
return AZ::Failure(validateArgsOutcome.TakeError());
|
||||
}
|
||||
|
||||
ComparisonParams params;
|
||||
|
||||
// Read in Platform arg
|
||||
@@ -1024,15 +996,8 @@ namespace AssetBundler
|
||||
return AZ::Success(params);
|
||||
}
|
||||
|
||||
AZ::Outcome<BundleSettingsParams, AZStd::string> ApplicationManager::ParseBundleSettingsCommandData(const AzFramework::CommandLine* parser)
|
||||
AZ::Outcome<BundleSettingsParams, AZStd::string> ApplicationManager::ParseBundleSettingsCommandData(const AZ::CommandLine* parser)
|
||||
{
|
||||
auto validateArgsOutcome = ValidateInputArgs(parser, m_allBundleSettingsArgs);
|
||||
if (!validateArgsOutcome.IsSuccess())
|
||||
{
|
||||
OutputHelpBundleSettings();
|
||||
return AZ::Failure(validateArgsOutcome.TakeError());
|
||||
}
|
||||
|
||||
BundleSettingsParams params;
|
||||
|
||||
// Read in Platform arg
|
||||
@@ -1099,7 +1064,7 @@ namespace AssetBundler
|
||||
return AZ::Success(params);
|
||||
}
|
||||
|
||||
AZ::Outcome<BundlesParamsList, AZStd::string> ApplicationManager::ParseBundleSettingsAndOverrides(const AzFramework::CommandLine* parser, const char* commandName)
|
||||
AZ::Outcome<BundlesParamsList, AZStd::string> ApplicationManager::ParseBundleSettingsAndOverrides(const AZ::CommandLine* parser, const char* commandName)
|
||||
{
|
||||
// Read in Bundle Settings File args
|
||||
auto bundleSettingsOutcome = GetArgsList<FilePath>(parser, BundleSettingsFileArg, commandName);
|
||||
@@ -1235,15 +1200,8 @@ namespace AssetBundler
|
||||
return AZ::Success(bundleParamsList);
|
||||
}
|
||||
|
||||
AZ::Outcome<BundlesParamsList, AZStd::string> ApplicationManager::ParseBundlesCommandData(const AzFramework::CommandLine* parser)
|
||||
AZ::Outcome<BundlesParamsList, AZStd::string> ApplicationManager::ParseBundlesCommandData(const AZ::CommandLine* parser)
|
||||
{
|
||||
auto validateArgsOutcome = ValidateInputArgs(parser, m_allBundlesArgs);
|
||||
if (!validateArgsOutcome.IsSuccess())
|
||||
{
|
||||
OutputHelpBundles();
|
||||
return AZ::Failure(validateArgsOutcome.TakeError());
|
||||
}
|
||||
|
||||
auto parseSettingsOutcome = ParseBundleSettingsAndOverrides(parser, BundlesCommand);
|
||||
if (!parseSettingsOutcome.IsSuccess())
|
||||
{
|
||||
@@ -1253,16 +1211,8 @@ namespace AssetBundler
|
||||
return AZ::Success(parseSettingsOutcome.TakeValue());
|
||||
}
|
||||
|
||||
AZ::Outcome<BundleSeedParams, AZStd::string> ApplicationManager::ParseBundleSeedCommandData(const AzFramework::CommandLine* parser)
|
||||
AZ::Outcome<BundleSeedParams, AZStd::string> ApplicationManager::ParseBundleSeedCommandData(const AZ::CommandLine* parser)
|
||||
{
|
||||
|
||||
auto validateArgsOutcome = ValidateInputArgs(parser, m_allBundleSeedArgs);
|
||||
if (!validateArgsOutcome.IsSuccess())
|
||||
{
|
||||
OutputHelpBundles();
|
||||
return AZ::Failure(validateArgsOutcome.TakeError());
|
||||
}
|
||||
|
||||
BundleSeedParams params;
|
||||
|
||||
params.m_addSeedList = GetAddSeedArgList(parser);
|
||||
@@ -1278,7 +1228,7 @@ namespace AssetBundler
|
||||
return AZ::Success(params);
|
||||
}
|
||||
|
||||
AZ::Outcome<void, AZStd::string> ApplicationManager::ValidateInputArgs(const AzFramework::CommandLine* parser, const AZStd::vector<const char*>& validArgList)
|
||||
AZ::Outcome<void, AZStd::string> ApplicationManager::ValidateInputArgs(const AZ::CommandLine* parser, const AZStd::vector<const char*>& validArgList)
|
||||
{
|
||||
for (const auto& paramInfo : *parser)
|
||||
{
|
||||
@@ -1291,7 +1241,7 @@ namespace AssetBundler
|
||||
|
||||
for (const auto& validArg : validArgList)
|
||||
{
|
||||
if (AzFramework::StringFunc::Equal(paramInfo.m_option, validArg))
|
||||
if (AZ::StringFunc::Equal(paramInfo.m_option, validArg))
|
||||
{
|
||||
isValidArg = true;
|
||||
break;
|
||||
@@ -1300,14 +1250,14 @@ namespace AssetBundler
|
||||
|
||||
if (!isValidArg)
|
||||
{
|
||||
return AZ::Failure(AZStd::string::format("Invalid command: \"--%s\" is not a valid argument for this sub-command.", paramInfo.m_option.c_str()));
|
||||
return AZ::Failure(AZStd::string::format("Unknown argument: \"--%s\" is not an unknown argument for this sub-command.", paramInfo.m_option.c_str()));
|
||||
}
|
||||
}
|
||||
|
||||
return AZ::Success();
|
||||
}
|
||||
|
||||
AZ::Outcome<AZStd::string, AZStd::string> ApplicationManager::GetFilePathArg(const AzFramework::CommandLine* parser, const char* argName, const char* subCommandName, bool isRequired)
|
||||
AZ::Outcome<AZStd::string, AZStd::string> ApplicationManager::GetFilePathArg(const AZ::CommandLine* parser, const char* argName, const char* subCommandName, bool isRequired)
|
||||
{
|
||||
if (!parser->HasSwitch(argName))
|
||||
{
|
||||
@@ -1328,7 +1278,7 @@ namespace AssetBundler
|
||||
|
||||
|
||||
template <typename T>
|
||||
AZ::Outcome<AZStd::vector<T>, AZStd::string> ApplicationManager::GetArgsList(const AzFramework::CommandLine* parser, const char* argName, const char* subCommandName, bool isRequired)
|
||||
AZ::Outcome<AZStd::vector<T>, AZStd::string> ApplicationManager::GetArgsList(const AZ::CommandLine* parser, const char* argName, const char* subCommandName, bool isRequired)
|
||||
{
|
||||
AZStd::vector<T> args;
|
||||
|
||||
@@ -1352,7 +1302,7 @@ namespace AssetBundler
|
||||
return AZ::Success(args);
|
||||
}
|
||||
|
||||
AZ::Outcome<AzFramework::PlatformFlags, AZStd::string> ApplicationManager::GetPlatformArg(const AzFramework::CommandLine* parser)
|
||||
AZ::Outcome<AzFramework::PlatformFlags, AZStd::string> ApplicationManager::GetPlatformArg(const AZ::CommandLine* parser)
|
||||
{
|
||||
using namespace AzFramework;
|
||||
PlatformFlags platform = AzFramework::PlatformFlags::Platform_NONE;
|
||||
@@ -1395,7 +1345,7 @@ namespace AssetBundler
|
||||
return platformFlags;
|
||||
}
|
||||
|
||||
AZStd::vector<AZStd::string> ApplicationManager::GetAddSeedArgList(const AzFramework::CommandLine* parser)
|
||||
AZStd::vector<AZStd::string> ApplicationManager::GetAddSeedArgList(const AZ::CommandLine* parser)
|
||||
{
|
||||
AZStd::vector<AZStd::string> addSeedList;
|
||||
size_t numAddSeedArgs = parser->GetNumSwitchValues(AddSeedArg);
|
||||
@@ -1406,7 +1356,7 @@ namespace AssetBundler
|
||||
return addSeedList;
|
||||
}
|
||||
|
||||
AZStd::vector<AZStd::string> ApplicationManager::GetSkipArgList(const AzFramework::CommandLine* parser)
|
||||
AZStd::vector<AZStd::string> ApplicationManager::GetSkipArgList(const AZ::CommandLine* parser)
|
||||
{
|
||||
AZStd::vector<AZStd::string> skipList;
|
||||
size_t numArgs = parser->GetNumSwitchValues(SkipArg);
|
||||
@@ -1920,10 +1870,12 @@ namespace AssetBundler
|
||||
AZStd::vector<AZStd::string> destructiveOverwriteFilePaths = comparisonOperations.GetDestructiveOverwriteFilePaths();
|
||||
if (!destructiveOverwriteFilePaths.empty())
|
||||
{
|
||||
#if defined(AZ_ENABLE_TRACING)
|
||||
for (const AZStd::string& path : destructiveOverwriteFilePaths)
|
||||
{
|
||||
AZ_Error(AssetBundler::AppWindowName, false, "Asset List file ( %s ) already exists, running this command would perform a destructive overwrite.", path.c_str());
|
||||
}
|
||||
#endif
|
||||
AZ_Printf(AssetBundler::AppWindowName, "\nRun your command again with the ( --%s ) arg if you want to save over the existing file.\n\n", AllowOverwritesFlag)
|
||||
hasError = true;
|
||||
continue;
|
||||
@@ -2028,7 +1980,7 @@ namespace AssetBundler
|
||||
AZStd::string assetListFilePath = FilePath(params.m_assetListFile.AbsolutePath(), platformName).AbsolutePath();
|
||||
if (!assetListFilePath.empty())
|
||||
{
|
||||
if (!AzFramework::StringFunc::EndsWith(assetListFilePath, AssetSeedManager::GetAssetListFileExtension()))
|
||||
if (!AZ::StringFunc::EndsWith(assetListFilePath, AssetSeedManager::GetAssetListFileExtension()))
|
||||
{
|
||||
AZ_Error(AppWindowName, false, "Cannot set Asset List file to ( %s ): file extension must be ( %s ).", assetListFilePath.c_str(), AssetSeedManager::GetAssetListFileExtension());
|
||||
return false;
|
||||
@@ -2041,7 +1993,7 @@ namespace AssetBundler
|
||||
}
|
||||
|
||||
// Make the path relative to the engine root folder before saving
|
||||
AzFramework::StringFunc::Replace(assetListFilePath, GetEngineRoot(), "");
|
||||
AZ::StringFunc::Replace(assetListFilePath, GetEngineRoot(), "");
|
||||
|
||||
bundleSettings.m_assetFileInfoListPath = assetListFilePath;
|
||||
}
|
||||
@@ -2050,14 +2002,14 @@ namespace AssetBundler
|
||||
AZStd::string outputBundlePath = FilePath(params.m_outputBundlePath.AbsolutePath(), platformName).AbsolutePath();
|
||||
if (!outputBundlePath.empty())
|
||||
{
|
||||
if (!AzFramework::StringFunc::EndsWith(outputBundlePath, AssetBundleSettings::GetBundleFileExtension()))
|
||||
if (!AZ::StringFunc::EndsWith(outputBundlePath, AssetBundleSettings::GetBundleFileExtension()))
|
||||
{
|
||||
AZ_Error(AppWindowName, false, "Cannot set Output Bundle Path to ( %s ): file extension must be ( %s ).", outputBundlePath.c_str(), AssetBundleSettings::GetBundleFileExtension());
|
||||
return false;
|
||||
}
|
||||
|
||||
// Make the path relative to the engine root folder before saving
|
||||
AzFramework::StringFunc::Replace(outputBundlePath, GetEngineRoot(), "");
|
||||
AZ::StringFunc::Replace(outputBundlePath, GetEngineRoot(), "");
|
||||
|
||||
bundleSettings.m_bundleFilePath = outputBundlePath;
|
||||
}
|
||||
@@ -2341,7 +2293,7 @@ namespace AssetBundler
|
||||
AZStd::string platformSpecificAssetCatalogPath;
|
||||
if (assetCatalogFile.empty())
|
||||
{
|
||||
AzFramework::StringFunc::Path::ConstructFull(
|
||||
AZ::StringFunc::Path::ConstructFull(
|
||||
PlatformAddressedAssetCatalog::GetAssetRootForPlatform(platformId).c_str(),
|
||||
AssetBundler::AssetCatalogFilename,
|
||||
platformSpecificAssetCatalogPath);
|
||||
@@ -2489,7 +2441,7 @@ namespace AssetBundler
|
||||
if (params.m_generateDebugFile)
|
||||
{
|
||||
debugListFileAbsolutePath = assetListFileAbsolutePath;
|
||||
AzFramework::StringFunc::Path::ReplaceExtension(debugListFileAbsolutePath, AssetFileDebugInfoList::GetAssetListDebugFileExtension());
|
||||
AZ::StringFunc::Path::ReplaceExtension(debugListFileAbsolutePath, AssetFileDebugInfoList::GetAssetListDebugFileExtension());
|
||||
AZ_TracePrintf(AssetBundler::AppWindowName, "Saving Asset List Debug file to ( %s )...\n", debugListFileAbsolutePath.c_str());
|
||||
}
|
||||
|
||||
@@ -2706,7 +2658,7 @@ namespace AssetBundler
|
||||
AZ_Printf(AppWindowName, " --%-25s-Outputs the contents of the Seed List file after performing any specified operations.\n", PrintFlag);
|
||||
AZ_Printf(AppWindowName, " --%-25s-Specifies the platform(s) referenced by all Seed operations.\n", PlatformArg);
|
||||
AZ_Printf(AppWindowName, "%-31s---Requires an existing cache of assets for the input platform(s).\n", "");
|
||||
AZ_Printf(AppWindowName, "%-31s---Defaults to all enabled platforms. Platforms can be changed by modifying AssetProcessorPlatformConfig.ini.\n", "");
|
||||
AZ_Printf(AppWindowName, "%-31s---Defaults to all enabled platforms. Platforms can be changed by modifying AssetProcessorPlatformConfig.setreg.\n", "");
|
||||
AZ_Printf(AppWindowName, " --%-25s-Updates the path hints stored in the Seed List file.\n", UpdateSeedPathArg);
|
||||
AZ_Printf(AppWindowName, " --%-25s-Removes the path hints stored in the Seed List file.\n", RemoveSeedPathArg);
|
||||
AZ_Printf(AppWindowName, " --%-25s-Allows input file path to still match if the file path case is different than on disk.\n", IgnoreFileCaseFlag);
|
||||
@@ -2729,7 +2681,7 @@ namespace AssetBundler
|
||||
AZ_Printf(AppWindowName, "%-31s---This will include Seed List files for the Lumberyard Engine and all enabled Gems.\n", "");
|
||||
AZ_Printf(AppWindowName, " --%-25s-Specifies the platform(s) to generate an Asset List file for.\n", PlatformArg);
|
||||
AZ_Printf(AppWindowName, "%-31s---Requires an existing cache of assets for the input platform(s).\n", "");
|
||||
AZ_Printf(AppWindowName, "%-31s---Defaults to all enabled platforms. Platforms can be changed by modifying AssetProcessorPlatformConfig.ini.\n", "");
|
||||
AZ_Printf(AppWindowName, "%-31s---Defaults to all enabled platforms. Platforms can be changed by modifying AssetProcessorPlatformConfig.setreg.\n", "");
|
||||
AZ_Printf(AppWindowName, " --%-25s-[Testing] Specifies the Asset Catalog file referenced by all Asset List operations.\n", AssetCatalogFileArg);
|
||||
AZ_Printf(AppWindowName, "%-31s---Designed to be used in Unit Tests.\n", "");
|
||||
AZ_Printf(AppWindowName, " --%-25s-Outputs the contents of the Asset List file after adding any specified seed files.\n", PrintFlag);
|
||||
@@ -2793,7 +2745,7 @@ namespace AssetBundler
|
||||
AZ_Printf(AppWindowName, "%-31s---Leave list blank to just print the final comparison result.\n", "");
|
||||
AZ_Printf(AppWindowName, " --%-25s-Specifies the platform(s) referenced when determining which Asset List files to compare.\n", PlatformArg);
|
||||
AZ_Printf(AppWindowName, "%-31s---All input Asset List files must exist for all specified platforms\n", "");
|
||||
AZ_Printf(AppWindowName, "%-31s---Defaults to all enabled platforms. Platforms can be changed by modifying AssetProcessorPlatformConfig.ini.\n", "");
|
||||
AZ_Printf(AppWindowName, "%-31s---Defaults to all enabled platforms. Platforms can be changed by modifying AssetProcessorPlatformConfig.setreg.\n", "");
|
||||
AZ_Printf(AppWindowName, " --%-25s-Allow destructive overwrites of files. Include this arg in automation.\n", AllowOverwritesFlag);
|
||||
AZ_Printf(AppWindowName, " --%-25s-Specifies the game project to use rather than the current default project set in bootstrap.cfg's project_path.\n", ProjectArg);
|
||||
}
|
||||
@@ -2809,7 +2761,7 @@ namespace AssetBundler
|
||||
AZ_Printf(AppWindowName, " --%-25s-Sets the maximum size for a single Bundle (in MB). Default size is (%i MB).\n", MaxBundleSizeArg, AssetBundleSettings::GetMaxBundleSizeInMB());
|
||||
AZ_Printf(AppWindowName, "%-31s---Bundles larger than this limit will be divided into a series of smaller Bundles and named accordingly.\n", "");
|
||||
AZ_Printf(AppWindowName, " --%-25s-Specifies the platform(s) referenced by all Bundle Settings operations.\n", PlatformArg);
|
||||
AZ_Printf(AppWindowName, "%-31s---Defaults to all enabled platforms. Platforms can be changed by modifying AssetProcessorPlatformConfig.ini.\n", "");
|
||||
AZ_Printf(AppWindowName, "%-31s---Defaults to all enabled platforms. Platforms can be changed by modifying AssetProcessorPlatformConfig.setreg.\n", "");
|
||||
AZ_Printf(AppWindowName, " --%-25s-Outputs the contents of the Bundle Settings file after modifying any specified values.\n", PrintFlag);
|
||||
AZ_Printf(AppWindowName, " --%-25s-Specifies the game project to use rather than the current default project set in bootstrap.cfg's project_path.\n", ProjectArg);
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace AssetBundler
|
||||
const char* AssetCatalogFileArg = "overrideAssetCatalogFile";
|
||||
const char* AllowOverwritesFlag = "allowOverwrites";
|
||||
const char* IgnoreFileCaseFlag = "ignoreFileCase";
|
||||
const char* ProjectArg = "project";
|
||||
const char* ProjectArg = "project-path";
|
||||
|
||||
// Seeds
|
||||
const char* SeedsCommand = "seeds";
|
||||
@@ -607,9 +607,9 @@ namespace AssetBundler
|
||||
if (!filePath.empty())
|
||||
{
|
||||
m_validPath = true;
|
||||
m_originalPath = m_absolutePath = filePath;
|
||||
AzFramework::StringFunc::Path::Normalize(m_originalPath);
|
||||
ComputeAbsolutePath(m_absolutePath, platform, checkFileCase, ignoreFileCase);
|
||||
m_absolutePath = AZ::IO::PathView(filePath).LexicallyNormal();
|
||||
m_originalPath = m_absolutePath;
|
||||
ComputeAbsolutePath(platform, checkFileCase, ignoreFileCase);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -621,12 +621,12 @@ namespace AssetBundler
|
||||
|
||||
const AZStd::string& FilePath::AbsolutePath() const
|
||||
{
|
||||
return m_absolutePath;
|
||||
return m_absolutePath.Native();
|
||||
}
|
||||
|
||||
const AZStd::string& FilePath::OriginalPath() const
|
||||
{
|
||||
return m_originalPath;
|
||||
return m_originalPath.Native();
|
||||
}
|
||||
|
||||
bool FilePath::IsValid() const
|
||||
@@ -639,60 +639,37 @@ namespace AssetBundler
|
||||
return m_errorString;
|
||||
}
|
||||
|
||||
void FilePath::ComputeAbsolutePath(AZStd::string& filePath, const AZStd::string& platformIdentifier, bool checkFileCase, bool ignoreFileCase)
|
||||
void FilePath::ComputeAbsolutePath(const AZStd::string& platformIdentifier, bool checkFileCase, bool ignoreFileCase)
|
||||
{
|
||||
if (AzToolsFramework::AssetFileInfoListComparison::IsTokenFile(filePath))
|
||||
if (AzToolsFramework::AssetFileInfoListComparison::IsTokenFile(m_absolutePath.Native()))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!platformIdentifier.empty())
|
||||
{
|
||||
AssetBundler::AddPlatformIdentifier(filePath, platformIdentifier);
|
||||
}
|
||||
|
||||
const char* appRoot = nullptr;
|
||||
AzFramework::ApplicationRequests::Bus::BroadcastResult(appRoot, &AzFramework::ApplicationRequests::GetAppRoot);
|
||||
|
||||
#if AZ_TRAIT_OS_USE_WINDOWS_FILE_PATHS
|
||||
AZStd::string driveString;
|
||||
AzFramework::StringFunc::Path::GetDrive(appRoot, driveString);
|
||||
|
||||
if (AzFramework::StringFunc::FirstCharacter(filePath.c_str()) == AZ_CORRECT_FILESYSTEM_SEPARATOR)
|
||||
{
|
||||
AzFramework::StringFunc::Path::ConstructFull(driveString.c_str(), filePath.c_str(), filePath, true);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!AzFramework::StringFunc::Path::IsRelative(filePath.c_str()))
|
||||
{
|
||||
// it is already an absolute path
|
||||
AzFramework::StringFunc::Path::Normalize(filePath);
|
||||
}
|
||||
else
|
||||
{
|
||||
AzFramework::StringFunc::Path::ConstructFull(appRoot, m_absolutePath.c_str(), m_absolutePath, true);
|
||||
AssetBundler::AddPlatformIdentifier(m_absolutePath.Native(), platformIdentifier);
|
||||
}
|
||||
|
||||
AZ::IO::Path enginePath = AZ::IO::PathView(AZ::Utils::GetEnginePath());
|
||||
m_absolutePath = enginePath / m_absolutePath;
|
||||
if (checkFileCase)
|
||||
{
|
||||
QDir rootDir(appRoot);
|
||||
QString relFilePath = rootDir.relativeFilePath(m_absolutePath.c_str());
|
||||
if (AzToolsFramework::AssetUtils::UpdateFilePathToCorrectCase(QString(appRoot), relFilePath))
|
||||
AZ::IO::Path relFilePath = m_absolutePath.LexicallyProximate(enginePath);
|
||||
if (AzToolsFramework::AssetUtils::UpdateFilePathToCorrectCase(enginePath.Native(), relFilePath.Native()))
|
||||
{
|
||||
if (ignoreFileCase)
|
||||
{
|
||||
AzFramework::StringFunc::Path::ConstructFull(appRoot, relFilePath.toUtf8().data(), m_absolutePath, true);
|
||||
m_absolutePath = (enginePath / relFilePath).String();
|
||||
}
|
||||
else
|
||||
{
|
||||
AZStd::string absfilePath(rootDir.filePath(relFilePath).toUtf8().data());
|
||||
AzFramework::StringFunc::Path::Normalize(absfilePath);
|
||||
if (!AZ::StringFunc::Equal(absfilePath.c_str(), m_absolutePath.c_str(), true))
|
||||
AZ::IO::Path absfilePath = (enginePath / relFilePath).LexicallyNormal();
|
||||
if (absfilePath != AZ::IO::PathView(m_absolutePath))
|
||||
{
|
||||
m_errorString = AZStd::string::format("File case mismatch, file ( %s ) does not exist on disk, did you mean file ( %s ). \
|
||||
Please run the command again with the correct file path or use ( --%s ) arg if you want to allow case insensitive file match.\n",
|
||||
m_absolutePath.c_str(), rootDir.filePath(relFilePath.toUtf8().data()).toUtf8().data(), IgnoreFileCaseFlag);
|
||||
m_errorString = AZStd::string::format("File case mismatch, file ( %s ) does not exist on disk, did you mean file ( %s )."
|
||||
" Please run the command again with the correct file path or use ( --%s ) arg if you want to allow case insensitive file match.\n",
|
||||
m_absolutePath.c_str(), absfilePath.c_str(), IgnoreFileCaseFlag);
|
||||
m_validPath = false;
|
||||
}
|
||||
}
|
||||
@@ -731,10 +708,12 @@ m_absolutePath.c_str(), rootDir.filePath(relFilePath.toUtf8().data()).toUtf8().d
|
||||
void ScopedTraceHandler::ReportErrors()
|
||||
{
|
||||
m_reportingError = true;
|
||||
#if defined(AZ_ENABLE_TRACING)
|
||||
for (const AZStd::string& error : m_errors)
|
||||
{
|
||||
AZ_Error(AssetBundler::AppWindowName, false, error.c_str());
|
||||
}
|
||||
#endif
|
||||
|
||||
ClearErrors();
|
||||
m_reportingError = false;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
#include <AzCore/std/string/string.h>
|
||||
#include <AzCore/Debug/TraceMessageBus.h>
|
||||
#include <AzCore/IO/SystemFile.h> //AZ_MAX_PATH_LEN
|
||||
#include <AzCore/IO/Path/Path.h>
|
||||
#include <AzCore/Outcome/Outcome.h>
|
||||
#include <AzFramework/Platform/PlatformDefaults.h>
|
||||
#include <AzToolsFramework/Asset/AssetBundler.h>
|
||||
@@ -246,10 +246,10 @@ namespace AssetBundler
|
||||
AZStd::string ErrorString() const;
|
||||
bool IsValid() const;
|
||||
private:
|
||||
void ComputeAbsolutePath(AZStd::string& filePath, const AZStd::string& platformIdentifier, bool checkFileCase, bool ignoreFileCase);
|
||||
void ComputeAbsolutePath(const AZStd::string& platformIdentifier, bool checkFileCase, bool ignoreFileCase);
|
||||
|
||||
AZStd::string m_absolutePath;
|
||||
AZStd::string m_originalPath;
|
||||
AZ::IO::Path m_absolutePath;
|
||||
AZ::IO::Path m_originalPath;
|
||||
AZStd::string m_errorString;
|
||||
bool m_validPath = false;
|
||||
};
|
||||
|
||||
@@ -12,8 +12,9 @@
|
||||
|
||||
#include <AzFramework/API/ApplicationAPI.h>
|
||||
#include <source/utils/utils.h>
|
||||
#include <AzCore/Settings/SettingsRegistryImpl.h>
|
||||
#include <AzCore/Settings/SettingsRegistryMergeUtils.h>
|
||||
#include <AzCore/UnitTest/TestTypes.h>
|
||||
#include <AzFramework/StringFunc/StringFunc.h>
|
||||
#include <Utils/Utils.h>
|
||||
#include <AzFramework/IO/LocalFileIO.h>
|
||||
|
||||
@@ -36,10 +37,27 @@ namespace AssetBundler
|
||||
AZ::IO::FileIOBase::SetInstance(nullptr);
|
||||
AZ::IO::FileIOBase::SetInstance(m_localFileIO);
|
||||
m_tempDir = new UnitTest::ScopedTemporaryDirectory();
|
||||
auto settingsRegistry = AZ::SettingsRegistry::Get();
|
||||
if (settingsRegistry == nullptr)
|
||||
{
|
||||
m_settingsRegistry = AZStd::make_unique<AZ::SettingsRegistryImpl>();
|
||||
settingsRegistry = m_settingsRegistry.get();
|
||||
AZ::SettingsRegistry::Register(settingsRegistry);
|
||||
}
|
||||
settingsRegistry->Get(m_oldEngineRoot.Native(), AZ::SettingsRegistryMergeUtils::FilePathKey_EngineRootFolder);
|
||||
settingsRegistry->Set(AZ::SettingsRegistryMergeUtils::FilePathKey_EngineRootFolder, m_tempDir->GetDirectory());
|
||||
}
|
||||
|
||||
void TearDown() override
|
||||
{
|
||||
// Reset Engine Path if there was an existing Settings Registry from before
|
||||
auto settingsRegistry = AZ::SettingsRegistry::Get();
|
||||
settingsRegistry->Set(AZ::SettingsRegistryMergeUtils::FilePathKey_EngineRootFolder, m_oldEngineRoot.Native());
|
||||
if(settingsRegistry == m_settingsRegistry.get())
|
||||
{
|
||||
AZ::SettingsRegistry::Unregister(settingsRegistry);
|
||||
m_settingsRegistry.reset();
|
||||
}
|
||||
delete m_tempDir;
|
||||
AZ::IO::FileIOBase::SetInstance(nullptr);
|
||||
delete m_localFileIO;
|
||||
@@ -53,7 +71,7 @@ namespace AssetBundler
|
||||
void NormalizePathKeepCase(AZStd::string& /*path*/) override {}
|
||||
void CalculateBranchTokenForEngineRoot(AZStd::string& /*token*/) const override {}
|
||||
|
||||
const char* GetAppRoot() const override
|
||||
const char* GetEngineRoot() const override
|
||||
{
|
||||
return m_tempDir->GetDirectory();
|
||||
}
|
||||
@@ -61,56 +79,55 @@ namespace AssetBundler
|
||||
AZ::IO::FileIOBase* m_priorFileIO = nullptr;
|
||||
AZ::IO::FileIOBase* m_localFileIO = nullptr;
|
||||
UnitTest::ScopedTemporaryDirectory* m_tempDir = nullptr;
|
||||
AZStd::unique_ptr<AZ::SettingsRegistryInterface> m_settingsRegistry;
|
||||
AZ::IO::Path m_oldEngineRoot;
|
||||
};
|
||||
|
||||
|
||||
TEST_F(MockUtilsTest, DISABLED_TestFilePath_StartsWithAFileSeparator_Valid)
|
||||
{
|
||||
AZStd::string relFilePath = "Foo/foo.xml";
|
||||
AzFramework::StringFunc::Prepend(relFilePath, AZ_CORRECT_FILESYSTEM_SEPARATOR);
|
||||
AZStd::string absoluteFilePath;
|
||||
#if AZ_TRAIT_OS_USE_WINDOWS_FILE_PATHS
|
||||
AZStd::string driveString;
|
||||
AzFramework::StringFunc::Path::GetDrive(GetAppRoot(), driveString);
|
||||
AzFramework::StringFunc::Path::ConstructFull(driveString.c_str(), relFilePath.c_str(), absoluteFilePath, true);
|
||||
#else
|
||||
absoluteFilePath = relFilePath;
|
||||
#endif
|
||||
FilePath filePath(relFilePath);
|
||||
AZ::IO::Path relFilePath = "Foo/foo.xml";
|
||||
AZ::IO::Path absoluteFilePath = AZ::IO::PathView(GetEngineRoot()).RootPath();
|
||||
absoluteFilePath /= relFilePath;
|
||||
absoluteFilePath = absoluteFilePath.LexicallyNormal();
|
||||
|
||||
FilePath filePath(relFilePath.Native());
|
||||
EXPECT_STREQ(filePath.AbsolutePath().c_str(), absoluteFilePath.c_str());
|
||||
}
|
||||
|
||||
|
||||
TEST_F(MockUtilsTest, TestFilePath_RelativePath_Valid)
|
||||
{
|
||||
AZStd::string relFilePath = "Foo\\foo.xml";
|
||||
AZStd::string absoluteFilePath;
|
||||
AzFramework::StringFunc::Path::ConstructFull(GetAppRoot(), relFilePath.c_str(), absoluteFilePath, true);
|
||||
FilePath filePath(relFilePath);
|
||||
EXPECT_EQ(filePath.AbsolutePath(), absoluteFilePath);
|
||||
AZ::IO::Path relFilePath = "Foo\\foo.xml";
|
||||
AZ::IO::Path absoluteFilePath = (AZ::IO::Path(GetEngineRoot()) / relFilePath).LexicallyNormal();
|
||||
FilePath filePath(relFilePath.Native());
|
||||
EXPECT_EQ(AZ::IO::PathView{ filePath.AbsolutePath() }, absoluteFilePath);
|
||||
}
|
||||
|
||||
#if !AZ_TRAIT_USE_WINDOWS_FILE_API
|
||||
// When using Windows file API the the AZ::IO::Path comparisons are case insensitive
|
||||
TEST_F(MockUtilsTest, TestFilePath_CasingMismatch_Error_valid)
|
||||
{
|
||||
AZStd::string relFilePath = "Foo\\Foo.xml";
|
||||
AZStd::string wrongCaseRelFilePath = "Foo\\foo.xml";
|
||||
AZStd::string correctAbsoluteFilePath;
|
||||
AZStd::string wrongCaseAbsoluteFilePath;
|
||||
AzFramework::StringFunc::Path::ConstructFull(GetAppRoot(), relFilePath.c_str(), correctAbsoluteFilePath, true);
|
||||
AzFramework::StringFunc::Path::ConstructFull(GetAppRoot(), wrongCaseRelFilePath.c_str(), wrongCaseAbsoluteFilePath, true);
|
||||
AZ::IO::Path relFilePath = "Foo\\Foo.xml";
|
||||
AZ::IO::Path wrongCaseRelFilePath = "Foo\\foo.xml";
|
||||
|
||||
AZ::IO::Path correctAbsoluteFilePath = (AZ::IO::Path(GetEngineRoot()) / relFilePath).LexicallyNormal();
|
||||
AZ::IO::Path wrongCaseAbsoluteFilePath = (AZ::IO::Path(GetEngineRoot()) / wrongCaseRelFilePath).LexicallyNormal();
|
||||
|
||||
AZ::IO::HandleType fileHandle = AZ::IO::InvalidHandle;
|
||||
AZ::IO::FileIOBase::GetInstance()->Open(correctAbsoluteFilePath.c_str(), AZ::IO::OpenMode::ModeWrite | AZ::IO::OpenMode::ModeCreatePath, fileHandle);
|
||||
FilePath filePath(wrongCaseAbsoluteFilePath, true, false);
|
||||
FilePath filePath(wrongCaseAbsoluteFilePath.Native(), true, false);
|
||||
EXPECT_FALSE(filePath.IsValid());
|
||||
EXPECT_TRUE(filePath.ErrorString().find("File case mismatch") != AZStd::string::npos);
|
||||
EXPECT_TRUE(filePath.ErrorString().contains("File case mismatch"));
|
||||
}
|
||||
#endif
|
||||
|
||||
TEST_F(MockUtilsTest, TestFilePath_NoFileExists_NoError_valid)
|
||||
{
|
||||
AZStd::string relFilePath = "Foo\\Foo.xml";
|
||||
AZStd::string absoluteFilePath;
|
||||
AzFramework::StringFunc::Path::ConstructFull(GetAppRoot(), relFilePath.c_str(), absoluteFilePath, true);
|
||||
FilePath filePath(absoluteFilePath, true, false);
|
||||
AZ::IO::Path relFilePath = "Foo\\Foo.xml";
|
||||
AZ::IO::Path absoluteFilePath = (AZ::IO::Path(GetEngineRoot()) / relFilePath).LexicallyNormal();
|
||||
|
||||
FilePath filePath(absoluteFilePath.Native(), true, false);
|
||||
EXPECT_TRUE(filePath.IsValid());
|
||||
EXPECT_TRUE(filePath.ErrorString().empty());
|
||||
}
|
||||
@@ -119,13 +136,12 @@ namespace AssetBundler
|
||||
{
|
||||
AZStd::string relFilePath = "Foo\\Foo.xml";
|
||||
AZStd::string wrongCaseRelFilePath = "Foo\\foo.xml";
|
||||
AZStd::string correctAbsoluteFilePath;
|
||||
AZStd::string wrongCaseAbsoluteFilePath;
|
||||
AzFramework::StringFunc::Path::ConstructFull(GetAppRoot(), relFilePath.c_str(), correctAbsoluteFilePath, true);
|
||||
AzFramework::StringFunc::Path::ConstructFull(GetAppRoot(), wrongCaseRelFilePath.c_str(), wrongCaseAbsoluteFilePath, true);
|
||||
AZ::IO::Path correctAbsoluteFilePath = (AZ::IO::Path(GetEngineRoot()) / relFilePath).LexicallyNormal();
|
||||
AZ::IO::Path wrongCaseAbsoluteFilePath = (AZ::IO::Path(GetEngineRoot()) / wrongCaseRelFilePath).LexicallyNormal();
|
||||
|
||||
AZ::IO::HandleType fileHandle = AZ::IO::InvalidHandle;
|
||||
AZ::IO::FileIOBase::GetInstance()->Open(correctAbsoluteFilePath.c_str(), AZ::IO::OpenMode::ModeWrite | AZ::IO::OpenMode::ModeCreatePath, fileHandle);
|
||||
FilePath filePath(wrongCaseAbsoluteFilePath, true, true);
|
||||
FilePath filePath(wrongCaseAbsoluteFilePath.Native(), true, true);
|
||||
EXPECT_TRUE(filePath.IsValid());
|
||||
EXPECT_STREQ(filePath.AbsolutePath().c_str(), correctAbsoluteFilePath.c_str());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user