Integrating github/staging through commit ab87ed9
This commit is contained in:
@@ -18,8 +18,6 @@ endif()
|
||||
add_subdirectory(AssetBuilderSDK)
|
||||
add_subdirectory(AssetBuilder)
|
||||
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/Platform/${PAL_PLATFORM_NAME}/PAL_${PAL_PLATFORM_NAME_LOWERCASE}.cmake)
|
||||
|
||||
ly_add_target(
|
||||
NAME AssetProcessor.Static STATIC
|
||||
NAMESPACE AZ
|
||||
@@ -63,7 +61,7 @@ ly_add_source_properties(
|
||||
)
|
||||
|
||||
ly_add_target(
|
||||
NAME AssetProcessor ${PAL_TRAIT_BUILD_ASSETPROCESSOR_APPLICATION_TYPE}
|
||||
NAME AssetProcessor APPLICATION
|
||||
NAMESPACE AZ
|
||||
AUTOMOC
|
||||
AUTOUIC
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
#
|
||||
# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
|
||||
# its licensors.
|
||||
#
|
||||
# For complete copyright and license terms please see the LICENSE at the root of this
|
||||
# distribution (the "License"). All use of this software is governed by the License,
|
||||
# or, if provided, by the license below or the license accompanying this file. Do not
|
||||
# remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
#
|
||||
|
||||
set (PAL_TRAIT_BUILD_ASSETPROCESSOR_APPLICATION_TYPE APPLICATION)
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
#
|
||||
# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
|
||||
# its licensors.
|
||||
#
|
||||
# For complete copyright and license terms please see the LICENSE at the root of this
|
||||
# distribution (the "License"). All use of this software is governed by the License,
|
||||
# or, if provided, by the license below or the license accompanying this file. Do not
|
||||
# remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
#
|
||||
|
||||
set (PAL_TRAIT_BUILD_ASSETPROCESSOR_APPLICATION_TYPE APPLICATION)
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
#
|
||||
# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
|
||||
# its licensors.
|
||||
#
|
||||
# For complete copyright and license terms please see the LICENSE at the root of this
|
||||
# distribution (the "License"). All use of this software is governed by the License,
|
||||
# or, if provided, by the license below or the license accompanying this file. Do not
|
||||
# remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
#
|
||||
|
||||
set (PAL_TRAIT_BUILD_ASSETPROCESSOR_APPLICATION_TYPE APPLICATION)
|
||||
|
||||
@@ -2261,8 +2261,6 @@ namespace AssetProcessor
|
||||
|
||||
{
|
||||
// note, intentional scope created for the statement finalizer
|
||||
const char* statementToUse = wasAlreadyInDatabase ? UPDATE_PRODUCT : INSERT_PRODUCT;
|
||||
|
||||
StatementAutoFinalizer autoFinalizer;
|
||||
if (wasAlreadyInDatabase)
|
||||
{
|
||||
@@ -2285,7 +2283,7 @@ namespace AssetProcessor
|
||||
|
||||
if(statement->Step() == Statement::SqlError)
|
||||
{
|
||||
AZ_Error(LOG_NAME, false, "Failed to execute the %s statement", statementToUse);
|
||||
AZ_Error(LOG_NAME, false, "Failed to execute the %s statement", wasAlreadyInDatabase ? UPDATE_PRODUCT : INSERT_PRODUCT);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace AssetProcessor
|
||||
m_platforms.push_back(QString::fromUtf8(info.m_identifier.c_str()));
|
||||
}
|
||||
|
||||
bool computedCacheRoot = AssetUtilities::ComputeProjectCacheRoot(m_cacheRoot);
|
||||
[[maybe_unused]] bool computedCacheRoot = AssetUtilities::ComputeProjectCacheRoot(m_cacheRoot);
|
||||
AZ_Assert(computedCacheRoot, "Could not compute cache root for AssetCatalog");
|
||||
|
||||
// save 30mb for this. Really large projects do get this big (and bigger)
|
||||
@@ -341,10 +341,10 @@ namespace AssetProcessor
|
||||
{
|
||||
auto settingsRegistry = AZ::SettingsRegistry::Get();
|
||||
AZ::SettingsRegistryInterface::FixedValueString cacheRootFolder;
|
||||
settingsRegistry->Get(cacheRootFolder, AZ::SettingsRegistryMergeUtils::FilePathKey_CacheRootFolder);
|
||||
settingsRegistry->Get(cacheRootFolder, AZ::SettingsRegistryMergeUtils::FilePathKey_CacheProjectRootFolder);
|
||||
|
||||
QString tempRegistryFile = QString("%1/%2").arg(workSpace).arg("assetcatalog.xml.tmp");
|
||||
QString platformCacheDir = QString::fromUtf8(cacheRootFolder.c_str(), aznumeric_cast<int>(cacheRootFolder.size()));
|
||||
QString platformCacheDir = QString("%1/%2").arg(cacheRootFolder.c_str()).arg(platform);
|
||||
QString actualRegistryFile = QString("%1/%2").arg(platformCacheDir).arg("assetcatalog.xml");
|
||||
|
||||
AZ_TracePrintf(AssetProcessor::DebugChannel, "Creating asset catalog: %s --> %s\n", tempRegistryFile.toUtf8().constData(), actualRegistryFile.toUtf8().constData());
|
||||
@@ -359,7 +359,7 @@ namespace AssetProcessor
|
||||
if (!registryDir.exists())
|
||||
{
|
||||
QString absPath = registryDir.absolutePath();
|
||||
bool makeDirResult = AZ::IO::SystemFile::CreateDir(absPath.toUtf8().constData());
|
||||
[[maybe_unused]] bool makeDirResult = AZ::IO::SystemFile::CreateDir(absPath.toUtf8().constData());
|
||||
AZ_Warning(AssetProcessor::ConsoleChannel, makeDirResult, "Failed create folder %s", platformCacheDir.toUtf8().constData());
|
||||
}
|
||||
|
||||
@@ -739,8 +739,6 @@ namespace AssetProcessor
|
||||
|
||||
QMutexLocker locker(&m_registriesMutex);
|
||||
|
||||
const auto& productDependencies = m_registries[platform].GetAssetDependencies(id);
|
||||
|
||||
auto itr = m_registries[platform].m_assetDependencies.find(id);
|
||||
|
||||
if (itr == m_registries[platform].m_assetDependencies.end())
|
||||
|
||||
@@ -284,7 +284,7 @@ namespace AssetProcessor
|
||||
for (const auto& settingsKey : settingsToCopy)
|
||||
{
|
||||
AZ::SettingsRegistryInterface::FixedValueString settingsValue;
|
||||
bool settingsCopied = settingsRegistry->Get(settingsValue, settingsKey)
|
||||
[[maybe_unused]] bool settingsCopied = settingsRegistry->Get(settingsValue, settingsKey)
|
||||
&& registry.Set(settingsKey, settingsValue);
|
||||
AZ_Warning("Settings Registry Builder", settingsCopied, "Unable to copy setting %s from AssetProcessor settings registry"
|
||||
" to local settings registry", settingsKey.c_str());
|
||||
|
||||
@@ -150,7 +150,7 @@ namespace AssetProcessor
|
||||
return true;
|
||||
}
|
||||
|
||||
bool NativeLegacyRCCompiler::Execute(const QString& inputFile, const QString& watchFolder, const QString& platformIdentifier,
|
||||
bool NativeLegacyRCCompiler::Execute(const QString& inputFile, const QString& watchFolder, const QString& platformIdentifier,
|
||||
const QString& params, const QString& dest, const AssetBuilderSDK::JobCancelListener* jobCancelListener, Result& result) const
|
||||
{
|
||||
if (!this->m_resourceCompilerInitialized)
|
||||
@@ -177,7 +177,7 @@ namespace AssetProcessor
|
||||
|
||||
AZ_TracePrintf("RC Builder", "Executing RC.EXE: '%s' ...\n", processLaunchInfo.m_commandlineParameters.c_str());
|
||||
AZ_TracePrintf("Rc Builder", "Executing RC.EXE with working directory: '%s' ...\n", processLaunchInfo.m_workingDirectory.c_str());
|
||||
|
||||
|
||||
AzFramework::ProcessWatcher* watcher = AzFramework::ProcessWatcher::LaunchProcess(processLaunchInfo, AzFramework::ProcessCommunicationType::COMMUNICATOR_TYPE_STDINOUT);
|
||||
|
||||
if (!watcher)
|
||||
@@ -256,7 +256,6 @@ namespace AssetProcessor
|
||||
QString cmdLine;
|
||||
if (!dest.isEmpty())
|
||||
{
|
||||
QString projectName = AssetUtilities::ComputeProjectName();
|
||||
QString projectPath = AssetUtilities::ComputeProjectPath();
|
||||
|
||||
int portNumber = 0;
|
||||
@@ -264,12 +263,12 @@ namespace AssetProcessor
|
||||
|
||||
AZStd::string appBranchToken;
|
||||
AzFramework::ApplicationRequests::Bus::Broadcast(&AzFramework::ApplicationRequests::CalculateBranchTokenForEngineRoot, appBranchToken);
|
||||
cmdLine = QString("\"%1\" /p=%2 %3 /unattended=true /gameroot=\"%4\" /watchfolder=\"%6\" /targetroot=\"%5\" /logprefix=\"%5/\" /port=%7 /gamesubdirectory=\"%8\" /branchtoken=\"%9\"");
|
||||
cmdLine = cmdLine.arg(inputFile, platformIdentifier, params, projectPath, dest, watchFolder).arg(portNumber).arg(projectName).arg(appBranchToken.c_str());
|
||||
cmdLine = QString("\"%1\" --platform=%2 %3 --unattended=true --project-path=\"%4\" --watchfolder=\"%6\" --targetroot=\"%5\" --logprefix=\"%5/\" --port=%7 --branchtoken=\"%8\"");
|
||||
cmdLine = cmdLine.arg(inputFile, platformIdentifier, params, projectPath, dest, watchFolder).arg(portNumber).arg(appBranchToken.c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
cmdLine = QString("\"%1\" /p=%2 %3").arg(inputFile, platformIdentifier, params);
|
||||
cmdLine = QString("\"%1\" --platform=%2 %3").arg(inputFile, platformIdentifier, params);
|
||||
}
|
||||
return cmdLine;
|
||||
}
|
||||
@@ -365,7 +364,7 @@ namespace AssetProcessor
|
||||
return static_cast<AZ::u32>(crc);
|
||||
}
|
||||
|
||||
//! Constructor to initialize the internal builders and a general internal builder uuid that is used for bus
|
||||
//! Constructor to initialize the internal builders and a general internal builder uuid that is used for bus
|
||||
//! registration. This constructor is helpful for deriving other classes from this builder for purposes like
|
||||
//! unit testing.
|
||||
InternalRecognizerBasedBuilder::InternalRecognizerBasedBuilder(QHash<QString, BuilderIdAndName> inputBuilderByIdMap, AZ::Uuid internalBuilderUuid)
|
||||
@@ -471,32 +470,32 @@ namespace AssetProcessor
|
||||
// inside of each such recognizer is a map of [platform] --> options for that platform.
|
||||
// so visualizing this whole struct in summary might look something like
|
||||
|
||||
// "Internal RC Builder" :
|
||||
// "Internal RC Builder" :
|
||||
// {
|
||||
// { <----- list of recognizers for that RC builder starts here
|
||||
// regex: "*.tif",
|
||||
// builderUUID : "12345-12354-123145",
|
||||
// platformSpecsByPlatform :
|
||||
// {
|
||||
// builderUUID : "12345-12354-123145",
|
||||
// platformSpecsByPlatform :
|
||||
// {
|
||||
// "pc" : "streaming = 1",
|
||||
// "ios" : "streaming = 0"
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// {
|
||||
// regex: "*.png",
|
||||
// builderUUID : "12345-12354-123145",
|
||||
// platformSpecsByPlatform :
|
||||
// {
|
||||
// builderUUID : "12345-12354-123145",
|
||||
// platformSpecsByPlatform :
|
||||
// {
|
||||
// "pc" : "split=1"
|
||||
// }
|
||||
// },
|
||||
// },
|
||||
// "Internal Copy Builder",
|
||||
// {
|
||||
// {
|
||||
// regex: "*.cfg",
|
||||
// builderUUID : "12345-12354-123145",
|
||||
// platformSpecsByPlatform :
|
||||
// {
|
||||
// builderUUID : "12345-12354-123145",
|
||||
// platformSpecsByPlatform :
|
||||
// {
|
||||
// "pc" : "copy",
|
||||
// "ios" : "copy"
|
||||
// }
|
||||
@@ -517,7 +516,7 @@ namespace AssetProcessor
|
||||
|
||||
for (auto internalAssetRecognizer : *internalRecognizerList)
|
||||
{
|
||||
// so referring to the structure explanation above, internalAssetRecognizer is
|
||||
// so referring to the structure explanation above, internalAssetRecognizer is
|
||||
// one of those objects that has the regex in it, (along with list of commands to apply per platform)
|
||||
if (internalAssetRecognizer->m_platformSpecsByPlatform.size() == 0)
|
||||
{
|
||||
@@ -560,7 +559,7 @@ namespace AssetProcessor
|
||||
if (builderInfo.GetType() == BuilderIdAndName::Type::REGISTERED_BUILDER)
|
||||
{
|
||||
AssetBuilderSDK::AssetBuilderDesc builderDesc = CreateBuilderDesc(builderId, builderPatterns);
|
||||
|
||||
|
||||
// RC Builder also needs to include its platforms and its RC command lines so that if you change this, the jobs
|
||||
// are re-evaluated.
|
||||
size_t currentHash = 0;
|
||||
@@ -626,7 +625,7 @@ namespace AssetProcessor
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
return foundAny;
|
||||
@@ -646,11 +645,11 @@ namespace AssetProcessor
|
||||
QString requestedBuilderID = QString(azBuilderId.c_str());
|
||||
|
||||
response.m_result = AssetBuilderSDK::CreateJobsResultCode::Failed;
|
||||
|
||||
|
||||
QDir watchFolder(request.m_watchFolder.c_str());
|
||||
QString normalizedPath = watchFolder.absoluteFilePath(request.m_sourceFile.c_str());
|
||||
normalizedPath = AssetUtilities::NormalizeFilePath(normalizedPath);
|
||||
|
||||
|
||||
// Locate recognizers that match the file
|
||||
InternalRecognizerPointerContainer recognizers;
|
||||
if (!GetMatchingRecognizers(request.m_enabledPlatforms, normalizedPath, recognizers))
|
||||
@@ -803,15 +802,15 @@ namespace AssetProcessor
|
||||
// If the job fails due to a networking issue, we will attempt to retry RetriesForJobNetworkError times
|
||||
int retryCount = 0;
|
||||
|
||||
do
|
||||
do
|
||||
{
|
||||
++retryCount;
|
||||
ProcessLegacyRCJob(request, rcParam, assetRecognizer->m_productAssetType, jobCancelListener, response);
|
||||
|
||||
AZ_Warning("RC Builder", response.m_resultCode != AssetBuilderSDK::ProcessJobResult_NetworkIssue, "RC.exe reported a network connection issue. %s",
|
||||
AZ_Warning("RC Builder", response.m_resultCode != AssetBuilderSDK::ProcessJobResult_NetworkIssue, "RC.exe reported a network connection issue. %s",
|
||||
retryCount <= AssetProcessor::RetriesForJobNetworkError ? "Attempting to retry job." : "Maximum retry attempts exceeded, giving up.");
|
||||
} while (response.m_resultCode == AssetBuilderSDK::ProcessJobResult_NetworkIssue && retryCount <= AssetProcessor::RetriesForJobNetworkError);
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (jobCancelListener.IsCancelled())
|
||||
@@ -873,7 +872,7 @@ namespace AssetProcessor
|
||||
workDir.removeRecursively();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool InternalRecognizerBasedBuilder::SaveProcessJobRequestFile(const char* requestFileDir, const char* requestFileName, const AssetBuilderSDK::ProcessJobRequest& request)
|
||||
{
|
||||
AZStd::string finalFullPath;
|
||||
@@ -886,7 +885,7 @@ namespace AssetProcessor
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool InternalRecognizerBasedBuilder::LoadProcessJobResponseFile(const char* responseFileDir, const char* responseFileName, AssetBuilderSDK::ProcessJobResponse& response, bool& responseLoaded)
|
||||
{
|
||||
responseLoaded = false;
|
||||
@@ -914,7 +913,7 @@ namespace AssetProcessor
|
||||
return true;
|
||||
}
|
||||
|
||||
void InternalRecognizerBasedBuilder::ProcessLegacyRCJob(const AssetBuilderSDK::ProcessJobRequest& request, QString rcParam,
|
||||
void InternalRecognizerBasedBuilder::ProcessLegacyRCJob(const AssetBuilderSDK::ProcessJobRequest& request, QString rcParam,
|
||||
AZ::Uuid productAssetType, const AssetBuilderSDK::JobCancelListener& jobCancelListener, AssetBuilderSDK::ProcessJobResponse& response)
|
||||
{
|
||||
// Process this job
|
||||
@@ -954,7 +953,7 @@ namespace AssetProcessor
|
||||
response.m_resultCode = AssetBuilderSDK::ProcessJobResult_Failed;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (!responseFromRCCompiler)
|
||||
{
|
||||
if(rcResult.m_exitCode != 0)
|
||||
@@ -1094,7 +1093,7 @@ namespace AssetProcessor
|
||||
AzFramework::StringFunc::Path::Join(dest.toUtf8().constData(), productName.c_str(), joinedPath);
|
||||
productName.swap(joinedPath);
|
||||
}
|
||||
|
||||
|
||||
// update it in the structure to be absolute normalized path.
|
||||
product.m_productFileName = productName;
|
||||
|
||||
@@ -1139,10 +1138,10 @@ namespace AssetProcessor
|
||||
}
|
||||
|
||||
void InternalRecognizerBasedBuilder::ProcessCopyJob(
|
||||
const AssetBuilderSDK::ProcessJobRequest& request,
|
||||
AZ::Uuid productAssetType,
|
||||
bool outputProductDependencies,
|
||||
const AssetBuilderSDK::JobCancelListener& jobCancelListener,
|
||||
const AssetBuilderSDK::ProcessJobRequest& request,
|
||||
AZ::Uuid productAssetType,
|
||||
bool outputProductDependencies,
|
||||
const AssetBuilderSDK::JobCancelListener& jobCancelListener,
|
||||
AssetBuilderSDK::ProcessJobResponse& response)
|
||||
{
|
||||
AssetBuilderSDK::JobProduct jobProduct(request.m_fullPath, productAssetType);
|
||||
@@ -1151,7 +1150,7 @@ namespace AssetProcessor
|
||||
{
|
||||
jobProduct.m_dependenciesHandled = true; // Copy jobs are meant to be used for assets that have no dependencies and just need to be copied.
|
||||
}
|
||||
|
||||
|
||||
response.m_outputProducts.push_back(jobProduct);
|
||||
response.m_resultCode = AssetBuilderSDK::ProcessJobResult_Success;
|
||||
|
||||
|
||||
@@ -364,10 +364,12 @@ namespace AssetProcessor
|
||||
|
||||
if (!results.isEmpty())
|
||||
{
|
||||
#if defined(AZ_ENABLE_TRACING)
|
||||
for (const AssetProcessor::QueueElementID& result : results)
|
||||
{
|
||||
AZ_TracePrintf(AssetProcessor::DebugChannel, "OnEscalateJobsBySourceUUID: %s --> %s\n", sourceUuid.ToString<AZStd::string>().c_str(), result.GetInputAssetName().toUtf8().constData());
|
||||
}
|
||||
#endif
|
||||
m_RCQueueSortModel.OnEscalateJobs(escalationList);
|
||||
}
|
||||
// do not print a warning out when this fails, its fine for things to escalate jobs as a matter of course just to "make sure" they are escalated
|
||||
|
||||
@@ -410,6 +410,7 @@ namespace AssetProcessor
|
||||
AssetProcessor::SetThreadLocalJobId(builderParams.m_rcJob->GetJobEntry().m_jobRunKey);
|
||||
AssetUtilities::JobLogTraceListener jobLogTraceListener(builderParams.m_rcJob->m_jobDetails.m_jobEntry);
|
||||
|
||||
#if defined(AZ_ENABLE_TRACING)
|
||||
QString sourceFullPath(builderParams.m_processJobRequest.m_fullPath.c_str());
|
||||
auto failReason = builderParams.m_processJobRequest.m_jobDescription.m_jobParameters.find(AZ_CRC(AssetProcessor::AutoFailReasonKey));
|
||||
if (failReason != builderParams.m_processJobRequest.m_jobDescription.m_jobParameters.end())
|
||||
@@ -456,6 +457,7 @@ namespace AssetProcessor
|
||||
}
|
||||
});
|
||||
}
|
||||
#endif
|
||||
|
||||
// note that this line below is printed out to be consistent with the output from a job that normally failed, so
|
||||
// applications reading log file will find it.
|
||||
@@ -481,6 +483,7 @@ namespace AssetProcessor
|
||||
AssetBuilderSDK::JobCancelListener JobCancelListener(builderParams.m_rcJob->m_jobDetails.m_jobEntry.m_jobRunKey);
|
||||
result.m_resultCode = AssetBuilderSDK::ProcessJobResult_Failed; // failed by default
|
||||
|
||||
#if defined(AZ_ENABLE_TRACING)
|
||||
auto warningMessage = builderParams.m_processJobRequest.m_jobDescription.m_jobParameters.find(AZ_CRC(AssetProcessor::JobWarningKey));
|
||||
if (warningMessage != builderParams.m_processJobRequest.m_jobDescription.m_jobParameters.end())
|
||||
{
|
||||
@@ -492,6 +495,7 @@ namespace AssetProcessor
|
||||
AZ_Warning(AssetBuilderSDK::WarningWindow, false, "%s", token.c_str());
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// create a temporary directory for Builder to work in.
|
||||
// lets make it as a subdir of a known temp dir
|
||||
|
||||
@@ -108,11 +108,13 @@ void FileWatcherUnitTestRunner::StartTest()
|
||||
|
||||
if (outstandingFiles.count() > 0)
|
||||
{
|
||||
#if defined(AZ_ENABLE_TRACING)
|
||||
AZ_TracePrintf(AssetProcessor::DebugChannel, "Timed out waiting for file changes: %d / %d missed\n", outstandingFiles.count(), maxFiles);
|
||||
for (const QString& pending : outstandingFiles)
|
||||
{
|
||||
AZ_TracePrintf(AssetProcessor::DebugChannel, "Missed file: %s", pending.toUtf8().data());
|
||||
}
|
||||
#endif
|
||||
Q_EMIT UnitTestFailed("Missed files waiting for file changes");
|
||||
return;
|
||||
}
|
||||
@@ -308,4 +310,4 @@ void FileWatcherUnitTestRunner::StartTest()
|
||||
|
||||
#if !AZ_TRAIT_DISABLE_FAILED_ASSET_PROCESSOR_TESTS
|
||||
REGISTER_UNIT_TEST(FileWatcherUnitTestRunner)
|
||||
#endif // !AZ_TRAIT_DISABLE_FAILED_ASSET_PROCESSOR_TESTS
|
||||
#endif // !AZ_TRAIT_DISABLE_FAILED_ASSET_PROCESSOR_TESTS
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
#include <AzToolsFramework/ToolsComponents/ToolsAssetCatalogComponent.h>
|
||||
#include <AzToolsFramework/AssetBrowser/AssetBrowserComponent.h>
|
||||
#include <AzToolsFramework/SourceControl/PerforceComponent.h>
|
||||
#include <AzToolsFramework/Prefab/PrefabSystemComponent.h>
|
||||
|
||||
namespace AssetProcessor
|
||||
{
|
||||
@@ -153,6 +154,7 @@ AZ::ComponentTypeList AssetProcessorAZApplication::GetRequiredSystemComponents()
|
||||
}
|
||||
|
||||
components.push_back(azrtti_typeid<AzToolsFramework::PerforceComponent>());
|
||||
components.push_back(azrtti_typeid<AzToolsFramework::Prefab::PrefabSystemComponent>());
|
||||
|
||||
return components;
|
||||
}
|
||||
@@ -508,7 +510,6 @@ bool ApplicationManager::StartAZFramework()
|
||||
AZ::ComponentApplication::StartupParameters params;
|
||||
|
||||
QString projectName = AssetUtilities::ComputeProjectName();
|
||||
AZ::SettingsRegistryInterface& registry = *AZ::SettingsRegistry::Get();
|
||||
|
||||
// Prevent loading of gems in the Create method of the ComponentApplication
|
||||
params.m_loadDynamicModules = false;
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
*/
|
||||
#include "ApplicationManagerBase.h"
|
||||
|
||||
#include <AzCore/Settings/SettingsRegistryMergeUtils.h>
|
||||
#include <AzCore/std/smart_ptr/make_shared.h>
|
||||
#include <AzCore/std/sort.h>
|
||||
|
||||
@@ -1592,10 +1593,9 @@ void ApplicationManagerBase::BuilderLogV(const AZ::Uuid& builderId, const char*
|
||||
|
||||
if (m_builderDescMap.find(builderId) != m_builderDescMap.end())
|
||||
{
|
||||
const AssetBuilderSDK::AssetBuilderDesc& builderDesc = m_builderDescMap[builderId];
|
||||
char messageBuffer[1024];
|
||||
azvsnprintf(messageBuffer, 1024, message, list);
|
||||
AZ_TracePrintf(AssetProcessor::ConsoleChannel, "Builder name : %s Message : %s.\n", builderDesc.m_name.c_str(), messageBuffer);
|
||||
AZ_TracePrintf(AssetProcessor::ConsoleChannel, "Builder name : %s Message : %s.\n", m_builderDescMap[builderId].m_name.c_str(), messageBuffer);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1691,7 +1691,7 @@ bool ApplicationManagerBase::CheckSufficientDiskSpace(const QString& savePath, q
|
||||
}
|
||||
|
||||
qint64 bytesFree = 0;
|
||||
bool result = AzToolsFramework::ToolsFileUtils::GetFreeDiskSpace(savePath, bytesFree);
|
||||
[[maybe_unused]] bool result = AzToolsFramework::ToolsFileUtils::GetFreeDiskSpace(savePath, bytesFree);
|
||||
|
||||
AZ_Assert(result, "Unable to determine the amount of free space on drive containing path (%s).", savePath.toUtf8().constData());
|
||||
|
||||
@@ -1717,7 +1717,15 @@ void ApplicationManagerBase::RemoveOldTempFolders()
|
||||
return;
|
||||
}
|
||||
|
||||
QString startFolder = rootDir.absolutePath();
|
||||
QString startFolder;
|
||||
if (auto settingsRegistry = AZ::SettingsRegistry::Get(); settingsRegistry != nullptr)
|
||||
{
|
||||
if (AZ::IO::Path userPath; settingsRegistry->Get(userPath.Native(), AZ::SettingsRegistryMergeUtils::FilePathKey_ProjectUserPath))
|
||||
{
|
||||
startFolder = QString::fromUtf8(userPath.c_str(), aznumeric_cast<int>(userPath.Native().size()));
|
||||
}
|
||||
}
|
||||
|
||||
QDir root;
|
||||
if (!AssetUtilities::CreateTempRootFolder(startFolder, root))
|
||||
{
|
||||
|
||||
@@ -1521,10 +1521,10 @@ namespace AssetProcessor
|
||||
//! Given a scan folder path, get its complete info
|
||||
const AssetProcessor::ScanFolderInfo* PlatformConfiguration::GetScanFolderByPath(const QString& scanFolderPath) const
|
||||
{
|
||||
QString normalized = AssetUtilities::NormalizeFilePath(scanFolderPath);
|
||||
AZ::IO::Path scanFolderPathView(scanFolderPath.toUtf8().constData());
|
||||
for (int pathIdx = 0; pathIdx < m_scanFolders.size(); ++pathIdx)
|
||||
{
|
||||
if (QString::compare(m_scanFolders[pathIdx].ScanPath(), normalized, Qt::CaseSensitive) == 0)
|
||||
if (AZ::IO::PathView(m_scanFolders[pathIdx].ScanPath().toUtf8().constData()) == scanFolderPathView)
|
||||
{
|
||||
return &m_scanFolders[pathIdx];
|
||||
}
|
||||
|
||||
@@ -1478,7 +1478,14 @@ to ensure that the address is correct. Asset Processor won't be running in serve
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
return AzToolsFramework::AssetUtils::UpdateFilePathToCorrectCase(rootPath, relativePathFromRoot);
|
||||
|
||||
AZStd::string relPathFromRoot = relativePathFromRoot.toUtf8().constData();
|
||||
if(AzToolsFramework::AssetUtils::UpdateFilePathToCorrectCase(rootPath.toUtf8().constData(), relPathFromRoot))
|
||||
{
|
||||
relativePathFromRoot = QString::fromUtf8(relPathFromRoot.c_str(), aznumeric_cast<int>(relPathFromRoot.size()));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
BuilderFilePatternMatcher::BuilderFilePatternMatcher(const AssetBuilderSDK::AssetBuilderPattern& pattern, const AZ::Uuid& builderDescID)
|
||||
|
||||
Reference in New Issue
Block a user