5fc4551ac0
* Enable relocation of the Project Game Release Layout Relocating the Project Game Release Layout to another directory on the file system failed due to the querying of the engine root failing due to the ComponentApplication::m_engineRoot not using the project path stored in the SettingsRegisry if the engine root cannot be detected Removed the ApplicationRequestBus GetEngineRoot function. The ComponentApplicationRequestBus has a function of the same name that returns the same path. Removed the deprecated GetAppRoot function. The path it returns has no defined value. It was not the engine root or the project root. Removed unused CFileUtil and CFileUtil_impl functions that were invoking the ApplicationREquestBus GetEngineRoot function. On the way to update the functions it was discovered that they aren't called Added a CalculateBranchToken overload that can populate a fixed_string to avoid heap allocations Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com> * Protect against an empty list of artifacts to remove when generating the engine.pak Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
56 lines
3.2 KiB
C++
56 lines
3.2 KiB
C++
/*
|
|
* Copyright (c) Contributors to the Open 3D Engine Project.
|
|
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0 OR MIT
|
|
*
|
|
*/
|
|
#pragma once
|
|
|
|
#include <AzCore/IO/Path/Path.h>
|
|
#include <AzCore/Memory/SystemAllocator.h>
|
|
#include <AzCore/std/containers/vector.h>
|
|
#include <AzCore/std/string/string.h>
|
|
#include <AzFramework/Gem/GemInfo.h>
|
|
|
|
class QString;
|
|
|
|
namespace AzToolsFramework::AssetUtils
|
|
{
|
|
static constexpr const char* AssetImporterSettingsKey{ "/O3DE/SceneAPI/AssetImporter" };
|
|
static constexpr const char* AssetImporterSupportedFileTypeKey{ "SupportedFileTypeExtensions" };
|
|
|
|
//! Reads the "/Amazon/AssetProcessor/Settings/Platforms" entry from the settings registry
|
|
//! to retrieve all enabled platforms
|
|
void ReadEnabledPlatformsFromSettingsRegistry(AZ::SettingsRegistryInterface& settingsRegistry,
|
|
AZStd::vector<AZStd::string>& enabledPlatforms);
|
|
|
|
//! Returns all the enabledPlatforms by reading the specified config files in order.
|
|
AZStd::vector<AZStd::string> GetEnabledPlatforms(AZ::SettingsRegistryInterface& settingsRegistry,
|
|
const AZStd::vector<AZ::IO::Path>& configFiles);
|
|
|
|
//! Returns the platform specific AssetProcessorPlatformConfig.ini/setreg files
|
|
//! Please note that config files are order dependent
|
|
bool AddPlatformConfigFilePaths(AZStd::string_view root, AZStd::vector<AZ::IO::Path>& configFilePaths);
|
|
|
|
//! Returns all the config files including the the platform and gems ones.
|
|
//! Please note that config files are order dependent
|
|
//! the root config file has the lowest priority.
|
|
//! the project configuration file has the absolutely highest priority
|
|
//! Also note that if the project has any "game project gems", then those will also be inserted last,
|
|
//! and thus have a higher priority than the root or non - project gems.
|
|
//! Also note that the game project could be in a different location to the engine therefore we need the assetRoot param.
|
|
AZStd::vector<AZ::IO::Path> GetConfigFiles(AZStd::string_view engineRoot, AZStd::string_view projectPath,
|
|
bool addPlatformConfigs = true, bool addGemsConfigs = true, AZ::SettingsRegistryInterface* settingsRegistry = nullptr);
|
|
|
|
//! A utility function which checks the given path starting at the root and updates the relative path to be the actual case correct path.
|
|
//! For example, if you pass it "c:\lumberyard\dev" as the root and "editor\icons\whatever.ico" as the relative path.
|
|
//! It may update relativePathFromRoot to be "Editor\Icons\Whatever.ico" if such a casing is the actual physical case on disk already.
|
|
//! @param root a trusted already-case-correct path (will not be case corrected). If empty it will be set to appRoot.
|
|
//! @param relativePathFromRoot a non-trusted (may be incorrect case) path relative to rootPath,
|
|
//! which will be normalized and updated to be correct casing.
|
|
//! @return if such a file does NOT exist, it returns FALSE, else returns TRUE.
|
|
//! @note A very expensive function! Call sparingly.
|
|
bool UpdateFilePathToCorrectCase(AZStd::string_view root, AZStd::string& relativePathFromRoot);
|
|
} //namespace AzToolsFramework::AssetUtils
|