Misc fixes for Linux SDK (#3764)
* Fix rpath for lrelease binary This fixes the rpath for lrelease which is used to compile the qt translation file. Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com> * Fix a LocalFileIO path casing issue LocalFileIO was lowercasing the entire path after substituting aliases. This caused files to not be found and many failures in AP. Fixed to only lowercase the trailing relative path after the substitution. Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com> * Removed a message line Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com>
This commit is contained in:
@@ -707,6 +707,7 @@ namespace AZ
|
||||
resolvedPathLen += postAliasView.size();
|
||||
// Null-Terminated the resolved path
|
||||
resolvedPath[resolvedPathLen] = '\0';
|
||||
|
||||
// If the path started with one of the "asset cache" path aliases, lowercase the path
|
||||
const char* assetAliasPath = GetAlias("@assets@");
|
||||
const char* rootAliasPath = GetAlias("@root@");
|
||||
@@ -714,10 +715,13 @@ namespace AZ
|
||||
const bool lowercasePath = (assetAliasPath != nullptr && AZ::StringFunc::StartsWith(resolvedPath, assetAliasPath)) ||
|
||||
(rootAliasPath != nullptr && AZ::StringFunc::StartsWith(resolvedPath, rootAliasPath)) ||
|
||||
(projectPlatformCacheAliasPath != nullptr && AZ::StringFunc::StartsWith(resolvedPath, projectPlatformCacheAliasPath));
|
||||
|
||||
if (lowercasePath)
|
||||
{
|
||||
AZStd::to_lower(resolvedPath, resolvedPath + resolvedPathLen);
|
||||
// Lowercase only the relative part after the replaced alias.
|
||||
AZStd::to_lower(resolvedPath + aliasValue.size(), resolvedPath + resolvedPathLen);
|
||||
}
|
||||
|
||||
// Replace any backslashes with posix slashes
|
||||
AZStd::replace(resolvedPath, resolvedPath + resolvedPathLen, AZ::IO::WindowsPathSeparator, AZ::IO::PosixPathSeparator);
|
||||
return true;
|
||||
|
||||
@@ -14,6 +14,9 @@ function(ly_copy source_file target_directory)
|
||||
if("${source_file}" MATCHES "qt/plugins" AND "${target_filename_ext}" STREQUAL ".so")
|
||||
get_filename_component(target_filename "${source_file}" NAME)
|
||||
file(RPATH_CHANGE FILE "${target_directory}/${target_filename}" OLD_RPATH "\$ORIGIN/../../lib" NEW_RPATH "\$ORIGIN/..")
|
||||
elseif("${source_file}" MATCHES "lrelease")
|
||||
get_filename_component(target_filename "${source_file}" NAME)
|
||||
file(RPATH_CHANGE FILE "${target_directory}/${target_filename}" OLD_RPATH "\$ORIGIN/../lib" NEW_RPATH "\$ORIGIN")
|
||||
endif()
|
||||
endfunction()]])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user