You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
o3de/Code/Legacy/CryCommon
lumberyard-employee-dm f648cb1fd8
Update the FileIO Aliases (#4186)
* Update the FileIOAlias naming to make the cache, project root and engine
root paths more clear

The alias of `@root@`, `@assets@`, and `@projectplatformcache@` has been
collapsed to `@projectproductassets@`

The alias of `@devroot@` and `@engroot@` has been collapsed to
`@engroot@`

The alias of `@devassets@` and `@projectroot@` has been collapsed to
`@projectroot@`

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Updated use of devassets and devroot properties in python

Those properties now use projectroot and engroot

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Updating the alias @engroot@ alias path comment in each platform specific LocalFileIO_*.cpp file

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Removed hardcoded size of 9 for the product asset alias.

The ResolvePath function now just appends the @projectproductassets@
alias with the input path

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Remove duplicate @projectproductassets@ check in ProcessFileTreeRequest

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Fix for typos in Hydra python test

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Updated LocalFileIO::Copy call on Windows to use the Unicode aware CopyFileW API

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Updated the AWSMetreicsGemAllocatorFixture to properly suppress asset
cache write errors for Test file creation.

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Removed unneeded call to set the @projectproductasstes@ alias at the bottom of the AssetSeedManagerTest SetUp

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Added a deprecated alias map to the FileIO System

When a deprecated alias is accessed, the FileIO System logs an AZ_Error and indicates the alias that should be used

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Updated python test scripts to use the projectroot binding

Retrieving the AutomatedTesting project path based on "<devroot>/AutomatedTesting" has been removed.

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Updated references to devroot and devgame within the codebase

The GetAbsoluteDevGameFolderPath functions has been replaced with direct call to AZ::Utils::GetProjectPath
The GetAbsoluteDevRootFolderPath functions has been replaced with direct calls to AZ::Utils::GetEnginePath

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Updated <engroot>/AutomatedTesting references to projectroot


Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Replaced references that assumes the project path is <engroot>/AutomatedTesting with <projectroot> in the AutomatedTesting python test

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Correct casing in emfxworkspace file


Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Removed newly added AppendPathParts function
Removed the Path constructors which accepts a PathIterable instance

The PathIterable isn't safe to return to a user of the Path class as it might be referencing temporary paths supplied via PathView arguments

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Fixed unused parameter warning

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Undid change to the LexicallyProximate function to set the path result to the base path.

It needs to return the *this path if the pathResult is empty

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Moved the LocalFileIO ConvertToAbsolutePath implementations to AZ::Utils

Fixed the ConvertToAbsolutePath implementation for Unix platforms to use a buffer that is size PATH_MAX(4096 on all our supported Unix platforms).
Because the buffer before was AZ::IO::MaxPathLength which as a size of 1024, this was resulting in the Unix `realpath` function smashing the stack when it converts a path to an absolute path that is longer than 1024 characters

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Updated the EditorCore.Tests to attach the AZ Environment to the EditorCore shared library that is statically loaded on launch.

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Fixed for DeprecatedAlaisesKeyVisitor Visit function causing the non string_view overloads being hidden causing a hidden base class function warning

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Changed the AWSMetricsGemMock to use a temporary for writing test assets

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Updated the LocalFileIO::ResolvePath function to use HasRootPath to determine if a path starts with a root path such as "D:", "D:/" or "/"

IsAbsolute was not the corect check as the path of "D:" is a relative
path.
To be absolute according to the Windows the path must have a root
directory. i.e "D:/" or "D:\"

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Removed absolute path comment from LocalFile_UnixLike.cpp and LocalFile_Android.cpp FindFiles implementations
Updated the ConvertToAlias to supply an AZ::IO::FixedMaxPath

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Replaced usage of the @projectproductassets@ alias with @engroot@ when referring to the LmbrCentral source folder in the CopyDependencyBuilderTest and the SeedBuilderTests

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Updated the ScriptCanvas Upgrade Tool to output backed up files to the
Project User Path instead of the engine root

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Fixed whitespacing issues in Application.cpp

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Remove unnecessary creation of a FixedMaxPath in the UpgradeTool.cpp

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Modified testSeedFolder variable in the SeedBuilderTests to use the
@engroot@ alias instead of @projectproductassets@/.. alias when
referring to the LmbrCentral Gem source path

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Updated references to the Project Asset Cache in the PythonTests.

Those tests no longer use the logic `azlmbr.paths.projectroot / "Cache" / "pc"` to retrieve a path to the cache root but instead the `azlmbr.paths.projectproductassets` constant

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Fixed the FileIO Deprecated Alias test on Windows

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Removing @projectsourceassets@ alias, as it is only used once.

Updated the PhysX EditorSystemComponent.cpp to query the ProjectPath
form the SettingsRegistry.

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Replaced @projectproductassets@ alias with @products@

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Rollback changes to the PhysX EditorSystemComponent.cpp

The changes to use the ProjectPath from the SettingsRegistry has been implemented in PR #4497

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
4 years ago
..
LyShine Legacy code cleanup - part 3 (#3903) 4 years ago
Maestro Cleanup SerializeContext.h pt.1 (#4264) 4 years ago
Mocks Updated the GameApplication to mount the engine.pak (#4128) 4 years ago
Platform Various fixes and empty boilerplate files required for restricted platforms. (#3610) 4 years ago
AndroidSpecific.h remove unnecessary ALIGN macros 4 years ago
AnimKey.h Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
AppleSpecific.h XCode doesnt support files per configuration, using the old method (#3789) 4 years ago
BaseTypes.h Legacy code cleanup - part 3 (#3903) 4 years ago
CMakeLists.txt Various fixes and empty boilerplate files required for restricted platforms. (#3610) 4 years ago
CryAssert.h platform.h cleanup 4 years ago
CryAssert_Android.h Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
CryAssert_Linux.h [redcode/crythread-2nd-pass] replaced instances of AZStd::lock_guard<> with AZStd::scoped_lock as per feedback 4 years ago
CryAssert_Mac.h [redcode/crythread-2nd-pass] removed or replaced remaining CryMutex/CryLock usage with equivalent AZStd version 4 years ago
CryAssert_iOS.h Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
CryAssert_impl.h Merge branch 'development' into cmake/SPEC-7179 4 years ago
CryEndian.h Legacy code cleanup - part 3 (#3903) 4 years ago
CryFile.h Updated the GameApplication to mount the engine.pak (#4128) 4 years ago
CryHalf.inl Legacy code cleanup - part 3 (#3903) 4 years ago
CryLegacyAllocator.h CryLegacyAllocator cleanup 4 years ago
CryLibrary.cpp Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
CryLibrary.h fixes for Android 4 years ago
CryListenerSet.h Legacy code cleanup - part 3 (#3903) 4 years ago
CryPath.h Update the FileIO Aliases (#4186) 4 years ago
CryRandomInternal.h removing more unused stuff 4 years ago
CrySystemBus.h Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
CryVersion.h some fixes 4 years ago
Cry_Camera.h Fix some debug compile errors introduced by https://github.com/o3de/o3de/pull/3903 4 years ago
Cry_Color.h Legacy code cleanup - part 3 (#3903) 4 years ago
Cry_Geo.h Legacy code cleanup - part 3 (#3903) 4 years ago
Cry_GeoDistance.h Legacy cleanup (#3383) 4 years ago
Cry_GeoIntersect.h Legacy cleanup (#3383) 4 years ago
Cry_Math.h Legacy code cleanup - part 3 (#3903) 4 years ago
Cry_Matrix33.h Legacy code cleanup - part 3 (#3903) 4 years ago
Cry_Matrix34.h Fix some debug compile errors introduced by https://github.com/o3de/o3de/pull/3903 4 years ago
Cry_Matrix44.h Legacy code cleanup - part 3 (#3903) 4 years ago
Cry_Quat.h Legacy code cleanup - part 3 (#3903) 4 years ago
Cry_ValidNumber.h Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
Cry_Vector2.h Legacy code cleanup - part 3 (#3903) 4 years ago
Cry_Vector3.h Legacy code cleanup - part 3 (#3903) 4 years ago
Cry_Vector4.h Fix some debug compile errors introduced by https://github.com/o3de/o3de/pull/3903 4 years ago
HMDBus.h Legacy cleanup, part 2 (#3659) 4 years ago
IAudioInterfacesCommonData.h Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
IAudioSystem.h Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
ICmdLine.h Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
IConsole.h Merge branch 'development' into cmake/warn_virtual 4 years ago
IEntityRenderState.h Legacy code cleanup - part 3 (#3903) 4 years ago
IFont.h Legacy code cleanup - part 3 (#3903) 4 years ago
IFunctorBase.h [redcode/crythread-2nd-pass] post merge include fixes 4 years ago
IGem.h Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
IIndexedMesh.h Legacy code cleanup - part 3 (#3903) 4 years ago
ILevelSystem.h Legacy code cleanup - part 3 (#3903) 4 years ago
ILocalizationManager.h Merge branch 'development' into cmake/warn_virtual 4 years ago
ILog.h Legacy code cleanup - part 3 (#3903) 4 years ago
IMNM.h Merge branch 'development' into cmake/SPEC-7179 4 years ago
IMaterial.h Legacy code cleanup - part 3 (#3903) 4 years ago
IMiniLog.h more fixes 4 years ago
IMovieSystem.h Legacy code cleanup - part 3 (#3903) 4 years ago
INavigationSystem.h Legacy cleanup (#3383) 4 years ago
IPathfinder.h Legacy code cleanup - part 3 (#3903) 4 years ago
IProcess.h Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
IRenderAuxGeom.h Legacy code cleanup - part 3 (#3903) 4 years ago
IRenderer.h Legacy code cleanup - part 3 (#3903) 4 years ago
ISerialize.h Legacy code cleanup - part 3 (#3903) 4 years ago
IShader.h Legacy code cleanup - part 3 (#3903) 4 years ago
ISplines.h Legacy code cleanup - part 3 (#3903) 4 years ago
IStatObj.h Legacy code cleanup - part 3 (#3903) 4 years ago
ISystem.h Legacy code cleanup - part 3 (#3903) 4 years ago
ITexture.h Legacy code cleanup - part 3 (#3903) 4 years ago
ITimer.h Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
IValidator.h Legacy code cleanup - part 3 (#3903) 4 years ago
IViewSystem.h Legacy cleanup, part 2 (#3659) 4 years ago
IWindowMessageHandler.h Merge branch 'development' into cmake/SPEC-7179 4 years ago
IXml.h Legacy code cleanup - part 3 (#3903) 4 years ago
LCGRandom.h Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
LegacyAllocator.cpp Merge branch 'development' into cmake/AddressSanitizer 4 years ago
LegacyAllocator.h Deprecate profiler categories based on global enum 4 years ago
Linux32Specific.h remove unnecessary ALIGN macros 4 years ago
Linux64Specific.h remove unnecessary ALIGN macros 4 years ago
LinuxSpecific.h remove unnecessary ALIGN macros 4 years ago
Linux_Win32Wrapper.h Legacy code cleanup - part 3 (#3903) 4 years ago
LoadScreenBus.h Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
LocalizationManagerBus.h Legacy code cleanup - part 3 (#3903) 4 years ago
LocalizationManagerBus.inl Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
MacSpecific.h Several build fixes 4 years ago
MainThreadRenderRequestBus.h Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
MathConversion.h Legacy code cleanup - part 3 (#3903) 4 years ago
MicrophoneBus.h Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
MiniQueue.h Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
MultiThread_Containers.h Legacy code cleanup - part 3 (#3903) 4 years ago
NullAudioSystem.h Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
PNoise3.h fixes for Code/CryEngine 4 years ago
ProjectDefines.h fixes some install paths issues in monolithic release (#4422) 4 years ago
Random.h Legacy code cleanup - part 3 (#3903) 4 years ago
Range.h Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
ScopedVariableSetter.h Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
SerializationTypes.h Legacy code cleanup - part 3 (#3903) 4 years ago
SerializeFwd.h Legacy code cleanup - part 3 (#3903) 4 years ago
SimpleSerialize.h more fixes 4 years ago
StatObjBus.h Legacy code cleanup - part 3 (#3903) 4 years ago
StaticInstance.h Legacy cleanup (#3383) 4 years ago
StlUtils.h Legacy cleanup, part 2 (#3659) 4 years ago
Synchronization.h Legacy code cleanup - part 3 (#3903) 4 years ago
TimeValue.h Legacy code cleanup - part 3 (#3903) 4 years ago
Timer.h Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
VRCommon.h Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
VectorMap.h some fixes 4 years ago
Vertex.h Legacy cleanup, part 2 (#3659) 4 years ago
VertexFormats.h Legacy code cleanup - part 3 (#3903) 4 years ago
Win32specific.h remove unnecessary ALIGN macros 4 years ago
Win64specific.h remove unnecessary ALIGN macros 4 years ago
WinBase.cpp Miscellaneous fixes and PAL changes required for restricted platforms. (#4021) 4 years ago
XMLBinaryHeaders.h Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
crycommon_files.cmake Legacy code cleanup - part 3 (#3903) 4 years ago
crycommon_testing_files.cmake Legacy cleanup (#3383) 4 years ago
iOSSpecific.h removing more unused stuff 4 years ago
platform.h Avoid redefining `PRI` macros on Linux (#4055) 4 years ago
platform_impl.cpp fixes some install paths issues in monolithic release (#4422) 4 years ago
smartptr.h Legacy cleanup, part 2 (#3659) 4 years ago