Integrating latest from github/staging

Integrating up through commit 5e1bdae
This commit is contained in:
alexpete
2021-03-26 14:31:50 -07:00
parent 9c54341af8
commit 36c4e827bd
764 changed files with 11453 additions and 20251 deletions
@@ -12,7 +12,5 @@
#pragma once
#define AZ_TRAIT_LAUNCHER_LOWER_CASE_PATHS 1
#define AZ_TRAIT_LAUNCHER_SET_APPROOT_OVERRIDE 0
#define AZ_TRAIT_LAUNCHER_ALLOW_CMDLINE_APPROOT_OVERRIDE 0
#define AZ_TRAIT_LAUNCHER_USE_CRY_DYNAMIC_MODULE_HANDLE 1
#define AZ_TRAIT_SHARED_LIBRARY_FILENAME_FORMAT "%s/lib%s.so"
@@ -12,7 +12,5 @@
#pragma once
#define AZ_TRAIT_LAUNCHER_LOWER_CASE_PATHS 0
#define AZ_TRAIT_LAUNCHER_SET_APPROOT_OVERRIDE 0
#define AZ_TRAIT_LAUNCHER_ALLOW_CMDLINE_APPROOT_OVERRIDE 1
#define AZ_TRAIT_LAUNCHER_USE_CRY_DYNAMIC_MODULE_HANDLE 1
#define AZ_TRAIT_SHARED_LIBRARY_FILENAME_FORMAT "%s/lib%s.so"
@@ -12,7 +12,5 @@
#pragma once
#define AZ_TRAIT_LAUNCHER_LOWER_CASE_PATHS 1
#define AZ_TRAIT_LAUNCHER_SET_APPROOT_OVERRIDE 1
#define AZ_TRAIT_LAUNCHER_ALLOW_CMDLINE_APPROOT_OVERRIDE 1
#define AZ_TRAIT_LAUNCHER_USE_CRY_DYNAMIC_MODULE_HANDLE 1
#define AZ_TRAIT_SHARED_LIBRARY_FILENAME_FORMAT "%s/lib%s.dylib"
@@ -20,35 +20,39 @@ else()
endif()
# Add resources and app icons to launchers
get_target_property(${project}_SOURCE_DIR ${project} SOURCE_DIR)
get_filename_component(${project}_SOURCE_PARENT_DIR ${${project}_SOURCE_DIR} DIRECTORY)
set(ly_game_resource_folder ${${project}_SOURCE_PARENT_DIR}/Resources/Platform/Mac)
if (NOT EXISTS ${ly_game_resource_folder})
set(ly_game_resource_folder ${${project}_SOURCE_PARENT_DIR}/Resources/MacLauncher)
if (NOT EXISTS ${ly_game_resource_folder})
message(FATAL_ERROR "Missing expected resources folder")
list(APPEND candidate_paths ${project_real_path}/Resources/Platform/Mac)
list(APPEND candidate_paths ${project_real_path}/Gem/Resources/Platform/Mac) # Legacy projects
list(APPEND candidate_paths ${project_real_path}/Gem/Resources/MacLauncher) # Legacy projects
foreach(resource_path IN LISTS candidate_paths)
if(EXISTS ${resource_path})
set(ly_game_resource_folder ${resource_path})
break()
endif()
endforeach()
if(NOT EXISTS ${ly_game_resource_folder})
list(JOIN candidate_paths " " formatted_error)
message(FATAL_ERROR "Missing 'Resources' folder. Candidate paths tried were: ${formatted_error}")
endif()
target_sources(${project}.GameLauncher PRIVATE ${ly_game_resource_folder}/Images.xcassets)
set_target_properties(${project}.GameLauncher PROPERTIES
target_sources(${project_name}.GameLauncher PRIVATE ${ly_game_resource_folder}/Images.xcassets)
set_target_properties(${project_name}.GameLauncher PROPERTIES
MACOSX_BUNDLE_INFO_PLIST ${ly_game_resource_folder}/Info.plist
RESOURCE ${ly_game_resource_folder}/Images.xcassets
XCODE_ATTRIBUTE_ASSETCATALOG_COMPILER_APPICON_NAME ${project}AppIcon
XCODE_ATTRIBUTE_ASSETCATALOG_COMPILER_APPICON_NAME ${project_name}AppIcon
)
set(layout_tool_dir ${LY_ROOT_FOLDER}/cmake/Tools)
add_custom_command(TARGET ${project}.GameLauncher POST_BUILD
add_custom_command(TARGET ${project_name}.GameLauncher POST_BUILD
COMMAND ${LY_PYTHON_CMD} layout_tool.py
--dev-root "${LY_ROOT_FOLDER}"
-p Mac
-a ${LY_ASSET_DEPLOY_ASSET_TYPE}
-g ${project}
--project-path ${project_real_path}
-m ${LY_ASSET_DEPLOY_MODE}
--create-layout-root
-l $<TARGET_BUNDLE_DIR:${project}.GameLauncher>/Contents/Resources/assets
-l $<TARGET_BUNDLE_DIR:${project_name}.GameLauncher>/Contents/Resources/assets
--build-config $<CONFIG>
--warn-on-missing-assets
--verify
@@ -12,7 +12,5 @@
#pragma once
#define AZ_TRAIT_LAUNCHER_LOWER_CASE_PATHS 0
#define AZ_TRAIT_LAUNCHER_SET_APPROOT_OVERRIDE 0
#define AZ_TRAIT_LAUNCHER_ALLOW_CMDLINE_APPROOT_OVERRIDE 1
#define AZ_TRAIT_LAUNCHER_USE_CRY_DYNAMIC_MODULE_HANDLE 0
#define AZ_TRAIT_SHARED_LIBRARY_FILENAME_FORMAT R"(%s\%s.dll)"
@@ -21,17 +21,14 @@ else()
)
endif()
# Find the resource from the game gem
get_target_property(${project}_SOURCE_DIR ${project} SOURCE_DIR) # Point to where the code is
get_filename_component(${project}_SOURCE_PARENT_DIR ${${project}_SOURCE_DIR} DIRECTORY) # Parent directory
set(ICON_FILE ${${project}_SOURCE_PARENT_DIR}/Resources/GameSDK.ico)
set(ICON_FILE ${project_real_path}/Gem/Resources/GameSDK.ico)
if(NOT EXISTS ${ICON_FILE})
# Try the common LauncherUnified icon instead
set(ICON_FILE Resources/GameSDK.ico)
endif()
if(EXISTS ${ICON_FILE})
set(target_file ${CMAKE_CURRENT_BINARY_DIR}/${project}.GameLauncher.rc)
set(target_file ${CMAKE_CURRENT_BINARY_DIR}/${project_name}.GameLauncher.rc)
configure_file(Platform/Windows/Launcher.rc.in
${target_file}
@ONLY
@@ -12,7 +12,5 @@
#pragma once
#define AZ_TRAIT_LAUNCHER_LOWER_CASE_PATHS 1
#define AZ_TRAIT_LAUNCHER_SET_APPROOT_OVERRIDE 1
#define AZ_TRAIT_LAUNCHER_ALLOW_CMDLINE_APPROOT_OVERRIDE 0
#define AZ_TRAIT_LAUNCHER_USE_CRY_DYNAMIC_MODULE_HANDLE 0
#define AZ_TRAIT_SHARED_LIBRARY_FILENAME_FORMAT "%s/lib%s.dylib"
@@ -21,37 +21,40 @@ else()
set(LY_RUNTIME_DEPENDENCIES Legacy::CryRenderMetal)
endif()
# Find the resource from the game gem
get_target_property(${project}_SOURCE_DIR ${project} SOURCE_DIR) # Point to where the code is
get_filename_component(${project}_SOURCE_PARENT_DIR ${${project}_SOURCE_DIR} DIRECTORY) # Parent directory
set(ly_game_resource_folder ${${project}_SOURCE_PARENT_DIR}/Resources/Platform/iOS)
if (NOT EXISTS ${ly_game_resource_folder})
set(ly_game_resource_folder ${${project}_SOURCE_PARENT_DIR}/Resources/IOSLauncher)
if (NOT EXISTS ${ly_game_resource_folder})
message(FATAL_ERROR "Missing expected resources folder")
# Add resources and app icons to launchers
list(APPEND candidate_paths ${project_real_path}/Resources/Platform/iOS)
list(APPEND candidate_paths ${project_real_path}/Gem/Resources/Platform/iOS) # Legacy projects
list(APPEND candidate_paths ${project_real_path}/Gem/Resources/IOSLauncher) # Legacy projects
foreach(resource_path IN LISTS candidate_paths)
if(EXISTS ${resource_path})
set(ly_game_resource_folder ${resource_path})
break()
endif()
endforeach()
if(NOT EXISTS ${ly_game_resource_folder})
list(JOIN candidate_paths " " formatted_error)
message(FATAL_ERROR "Missing 'Resources' folder. Candidate paths tried were: ${formatted_error}")
endif()
# Add resources and app icons to launchers
target_sources(${project}.GameLauncher PRIVATE ${ly_game_resource_folder}/Images.xcassets)
set_target_properties(${project}.GameLauncher PROPERTIES
target_sources(${project_name}.GameLauncher PRIVATE ${ly_game_resource_folder}/Images.xcassets)
set_target_properties(${project_name}.GameLauncher PROPERTIES
MACOSX_BUNDLE_INFO_PLIST ${ly_game_resource_folder}/Info.plist
RESOURCE ${ly_game_resource_folder}/Images.xcassets
XCODE_ATTRIBUTE_ASSETCATALOG_COMPILER_APPICON_NAME ${project}AppIcon
XCODE_ATTRIBUTE_ASSETCATALOG_COMPILER_APPICON_NAME ${project_name}AppIcon
)
set(layout_tool_dir ${LY_ROOT_FOLDER}/cmake/Tools)
add_custom_command(TARGET ${project}.GameLauncher POST_BUILD
add_custom_command(TARGET ${project_name}.GameLauncher POST_BUILD
COMMAND ${LY_PYTHON_CMD} layout_tool.py
--dev-root "${LY_ROOT_FOLDER}"
-p iOS
-a ${LY_ASSET_DEPLOY_ASSET_TYPE}
-g ${project}
--project-path ${project_real_path}
-m ${LY_ASSET_DEPLOY_MODE}
--create-layout-root
-l $<TARGET_BUNDLE_DIR:${project}.GameLauncher>/assets
-l $<TARGET_BUNDLE_DIR:${project_name}.GameLauncher>/assets
--build-config $<CONFIG>
--warn-on-missing-assets
--verify