From bfd266db8f4e298a1fddc6525245f63ecc5a8c3b Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Mon, 21 Jun 2021 18:24:29 -0700 Subject: [PATCH] LYN-4659 OSX: Prebuilt Editor and Asset Processor fail to launch (#1446) * LYN-4657 OSX: Building AutomatedTesting project fails * forgot this file * fixing lrelease patching in mac/windows * reverting change and disabling warning, the intention of the test is to compare to unitialized values * Fix for dxc * no need to disable the warning, just remove the const * missing dependency to EditorCommon --- .../Json/JsonSerializerConformityTests.h | 2 +- Code/Sandbox/Editor/CMakeLists.txt | 1 + .../Code/Platform/Mac/lrelease_mac.cmake | 9 --------- .../Platform/Windows/lrelease_windows.cmake | 16 ---------------- .../Mac/runtime_dependencies_mac.cmake.in | 17 ++++++++++++----- 5 files changed, 14 insertions(+), 31 deletions(-) diff --git a/Code/Framework/AzCore/Tests/Serialization/Json/JsonSerializerConformityTests.h b/Code/Framework/AzCore/Tests/Serialization/Json/JsonSerializerConformityTests.h index 9d7e58dd36..a46d8ad9d4 100644 --- a/Code/Framework/AzCore/Tests/Serialization/Json/JsonSerializerConformityTests.h +++ b/Code/Framework/AzCore/Tests/Serialization/Json/JsonSerializerConformityTests.h @@ -1206,7 +1206,7 @@ namespace JsonSerializationTests if (this->m_features.m_enableInitializationTest) { auto instance = this->m_description.CreateDefaultInstance(); - typename TypeParam::Type compare = typename TypeParam::Type{}; + AZStd::remove_cvref_t compare; if (!this->m_description.AreEqual(*instance, compare)) { auto serializer = this->m_description.CreateSerializer(); diff --git a/Code/Sandbox/Editor/CMakeLists.txt b/Code/Sandbox/Editor/CMakeLists.txt index 51620c6e37..6a5fb7c6c8 100644 --- a/Code/Sandbox/Editor/CMakeLists.txt +++ b/Code/Sandbox/Editor/CMakeLists.txt @@ -128,6 +128,7 @@ ly_add_target( Legacy::EditorCore RUNTIME_DEPENDENCIES Gem::AtomViewportDisplayInfo + Legacy::EditorCommon ) ly_add_source_properties( SOURCES CryEdit.cpp diff --git a/Gems/LmbrCentral/Code/Platform/Mac/lrelease_mac.cmake b/Gems/LmbrCentral/Code/Platform/Mac/lrelease_mac.cmake index 715762b58c..4d5680a30d 100644 --- a/Gems/LmbrCentral/Code/Platform/Mac/lrelease_mac.cmake +++ b/Gems/LmbrCentral/Code/Platform/Mac/lrelease_mac.cmake @@ -8,12 +8,3 @@ # 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. # - -add_custom_command(TARGET LmbrCentral.Editor POST_BUILD - COMMAND "${CMAKE_COMMAND}" -P "${LY_ROOT_FOLDER}/cmake/Platform/Mac/RPathChange.cmake" - "$/lrelease" - @loader_path/../lib - "${QT_PATH}/lib" - COMMENT "Patching lrelease..." - VERBATIM -) diff --git a/Gems/LmbrCentral/Code/Platform/Windows/lrelease_windows.cmake b/Gems/LmbrCentral/Code/Platform/Windows/lrelease_windows.cmake index 73e1fb82c1..4d5680a30d 100644 --- a/Gems/LmbrCentral/Code/Platform/Windows/lrelease_windows.cmake +++ b/Gems/LmbrCentral/Code/Platform/Windows/lrelease_windows.cmake @@ -8,19 +8,3 @@ # 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. # - -add_custom_command(TARGET LmbrCentral.Editor POST_BUILD - COMMAND "${CMAKE_COMMAND}" - -DLY_TIMESTAMP_REFERENCE=$/lrelease.exe - -DLY_LOCK_FILE=$/qtdeploy.lock - -P ${LY_ROOT_FOLDER}/cmake/CommandExecution.cmake - EXEC_COMMAND "${CMAKE_COMMAND}" -E - env PATH="${QT_PATH}/bin" - ${WINDEPLOYQT_EXECUTABLE} - $<$:--pdb> - --verbose 0 - --no-compiler-runtime - $/lrelease.exe - COMMENT "Patching lrelease..." - VERBATIM -) diff --git a/cmake/Platform/Mac/runtime_dependencies_mac.cmake.in b/cmake/Platform/Mac/runtime_dependencies_mac.cmake.in index 6ad428c08d..25418bf6cf 100644 --- a/cmake/Platform/Mac/runtime_dependencies_mac.cmake.in +++ b/cmake/Platform/Mac/runtime_dependencies_mac.cmake.in @@ -105,12 +105,10 @@ if(@target_file_dir@ MATCHES ".app/Contents/MacOS") endif() endif() if(anything_new) + unset(fixup_bundle_ignore) # LYN-4505: Patch dxc, is configured in the wrong folder in 3p if(EXISTS ${bundle_path}/Contents/MacOS/Builders/DirectXShaderCompiler/bin/dxc-3.7) - # we copy to not invalidate the copy check from above - file(COPY ${bundle_path}/Contents/MacOS/Builders/DirectXShaderCompiler/lib/libdxcompiler.3.7.dylib - DESTINATION ${bundle_path}/Contents/MacOS/Builders/DirectXShaderCompiler/bin - ) + list(APPEND fixup_bundle_ignore dxc-3.7) endif() # Python.framework being copied by fixup_bundle #if(EXISTS ${bundle_path}/Contents/Frameworks/Python.framework) @@ -139,8 +137,17 @@ if(@target_file_dir@ MATCHES ".app/Contents/MacOS") #endif() list(REMOVE_DUPLICATES plugin_libs) list(REMOVE_DUPLICATES plugin_dirs) - fixup_bundle("${bundle_path}" "${plugin_libs}" "${plugin_dirs}") + fixup_bundle("${bundle_path}" "${plugin_libs}" "${plugin_dirs}" IGNORE_ITEM ${fixup_bundle_ignore}) file(TOUCH "${bundle_path}") file(TOUCH "${fixup_timestamp_file}") + + # fixup bundle ends up removing the rpath of dxc (despite we exclude it) + if(EXISTS ${bundle_path}/Contents/MacOS/Builders/DirectXShaderCompiler/bin/dxc-3.7) + find_program(LY_INSTALL_NAME_TOOL install_name_tool) + if (NOT LY_INSTALL_NAME_TOOL) + message(FATAL_ERROR "Unable to locate 'install_name_tool'") + endif() + execute_process(COMMAND ${LY_INSTALL_NAME_TOOL} -add_rpath @executable_path/../lib ${bundle_path}/Contents/MacOS/Builders/DirectXShaderCompiler/bin/dxc-3.7) + endif() endif() endif()