aws / lumberyard

Amazon Lumberyard is a free AAA game engine deeply integrated with AWS and Twitch – with full source.
Other
2.02k stars 540 forks source link

Path names are very long #476

Closed gitrndlab closed 4 years ago

gitrndlab commented 4 years ago

Describe your feature request I observed that some file paths are very long. I have experience in previous projects in different engine that this may be a case and a problem. At the moment we can see some of the warnings but we should be aware of it. I attach a few logs about it:

android_armv8_clangProfile|arm64-v8a :CMake Warning in CloudGemFramework/CMakeLists.txt:
android_armv8_clangProfile|arm64-v8a :  The object file directory
android_armv8_clangProfile|arm64-v8a :    I:/Amazon/lumberyard/dev/BinTemp/android_studio/TestProjectLauncher/cmake/android_armv8_clangProfile/arm64-v8a/CloudGemFramework/CMakeFiles/CloudGemFramework.dir/
android_armv8_clangProfile|arm64-v8a :  has 162 characters.  The maximum full path to an object file is 250
android_armv8_clangProfile|arm64-v8a :  characters (see CMAKE_OBJECT_PATH_MAX).  Object file
android_armv8_clangProfile|arm64-v8a :    I_/Amazon/lumberyard/dev/Gems/CloudGemFramework/v1/Code/Source/Identity/ResourceManagementLambdaBasedTokenRetrievalStrategy.cpp.o
android_armv8_clangProfile|arm64-v8a :  cannot be safely placed under this directory.  The build may not work
android_armv8_clangProfile|arm64-v8a :  correctly.
android_armv8_clangProfile|arm64-v8a :CMake Warning in CloudGemFramework.StaticLibrary/CMakeLists.txt:
android_armv8_clangProfile|arm64-v8a :  The object file directory
android_armv8_clangProfile|arm64-v8a :    I:/Amazon/lumberyard/dev/BinTemp/android_studio/TestProjectLauncher/cmake/android_armv8_clangProfile/arm64-v8a/CloudGemFramework.StaticLibrary/CMakeFiles/CloudGemFramework.StaticLibrary.dir/
android_armv8_clangProfile|arm64-v8a :  has 190 characters.  The maximum full path to an object file is 250
android_armv8_clangProfile|arm64-v8a :  characters (see CMAKE_OBJECT_PATH_MAX).  Object file
android_armv8_clangProfile|arm64-v8a :    I_/Amazon/lumberyard/dev/Gems/CloudGemFramework/v1/Code/StaticLibrary/CloudGemFramework_precompiled.cpp.o
android_armv8_clangProfile|arm64-v8a :  cannot be safely placed under this directory.  The build may not work
android_armv8_clangProfile|arm64-v8a :  correctly.
android_armv8_clangProfile|arm64-v8a :CMake Warning in InputManagementFramework/CMakeLists.txt:
android_armv8_clangProfile|arm64-v8a :  The object file directory
android_armv8_clangProfile|arm64-v8a :    I:/Amazon/lumberyard/dev/BinTemp/android_studio/TestProjectLauncher/cmake/android_armv8_clangProfile/arm64-v8a/InputManagementFramework/CMakeFiles/InputManagementFramework.dir/
android_armv8_clangProfile|arm64-v8a :  has 176 characters.  The maximum full path to an object file is 250
android_armv8_clangProfile|arm64-v8a :  characters (see CMAKE_OBJECT_PATH_MAX).  Object file
android_armv8_clangProfile|arm64-v8a :    I_/Amazon/lumberyard/dev/Gems/InputManagementFramework/Code/Source/InputManagementFramework_precompiled.cpp.o
android_armv8_clangProfile|arm64-v8a :  cannot be safely placed under this directory.  The build may not work
android_armv8_clangProfile|arm64-v8a :  correctly.
android_armv8_clangProfile|arm64-v8a :-- Generating done
AMZN-alexpete commented 4 years ago

Hi @researchdeveloping,

This is a limitation of Windows and there's little we can do about it. If you're on Win 10 you can increase the limit of the command line:

https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file#enable-long-paths-in-windows-10-version-1607-and-later

Starting in Windows 10, version 1607, MAX_PATH limitations have been removed from common Win32 file and directory functions. However, you must opt-in to the new behavior.

To enable the new long path behavior, both of the following conditions must be met:

The registry key HKLM\SYSTEM\CurrentControlSet\Control\FileSystem LongPathsEnabled (Type: REG_DWORD) must exist and be set to 1. The key's value will be cached by the system (per process) after the first call to an affected Win32 file or directory function (see below for the list of functions). The registry key will not be reloaded during the lifetime of the process. In order for all apps on the system to recognize the value of the key, a reboot might be required because some processes may have started before the key was set.

gitrndlab commented 4 years ago

Thank You @AMZN-alexpete, I didn't know it - that will help a lot!