Merge branch 'main' into LoadPipelineFromGitHub

This commit is contained in:
Brian Herrera
2021-03-26 17:05:57 -07:00
765 changed files with 11513 additions and 20246 deletions
-10
View File
@@ -296,13 +296,3 @@ list(APPEND CMAKE_MODULE_PATH ${pal_dir})
ly_include_cmake_file_list(cmake/3rdParty/cmake_files.cmake)
ly_get_absolute_pal_filename(pal_3rdparty_dir ${CMAKE_CURRENT_SOURCE_DIR}/cmake/3rdParty/Platform/${PAL_PLATFORM_NAME})
ly_include_cmake_file_list(${pal_3rdparty_dir}/cmake_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake)
# we must include this here to bring the package system up before we actually start calling
# find_package. Otherwise the find_package may not actually find the packages it needs
include(cmake/3rdPartyPackages.cmake)
if(PAL_TRAIT_BUILD_HOST_TOOLS)
# Importing this globally to handle AUTOMOC, AUTOUIC, AUTORCC
find_package(Qt REQUIRED MODULE)
endif()
-118
View File
@@ -1,118 +0,0 @@
#
# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
# its licensors.
#
# For complete copyright and license terms please see the LICENSE at the root of this
# distribution (the "License"). All use of this software is governed by the License,
# or, if provided, by the license below or the license accompanying this file. Do not
# 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.
#
set(AWSNATIVESDK_PACKAGE_NAME AWSNativeSDK)
set(AWSNATIVESDK_3RDPARTY_DIRECTORY AWS/AWSNativeSDK)
set(AWSNATIVESDK_PACKAGE_VERSION 1.7.167-az.2)
set(AWSNATIVESDK_COMPILEDEFINITIONS AWS_CUSTOM_MEMORY_MANAGEMENT PLATFORM_SUPPORTS_AWS_NATIVE_SDK)
set(AWSNATIVESDK_MODULES
Common
Core
EventStream
Checksums
AcessManagement
CognitoIdentity
CognitoIdp
DeviceFarm
DynamoDB
GameLift
IdentityManagement
Kinesis
Lambda
MobileAnalytics
Queues
S3
SNS
SQS
STS
Transfer
)
foreach(awsmodule ${AWSNATIVESDK_MODULES})
ly_add_external_target(
NAME ${awsmodule}
PACKAGE ${AWSNATIVESDK_PACKAGE_NAME}
VERSION ${AWSNATIVESDK_PACKAGE_VERSION}
3RDPARTY_DIRECTORY ${AWSNATIVESDK_3RDPARTY_DIRECTORY}
INCLUDE_DIRECTORIES include
COMPILE_DEFINITIONS ${AWSNATIVESDK_COMPILEDEFINITIONS}
)
endforeach()
# Then we have some groupings by functionality. We define a function here to make this easier to define
include(CMakeParseArguments)
function(ly_aws_addgroup)
cmake_parse_arguments(ly_aws_add "" "NAME" "BUILD_DEPENDENCIES" ${ARGN})
ly_add_external_target(
NAME ${ly_aws_add_NAME}
PACKAGE ${AWSNATIVESDK_PACKAGE_NAME}
VERSION ${AWSNATIVESDK_PACKAGE_VERSION}
3RDPARTY_DIRECTORY ${AWSNATIVESDK_3RDPARTY_DIRECTORY}
INCLUDE_DIRECTORIES include
COMPILE_DEFINITIONS ${AWSNATIVESDK_COMPILEDEFINITIONS}
BUILD_DEPENDENCIES ${ly_aws_add_BUILD_DEPENDENCIES}
)
endfunction()
# And here we define the groupings
ly_aws_addgroup(NAME Dependencies
BUILD_DEPENDENCIES
3rdParty::AWSNativeSDK::Checksums
3rdParty::AWSNativeSDK::Common
3rdParty::AWSNativeSDK::EventStream
)
ly_aws_addgroup(NAME IdentityMetrics
BUILD_DEPENDENCIES
3rdParty::AWSNativeSDK::Dependencies
3rdParty::AWSNativeSDK::CognitoIdentity
3rdParty::AWSNativeSDK::CognitoIdp
3rdParty::AWSNativeSDK::Core
3rdParty::AWSNativeSDK::IdentityManagement
3rdParty::AWSNativeSDK::STS
3rdParty::AWSNativeSDK::MobileAnalytics
)
ly_aws_addgroup(NAME IdentityLambda
BUILD_DEPENDENCIES
3rdParty::AWSNativeSDK::Dependencies
3rdParty::AWSNativeSDK::CognitoIdentity
3rdParty::AWSNativeSDK::CognitoIdp
3rdParty::AWSNativeSDK::Core
3rdParty::AWSNativeSDK::IdentityManagement
3rdParty::AWSNativeSDK::Lambda
3rdParty::AWSNativeSDK::STS
)
ly_aws_addgroup(NAME GameLiftClient
BUILD_DEPENDENCIES
3rdParty::AWSNativeSDK::Core
3rdParty::AWSNativeSDK::GameLift
3rdParty::AWSNativeSDK::Dependencies
)
ly_aws_addgroup(NAME AWSClientAuth
BUILD_DEPENDENCIES
3rdParty::AWSNativeSDK::Dependencies
3rdParty::AWSNativeSDK::CognitoIdentity
3rdParty::AWSNativeSDK::CognitoIdp
3rdParty::AWSNativeSDK::STS
3rdParty::AWSNativeSDK::IdentityManagement
)
ly_aws_addgroup(NAME AWSCore
BUILD_DEPENDENCIES
3rdParty::AWSNativeSDK::Dependencies
3rdParty::AWSNativeSDK::Core
3rdParty::AWSNativeSDK::DynamoDB
3rdParty::AWSNativeSDK::Lambda
3rdParty::AWSNativeSDK::S3
)
-173
View File
@@ -1,173 +0,0 @@
#
# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
# its licensors.
#
# For complete copyright and license terms please see the LICENSE at the root of this
# distribution (the "License"). All use of this software is governed by the License,
# or, if provided, by the license below or the license accompanying this file. Do not
# 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.
#
if(TARGET 3rdParty::Qt::Core) # Check we are not called multiple times
return()
endif()
set(QT_PACKAGE_NAME Qt)
set(QT_PACKAGE_VERSION 5.15.1.2-az)
set(BASE_PATH "${LY_3RDPARTY_PATH}/${QT_PACKAGE_NAME}/${QT_PACKAGE_VERSION}")
if(NOT EXISTS ${BASE_PATH})
message(FATAL_ERROR "Cannot find 3rdParty library ${QT_PACKAGE_NAME} on path ${BASE_PATH}")
endif()
set(QT5_COMPONENTS
Core
Concurrent
Gui
LinguistTools
Network
OpenGL
Svg
Test
WebEngineWidgets
Widgets
Xml
)
include(${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME}/Qt_${PAL_PLATFORM_NAME_LOWERCASE}.cmake)
list(APPEND CMAKE_PREFIX_PATH ${QT_LIB_PATH}/cmake/Qt5)
# Clear the cache for found DIRs
unset(Qt5_DIR CACHE)
foreach(component ${QT5_COMPONENTS})
unset(Qt5${component}_DIR CACHE)
endforeach()
unset(Qt5Positioning_DIR CACHE)
unset(Qt5PrintSupport_DIR CACHE)
unset(Qt5WebChannel_DIR CACHE)
unset(Qt5WebEngineCore_DIR CACHE)
# Populate the Qt5 configurations
find_package(Qt5
COMPONENTS ${QT5_COMPONENTS}
REQUIRED
NO_CMAKE_PACKAGE_REGISTRY
)
mark_as_advanced(Qt5_DIR) # Hiding from GUI
mark_as_advanced(Qt5LinguistTools_DIR) # Hiding from GUI, this variable comes from the LinguistTools module
# Now create libraries that wrap the dependency so we can refer to them in our format
foreach(component ${QT5_COMPONENTS})
if(TARGET Qt5::${component})
get_target_property(system_includes Qt5::${component} INTERFACE_INCLUDE_DIRECTORIES)
set_target_properties(Qt5::${component} PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "") # Clear it in case someone refers to it
ly_target_include_system_directories(TARGET Qt5::${component}
INTERFACE "${system_includes}"
)
add_library(3rdParty::Qt::${component} INTERFACE IMPORTED)
set_target_properties(3rdParty::Qt::${component} PROPERTIES
INTERFACE_LINK_LIBRARIES Qt5::${component}
INTERFACE_COMPILE_DEFINITIONS QT_NO_EXCEPTIONS
)
mark_as_advanced(Qt5${component}_DIR) # Hiding from GUI
endif()
endforeach()
# Some extra DIR variables we want to hide from GUI
mark_as_advanced(Qt5Positioning_DIR)
mark_as_advanced(Qt5PrintSupport_DIR)
mark_as_advanced(Qt5WebChannel_DIR)
mark_as_advanced(Qt5WebEngineCore_DIR)
# Special case for Qt::Gui, we are using the private headers...
ly_target_include_system_directories(TARGET 3rdParty::Qt::Gui
INTERFACE "${Qt5Gui_PRIVATE_INCLUDE_DIRS}"
)
# Another special case: Qt:Widgets, we are also using private headers
ly_target_include_system_directories(TARGET 3rdParty::Qt::Widgets
INTERFACE "${Qt5Widgets_PRIVATE_INCLUDE_DIRS}"
)
# UIC executable
unset(QT_UIC_EXECUTABLE CACHE)
find_program(QT_UIC_EXECUTABLE uic HINTS "${QT_PATH}/bin")
mark_as_advanced(QT_UIC_EXECUTABLE) # Hiding from GUI
#! ly_qt_uic_target: handles qt's ui files by injecting uic generation
#
# AUTOUIC has issues to detect changes in UIC files and trigger regeneration:
# https://gitlab.kitware.com/cmake/cmake/-/issues/18741
# So instead, we are going to manually wrap the files. We dont use qt5_wrap_ui because
# it outputs to ${CMAKE_CURRENT_BINARY_DIR}/ui_${outfile}.h and we want to follow the
# same folder structure that AUTOUIC uses
#
function(ly_qt_uic_target TARGET)
get_target_property(all_ui_sources ${TARGET} SOURCES)
list(FILTER all_ui_sources INCLUDE REGEX "^.*\\.ui$")
if(NOT all_ui_sources)
message(FATAL_ERROR "Target ${TARGET} contains AUTOUIC but doesnt have any .ui file")
endif()
if(AUTOGEN_BUILD_DIR)
set(gen_dir ${AUTOGEN_BUILD_DIR})
else()
set(gen_dir ${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_autogen/include)
endif()
foreach(ui_source ${all_ui_sources})
get_filename_component(filename ${ui_source} NAME_WE)
get_filename_component(dir ${ui_source} DIRECTORY)
if(IS_ABSOLUTE ${dir})
file(RELATIVE_PATH dir ${CMAKE_CURRENT_SOURCE_DIR} ${dir})
endif()
set(outfolder ${gen_dir}/${dir})
set(outfile ${outfolder}/ui_${filename}.h)
get_filename_component(infile ${ui_source} ABSOLUTE)
file(MAKE_DIRECTORY ${outfolder})
add_custom_command(OUTPUT ${outfile}
COMMAND ${QT_UIC_EXECUTABLE} -o ${outfile} ${infile}
MAIN_DEPENDENCY ${infile} VERBATIM
COMMENT "UIC ${infile}"
)
set_source_files_properties(${infile} PROPERTIES SKIP_AUTOUIC TRUE)
set_source_files_properties(${outfile} PROPERTIES
SKIP_AUTOMOC TRUE
SKIP_AUTOUIC TRUE
GENERATED TRUE
)
list(APPEND all_ui_wrapped_sources ${outfile})
endforeach()
# Add files to the target
target_sources(${TARGET} PRIVATE ${all_ui_wrapped_sources})
source_group("Generated Files" FILES ${all_ui_wrapped_sources})
# Add include directories relative to the generated folder
# query for the property first to avoid the "NOTFOUND" in a list
get_property(has_includes TARGET ${TARGET} PROPERTY INCLUDE_DIRECTORIES SET)
if(has_includes)
get_property(all_include_directories TARGET ${TARGET} PROPERTY INCLUDE_DIRECTORIES)
foreach(dir ${all_include_directories})
if(IS_ABSOLUTE ${dir})
file(RELATIVE_PATH dir ${CMAKE_CURRENT_SOURCE_DIR} ${dir})
endif()
list(APPEND new_includes ${gen_dir}/${dir})
endforeach()
endif()
list(APPEND new_includes ${gen_dir})
target_include_directories(${TARGET} PRIVATE ${new_includes})
endfunction()
@@ -1,69 +0,0 @@
#
# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
# its licensors.
#
# For complete copyright and license terms please see the LICENSE at the root of this
# distribution (the "License"). All use of this software is governed by the License,
# or, if provided, by the license below or the license accompanying this file. Do not
# 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.
#
if(LY_MONOLITHIC_GAME)
set(AWSNATIVE_SDK_LIB_PATH ${BASE_PATH}/lib/android/arm64-v8a/$<IF:$<CONFIG:Debug>,Debug,Release>)
set(AWSNATIVE_SDK_LIB_EXTENSION a)
set(AWSNATIVESDK_BUILD_DEPENDENCIES
${AWSNATIVE_SDK_LIB_PATH}/dependencies/libcurl.a
${AWSNATIVE_SDK_LIB_PATH}/dependencies/libssl.a
${AWSNATIVE_SDK_LIB_PATH}/dependencies/libcrypto.a
${AWSNATIVE_SDK_LIB_PATH}/dependencies/libz.a
)
else()
set(AWSNATIVE_SDK_LIB_PATH ${BASE_PATH}/bin/android/arm64-v8a/$<IF:$<CONFIG:Debug>,Debug,Release>)
set(AWSNATIVE_SDK_LIB_EXTENSION so)
endif()
set(AWSNATIVESDK_CORE_LIBS ${AWSNATIVE_SDK_LIB_PATH}/libaws-cpp-sdk-core.${AWSNATIVE_SDK_LIB_EXTENSION})
if(NOT LY_MONOLITHIC_GAME)
list(APPEND AWSNATIVESDK_CORE_LIBS ${AWSNATIVE_SDK_LIB_PATH}/libcurl$<IF:$<CONFIG:Debug>,-d,>.${AWSNATIVE_SDK_LIB_EXTENSION})
endif()
set(AWSNATIVESDK_COMMON_LIBS ${AWSNATIVE_SDK_LIB_PATH}/libaws-c-common.${AWSNATIVE_SDK_LIB_EXTENSION})
set(AWSNATIVESDK_EVENTSTREAM_LIBS ${AWSNATIVE_SDK_LIB_PATH}/libaws-c-event-stream.${AWSNATIVE_SDK_LIB_EXTENSION})
set(AWSNATIVESDK_CHECKSUMS_LIBS ${AWSNATIVE_SDK_LIB_PATH}/libaws-checksums.${AWSNATIVE_SDK_LIB_EXTENSION})
set(AWSNATIVESDK_ACESSMANAGEMENT_LIBS ${AWSNATIVE_SDK_LIB_PATH}/libaws-cpp-sdk-access-management.${AWSNATIVE_SDK_LIB_EXTENSION})
set(AWSNATIVESDK_COGNITOIDENTITY_LIBS ${AWSNATIVE_SDK_LIB_PATH}/libaws-cpp-sdk-cognito-identity.${AWSNATIVE_SDK_LIB_EXTENSION})
set(AWSNATIVESDK_COGNITOIDP_LIBS ${AWSNATIVE_SDK_LIB_PATH}/libaws-cpp-sdk-cognito-idp.${AWSNATIVE_SDK_LIB_EXTENSION})
set(AWSNATIVESDK_DYNAMODB_LIBS ${AWSNATIVE_SDK_LIB_PATH}/libaws-cpp-sdk-dynamodb.${AWSNATIVE_SDK_LIB_EXTENSION})
set(AWSNATIVESDK_GAMELIFT_LIBS ${AWSNATIVE_SDK_LIB_PATH}/libaws-cpp-sdk-gamelift.${AWSNATIVE_SDK_LIB_EXTENSION})
set(AWSNATIVESDK_IDENTITYMANAGEMENT_LIBS ${AWSNATIVE_SDK_LIB_PATH}/libaws-cpp-sdk-identity-management.${AWSNATIVE_SDK_LIB_EXTENSION})
set(AWSNATIVESDK_KINESIS_LIBS ${AWSNATIVE_SDK_LIB_PATH}/libaws-cpp-sdk-kinesis.${AWSNATIVE_SDK_LIB_EXTENSION})
set(AWSNATIVESDK_LAMBDA_LIBS ${AWSNATIVE_SDK_LIB_PATH}/libaws-cpp-sdk-lambda.${AWSNATIVE_SDK_LIB_EXTENSION})
set(AWSNATIVESDK_MOBILEANALYTICS_LIBS ${AWSNATIVE_SDK_LIB_PATH}/libaws-cpp-sdk-mobileanalytics.${AWSNATIVE_SDK_LIB_EXTENSION})
set(AWSNATIVESDK_QUEUES_LIBS ${AWSNATIVE_SDK_LIB_PATH}/libaws-cpp-sdk-queues.${AWSNATIVE_SDK_LIB_EXTENSION})
set(AWSNATIVESDK_S3_LIBS ${AWSNATIVE_SDK_LIB_PATH}/libaws-cpp-sdk-s3.${AWSNATIVE_SDK_LIB_EXTENSION})
set(AWSNATIVESDK_SNS_LIBS ${AWSNATIVE_SDK_LIB_PATH}/libaws-cpp-sdk-sns.${AWSNATIVE_SDK_LIB_EXTENSION})
set(AWSNATIVESDK_SQS_LIBS ${AWSNATIVE_SDK_LIB_PATH}/libaws-cpp-sdk-sqs.${AWSNATIVE_SDK_LIB_EXTENSION})
set(AWSNATIVESDK_STS_LIBS ${AWSNATIVE_SDK_LIB_PATH}/libaws-cpp-sdk-sts.${AWSNATIVE_SDK_LIB_EXTENSION})
set(AWSNATIVESDK_TRANSFER_LIBS ${AWSNATIVE_SDK_LIB_PATH}/libaws-cpp-sdk-transfer.${AWSNATIVE_SDK_LIB_EXTENSION})
if(NOT LY_MONOLITHIC_GAME)
list(JOIN AWSNATIVESDK_CORE_LIBS ";" AWSNATIVESDK_CORE_RUNTIME_DEPENDENCIES)
set(AWSNATIVESDK_COMMON_RUNTIME_DEPENDENCIES ${AWSNATIVESDK_COMMON_LIBS})
set(AWSNATIVESDK_EVENTSTREAM_RUNTIME_DEPENDENCIES ${AWSNATIVESDK_EVENTSTREAM_LIBS})
set(AWSNATIVESDK_CHECKSUMS_RUNTIME_DEPENDENCIES ${AWSNATIVESDK_CHECKSUMS_LIBS})
set(AWSNATIVESDK_ACCESSMANAGEMENT_RUNTIME_DEPENDENCIES ${AWSNATIVESDK_ACESSMANAGEMENT_LIBS})
set(AWSNATIVESDK_COGNITOIDENTITY_RUNTIME_DEPENDENCIES ${AWSNATIVESDK_COGNITOIDENTITY_LIBS})
set(AWSNATIVESDK_COGNITOIDP_RUNTIME_DEPENDENCIES ${AWSNATIVESDK_COGNITOIDP_LIBS})
set(AWSNATIVESDK_DYNAMODB_RUNTIME_DEPENDENCIES ${AWSNATIVESDK_DYNAMODB_LIBS})
set(AWSNATIVESDK_GAMELIFT_RUNTIME_DEPENDENCIES ${AWSNATIVESDK_GAMELIFT_LIBS})
set(AWSNATIVESDK_IDENTITYMANAGEMENT_RUNTIME_DEPENDENCIES ${AWSNATIVESDK_IDENTITYMANAGEMENT_LIBS})
set(AWSNATIVESDK_KINESIS_RUNTIME_DEPENDENCIES ${AWSNATIVESDK_KINESIS_LIBS})
set(AWSNATIVESDK_LAMBDA_RUNTIME_DEPENDENCIES ${AWSNATIVESDK_LAMBDA_LIBS})
set(AWSNATIVESDK_MOBILEANALYTICS_RUNTIME_DEPENDENCIES ${AWSNATIVESDK_MOBILEANALYTICS_LIBS})
set(AWSNATIVESDK_QUEUES_RUNTIME_DEPENDENCIES ${AWSNATIVESDK_QUEUES_LIBS})
endif()
@@ -20,6 +20,7 @@ ly_associate_package(PACKAGE_NAME lz4-r128-multiplatform TARGETS lz4
ly_associate_package(PACKAGE_NAME zstd-1.35-multiplatform TARGETS zstd PACKAGE_HASH 45d466c435f1095898578eedde85acf1fd27190e7ea99aeaa9acfd2f09e12665)
ly_associate_package(PACKAGE_NAME glad-2.0.0-beta-rev2-multiplatform TARGETS glad PACKAGE_HASH ff97ee9664e97d0854b52a3734c2289329d9f2b4cd69478df6d0ca1f1c9392ee)
# platform-specific:
ly_associate_package(PACKAGE_NAME AWSNativeSDK-1.7.167-rev1-android TARGETS AWSNativeSDK PACKAGE_HASH 3612d8397700cb3a585405440aec2a393843baa506ef8821d0a9b29162fb1854)
ly_associate_package(PACKAGE_NAME PhysX-4.1.0.25992954-rev1-android TARGETS PhysX PACKAGE_HASH 9c494576c2d4ff04dee5a9e092fcd9d5af4b2845f15ffdfcaabb0dbc5b88a7a9)
ly_associate_package(PACKAGE_NAME mikkelsen-1.0.0.4-android TARGETS mikkelsen PACKAGE_HASH 075e8e4940884971063b5a9963014e2e517246fa269c07c7dc55b8cf2cd99705)
ly_associate_package(PACKAGE_NAME googletest-1.8.1-rev4-android TARGETS googletest PACKAGE_HASH 95671be75287a61c9533452835c3647e9c1b30f81b34b43bcb0ec1997cc23894)
@@ -10,7 +10,6 @@
#
set(FILES
AWSNativeSDK_android.cmake
BuiltInPackages_android.cmake
civetweb_android.cmake
expat_android.cmake
-73
View File
@@ -1,73 +0,0 @@
#
# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
# its licensors.
#
# For complete copyright and license terms please see the LICENSE at the root of this
# distribution (the "License"). All use of this software is governed by the License,
# or, if provided, by the license below or the license accompanying this file. Do not
# 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.
#
if(LY_MONOLITHIC_GAME)
set(AWSNATIVE_SDK_LIB_PATH ${BASE_PATH}/lib/linux/$<IF:$<CONFIG:Debug>,Debug,Release>)
set(AWSNATIVE_SDK_LIB_EXTENSION a)
else()
set(AWSNATIVE_SDK_LIB_PATH ${BASE_PATH}/bin/linux/$<IF:$<CONFIG:Debug>,Debug,Release>)
set(AWSNATIVE_SDK_LIB_EXTENSION so)
set(AWSNATIVESDK_COMMON_UNSTABLE_LIBS ${AWSNATIVE_SDK_LIB_PATH}/libaws-c-common.so.0unstable)
set(AWSNATIVESDK_EVENTSTREAM_UNSTABLE_LIBS ${AWSNATIVE_SDK_LIB_PATH}/libaws-c-event-stream.so.0unstable)
endif()
set(AWSNATIVESDK_LIBS
curl # The one bundled with the aws sdk in 3rdParty doesn't use the right openssl
)
set(AWSNATIVESDK_CORE_LIBS ${AWSNATIVE_SDK_LIB_PATH}/libaws-cpp-sdk-core.${AWSNATIVE_SDK_LIB_EXTENSION})
set(AWSNATIVESDK_COMMON_LIBS ${AWSNATIVE_SDK_LIB_PATH}/libaws-c-common.${AWSNATIVE_SDK_LIB_EXTENSION} ${AWSNATIVESDK_COMMON_UNSTABLE_LIBS})
set(AWSNATIVESDK_EVENTSTREAM_LIBS ${AWSNATIVE_SDK_LIB_PATH}/libaws-c-event-stream.${AWSNATIVE_SDK_LIB_EXTENSION} ${AWSNATIVESDK_EVENTSTREAM_UNSTABLE_LIBS})
set(AWSNATIVESDK_CHECKSUMS_LIBS ${AWSNATIVE_SDK_LIB_PATH}/libaws-checksums.${AWSNATIVE_SDK_LIB_EXTENSION})
set(AWSNATIVESDK_ACESSMANAGEMENT_LIBS ${AWSNATIVE_SDK_LIB_PATH}/libaws-cpp-sdk-access-management.${AWSNATIVE_SDK_LIB_EXTENSION})
set(AWSNATIVESDK_COGNITOIDENTITY_LIBS ${AWSNATIVE_SDK_LIB_PATH}/libaws-cpp-sdk-cognito-identity.${AWSNATIVE_SDK_LIB_EXTENSION})
set(AWSNATIVESDK_COGNITOIDP_LIBS ${AWSNATIVE_SDK_LIB_PATH}/libaws-cpp-sdk-cognito-idp.${AWSNATIVE_SDK_LIB_EXTENSION})
set(AWSNATIVESDK_DEVICEFARM_LIBS ${AWSNATIVE_SDK_LIB_PATH}/libaws-cpp-sdk-devicefarm.${AWSNATIVE_SDK_LIB_EXTENSION})
set(AWSNATIVESDK_DYNAMODB_LIBS ${AWSNATIVE_SDK_LIB_PATH}/libaws-cpp-sdk-dynamodb.${AWSNATIVE_SDK_LIB_EXTENSION})
set(AWSNATIVESDK_GAMELIFT_LIBS ${AWSNATIVE_SDK_LIB_PATH}/libaws-cpp-sdk-gamelift.${AWSNATIVE_SDK_LIB_EXTENSION})
set(AWSNATIVESDK_IDENTITYMANAGEMENT_LIBS ${AWSNATIVE_SDK_LIB_PATH}/libaws-cpp-sdk-identity-management.${AWSNATIVE_SDK_LIB_EXTENSION})
set(AWSNATIVESDK_KINESIS_LIBS ${AWSNATIVE_SDK_LIB_PATH}/libaws-cpp-sdk-kinesis.${AWSNATIVE_SDK_LIB_EXTENSION})
set(AWSNATIVESDK_LAMBDA_LIBS ${AWSNATIVE_SDK_LIB_PATH}/libaws-cpp-sdk-lambda.${AWSNATIVE_SDK_LIB_EXTENSION})
set(AWSNATIVESDK_MOBILEANALYTICS_LIBS ${AWSNATIVE_SDK_LIB_PATH}/libaws-cpp-sdk-mobileanalytics.${AWSNATIVE_SDK_LIB_EXTENSION})
set(AWSNATIVESDK_QUEUES_LIBS ${AWSNATIVE_SDK_LIB_PATH}/libaws-cpp-sdk-queues.${AWSNATIVE_SDK_LIB_EXTENSION})
set(AWSNATIVESDK_S3_LIBS ${AWSNATIVE_SDK_LIB_PATH}/libaws-cpp-sdk-s3.${AWSNATIVE_SDK_LIB_EXTENSION})
set(AWSNATIVESDK_SNS_LIBS ${AWSNATIVE_SDK_LIB_PATH}/libaws-cpp-sdk-sns.${AWSNATIVE_SDK_LIB_EXTENSION})
set(AWSNATIVESDK_SQS_LIBS ${AWSNATIVE_SDK_LIB_PATH}/libaws-cpp-sdk-sqs.${AWSNATIVE_SDK_LIB_EXTENSION})
set(AWSNATIVESDK_STS_LIBS ${AWSNATIVE_SDK_LIB_PATH}/libaws-cpp-sdk-sts.${AWSNATIVE_SDK_LIB_EXTENSION})
set(AWSNATIVESDK_TRANSFER_LIBS ${AWSNATIVE_SDK_LIB_PATH}/libaws-cpp-sdk-transfer.${AWSNATIVE_SDK_LIB_EXTENSION})
if(NOT LY_MONOLITHIC_GAME)
list(JOIN AWSNATIVESDK_CORE_LIBS ";" AWSNATIVESDK_CORE_RUNTIME_DEPENDENCIES)
set(AWSNATIVESDK_COMMON_RUNTIME_DEPENDENCIES ${AWSNATIVESDK_COMMON_LIBS})
set(AWSNATIVESDK_EVENTSTREAM_RUNTIME_DEPENDENCIES ${AWSNATIVESDK_EVENTSTREAM_LIBS})
set(AWSNATIVESDK_CHECKSUMS_RUNTIME_DEPENDENCIES ${AWSNATIVESDK_CHECKSUMS_LIBS})
set(AWSNATIVESDK_ACCESSMANAGEMENT_RUNTIME_DEPENDENCIES ${AWSNATIVESDK_ACESSMANAGEMENT_LIBS})
set(AWSNATIVESDK_COGNITOIDENTITY_RUNTIME_DEPENDENCIES ${AWSNATIVESDK_COGNITOIDENTITY_LIBS})
set(AWSNATIVESDK_COGNITOIDP_RUNTIME_DEPENDENCIES ${AWSNATIVESDK_COGNITOIDP_LIBS})
set(AWSNATIVESDK_DEVICEFARM_RUNTIME_DEPENDENCIES ${AWSNATIVESDK_DEVICEFARM_LIBS})
set(AWSNATIVESDK_DYNAMODB_RUNTIME_DEPENDENCIES ${AWSNATIVESDK_DYNAMODB_LIBS})
set(AWSNATIVESDK_GAMELIFT_RUNTIME_DEPENDENCIES ${AWSNATIVESDK_GAMELIFT_LIBS})
set(AWSNATIVESDK_IDENTITYMANAGEMENT_RUNTIME_DEPENDENCIES ${AWSNATIVESDK_IDENTITYMANAGEMENT_LIBS})
set(AWSNATIVESDK_KINESIS_RUNTIME_DEPENDENCIES ${AWSNATIVESDK_KINESIS_LIBS})
set(AWSNATIVESDK_LAMBDA_RUNTIME_DEPENDENCIES ${AWSNATIVESDK_LAMBDA_LIBS})
set(AWSNATIVESDK_MOBILEANALYTICS_RUNTIME_DEPENDENCIES ${AWSNATIVESDK_MOBILEANALYTICS_LIBS})
set(AWSNATIVESDK_QUEUES_RUNTIME_DEPENDENCIES ${AWSNATIVESDK_QUEUES_LIBS})
set(AWSNATIVESDK_S3_RUNTIME_DEPENDENCIES ${AWSNATIVESDK_S3_LIBS})
set(AWSNATIVESDK_SNS_RUNTIME_DEPENDENCIES ${AWSNATIVESDK_SNS_LIBS})
set(AWSNATIVESDK_SQS_RUNTIME_DEPENDENCIES ${AWSNATIVESDK_SQS_LIBS})
set(AWSNATIVESDK_STS_RUNTIME_DEPENDENCIES ${AWSNATIVESDK_STS_LIBS})
set(AWSNATIVESDK_TRANSFER_RUNTIME_DEPENDENCIES ${AWSNATIVESDK_TRANSFER_LIBS})
endif()
+3 -1
View File
@@ -28,11 +28,13 @@ ly_associate_package(PACKAGE_NAME zstd-1.35-multiplatform TARG
ly_associate_package(PACKAGE_NAME SQLite-3.32.2-rev3-multiplatform TARGETS SQLite PACKAGE_HASH dd4d3de6cbb4ce3d15fc504ba0ae0587e515dc89a25228037035fc0aef4831f4)
ly_associate_package(PACKAGE_NAME glad-2.0.0-beta-rev2-multiplatform TARGETS glad PACKAGE_HASH ff97ee9664e97d0854b52a3734c2289329d9f2b4cd69478df6d0ca1f1c9392ee)
ly_associate_package(PACKAGE_NAME xxhash-0.7.4-rev1-multiplatform TARGETS xxhash PACKAGE_HASH e81f3e6c4065975833996dd1fcffe46c3cf0f9e3a4207ec5f4a1b564ba75861e)
ly_associate_package(PACKAGE_NAME PVRTexTool-4.24.0-rev3-multiplatform TARGETS PVRTexTool PACKAGE_HASH d9c7e21e03b03cb560da4793a91a0d384ea621757cf87a1a82c83bfca6b23f97)
ly_associate_package(PACKAGE_NAME PVRTexTool-4.24.0-rev4-multiplatform TARGETS PVRTexTool PACKAGE_HASH d0d6da61c7557de0d2c71fc35ba56c3be49555b703f0e853d4c58225537acf1e)
# platform-specific:
ly_associate_package(PACKAGE_NAME AWSNativeSDK-1.7.167-rev1-linux TARGETS AWSNativeSDK PACKAGE_HASH 3876457b5e3233b951ccd9bcf53df4b946041a7de2955eba647020d7ae46163d)
ly_associate_package(PACKAGE_NAME PhysX-4.1.0.25992954-rev1-linux TARGETS PhysX PACKAGE_HASH e3ca36106a8dbf1524709f8bb82d520920ebd3ff3a92672d382efff406c75ee3)
ly_associate_package(PACKAGE_NAME mikkelsen-1.0.0.4-linux TARGETS mikkelsen PACKAGE_HASH 5973b1e71a64633588eecdb5b5c06ca0081f7be97230f6ef64365cbda315b9c8)
ly_associate_package(PACKAGE_NAME googletest-1.8.1-rev4-linux TARGETS googletest PACKAGE_HASH 7b7ad330f369450c316a4c4592d17fbb4c14c731c95bd8f37757203e8c2bbc1b)
ly_associate_package(PACKAGE_NAME googlebenchmark-1.5.0-rev1-linux TARGETS GoogleBenchmark PACKAGE_HASH e794530c60bd1ecb5f224a346091f23c8fdeb4cfd7ba70b5195d6d2e276447e3)
ly_associate_package(PACKAGE_NAME unwind-1.2.1-linux TARGETS unwind PACKAGE_HASH 3453265fb056e25432f611a61546a25f60388e315515ad39007b5925dd054a77)
ly_associate_package(PACKAGE_NAME qt-5.15.2-linux TARGETS Qt PACKAGE_HASH 3857fbb2fc5581cdb71d80a7f9298c83ef06073d4e1ccd86a32b4f88782b6f14)
-80
View File
@@ -1,80 +0,0 @@
#
# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
# its licensors.
#
# For complete copyright and license terms please see the LICENSE at the root of this
# distribution (the "License"). All use of this software is governed by the License,
# or, if provided, by the license below or the license accompanying this file. Do not
# 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.
#
set(QT_PATH ${BASE_PATH}/gcc_64) # "gcc" means "linux" in this case
set(QT_LIB_PATH ${QT_PATH}/lib)
include(CMakeParseArguments)
unset(WINDEPLOYQT_EXECUTABLE CACHE)
find_program(WINDEPLOYQT_EXECUTABLE windeployqt
HINTS
"${QT_PATH}/bin"
)
mark_as_advanced(WINDEPLOYQT_EXECUTABLE) # Hiding from GUI
function(ly_qt_deploy)
set(options)
set(oneValueArgs TARGET)
set(multiValueArgs)
cmake_parse_arguments(ly_qt_deploy "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
# Validate input arguments
if(NOT ly_qt_deploy_TARGET)
message(FATAL_ERROR "You must provide a target to detect qt dependencies")
endif()
# When winqtdeploy is used on a unix platform it copies over the hardcoded platform abstraction plugin
# of qxcb plugin. The qxcb plugin requires an X server to be running on linux and order to load properly
# To avoid the issue of requiring an X server to be running in a headless setup, the qminimal
# platform plugin is also copied over to the target file output directory.
set(plugin_path "${QT_PATH}/plugins")
set(platform_plugins ${plugin_path}/platforms/libqminimal.so)
set(xcbglintegrations_plugins ${plugin_path}/xcbglintegrations/libqxcb-glx-integration.so)
add_custom_command(TARGET ${ly_qt_deploy_TARGET} POST_BUILD
COMMAND "${CMAKE_COMMAND}"
-DLY_TIMESTAMP_REFERENCE=$<TARGET_FILE:${ly_qt_deploy_TARGET}>
-DLY_LOCK_FILE=$<TARGET_FILE_DIR:${ly_qt_deploy_TARGET}>/qtdeploy.lock
-P ${LY_ROOT_FOLDER}/cmake/CommandExecution.cmake
EXEC_COMMAND "${CMAKE_COMMAND}" -E
env PATH=${CMAKE_BINARY_DIR}:${QT_PATH}/bin:$ENV{PATH}
"${CMAKE_COMMAND}" -P "${LY_ROOT_FOLDER}/cmake/Platform/Linux/windeployqt_wrapper.cmake"
"$<TARGET_FILE_DIR:${ly_qt_deploy_TARGET}>"
"${WINDEPLOYQT_EXECUTABLE}"
--verbose 2
--no-compiler-runtime
--dir "$<TARGET_FILE_DIR:${ly_qt_deploy_TARGET}>"
"$<TARGET_FILE:${ly_qt_deploy_TARGET}>"
EXEC_COMMAND ${CMAKE_COMMAND} -E make_directory
"$<TARGET_FILE_DIR:${ly_qt_deploy_TARGET}>/platforms"
EXEC_COMMAND ${CMAKE_COMMAND} -E copy_if_different
${platform_plugins}
"$<TARGET_FILE_DIR:${ly_qt_deploy_TARGET}>/platforms"
EXEC_COMMAND ${CMAKE_COMMAND} -E make_directory
"$<TARGET_FILE_DIR:${ly_qt_deploy_TARGET}>/xcbglintegrations"
EXEC_COMMAND ${CMAKE_COMMAND} -E copy_if_different
${xcbglintegrations_plugins}
"$<TARGET_FILE_DIR:${ly_qt_deploy_TARGET}>/xcbglintegrations"
DEPENDS $<TARGET_FILE:${ly_qt_deploy_TARGET}>
COMMENT "Deploying qt..."
VERBATIM
)
endfunction()
# windeployqt uses qmake -query to introspect a given Qt installation. However,
# qmake is not relocatable, so the paths reported are those from the build
# machine, and not from wherever the user has their 3rdParty libraries. So we
# create a fake qmake executable to report the right paths to windeployqt.
configure_file(${CMAKE_CURRENT_LIST_DIR}/Qt_qmake_${PAL_PLATFORM_NAME_LOWERCASE}.cmake.in ${CMAKE_BINARY_DIR}/qmake)
-38
View File
@@ -1,38 +0,0 @@
#!${CMAKE_COMMAND} -P
#
# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
# its licensors.
#
# For complete copyright and license terms please see the LICENSE at the root of this
# distribution (the "License"). All use of this software is governed by the License,
# or, if provided, by the license below or the license accompanying this file. Do not
# 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.
#
execute_process(COMMAND ${CMAKE_COMMAND} -E echo "QT_SYSROOT:
QT_INSTALL_PREFIX:${QT_PATH}
QT_INSTALL_ARCHDATA:${QT_PATH}
QT_INSTALL_DATA:${QT_PATH}
QT_INSTALL_DOCS:${QT_PATH}/doc
QT_INSTALL_HEADERS:${QT_PATH}/include
QT_INSTALL_LIBS:${QT_PATH}/lib
QT_INSTALL_LIBEXECS:${QT_PATH}/libexec
QT_INSTALL_BINS:${QT_PATH}/bin
QT_INSTALL_TESTS:${QT_PATH}/tests
QT_INSTALL_PLUGINS:${QT_PATH}/plugins
QT_INSTALL_IMPORTS:${QT_PATH}/imports
QT_INSTALL_TRANSLATIONS:${QT_PATH}/translations
QT_INSTALL_CONFIGURATION:${QT_PATH}/etc/xdg
QT_INSTALL_EXAMPLES:${QT_PATH}/examples
QT_INSTALL_DEMOS:${QT_PATH}/examples
QT_HOST_PREFIX:${QT_PATH}
QT_HOST_DATA:${QT_PATH}
QT_HOST_BINS:${QT_PATH}/bin
QT_HOST_LIBS:${QT_PATH}/lib
QMAKE_SPEC:linux-g++
QMAKE_XSPEC:linux-g++
QMAKE_VERSION:3.1
QT_VERSION:${QT_PACKAGE_VERSION}")
-2
View File
@@ -11,7 +11,6 @@
set(FILES
AWSGameLiftServerSDK_linux.cmake
AWSNativeSDK_linux.cmake
BuiltInPackages_linux.cmake
civetweb_linux.cmake
Clang_linux.cmake
@@ -21,7 +20,6 @@ set(FILES
FbxSdk_linux.cmake
FreeType2_linux.cmake
OpenSSL_linux.cmake
Qt_linux.cmake
tiff_linux.cmake
Wwise_linux.cmake
)
-95
View File
@@ -1,95 +0,0 @@
#
# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
# its licensors.
#
# For complete copyright and license terms please see the LICENSE at the root of this
# distribution (the "License"). All use of this software is governed by the License,
# or, if provided, by the license below or the license accompanying this file. Do not
# 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.
#
if (LY_MONOLITHIC_GAME)
#Static libs
set(AWSNATIVE_SDK_LIB_PATH ${BASE_PATH}/lib/mac/$<IF:$<CONFIG:Debug>,Debug,Release>)
set(AWSNATIVESDK_CORE_LIBS
${AWSNATIVE_SDK_LIB_PATH}/libaws-cpp-sdk-core.a
curl # The one bundled with the aws sdk in 3rdParty doesn't use the right openssl
)
set(AWSNATIVESDK_COMMON_LIBS ${AWSNATIVE_SDK_LIB_PATH}/libaws-c-common.a)
set(AWSNATIVESDK_EVENTSTREAM_LIBS ${AWSNATIVE_SDK_LIB_PATH}/libaws-c-event-stream.a)
set(AWSNATIVESDK_CHECKSUMS_LIBS ${AWSNATIVE_SDK_LIB_PATH}/libaws-checksums.a)
set(AWSNATIVESDK_COGNITOIDENTITY_LIBS ${AWSNATIVE_SDK_LIB_PATH}/libaws-cpp-sdk-cognito-identity.a)
set(AWSNATIVESDK_COGNITOIDP_LIBS ${AWSNATIVE_SDK_LIB_PATH}/libaws-cpp-sdk-cognito-idp.a)
set(AWSNATIVESDK_DEVICEFARM_LIBS ${AWSNATIVE_SDK_LIB_PATH}/libaws-cpp-sdk-devicefarm.a)
set(AWSNATIVESDK_DYNAMODB_LIBS ${AWSNATIVE_SDK_LIB_PATH}/libaws-cpp-sdk-dynamodb.a)
set(AWSNATIVESDK_GAMELIFT_LIBS ${AWSNATIVE_SDK_LIB_PATH}/libaws-cpp-sdk-gamelift.a)
set(AWSNATIVESDK_IDENTITYMANAGEMENT_LIBS ${AWSNATIVE_SDK_LIB_PATH}/libaws-cpp-sdk-identity-management.a)
set(AWSNATIVESDK_KINESIS_LIBS ${AWSNATIVE_SDK_LIB_PATH}/libaws-cpp-sdk-kinesis.a)
set(AWSNATIVESDK_LAMBDA_LIBS ${AWSNATIVE_SDK_LIB_PATH}/libaws-cpp-sdk-lambda.a)
set(AWSNATIVESDK_MOBILEANALYTICS_LIBS ${AWSNATIVE_SDK_LIB_PATH}/libaws-cpp-sdk-mobileanalytics.a)
set(AWSNATIVESDK_QUEUES_LIBS ${AWSNATIVE_SDK_LIB_PATH}/libaws-cpp-sdk-queues.a)
set(AWSNATIVESDK_S3_LIBS ${AWSNATIVE_SDK_LIB_PATH}/libaws-cpp-sdk-s3.a)
set(AWSNATIVESDK_SNS_LIBS ${AWSNATIVE_SDK_LIB_PATH}/libaws-cpp-sdk-sns.a)
set(AWSNATIVESDK_SQS_LIBS ${AWSNATIVE_SDK_LIB_PATH}/libaws-cpp-sdk-sqs.a)
set(AWSNATIVESDK_STS_LIBS ${AWSNATIVE_SDK_LIB_PATH}/libaws-cpp-sdk-sts.a)
else()
# Shared Libs
set(AWSNATIVE_SDK_SHARED_LIB_PATH ${BASE_PATH}/bin/mac/$<IF:$<CONFIG:Debug>,Debug,Release>)
set(AWSNATIVESDK_CORE_LIBS
${AWSNATIVE_SDK_SHARED_LIB_PATH}/libaws-cpp-sdk-core.dylib
curl # The one bundled with the aws sdk in 3rdParty doesn't use the right openssl
)
set(AWSNATIVESDK_COMMON_LIBS ${AWSNATIVE_SDK_SHARED_LIB_PATH}/libaws-c-common.dylib)
set(AWSNATIVESDK_EVENTSTREAM_LIBS ${AWSNATIVE_SDK_SHARED_LIB_PATH}/libaws-c-event-stream.dylib)
set(AWSNATIVESDK_CHECKSUMS_LIBS ${AWSNATIVE_SDK_SHARED_LIB_PATH}/libaws-checksums.dylib)
set(AWSNATIVESDK_COGNITOIDENTITY_LIBS ${AWSNATIVE_SDK_SHARED_LIB_PATH}/libaws-cpp-sdk-cognito-identity.dylib)
set(AWSNATIVESDK_COGNITOIDP_LIBS ${AWSNATIVE_SDK_SHARED_LIB_PATH}/libaws-cpp-sdk-cognito-idp.dylib)
set(AWSNATIVESDK_DEVICEFARM_LIBS ${AWSNATIVE_SDK_SHARED_LIB_PATH}/libaws-cpp-sdk-devicefarm.dylib)
set(AWSNATIVESDK_DYNAMODB_LIBS ${AWSNATIVE_SDK_SHARED_LIB_PATH}/libaws-cpp-sdk-dynamodb.dylib)
set(AWSNATIVESDK_GAMELIFT_LIBS ${AWSNATIVE_SDK_SHARED_LIB_PATH}/libaws-cpp-sdk-gamelift.dylib)
set(AWSNATIVESDK_IDENTITYMANAGEMENT_LIBS ${AWSNATIVE_SDK_SHARED_LIB_PATH}/libaws-cpp-sdk-identity-management.dylib)
set(AWSNATIVESDK_KINESIS_LIBS ${AWSNATIVE_SDK_SHARED_LIB_PATH}/libaws-cpp-sdk-kinesis.dylib)
set(AWSNATIVESDK_LAMBDA_LIBS ${AWSNATIVE_SDK_SHARED_LIB_PATH}/libaws-cpp-sdk-lambda.dylib)
set(AWSNATIVESDK_MOBILEANALYTICS_LIBS ${AWSNATIVE_SDK_SHARED_LIB_PATH}/libaws-cpp-sdk-mobileanalytics.dylib)
set(AWSNATIVESDK_QUEUES_LIBS ${AWSNATIVE_SDK_SHARED_LIB_PATH}/libaws-cpp-sdk-queues.dylib)
set(AWSNATIVESDK_S3_LIBS ${AWSNATIVE_SDK_SHARED_LIB_PATH}/libaws-cpp-sdk-s3.dylib)
set(AWSNATIVESDK_SNS_LIBS ${AWSNATIVE_SDK_SHARED_LIB_PATH}/libaws-cpp-sdk-sns.dylib)
set(AWSNATIVESDK_SQS_LIBS ${AWSNATIVE_SDK_SHARED_LIB_PATH}/libaws-cpp-sdk-sqs.dylib)
set(AWSNATIVESDK_STS_LIBS ${AWSNATIVE_SDK_SHARED_LIB_PATH}/libaws-cpp-sdk-sts.dylib)
set(AWSNATIVESDK_CORE_RUNTIME_DEPENDENCIES ${AWSNATIVE_SDK_SHARED_LIB_PATH}/libaws-cpp-sdk-core.dylib)
set(AWSNATIVESDK_COMMON_RUNTIME_DEPENDENCIES
${AWSNATIVE_SDK_SHARED_LIB_PATH}/libaws-c-common.dylib
${AWSNATIVE_SDK_SHARED_LIB_PATH}/libaws-c-common.0unstable.dylib
${AWSNATIVE_SDK_SHARED_LIB_PATH}/libaws-c-common.1.0.0.dylib
)
set(AWSNATIVESDK_EVENTSTREAM_RUNTIME_DEPENDENCIES
${AWSNATIVE_SDK_SHARED_LIB_PATH}/libaws-c-event-stream.dylib
${AWSNATIVE_SDK_SHARED_LIB_PATH}/libaws-c-event-stream.0unstable.dylib
${AWSNATIVE_SDK_SHARED_LIB_PATH}/libaws-c-event-stream.1.0.0.dylib
)
set(AWSNATIVESDK_CHECKSUMS_RUNTIME_DEPENDENCIES ${AWSNATIVE_SDK_SHARED_LIB_PATH}/libaws-checksums.dylib)
set(AWSNATIVESDK_ACCESSMANAGEMENT_RUNTIME_DEPENDENCIES ${AWSNATIVE_SDK_SHARED_LIB_PATH}/libaws-cpp-sdk-access-management.dylib)
set(AWSNATIVESDK_COGNITOIDENTITY_RUNTIME_DEPENDENCIES ${AWSNATIVE_SDK_SHARED_LIB_PATH}/libaws-cpp-sdk-cognito-identity.dylib)
set(AWSNATIVESDK_COGNITOIDP_RUNTIME_DEPENDENCIES ${AWSNATIVE_SDK_SHARED_LIB_PATH}/libaws-cpp-sdk-cognito-idp.dylib)
set(AWSNATIVESDK_DEVICEFARM_RUNTIME_DEPENDENCIES ${AWSNATIVE_SDK_SHARED_LIB_PATH}/libaws-cpp-sdk-devicefarm.dylib)
set(AWSNATIVESDK_DYNAMODB_RUNTIME_DEPENDENCIES ${AWSNATIVE_SDK_SHARED_LIB_PATH}/libaws-cpp-sdk-dynamodb.dylib)
set(AWSNATIVESDK_GAMELIFT_RUNTIME_DEPENDENCIES ${AWSNATIVE_SDK_SHARED_LIB_PATH}/libaws-cpp-sdk-gamelift.dylib)
set(AWSNATIVESDK_IDENTITYMANAGEMENT_RUNTIME_DEPENDENCIES ${AWSNATIVE_SDK_SHARED_LIB_PATH}/libaws-cpp-sdk-identity-management.dylib)
set(AWSNATIVESDK_KINESIS_RUNTIME_DEPENDENCIES ${AWSNATIVE_SDK_SHARED_LIB_PATH}/libaws-cpp-sdk-kinesis.dylib)
set(AWSNATIVESDK_LAMBDA_RUNTIME_DEPENDENCIES ${AWSNATIVE_SDK_SHARED_LIB_PATH}/libaws-cpp-sdk-lambda.dylib)
set(AWSNATIVESDK_MOBILEANALYTICS_RUNTIME_DEPENDENCIES ${AWSNATIVE_SDK_SHARED_LIB_PATH}/libaws-cpp-sdk-mobileanalytics.dylib)
set(AWSNATIVESDK_QUEUES_RUNTIME_DEPENDENCIES ${AWSNATIVE_SDK_SHARED_LIB_PATH}/libaws-cpp-sdk-queues.dylib)
set(AWSNATIVESDK_S3_RUNTIME_DEPENDENCIES ${AWSNATIVE_SDK_SHARED_LIB_PATH}/libaws-cpp-sdk-s3.dylib)
set(AWSNATIVESDK_SNS_RUNTIME_DEPENDENCIES ${AWSNATIVE_SDK_SHARED_LIB_PATH}/libaws-cpp-sdk-sns.dylib)
set(AWSNATIVESDK_SQS_RUNTIME_DEPENDENCIES ${AWSNATIVE_SDK_SHARED_LIB_PATH}/libaws-cpp-sdk-sqs.dylib)
set(AWSNATIVESDK_STS_RUNTIME_DEPENDENCIES ${AWSNATIVE_SDK_SHARED_LIB_PATH}/libaws-cpp-sdk-sts.dylib)
set(AWSNATIVESDK_TRANSFER_RUNTIME_DEPENDENCIES ${AWSNATIVE_SDK_SHARED_LIB_PATH}/libaws-cpp-sdk-transfer.dylib)
endif()
+3 -1
View File
@@ -33,10 +33,12 @@ ly_associate_package(PACKAGE_NAME DirectXShaderCompilerDxcAz-5.0.0_az-rev1-multi
ly_associate_package(PACKAGE_NAME azslc-1.7.19-rev1-multiplatform TARGETS azslc PACKAGE_HASH e7649ba4a9190a82512f9aaad1b4318fbdf09384c533d2e3cc15c8440e65bd4a)
ly_associate_package(PACKAGE_NAME glad-2.0.0-beta-rev2-multiplatform TARGETS glad PACKAGE_HASH ff97ee9664e97d0854b52a3734c2289329d9f2b4cd69478df6d0ca1f1c9392ee)
ly_associate_package(PACKAGE_NAME xxhash-0.7.4-rev1-multiplatform TARGETS xxhash PACKAGE_HASH e81f3e6c4065975833996dd1fcffe46c3cf0f9e3a4207ec5f4a1b564ba75861e)
ly_associate_package(PACKAGE_NAME PVRTexTool-4.24.0-rev3-multiplatform TARGETS PVRTexTool PACKAGE_HASH d9c7e21e03b03cb560da4793a91a0d384ea621757cf87a1a82c83bfca6b23f97)
ly_associate_package(PACKAGE_NAME PVRTexTool-4.24.0-rev4-multiplatform TARGETS PVRTexTool PACKAGE_HASH d0d6da61c7557de0d2c71fc35ba56c3be49555b703f0e853d4c58225537acf1e)
# platform-specific:
ly_associate_package(PACKAGE_NAME AWSNativeSDK-1.7.167-rev1-mac TARGETS AWSNativeSDK PACKAGE_HASH 9d0562de258edfd8f14c4cc85ac665cf64b6bf13928d53725e7f90e4ad4672a3)
ly_associate_package(PACKAGE_NAME PhysX-4.1.0.25992954-rev1-mac TARGETS PhysX PACKAGE_HASH 149f5e9b44bd27291b1c4772f5e89a1e0efa88eef73c7e0b188935ed4d0c4a70)
ly_associate_package(PACKAGE_NAME mikkelsen-1.0.0.4-mac TARGETS mikkelsen PACKAGE_HASH 83af99ca8bee123684ad254263add556f0cf49486c0b3e32e6d303535714e505)
ly_associate_package(PACKAGE_NAME googletest-1.8.1-rev4-mac TARGETS googletest PACKAGE_HASH cbf020d5ef976c5db8b6e894c6c63151ade85ed98e7c502729dd20172acae5a8)
ly_associate_package(PACKAGE_NAME googlebenchmark-1.5.0-rev1-mac TARGETS GoogleBenchmark PACKAGE_HASH d81817701931508c8aa4efc61852d3d9c5672e43d2f68df645ab56251da43119)
ly_associate_package(PACKAGE_NAME qt-5.15.2-mac TARGETS Qt PACKAGE_HASH ac248833d65838e4bcef50f30c9ff02ba9464ff64b9ada52de2ad6045d38baec)
-78
View File
@@ -1,78 +0,0 @@
#
# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
# its licensors.
#
# For complete copyright and license terms please see the LICENSE at the root of this
# distribution (the "License"). All use of this software is governed by the License,
# or, if provided, by the license below or the license accompanying this file. Do not
# 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.
#
set(QT_PATH ${BASE_PATH}/clang_64)
set(QT_LIB_PATH ${QT_PATH}/lib)
list(APPEND QT5_COMPONENTS MacExtras)
include(CMakeParseArguments)
# Clear the cache for found executable
unset(MACDEPLOYQT_EXECUTABLE CACHE)
find_program(MACDEPLOYQT_EXECUTABLE macdeployqt HINTS "${QT_PATH}/bin")
mark_as_advanced(MACDEPLOYQT_EXECUTABLE) # Hiding from GUI
function(ly_qt_deploy)
set(options)
set(oneValueArgs TARGET)
set(multiValueArgs)
cmake_parse_arguments(ly_qt_deploy "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
# Validate input arguments
if(NOT ly_qt_deploy_TARGET)
message(FATAL_ERROR "You must provide a target to detect qt dependencies")
endif()
get_target_property(is_bundle ${ly_qt_deploy_TARGET} MACOSX_BUNDLE)
if (is_bundle)
add_custom_command(TARGET ${ly_qt_deploy_TARGET} POST_BUILD
COMMAND "${CMAKE_COMMAND}"
-DLY_TIMESTAMP_REFERENCE=$<TARGET_FILE:${ly_qt_deploy_TARGET}>
-DLY_LOCK_FILE=$<TARGET_FILE_DIR:${ly_qt_deploy_TARGET}>/qtdeploy.lock
-P ${LY_ROOT_FOLDER}/cmake/CommandExecution.cmake
EXEC_COMMAND "${CMAKE_COMMAND}" -E time
${MACDEPLOYQT_EXECUTABLE}
$<TARGET_BUNDLE_DIR:${ly_qt_deploy_TARGET}>
-always-overwrite
-no-strip
-verbose=0
-fs=APFS
DEPENDS $<TARGET_FILE:${ly_qt_deploy_TARGET}>
COMMENT "Deploying qt to the ${ly_qt_deploy_TARGET} bundle ..."
VERBATIM
)
else()
set(qt_conf_config "[Paths]\nPlugins=@plugin_path@")
set(plugin_path "${QT_PATH}/plugins")
string(CONFIGURE "${qt_conf_config}" qt_conf_output @ONLY)
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/qt.conf" "${qt_conf_output}")
# output the qt_conf file using "echo" and file redirection
add_custom_command(TARGET ${ly_qt_deploy_TARGET} POST_BUILD
COMMAND "${CMAKE_COMMAND}"
-DLY_TIMESTAMP_REFERENCE=$<TARGET_FILE:${ly_qt_deploy_TARGET}>
-DLY_LOCK_FILE=$<TARGET_FILE_DIR:${ly_qt_deploy_TARGET}>/qtdeploy.lock
-P ${LY_ROOT_FOLDER}/cmake/CommandExecution.cmake
EXEC_COMMAND ${CMAKE_COMMAND} -E copy_if_different
${CMAKE_CURRENT_BINARY_DIR}/qt.conf
$<TARGET_FILE_DIR:${ly_qt_deploy_TARGET}>/qt.conf
COMMENT "copying over qt.conf..."
VERBATIM
)
endif()
endfunction()
-2
View File
@@ -10,7 +10,6 @@
#
set(FILES
AWSNativeSDK_mac.cmake
BuiltInPackages_mac.cmake
civetweb_mac.cmake
Clang_mac.cmake
@@ -20,6 +19,5 @@ set(FILES
FbxSdk_mac.cmake
FreeType2_mac.cmake
OpenSSL_mac.cmake
Qt_mac.cmake
Wwise_mac.cmake
)
@@ -1,74 +0,0 @@
#
# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
# its licensors.
#
# For complete copyright and license terms please see the LICENSE at the root of this
# distribution (the "License"). All use of this software is governed by the License,
# or, if provided, by the license below or the license accompanying this file. Do not
# 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.
#
if (LY_MONOLITHIC_GAME)
set(AWSNATIVE_SDK_LIB_PATH ${BASE_PATH}/lib/windows/$<IF:$<CONFIG:Debug>,Debug,Release>)
else()
set(AWSNATIVE_SDK_LIB_PATH ${BASE_PATH}/bin/windows/$<IF:$<CONFIG:Debug>,Debug,Release>)
endif()
set(AWSNATIVESDK_CORE_LIBS ${AWSNATIVE_SDK_LIB_PATH}/aws-cpp-sdk-core.lib
Bcrypt.lib
Userenv.lib
Version.lib
Wininet.lib
Winhttp.lib
Ws2_32.lib
)
set(AWSNATIVESDK_COMMON_LIBS ${AWSNATIVE_SDK_LIB_PATH}/aws-c-common.lib)
set(AWSNATIVESDK_EVENTSTREAM_LIBS ${AWSNATIVE_SDK_LIB_PATH}/aws-c-event-stream.lib)
set(AWSNATIVESDK_CHECKSUMS_LIBS ${AWSNATIVE_SDK_LIB_PATH}/aws-checksums.lib)
set(AWSNATIVESDK_ACCESSMANAGEMENT_LIBS ${AWSNATIVE_SDK_LIB_PATH}/aws-cpp-sdk-access-management.lib)
set(AWSNATIVESDK_COGNITOIDENTITY_LIBS ${AWSNATIVE_SDK_LIB_PATH}/aws-cpp-sdk-cognito-identity.lib)
set(AWSNATIVESDK_COGNITOIDP_LIBS ${AWSNATIVE_SDK_LIB_PATH}/aws-cpp-sdk-cognito-idp.lib)
set(AWSNATIVESDK_DEVICEFARM_LIBS ${AWSNATIVE_SDK_LIB_PATH}/aws-cpp-sdk-devicefarm.lib)
set(AWSNATIVESDK_DYNAMODB_LIBS ${AWSNATIVE_SDK_LIB_PATH}/aws-cpp-sdk-dynamodb.lib)
set(AWSNATIVESDK_GAMELIFT_LIBS ${AWSNATIVE_SDK_LIB_PATH}/aws-cpp-sdk-gamelift.lib)
set(AWSNATIVESDK_IDENTITYMANAGEMENT_LIBS ${AWSNATIVE_SDK_LIB_PATH}/aws-cpp-sdk-identity-management.lib)
set(AWSNATIVESDK_KINESIS_LIBS ${AWSNATIVE_SDK_LIB_PATH}/aws-cpp-sdk-kinesis.lib)
set(AWSNATIVESDK_LAMBDA_LIBS ${AWSNATIVE_SDK_LIB_PATH}/aws-cpp-sdk-lambda.lib)
set(AWSNATIVESDK_MOBILEANALYTICS_LIBS ${AWSNATIVE_SDK_LIB_PATH}/aws-cpp-sdk-mobileanalytics.lib)
set(AWSNATIVESDK_QUEUES_LIBS ${AWSNATIVE_SDK_LIB_PATH}/aws-cpp-sdk-queues.lib)
set(AWSNATIVESDK_S3_LIBS ${AWSNATIVE_SDK_LIB_PATH}/aws-cpp-sdk-s3.lib)
set(AWSNATIVESDK_SNS_LIBS ${AWSNATIVE_SDK_LIB_PATH}/aws-cpp-sdk-sns.lib)
set(AWSNATIVESDK_SQS_LIBS ${AWSNATIVE_SDK_LIB_PATH}/aws-cpp-sdk-sqs.lib)
set(AWSNATIVESDK_STS_LIBS ${AWSNATIVE_SDK_LIB_PATH}/aws-cpp-sdk-sts.lib)
set(AWSNATIVESDK_TRANSFER_LIBS ${AWSNATIVE_SDK_LIB_PATH}/aws-cpp-sdk-transfer.lib)
if (NOT LY_MONOLITHIC_GAME)
# Add 'USE_IMPORT_EXPORT' for external linkage
set(AWSNATIVESDK_COMPILE_DEFINITIONS USE_IMPORT_EXPORT)
#Shared libs
set(AWSNATIVESDK_CORE_RUNTIME_DEPENDENCIES ${AWSNATIVE_SDK_LIB_PATH}/aws-cpp-sdk-core.dll)
set(AWSNATIVESDK_COMMON_RUNTIME_DEPENDENCIES ${AWSNATIVE_SDK_LIB_PATH}/aws-c-common.dll)
set(AWSNATIVESDK_EVENTSTREAM_RUNTIME_DEPENDENCIES ${AWSNATIVE_SDK_LIB_PATH}/aws-c-event-stream.dll)
set(AWSNATIVESDK_CHECKSUMS_RUNTIME_DEPENDENCIES ${AWSNATIVE_SDK_LIB_PATH}/aws-checksums.dll)
set(AWSNATIVESDK_ACCESSMANAGEMENT_RUNTIME_DEPENDENCIES ${AWSNATIVE_SDK_LIB_PATH}/aws-cpp-sdk-access-management.dll)
set(AWSNATIVESDK_COGNITOIDENTITY_RUNTIME_DEPENDENCIES ${AWSNATIVE_SDK_LIB_PATH}/aws-cpp-sdk-cognito-identity.dll)
set(AWSNATIVESDK_COGNITOIDP_RUNTIME_DEPENDENCIES ${AWSNATIVE_SDK_LIB_PATH}/aws-cpp-sdk-cognito-idp.dll)
set(AWSNATIVESDK_DEVICEFARM_RUNTIME_DEPENDENCIES ${AWSNATIVE_SDK_LIB_PATH}/aws-cpp-sdk-devicefarm.dll)
set(AWSNATIVESDK_DYNAMODB_RUNTIME_DEPENDENCIES ${AWSNATIVE_SDK_LIB_PATH}/aws-cpp-sdk-dynamodb.dll)
set(AWSNATIVESDK_GAMELIFT_RUNTIME_DEPENDENCIES ${AWSNATIVE_SDK_LIB_PATH}/aws-cpp-sdk-gamelift.dll)
set(AWSNATIVESDK_IDENTITYMANAGEMENT_RUNTIME_DEPENDENCIES ${AWSNATIVE_SDK_LIB_PATH}/aws-cpp-sdk-identity-management.dll)
set(AWSNATIVESDK_KINESIS_RUNTIME_DEPENDENCIES ${AWSNATIVE_SDK_LIB_PATH}/aws-cpp-sdk-kinesis.dll)
set(AWSNATIVESDK_LAMBDA_RUNTIME_DEPENDENCIES ${AWSNATIVE_SDK_LIB_PATH}/aws-cpp-sdk-lambda.dll)
set(AWSNATIVESDK_MOBILEANALYTICS_RUNTIME_DEPENDENCIES ${AWSNATIVE_SDK_LIB_PATH}/aws-cpp-sdk-mobileanalytics.dll)
set(AWSNATIVESDK_QUEUES_RUNTIME_DEPENDENCIES ${AWSNATIVE_SDK_LIB_PATH}/aws-cpp-sdk-queues.dll)
set(AWSNATIVESDK_S3_RUNTIME_DEPENDENCIES ${AWSNATIVE_SDK_LIB_PATH}/aws-cpp-sdk-s3.dll)
set(AWSNATIVESDK_SNS_RUNTIME_DEPENDENCIES ${AWSNATIVE_SDK_LIB_PATH}/aws-cpp-sdk-sns.dll)
set(AWSNATIVESDK_SQS_RUNTIME_DEPENDENCIES ${AWSNATIVE_SDK_LIB_PATH}/aws-cpp-sdk-sqs.dll)
set(AWSNATIVESDK_STS_RUNTIME_DEPENDENCIES ${AWSNATIVE_SDK_LIB_PATH}/aws-cpp-sdk-sts.dll)
set(AWSNATIVESDK_TRANSFER_RUNTIME_DEPENDENCIES ${AWSNATIVE_SDK_LIB_PATH}/aws-cpp-sdk-transfer.dll)
endif()
@@ -34,8 +34,9 @@ ly_associate_package(PACKAGE_NAME azslc-1.7.19-rev1-multiplatform
ly_associate_package(PACKAGE_NAME glad-2.0.0-beta-rev2-multiplatform TARGETS glad PACKAGE_HASH ff97ee9664e97d0854b52a3734c2289329d9f2b4cd69478df6d0ca1f1c9392ee)
ly_associate_package(PACKAGE_NAME xxhash-0.7.4-rev1-multiplatform TARGETS xxhash PACKAGE_HASH e81f3e6c4065975833996dd1fcffe46c3cf0f9e3a4207ec5f4a1b564ba75861e)
ly_associate_package(PACKAGE_NAME Blast-1.1.7-rev1-multiplatform TARGETS Blast PACKAGE_HASH 36b8f393bcd25d0f85cfc7a831ebbdac881e6054c4f0735649966aa6aa86e6f0)
ly_associate_package(PACKAGE_NAME PVRTexTool-4.24.0-rev3-multiplatform TARGETS PVRTexTool PACKAGE_HASH d9c7e21e03b03cb560da4793a91a0d384ea621757cf87a1a82c83bfca6b23f97)
ly_associate_package(PACKAGE_NAME PVRTexTool-4.24.0-rev4-multiplatform TARGETS PVRTexTool PACKAGE_HASH d0d6da61c7557de0d2c71fc35ba56c3be49555b703f0e853d4c58225537acf1e)
# platform-specific:
ly_associate_package(PACKAGE_NAME AWSNativeSDK-1.7.167-rev1-windows TARGETS AWSNativeSDK PACKAGE_HASH 58e199f253a28964b96056ed4a6db06216fcde14a96d6d94b0d6ad3437516bdc)
ly_associate_package(PACKAGE_NAME PhysX-4.1.0.25992954-rev1-windows TARGETS PhysX PACKAGE_HASH 198bed89d1aae7caaf5dadba24cee56235fe41725d004b64040d4e50d0f3aa1a)
ly_associate_package(PACKAGE_NAME mikkelsen-1.0.0.4-windows TARGETS mikkelsen PACKAGE_HASH 872c4d245a1c86139aa929f2b465b63ea4ea55b04ced50309135dd4597457a4e)
ly_associate_package(PACKAGE_NAME googletest-1.8.1-rev4-windows TARGETS googletest PACKAGE_HASH 7e8f03ae8a01563124e3daa06386f25a2b311c10bb95bff05cae6c41eff83837)
@@ -43,3 +44,4 @@ ly_associate_package(PACKAGE_NAME googlebenchmark-1.5.0-rev1-windows TARGETS Goo
ly_associate_package(PACKAGE_NAME d3dx12-headers-rev1-windows TARGETS d3dx12 PACKAGE_HASH 088c637159fba4a3e4c0cf08fb4921906fd4cca498939bd239db7c54b5b2f804)
ly_associate_package(PACKAGE_NAME pyside2-qt-5.15.1-rev2-windows TARGETS pyside2 PACKAGE_HASH c90f3efcc7c10e79b22a33467855ad861f9dbd2e909df27a5cba9db9fa3edd0f)
ly_associate_package(PACKAGE_NAME openimageio-2.1.16.0-rev1-windows TARGETS openimageio PACKAGE_HASH b9f6d6df180ad240b9f17a68c1862c7d8f38234de0e692e83116254b0ee467e5)
ly_associate_package(PACKAGE_NAME qt-5.15.2-windows TARGETS Qt PACKAGE_HASH edaf954c647c99727bfd313dab2959803d2df0873914bb96368c3d8286eed6d9)
-55
View File
@@ -1,55 +0,0 @@
#
# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
# its licensors.
#
# For complete copyright and license terms please see the LICENSE at the root of this
# distribution (the "License"). All use of this software is governed by the License,
# or, if provided, by the license below or the license accompanying this file. Do not
# 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.
#
set(QT_PATH ${BASE_PATH}/msvc2019_64)
set(QT_LIB_PATH ${QT_PATH}/lib)
include(CMakeParseArguments)
# Clear the cache for found executable
unset(WINDEPLOYQT_EXECUTABLE CACHE)
find_program(WINDEPLOYQT_EXECUTABLE windeployqt HINTS "${QT_PATH}/bin")
mark_as_advanced(WINDEPLOYQT_EXECUTABLE) # Hiding from GUI
function(ly_qt_deploy)
set(options)
set(oneValueArgs TARGET)
set(multiValueArgs)
cmake_parse_arguments(ly_qt_deploy "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
# Validate input arguments
if(NOT ly_qt_deploy_TARGET)
message(FATAL_ERROR "You must provide a target to detect qt dependencies")
endif()
# CMake has an issue with POST_BUILD commands in msbuild when it is executed from outside VS:
# https://gitlab.kitware.com/cmake/cmake/issues/18530
add_custom_command(TARGET ${ly_qt_deploy_TARGET} POST_BUILD
COMMAND "${CMAKE_COMMAND}"
-DLY_TIMESTAMP_REFERENCE=$<TARGET_FILE:${ly_qt_deploy_TARGET}>
-DLY_LOCK_FILE=$<TARGET_FILE_DIR:${ly_qt_deploy_TARGET}>/qtdeploy.lock
-P ${LY_ROOT_FOLDER}/cmake/CommandExecution.cmake
EXEC_COMMAND "${CMAKE_COMMAND}" -E
env PATH="${QT_PATH}/bin"
${WINDEPLOYQT_EXECUTABLE}
$<$<CONFIG:Debug>:--pdb>
--verbose 0
--no-compiler-runtime
$<TARGET_FILE:${ly_qt_deploy_TARGET}>
DEPENDS $<TARGET_FILE:${ly_qt_deploy_TARGET}> $<TARGET_FILE:AZ::QtTGAImageFormatPlugin>
COMMENT "Deploying qt..."
VERBATIM
)
endfunction()
@@ -10,7 +10,6 @@
#
set(FILES
AWSNativeSDK_windows.cmake
AWSGameLiftServerSDK_windows.cmake
BuiltInPackages_windows.cmake
Clang_windows.cmake
@@ -23,7 +22,6 @@ set(FILES
FreeType2_windows.cmake
libav_windows.cmake
OpenSSL_windows.cmake
Qt_windows.cmake
tiff_windows.cmake
Wwise_windows.cmake
)
-37
View File
@@ -1,37 +0,0 @@
#
# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
# its licensors.
#
# For complete copyright and license terms please see the LICENSE at the root of this
# distribution (the "License"). All use of this software is governed by the License,
# or, if provided, by the license below or the license accompanying this file. Do not
# 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.
#
set(AWSNATIVE_SDK_LIB_PATH ${BASE_PATH}/lib/ios/$<IF:$<CONFIG:Debug>,Debug,Release>)
set(AWSNATIVESDK_CORE_LIBS
${AWSNATIVE_SDK_LIB_PATH}/libaws-cpp-sdk-core.a
${AWSNATIVE_SDK_LIB_PATH}/libcurl.a
)
set(AWSNATIVESDK_COMMON_LIBS ${AWSNATIVE_SDK_LIB_PATH}/libaws-c-common.a)
set(AWSNATIVESDK_EVENTSTREAM_LIBS ${AWSNATIVE_SDK_LIB_PATH}/libaws-c-event-stream.a)
set(AWSNATIVESDK_CHECKSUMS_LIBS ${AWSNATIVE_SDK_LIB_PATH}/libaws-checksums.a)
set(AWSNATIVESDK_COGNITOIDENTITY_LIBS ${AWSNATIVE_SDK_LIB_PATH}/libaws-cpp-sdk-cognito-identity.a)
set(AWSNATIVESDK_COGNITOIDP_LIBS ${AWSNATIVE_SDK_LIB_PATH}/libaws-cpp-sdk-cognito-idp.a)
set(AWSNATIVESDK_DEVICEFARM_LIBS ${AWSNATIVE_SDK_LIB_PATH}/libaws-cpp-sdk-devicefarm.a)
set(AWSNATIVESDK_DYNAMODB_LIBS ${AWSNATIVE_SDK_LIB_PATH}/libaws-cpp-sdk-dynamodb.a)
set(AWSNATIVESDK_GAMELIFT_LIBS ${AWSNATIVE_SDK_LIB_PATH}/libaws-cpp-sdk-gamelift.a)
set(AWSNATIVESDK_IDENTITYMANAGEMENT_LIBS ${AWSNATIVE_SDK_LIB_PATH}/libaws-cpp-sdk-identity-management.a)
set(AWSNATIVESDK_KINESIS_LIBS ${AWSNATIVE_SDK_LIB_PATH}/libaws-cpp-sdk-kinesis.a)
set(AWSNATIVESDK_LAMBDA_LIBS ${AWSNATIVE_SDK_LIB_PATH}/libaws-cpp-sdk-lambda.a)
set(AWSNATIVESDK_MOBILEANALYTICS_LIBS ${AWSNATIVE_SDK_LIB_PATH}/libaws-cpp-sdk-mobileanalytics.a)
set(AWSNATIVESDK_QUEUES_LIBS ${AWSNATIVE_SDK_LIB_PATH}/libaws-cpp-sdk-queues.a)
set(AWSNATIVESDK_S3_LIBS ${AWSNATIVE_SDK_LIB_PATH}/libaws-cpp-sdk-s3.a)
set(AWSNATIVESDK_SNS_LIBS ${AWSNATIVE_SDK_LIB_PATH}/libaws-cpp-sdk-sns.a)
set(AWSNATIVESDK_SQS_LIBS ${AWSNATIVE_SDK_LIB_PATH}/libaws-cpp-sdk-sqs.a)
set(AWSNATIVESDK_STS_LIBS ${AWSNATIVE_SDK_LIB_PATH}/libaws-cpp-sdk-sts.a)
find_library(SECURITY_FRAMEWORK Security)
set(AWSNATIVESDK_BUILD_DEPENDENCIES ${SECURITY_FRAMEWORK})
+1
View File
@@ -21,6 +21,7 @@ ly_associate_package(PACKAGE_NAME zstd-1.35-multiplatform TARGETS zst
ly_associate_package(PACKAGE_NAME glad-2.0.0-beta-rev2-multiplatform TARGETS glad PACKAGE_HASH ff97ee9664e97d0854b52a3734c2289329d9f2b4cd69478df6d0ca1f1c9392ee)
# platform-specific:
ly_associate_package(PACKAGE_NAME AWSNativeSDK-1.7.167-rev1-ios TARGETS AWSNativeSDK PACKAGE_HASH 9e1956b5bb10762cdb84a981dcd356419078f4296ffbc8c55717bc3f53b09d69)
ly_associate_package(PACKAGE_NAME PhysX-4.1.0.25992954-rev1-ios TARGETS PhysX PACKAGE_HASH a2a48a09128337c72b9c2c1b8f43187c6c914e8509c9c6cd91810108748d7e09)
ly_associate_package(PACKAGE_NAME mikkelsen-1.0.0.4-ios TARGETS mikkelsen PACKAGE_HASH 976aaa3ccd8582346132a10af253822ccc5d5bcc9ea5ba44d27848f65ee88a8a)
ly_associate_package(PACKAGE_NAME googletest-1.8.1-rev4-ios TARGETS googletest PACKAGE_HASH 2f121ad9784c0ab73dfaa58e1fee05440a82a07cc556bec162eeb407688111a7)
-1
View File
@@ -10,7 +10,6 @@
#
set(FILES
AWSNativeSDK_ios.cmake
BuiltInPackages_ios.cmake
expat_ios.cmake
FreeType2_ios.cmake
-2
View File
@@ -11,7 +11,6 @@
set(FILES
BuiltInPackages.cmake
FindAWSNativeSDK.cmake
FindAWSGameLiftServerSDK.cmake
Findcivetweb.cmake
FindClang.cmake
@@ -23,7 +22,6 @@ set(FILES
FindFreeType2.cmake
Findlibav.cmake
FindOpenSSL.cmake
FindQt.cmake
FindRadTelemetry.cmake
Findtiff.cmake
FindVkValidation.cmake
+6
View File
@@ -699,3 +699,9 @@ if (NOT CMAKE_SCRIPT_MODE_FILE)
# a good starting point.
include(cmake/3rdParty/BuiltInPackages.cmake)
endif()
if(PAL_TRAIT_BUILD_HOST_TOOLS)
include(cmake/LYWrappers.cmake)
# Importing this globally to handle AUTOMOC, AUTOUIC, AUTORCC
ly_parse_third_party_dependencies(3rdParty::Qt)
endif()
+9 -4
View File
@@ -21,12 +21,17 @@ if(json_error)
endif()
# Read the list of paths from ~.o3de/o3de_manifest.json
if($ENV{USERPROFILE} AND EXISTS $ENV{USERPROFILE})
set(manifest_path $ENV{USERPROFILE}/.o3de/o3de_manifest.json) # Windows
else()
set(manifest_path $ENV{HOME}/.o3de/o3de_manifest.json) # Unix
file(TO_CMAKE_PATH "$ENV{USERPROFILE}" home_directory) # Windows
if((NOT home_directory) OR (NOT EXISTS ${home_directory}))
file(TO_CMAKE_PATH "$ENV{HOME}" home_directory)# Unix
endif()
if (NOT home_directory)
message(FATAL_ERROR "Cannot find user home directory, the o3de manifest cannot be found")
endif()
# Set manifest path to path in the user home directory
set(manifest_path ${home_directory}/.o3de/o3de_manifest.json)
if(EXISTS ${manifest_path})
file(READ ${manifest_path} manifest_json)
string(JSON engines_count ERROR_VARIABLE json_error LENGTH ${manifest_json} engines)
+2 -1
View File
@@ -100,6 +100,7 @@ endfunction()
# the cmake project generation. This will provide a bridge to non-cmake tools to read the platform-specific cmake
# project generation settings.
#
get_property(LY_PROJECTS_TARGET_NAME GLOBAL PROPERTY LY_PROJECTS_TARGET_NAME)
function(ly_update_platform_settings)
# Update the <platform>.last file to keep track of the recent build_dir
set(ly_platform_last_path "${CMAKE_BINARY_DIR}/platform.settings")
@@ -109,7 +110,7 @@ function(ly_update_platform_settings)
[settings]
platform=${PAL_PLATFORM_NAME}
game_projects=${LY_PROJECTS_NAME}
game_projects=${LY_PROJECTS_TARGET_NAME}
asset_deploy_mode=${LY_ASSET_DEPLOY_MODE}
asset_deploy_type=${LY_ASSET_DEPLOY_ASSET_TYPE}
override_pak_root=${LY_OVERRIDE_PAK_FOLDER_ROOT}
+3
View File
@@ -23,4 +23,7 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin CACHE PATH "Build dir
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin CACHE PATH "Build directory for executables")
set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/install CACHE PATH "Installation prefix")
set(LY_EXTERNAL_SUBDIRS "" CACHE STRING "Additional list of subdirectory to recurse into via the cmake `add_subdirectory()` command. \
The subdirectories are included after the restricted platform folders have been visited by a call to `add_subdirectory(restricted/\${restricted_platform})`")
ly_set(LY_ROOT_FOLDER ${CMAKE_CURRENT_SOURCE_DIR})
+30 -62
View File
@@ -23,6 +23,16 @@ if(LY_UNITY_BUILD AND NOT PAL_TRAIT_BUILD_UNITY_SUPPORTED)
message(ERROR "LY_UNITY_BUILD is specified, but not supported for the current target platform")
endif()
define_property(TARGET PROPERTY GEM_MODULE
BRIEF_DOCS "Defines a MODULE library as a Gem"
FULL_DOCS [[
Property which is set on targets that should be seen as gems
This is used to determine whether this target should load as
when used as a runtime dependency should load at the same time
as its dependee
]]
)
#! ly_add_target: adds a target and provides parameters for the common configurations.
#
@@ -39,6 +49,7 @@ endif()
# \arg:STATIC (bool) defines this target to be a static library
# \arg:SHARED (bool) defines this target to be a dynamic library
# \arg:MODULE (bool) defines this target to be a module library
# \arg:GEM_MODULE (bool) defines this target to be a module library while also marking the target as a "Gem" via the GEM_MODULE property
# \arg:HEADERONLY (bool) defines this target to be a header only library. A ${NAME}_HEADERS project will be created for the IDE
# \arg:EXECUTABLE (bool) defines this target to be an executable
# \arg:APPLICATION (bool) defines this target to be an application (executable that is not a console)
@@ -64,7 +75,7 @@ endif()
# \arg:AUTOGEN_RULES a set of AutoGeneration rules to be passed to the AzAutoGen expansion system
function(ly_add_target)
set(options STATIC SHARED MODULE HEADERONLY EXECUTABLE APPLICATION AUTOMOC AUTOUIC AUTORCC NO_UNITY)
set(options STATIC SHARED MODULE GEM_MODULE HEADERONLY EXECUTABLE APPLICATION AUTOMOC AUTOUIC AUTORCC NO_UNITY)
set(oneValueArgs NAME NAMESPACE OUTPUT_SUBDIRECTORY OUTPUT_NAME)
set(multiValueArgs FILES_CMAKE GENERATED_FILES INCLUDE_DIRECTORIES COMPILE_DEFINITIONS BUILD_DEPENDENCIES RUNTIME_DEPENDENCIES PLATFORM_INCLUDE_FILES TARGET_PROPERTIES AUTOGEN_RULES)
@@ -78,6 +89,11 @@ function(ly_add_target)
message(FATAL_ERROR "You must provide a list of _files.cmake files for the target")
endif()
# If the GEM_MODULE tag is passed set the normal MODULE argument
if(ly_add_target_GEM_MODULE)
set(ly_add_target_MODULE ${ly_add_target_GEM_MODULE})
endif()
foreach(file_cmake ${ly_add_target_FILES_CMAKE})
ly_include_cmake_file_list(${file_cmake})
endforeach()
@@ -176,6 +192,10 @@ function(ly_add_target)
endif()
if(ly_add_target_GEM_MODULE)
set_target_properties(${ly_add_target_NAME} PROPERTIES GEM_MODULE TRUE)
endif()
if (ly_add_target_INCLUDE_DIRECTORIES)
target_include_directories(${ly_add_target_NAME}
${ly_add_target_INCLUDE_DIRECTORIES}
@@ -225,7 +245,15 @@ function(ly_add_target)
ly_source_groups_from_folders("${ALLFILES}")
source_group("Generated Files" REGULAR_EXPRESSION "(${CMAKE_BINARY_DIR})") # Any file coming from the output folder
file(RELATIVE_PATH project_path ${LY_ROOT_FOLDER} ${CMAKE_CURRENT_SOURCE_DIR})
set_property(TARGET ${project_NAME} PROPERTY FOLDER ${project_path})
# Visual Studio cannot load a project with a FOLDER that starts with a "../" relative path
# Strip away any leading ../ and then add a prefix of ExternalTargets/ as that in this scenario
# A relative directory with ../ would be outside of the Lumberyard Engine Root therefore it is external
set(ide_path ${project_path})
if (${project_path} MATCHES [[^(\.\./)+(.*)]])
set(ide_path "${CMAKE_MATCH_2}")
endif()
set_property(TARGET ${project_NAME} PROPERTY FOLDER ${ide_path})
if(ly_add_target_RUNTIME_DEPENDENCIES)
ly_parse_third_party_dependencies("${ly_add_target_RUNTIME_DEPENDENCIES}")
@@ -561,66 +589,6 @@ function(ly_add_target_files)
endfunction()
#! ly_add_translations: adds translations (ts) to a target.
#
# This wrapper will generate a qrc file with those translations and add the files under "prefix" and add them to
# the indicated targets. These files will be added under the "Generated Files" filter
#
# \arg:TARGETS name of the targets that the translations will be added to
# \arg:PREFIX prefix where the translation will be located within the qrc file
# \arg:FILES translation files to add
#
function(ly_add_translations)
set(options)
set(oneValueArgs PREFIX)
set(multiValueArgs TARGETS FILES)
cmake_parse_arguments(ly_add_translations "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
# Validate input arguments
if(NOT ly_add_translations_TARGETS)
message(FATAL_ERROR "You must provide at least one target")
endif()
if(NOT ly_add_translations_FILES)
message(FATAL_ERROR "You must provide at least a translation file")
endif()
qt5_add_translation(TRANSLATED_FILES ${ly_add_translations_FILES})
set(qrc_file_contents
"<RCC>
<qresource prefix=\"/${ly_add_translations_PREFIX}\">
")
foreach(file ${TRANSLATED_FILES})
get_filename_component(filename ${file} NAME)
string(APPEND qrc_file_contents " <file>${filename}</file>
")
endforeach()
string(APPEND qrc_file_contents " </qresource>
</RCC>
")
set(qrc_file_path ${CMAKE_CURRENT_BINARY_DIR}/i18n_${ly_add_translations_PREFIX}.qrc)
file(WRITE
${qrc_file_path}
${qrc_file_contents}
)
set_source_files_properties(
${TRANSLATED_FILES}
${qrc_file_path}
PROPERTIES
GENERATED TRUE
SKIP_AUTORCC TRUE
)
qt5_add_resources(RESOURCE_FILE ${qrc_file_path})
foreach(target ${ly_add_translations_TARGETS})
target_sources(${target} PRIVATE "${TRANSLATED_FILES};${qrc_file_path};${RESOURCE_FILE}")
endforeach()
endfunction()
#! ly_add_source_properties: adds/appends properties to a source file.
#
# This wraps set_source_files_properties to be able to pass a property with multiple values
+1 -1
View File
@@ -22,5 +22,5 @@ if(LY_MONOLITHIC_GAME)
ly_set(PAL_TRAIT_BUILD_SERVER_SUPPORTED FALSE)
else()
ly_set(PAL_TRAIT_MONOLITHIC_DRIVEN_LIBRARY_TYPE SHARED)
ly_set(PAL_TRAIT_MONOLITHIC_DRIVEN_MODULE_TYPE MODULE)
ly_set(PAL_TRAIT_MONOLITHIC_DRIVEN_MODULE_TYPE GEM_MODULE)
endif()
+3 -7
View File
@@ -62,11 +62,11 @@ function(ly_get_absolute_pal_filename out_name in_name)
set(full_name ${in_name})
if (NOT EXISTS ${full_name})
string(REGEX MATCH "${repo_dir}/(.*)/Platform/([^/]*)(.*)?" match ${full_name})
string(REGEX MATCH "${repo_dir}/(.*)/Platform/([^/]*)/?(.*)$" match ${full_name})
if(${CMAKE_MATCH_2} IN_LIST PAL_RESTRICTED_PLATFORMS)
set(full_name ${repo_dir}/restricted/${CMAKE_MATCH_2}/${CMAKE_MATCH_1})
if(NOT "${CMAKE_MATCH_3}" STREQUAL "")
string(APPEND full_name ${CMAKE_MATCH_3})
string(APPEND full_name "/" ${CMAKE_MATCH_3})
endif()
endif()
endif()
@@ -74,11 +74,7 @@ function(ly_get_absolute_pal_filename out_name in_name)
endfunction()
function(ly_get_list_relative_pal_filename out_name in_name)
if(${ARGC} GREATER 2)
ly_get_absolute_pal_filename(abs_name ${in_name} ${ARGV2})
else()
ly_get_absolute_pal_filename(abs_name ${in_name})
endif()
ly_get_absolute_pal_filename(abs_name ${in_name} ${ARGN})
file(RELATIVE_PATH relative_name ${CMAKE_CURRENT_LIST_DIR} ${abs_name})
set(${out_name} ${relative_name} PARENT_SCOPE)
endfunction()
+4 -6
View File
@@ -9,7 +9,6 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#
# Detect the ios SDK Path and set the SYSROOT
find_program(XCRUN_PROG "xcrun")
execute_process(COMMAND ${XCRUN_PROG} --sdk iphoneos --show-sdk-path
@@ -20,11 +19,10 @@ if (NOT GET_IOS_SDK_RESULT EQUAL 0)
endif()
string(STRIP ${LY_IOS_SDK_PATH} LY_IOS_SDK_PATH)
ly_set(CMAKE_SYSROOT ${LY_IOS_SDK_PATH})
set(CMAKE_SYSROOT ${LY_IOS_SDK_PATH})
ly_set(SDKROOT "iphoneos")
set(SDKROOT "iphoneos")
ly_set(DEVROOT "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer")
ly_set(CMAKE_OSX_SYSROOT "${SDKROOT}")
set(DEVROOT "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer")
set(CMAKE_OSX_SYSROOT "${SDKROOT}")
+18 -13
View File
@@ -26,12 +26,13 @@ set(LY_PROJECTS "" CACHE STRING "List of projects to enable, this can be a relat
# found in the DEPENDENCIES_FILES. The PREFIX and each dependent target will be joined using the <dot> symbol
# \arg:TARGETS names of the targets to associate the dependencies to
# \arg:DEPENDENCIES_FILES file(s) that contains the load-time dependencies the TARGETS will be associated to
# \arg:DEPENDENT_TARGETS additional list of targets should be added as load-time dependencies for the TARGETS list
#
function(ly_add_target_dependencies)
set(options)
set(oneValueArgs PREFIX)
set(multiValueArgs TARGETS DEPENDENCIES_FILES)
set(multiValueArgs TARGETS DEPENDENCIES_FILES DEPENDENT_TARGETS)
cmake_parse_arguments(ly_add_gem_dependencies "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
@@ -40,8 +41,8 @@ function(ly_add_target_dependencies)
message(FATAL_ERROR "You must provide at least one target to associate the dependencies with")
endif()
if(NOT ly_add_gem_dependencies_DEPENDENCIES_FILES)
message(FATAL_ERROR "DEPENDENCIES_FILES parameter missing")
if(NOT ly_add_gem_dependencies_DEPENDENCIES_FILES AND NOT ly_add_gem_dependencies_DEPENDENT_TARGETS)
message(FATAL_ERROR "DEPENDENCIES_FILES parameter missing. It must be supplied unless the DEPENDENT_TARGETS parameter is set")
endif()
unset(ALL_GEM_DEPENDENCIES)
@@ -52,6 +53,9 @@ function(ly_add_target_dependencies)
list(APPEND ALL_GEM_DEPENDENCIES ${GEM_DEPENDENCIES})
endforeach()
# Append the DEPENDENT_TARGETS to the list of ALL_GEM_DEPENDENCIES
list(APPEND ALL_GEM_DEPENDENCIES ${ly_add_gem_dependencies_DEPENDENT_TARGETS})
# for each target, add the dependencies and generate gems json
foreach(target ${ly_add_gem_dependencies_TARGETS})
ly_add_dependencies(${target} ${ALL_GEM_DEPENDENCIES})
@@ -100,15 +104,16 @@ function(ly_add_project_dependencies)
endfunction()
# Add the projects here so the above function is found
unset(LY_PROJECTS_NAME)
foreach(project ${LY_PROJECTS})
if(IS_ABSOLUTE ${project})
get_filename_component(project_name ${project} NAME)
add_subdirectory(${project} ${project_name})
list(APPEND LY_PROJECTS_NAME ${project_name})
else()
add_subdirectory(${project})
list(APPEND LY_PROJECTS_NAME ${project})
endif()
get_filename_component(full_directory_path ${project} REALPATH ${CMAKE_SOURCE_DIR})
string(SHA256 full_directory_hash ${full_directory_path})
# Truncate the full_directory_hash down to 8 characters to avoid hitting the Windows 260 character path limit
# when the external subdirectory contains relative paths of significant length
string(SUBSTRING ${full_directory_hash} 0 8 full_directory_hash)
get_filename_component(project_folder_name ${project} NAME)
list(APPEND LY_PROJECTS_FOLDER_NAME ${project_folder_name})
add_subdirectory(${project} "${project_folder_name}-${full_directory_hash}")
endforeach()
ly_set(LY_PROJECTS_NAME ${LY_PROJECTS_NAME})
ly_set(LY_PROJECTS_FOLDER_NAME ${LY_PROJECTS_FOLDER_NAME})
+60 -3
View File
@@ -30,11 +30,61 @@ set(gems_json_template [[
set(gem_module_template [[
"@stripped_gem_target@":
{
"Module":"$<TARGET_FILE_NAME:@gem_target@>",
"Modules":["$<TARGET_FILE_NAME:@gem_target@>"],
"SourcePaths":["@gem_relative_source_dir@"]
}]]
)
#!ly_get_gem_load_dependencies: Retrieves the list of "load" dependencies for a target
# Visits through only MANUALLY_ADDED_DEPENDENCIES of targets with a GEM_MODULE property
# to determine which gems a target needs to load
# ly_get_runtime_dependencies cannot be used as it will recurse through non-manually added dependencies
# to add manually added added which results in false load dependencies.
# \arg:ly_GEM_LOAD_DEPENDENCIES(name) - Output variable to be populated gem load dependencies
# \arg:ly_TARGET(TARGET) - CMake target to examine for dependencies
function(ly_get_gem_load_dependencies ly_GEM_LOAD_DEPENDENCIES ly_TARGET)
if(NOT TARGET ${ly_TARGET})
return() # Nothing to do
endif()
# Optimize the search by caching gem load dependencies
get_property(are_dependencies_cached GLOBAL PROPERTY LY_GEM_LOAD_DEPENDENCIES_${ly_TARGET} SET)
if(are_dependencies_cached)
# We already walked through this target
get_property(cached_dependencies GLOBAL PROPERTY LY_GEM_LOAD_DEPENDENCIES_${ly_TARGET})
set(${ly_GEM_LOAD_DEPENDENCIES} ${cached_dependencies} PARENT_SCOPE)
return()
endif()
unset(all_gem_load_dependencies)
# For load dependencies, we want to copy over the dependency and traverse them
# Only if the dependency has a GEM_MODULE property
unset(load_dependencies)
get_target_property(load_dependencies ${ly_TARGET} MANUALLY_ADDED_DEPENDENCIES)
if(load_dependencies)
foreach(load_dependency ${load_dependencies})
# Skip wrapping produced when targets are not created in the same directory
if(NOT ${load_dependency} MATCHES "^::@")
get_property(dependency_type TARGET ${load_dependency} PROPERTY TYPE)
get_property(is_gem_target TARGET ${load_dependency} PROPERTY GEM_MODULE SET)
# If the dependency is a "gem module" then add it as a load dependencies
# and recurse into its manually added dependencies
if (is_gem_target)
unset(dependencies)
ly_get_gem_load_dependencies(dependencies ${load_dependency})
list(APPEND all_gem_load_dependencies ${load_dependency})
list(APPEND all_gem_load_dependencies ${dependencies})
endif()
endif()
endforeach()
endif()
list(REMOVE_DUPLICATES all_gem_load_dependencies)
set_property(GLOBAL PROPERTY LY_GEM_LOAD_DEPENDENCIES_${ly_TARGET} "${all_gem_load_dependencies}")
set(${ly_GEM_LOAD_DEPENDENCIES} ${all_gem_load_dependencies} PARENT_SCOPE)
endfunction()
#! ly_delayed_generate_settings_registry: Generates a .setreg file for each target with dependencies
# added to it via ly_add_target_dependencies
# The generated file contains the file to the each dependent targets
@@ -58,9 +108,16 @@ function(ly_delayed_generate_settings_registry)
# Get the gem dependencies for the given project and target combination
get_property(gem_dependencies GLOBAL PROPERTY LY_DELAYED_LOAD_"${prefix_target}")
list(REMOVE_DUPLICATES gem_dependencies) # Strip out any duplicate gem targets
set(all_gem_dependencies ${gem_dependencies})
foreach(gem_target ${gem_dependencies})
ly_get_gem_load_dependencies(gem_load_gem_dependencies ${gem_target})
list(APPEND all_gem_dependencies ${gem_load_gem_dependencies})
endforeach()
list(REMOVE_DUPLICATES all_gem_dependencies)
unset(target_gem_dependencies_names)
foreach(gem_target ${gem_dependencies})
foreach(gem_target ${all_gem_dependencies})
unset(gem_relative_source_dir)
# Create path from the LY_ROOT_FOLDER to the the Gem directory
if (NOT TARGET ${gem_target})
@@ -68,7 +125,7 @@ function(ly_delayed_generate_settings_registry)
endif()
get_property(gem_relative_source_dir TARGET ${gem_target} PROPERTY SOURCE_DIR)
if(gem_relative_source_dir)
# Most gems CMakeLists.txt files reside in the <GemSourceDir/>Code/ so remove "Code/" from the path
# Most gems CMakeLists.txt files reside in the <GemSourceDir>/Code/ so remove "Code/" from the path
if(gem_relative_source_dir MATCHES ".*/Code$")
get_filename_component(gem_relative_source_dir ${gem_relative_source_dir} DIRECTORY)
endif()
@@ -96,7 +96,7 @@ class AndroidDeployment(object):
if asset_mode == 'PAK':
self.local_asset_path = self.dev_root / 'Pak' / f'{game_name.lower()}_{asset_type}_paks'
else:
self.local_asset_path = self.dev_root / 'Cache' / game_name / asset_type
self.local_asset_path = self.dev_root / game_name / 'Cache' / asset_type
assert game_name is not None, f"'game_name' is required"
self.game_name = game_name
+77 -81
View File
@@ -84,7 +84,7 @@ APP_SPLASH_NAME = 'app_splash.png'
PYTHON_SCRIPT = 'python.cmd' if platform.system() == 'Windows' else 'python.sh'
ANDROID_LAUNCHER_NAME_PATTERN = "{game_name}.GameLauncher"
ANDROID_LAUNCHER_NAME_PATTERN = "{project_name}.GameLauncher"
class AndroidProjectManifestEnvironment(object):
"""
@@ -92,43 +92,42 @@ class AndroidProjectManifestEnvironment(object):
that were passed in or calculated from the command line arguments.
"""
def __init__(self, dev_root, game_name, android_sdk_version_number, android_ndk_platform_number):
def __init__(self, engine_root, project_path, android_sdk_version_number, android_ndk_platform_number, is_test:bool):
"""
Initialize the object with the project specific parameters and values for the game project
:param dev_root: The dev-root path where the game is located
:param game_name: The name of the game
:param engine_root: The path where the engine is located
:param project_path: The path were the project is located
:param android_sdk_version_number: The android SDK platform version
:param android_ndk_platform_number: The android NDK platform version
:param is_test: Indicates if theAzTestRunner application should be run
"""
is_test = game_name.lower() == TEST_RUNNER_PROJECT.lower()
if is_test:
# The AzTestRunner project.json is located under {dev_root}/Code/Tools/AzTestRunner/Platform/Android/android_project.json
game_folder_project_properties_path = dev_root / 'Code' / 'Tools' / 'AzTestRunner' / 'Platform' / 'Android' / 'android_project.json'
# The AzTestRunner project.json is located under {engine_root}/Code/Tools/AzTestRunner/Platform/Android/android_project.json
project_properties_path = engine_root / 'Code' / 'Tools' / 'AzTestRunner' / 'Platform' / 'Android' / 'android_project.json'
else:
# The project.json file is located under the game name folder
game_folder = dev_root / game_name
game_folder_project_properties_path = game_folder / 'project.json'
project_properties_path = project_path / 'project.json'
# Read and parse the project.json file into a dictionary to process the specific attributes needed for the manifest template
game_project_properties_content = game_folder_project_properties_path.resolve(strict=True)\
project_properties_content = project_properties_path.resolve(strict=True)\
.read_text(encoding=common.DEFAULT_TEXT_READ_ENCODING,
errors=common.ENCODING_ERROR_HANDLINGS)
self.game_name = game_name
self.project_path = project_path
# Extract the key attributes we need to process and build up our environment table
game_project_json = json.loads(game_project_properties_content)
project_json = json.loads(project_properties_content)
product_name = game_project_json['product_name']
project_name = project_json['project_name']
product_name = project_json['product_name']
game_project_android_settings = game_project_json['android_settings']
game_project_android_settings = project_json['android_settings']
package_name = game_project_android_settings["package_name"]
package_path = package_name.replace('.', '/')
project_activity = f'{TEST_RUNNER_PROJECT}Activity' if is_test else f'{self.game_name}Activity'
project_activity = f'{TEST_RUNNER_PROJECT}Activity' if is_test else f'{project_name}Activity'
# Multiview options require special processing
multi_window_options = AndroidProjectManifestEnvironment.process_android_multi_window_options(game_project_android_settings)
@@ -140,9 +139,9 @@ class AndroidProjectManifestEnvironment(object):
"ANDROID_VERSION_NAME": game_project_android_settings["version_name"],
"ANDROID_SCREEN_ORIENTATION": game_project_android_settings["orientation"],
'ANDROID_APP_NAME': TEST_RUNNER_PROJECT if is_test else product_name, # external facing name
'ANDROID_PROJECT_NAME': TEST_RUNNER_PROJECT if is_test else self.game_name, # internal facing name
'ANDROID_PROJECT_NAME': TEST_RUNNER_PROJECT if is_test else project_name, # internal facing name
'ANDROID_PROJECT_ACTIVITY': project_activity,
'ANDROID_LAUNCHER_NAME': TEST_RUNNER_PROJECT if is_test else ANDROID_LAUNCHER_NAME_PATTERN.format(game_name=self.game_name),
'ANDROID_LAUNCHER_NAME': TEST_RUNNER_PROJECT if is_test else ANDROID_LAUNCHER_NAME_PATTERN.format(project_name=project_name),
'ANDROID_CONFIG_CHANGES': multi_window_options['ANDROID_CONFIG_CHANGES'],
'ANDROID_APP_PUBLIC_KEY': game_project_android_settings.get('app_public_key', 'NoKey'),
'ANDROID_APP_OBFUSCATOR_SALT': game_project_android_settings.get('app_obfuscator_salt', ''),
@@ -297,7 +296,7 @@ PLATFORM_SETTINGS_FORMAT = """
[settings]
platform={platform}
game_projects={game_project}
game_projects={project_path}
asset_deploy_mode={asset_mode}
asset_deploy_type={asset_type}
@@ -336,7 +335,7 @@ CUSTOM_GRADLE_COPY_NATIVE_CONFIG_FORMAT_STR = """
task copyNativeLibs{config}(type: Copy) {{
delete 'outputs/native-lib/{abi}'
from fileTree(dir: 'build/intermediates/cmake/{config_lower}/obj/arm64-v8a/{config_lower}', include: '**/*.so', exclude: 'lib{game_name}.GameLauncher.so' )
from fileTree(dir: 'build/intermediates/cmake/{config_lower}/obj/arm64-v8a/{config_lower}', include: '**/*.so', exclude: 'lib{project_name}.GameLauncher.so' )
into 'outputs/native-lib/{abi}'
}}
@@ -363,7 +362,7 @@ CUSTOM_GRADLE_COPY_NATIVE_CONFIG_BUILD_ARTIFACTS_FORMAT_STR = """
CUSTOM_APPLY_ASSET_LAYOUT_TASK_FORMAT_STR = """
task syncLYLayoutMode{config}(type:Exec) {{
workingDir '{working_dir}'
commandLine '{python_full_path}', 'layout_tool.py', '--dev-root', '{dev_root}', '-p', 'Android', '-a', '{asset_type}', '-g', '{game_name}', '-m', '{asset_mode}', '--create-layout-root', '-l', '{asset_layout_folder}'
commandLine '{python_full_path}', 'layout_tool.py', '--project-path', '{project_path}', '-p', 'Android', '-a', '{asset_type}', '-m', '{asset_mode}', '--create-layout-root', '-l', '{asset_layout_folder}'
}}
compile{config}Sources.dependsOn syncLYLayoutMode{config}
"""
@@ -424,17 +423,19 @@ class AndroidProjectGenerator(object):
Class the manages the process to generate an android project folder in order to build with gradle/android studio
"""
def __init__(self, dev_root, build_dir, android_ndk_path, android_sdk_path, android_sdk_version, android_ndk_platform, game_name, third_party_path, cmake_version, override_cmake_path, override_gradle_path, override_ninja_path, android_sdk_build_tool_version, include_assets_in_apk, asset_mode, asset_type, signing_config, is_test_project=False):
def __init__(self, engine_root, build_dir, android_ndk_path, android_sdk_path, android_sdk_version, android_ndk_platform,
project_path, third_party_path, cmake_version, override_cmake_path, override_gradle_path, override_ninja_path,
android_sdk_build_tool_version, include_assets_in_apk, asset_mode, asset_type, signing_config, is_test_project=False):
"""
Initialize the object with all the required parameters needed to create an Android Project. The parameters should be verified before initializing this object
:param dev_root: The dev-root that contains the engine and the game
:param build_dir: The target folder under the ${dev_root} where the android project folder will be created
:param engine_root: The engine root that contains the engine
:param build_dir: The target folder under the where the android project folder will be created
:param android_ndk_path: The path to the ANDROID_NDK used for building the native android code
:param android_sdk_path: The path to the ANDROID_SDK used for building the android java code
:param android_sdk_version: The android platform version number to use for the Android SDK related builds
:param android_ndk_platform: The android platform version number to use for the Android NDK related builds
:param game_name: The name of the game under the ${dev_root} to create the project for
:param project_path: The path to the project
:param third_party_path: The required path to the lumberyard 3rd party path
:param cmake_version: The version number of cmake that will be used by gradle
:param override_cmake_path: The override path to cmake if it does not exists in the system path
@@ -445,11 +446,11 @@ class AndroidProjectGenerator(object):
:param asset_mode:
:param asset_type:
:param signing_config: Optional signing configuration arguments
:param is_test_project: Flag to indicate if this is a unit test runner project. (If true, game_name, asset_mode, asset_type, and include_assets_in_apk are ignored)
:param is_test_project: Flag to indicate if this is a unit test runner project. (If true, project_path, asset_mode, asset_type, and include_assets_in_apk are ignored)
"""
self.env = {}
self.dev_root = dev_root
self.engine_root = engine_root
self.build_dir = build_dir
@@ -457,7 +458,7 @@ class AndroidProjectGenerator(object):
self.android_sdk_path = android_sdk_path
self.android_project_builder_path = dev_root / 'Code/Tools/Android/ProjectBuilder'
self.android_project_builder_path = self.engine_root / 'Code/Tools/Android/ProjectBuilder'
self.android_sdk_version = android_sdk_version
@@ -465,7 +466,7 @@ class AndroidProjectGenerator(object):
self.android_ndk_platform = android_ndk_platform
self.game_name = game_name
self.project_path = project_path
self.third_party_path = third_party_path
@@ -507,7 +508,7 @@ class AndroidProjectGenerator(object):
'SDK_VER': self.android_sdk_version,
'NDK_PLATFORM_VER': self.android_ndk_platform,
'SDK_BUILD_TOOL_VER': self.android_sdk_build_tool_version,
'LY_DEV_ROOT': common.normalize_path_for_settings(self.dev_root)
'LY_ENGINE_ROOT': common.normalize_path_for_settings(self.engine_root)
}
# Generate the gradle build script
self.create_file_from_project_template(src_template_file='root.build.gradle.in',
@@ -570,7 +571,7 @@ class AndroidProjectGenerator(object):
if self.is_test_project:
platform_settings_content = PLATFORM_SETTINGS_FORMAT.format(generation_timestamp=str(datetime.datetime.now().strftime("%c")),
platform='android',
game_project=TEST_RUNNER_PROJECT,
project_path=TEST_RUNNER_PROJECT,
asset_mode='',
asset_type='',
android_sdk_path=str(self.android_sdk_path),
@@ -578,7 +579,7 @@ class AndroidProjectGenerator(object):
else:
platform_settings_content = PLATFORM_SETTINGS_FORMAT.format(generation_timestamp=str(datetime.datetime.now().strftime("%c")),
platform='android',
game_project=self.game_name,
project_path=self.project_path,
asset_mode=self.asset_mode,
asset_type=self.asset_type,
android_sdk_path=str(self.android_sdk_path),
@@ -709,22 +710,16 @@ class AndroidProjectGenerator(object):
# Prepare the 'PROJECT_DEPENDENCIES' environment variable
gradle_project_dependencies = [f" api project(path: ':{project_dependency}')" for project_dependency in project_dependencies]
template_dev_root = common.normalize_path_for_settings(self.dev_root)
template_engine_root = common.normalize_path_for_settings(self.engine_root)
template_third_party_path = common.normalize_path_for_settings(self.third_party_path)
template_ndk_path = common.normalize_path_for_settings(self.android_ndk_path)
gradle_build_env = dict()
# Calculate the relative path of the engine root based on the target build directory, which is
# expected to be at the same folder level as the engine root
relative_engine_root_path = ''
target_app_root_path = self.dev_root / self.build_dir / 'app'
while target_app_root_path != self.dev_root:
target_app_root_path = target_app_root_path.parent
relative_engine_root_path += '../'
engine_root_as_path= pathlib.PurePath(self.engine_root)
relative_cmakelist_path = relative_engine_root_path + 'CMakeLists.txt'
relative_azandroid_path = relative_engine_root_path + 'Code/Framework/AzAndroid/java'
relative_cmakelist_path = (engine_root_as_path / 'CMakeLists.txt').as_posix()
relative_azandroid_path = (engine_root_as_path / 'Code/Framework/AzAndroid/java').as_posix()
gradle_build_env['TARGET_TYPE'] = 'application'
gradle_build_env['PROJECT_DEPENDENCIES'] = PROJECT_DEPENDENCIES_VALUE_FORMAT.format(dependencies='\n'.join(gradle_project_dependencies))
@@ -744,13 +739,13 @@ class AndroidProjectGenerator(object):
# Prepare the cmake argument list based on the collected android settings and each build config
cmake_argument_list = [
'"-GNinja"',
f'"-S{template_dev_root}"',
f'"-S{template_engine_root}"',
f'"-DCMAKE_BUILD_TYPE={native_config_lower}"',
f'"-DCMAKE_TOOLCHAIN_FILE={template_dev_root}/cmake/Platform/Android/Toolchain_Android.cmake"',
f'"-DCMAKE_TOOLCHAIN_FILE={template_engine_root}/cmake/Platform/Android/Toolchain_Android.cmake"',
f'"-DLY_3RDPARTY_PATH={template_third_party_path}"']
if not self.is_test_project:
cmake_argument_list.append(f'"-DLY_PROJECTS={self.game_name}"')
cmake_argument_list.append(f'"-DLY_PROJECTS={pathlib.PurePath(self.project_path).as_posix()}"')
else:
cmake_argument_list.append('"-DLY_TEST_PROJECT=1"')
@@ -766,44 +761,46 @@ class AndroidProjectGenerator(object):
if self.override_ninja_path:
cmake_argument_list.append(f'"-DCMAKE_MAKE_PROGRAM={common.normalize_path_for_settings(self.override_ninja_path)}"')
# Query the project_path from the project.json file
project_name = common.read_project_name_from_project_json(self.project_path)
# Prepare the config-specific section to place the cmake argument list in the build.gradle for the app
gradle_build_env[f'NATIVE_CMAKE_SECTION_{native_config_upper}_CONFIG'] = \
NATIVE_CMAKE_SECTION_BUILD_TYPE_CONFIG_FORMAT_STR.format(targets_section=f'targets "{self.game_name}.GameLauncher"' if not self.is_test_project else "",
arguments=','.join(cmake_argument_list))
NATIVE_CMAKE_SECTION_BUILD_TYPE_CONFIG_FORMAT_STR.format(targets_section=f'targets "{project_name}.GameLauncher"'
if project_name and not self.is_test_project else "", arguments=','.join(cmake_argument_list))
# Prepare the config-specific section to copy the related .so files that are marked as dependencies for the target
# (launcher) since gradle will not include them automatically for APK import
gradle_build_env[f'CUSTOM_GRADLE_COPY_NATIVE_{native_config_upper}_LIB_TASK'] = \
CUSTOM_GRADLE_COPY_NATIVE_CONFIG_FORMAT_STR.format(config=native_config,
config_lower=native_config_lower,
game_name=self.game_name,
abi=ANDROID_ARCH,
optional_test_excludes=",'*.Tests.so'" if not self.is_test_project else "")
if project_name:
# Prepare the config-specific section to copy the related .so files that are marked as dependencies for the target
# (launcher) since gradle will not include them automatically for APK import
gradle_build_env[f'CUSTOM_GRADLE_COPY_NATIVE_{native_config_upper}_LIB_TASK'] = \
CUSTOM_GRADLE_COPY_NATIVE_CONFIG_FORMAT_STR.format(config=native_config,
config_lower=native_config_lower,
project_name=project_name,
abi=ANDROID_ARCH,
optional_test_excludes=",'*.Tests.so'" if not self.is_test_project else "")
if self.is_test_project:
gradle_build_env[f'CUSTOM_APPLY_ASSET_LAYOUT_{native_config_upper}_TASK'] = \
CUSTOM_GRADLE_COPY_NATIVE_CONFIG_BUILD_ARTIFACTS_FORMAT_STR.format(config=native_config,
config_lower=native_config_lower,
asset_layout_folder=common.normalize_path_for_settings(self.dev_root / self.build_dir / 'app/src/main/assets'),
asset_layout_folder=(self.project_path / self.build_dir / 'app/src/main/assets').as_posix(),
file_includes='Test.Assets/**/*.*')
else:
# Copy over settings registry files from the Registry folder with build output directory
gradle_build_env[f'CUSTOM_APPLY_ASSET_LAYOUT_{native_config_upper}_TASK'] = \
CUSTOM_GRADLE_COPY_NATIVE_CONFIG_BUILD_ARTIFACTS_FORMAT_STR.format(config=native_config,
config_lower=native_config_lower,
asset_layout_folder=common.normalize_path_for_settings(self.dev_root / self.build_dir / 'app/src/main/assets'),
asset_layout_folder=(self.project_path / self.build_dir / 'app/src/main/assets').as_posix(),
file_includes='**/Registry/*.setreg')
if self.include_assets_in_apk:
if not self.is_test_project:
gradle_build_env[f'CUSTOM_APPLY_ASSET_LAYOUT_{native_config_upper}_TASK'] += \
CUSTOM_APPLY_ASSET_LAYOUT_TASK_FORMAT_STR.format(working_dir=common.normalize_path_for_settings(self.dev_root / 'cmake/Tools'),
python_full_path=common.normalize_path_for_settings(self.dev_root / 'python' / PYTHON_SCRIPT),
dev_root=common.normalize_path_for_settings(self.dev_root),
CUSTOM_APPLY_ASSET_LAYOUT_TASK_FORMAT_STR.format(working_dir=common.normalize_path_for_settings(self.engine_root / 'cmake/Tools'),
python_full_path=common.normalize_path_for_settings(self.engine_root / 'python' / PYTHON_SCRIPT),
asset_type=self.asset_type,
game_name=self.game_name,
project_path=self.project_path.as_posix(),
asset_mode=self.asset_mode if native_config != 'Release' else 'PAK',
asset_layout_folder=common.normalize_path_for_settings(self.dev_root / self.build_dir / 'app/src/main/assets'),
asset_layout_folder=common.normalize_path_for_settings(self.project_path / self.build_dir / 'app/src/main/assets'),
config=native_config)
else:
gradle_build_env[f'CUSTOM_APPLY_ASSET_LAYOUT_{native_config_upper}_TASK'] = ''
@@ -833,10 +830,11 @@ class AndroidProjectGenerator(object):
# Generate a AndroidManifest.xml and write to ${az_android_dst_path}/src/main/AndroidManifest.xml
dest_src_main_path = az_android_dst_path / 'src/main'
dest_src_main_path.mkdir(parents=True)
az_android_package_env = AndroidProjectManifestEnvironment(dev_root=self.dev_root,
game_name=self.game_name,
az_android_package_env = AndroidProjectManifestEnvironment(engine_root=self.engine_root,
project_path=self.project_path,
android_sdk_version_number=self.android_sdk_version,
android_ndk_platform_number=self.android_ndk_platform)
android_ndk_platform_number=self.android_ndk_platform,
is_test=self.is_test_project)
self.create_file_from_project_template(src_template_file=ANDROID_MANIFEST_FILE,
template_env=az_android_package_env,
dst_file=dest_src_main_path / ANDROID_MANIFEST_FILE,
@@ -972,17 +970,12 @@ class AndroidProjectGenerator(object):
# Always return itself if the path is already and absolute path
return pathlib.Path(source_path)
game_gem_resources = self.dev_root / self.game_name / 'Gem' / 'Resources'
game_gem_resources = self.project_path / 'Gem' / 'Resources'
if game_gem_resources.is_dir(game_gem_resources):
# If the source is relative and the game gem's resource is present, construct the path based on that
return game_gem_resources / source_path
legacy_game_resources = self.dev_root / 'Code' / self.game_name / 'Resources'
if legacy_game_resources.is_dir(game_gem_resources):
# If the source is relative and the game is using the legacy code folder's resource, construct the path based on that
return legacy_game_resources / source_path
raise common.LmbrCmdError("Unable to locate resources folder for game '{}'".format(self.game_name))
raise common.LmbrCmdError(f'Unable to locate resources folder for project at path "{self.project_path}"')
def resolve_icon_overrides(self, az_android_dst_path, az_android_package_env):
"""
@@ -1012,7 +1005,7 @@ class AndroidProjectGenerator(object):
shutil.copyfile(src_default_icon_file.resolve(), dst_default_icon_file.resolve())
os.chmod(dst_default_icon_file.resolve(), stat.S_IWRITE | stat.S_IREAD)
else:
logging.debug('No default icon override specified for %s', self.game_name)
logging.debug(f'No default icon override specified for project_at path {self.project_path}')
# process each of the resolution overrides
warnings = []
@@ -1028,11 +1021,11 @@ class AndroidProjectGenerator(object):
# if both the resolution and the default are unspecified, warn the user but do nothing
if icon_source is None:
warnings.append(f'No icon override found for "{resolution}". Either supply one for "{resolution}" or a '
f'"default" in the android_settings "icon" section of the project.json file for {self.game_name}')
f'"default" in the android_settings "icon" section of the project.json file for {self.project_path}')
# if only the resolution is unspecified, remove the resolution specific version from the project
else:
logging.debug('Default icon being used for "%s" in %s', resolution, self.game_name)
logging.debug(f'Default icon being used for "{resolution}" in {self.project_path}', resolution)
common.remove_dir_path(target_directory)
continue
@@ -1072,7 +1065,7 @@ class AndroidProjectGenerator(object):
unused_override_warning = None
if (orientation & orientation_flag) == 0:
unused_override_warning = f'Splash screen overrides specified for "{orientation_key}" when desired orientation ' \
f'is set to "{ORIENTATION_FLAG_TO_KEY_MAP[orientation]}" in project {self.game_name}. ' \
f'is set to "{ORIENTATION_FLAG_TO_KEY_MAP[orientation]}" in project {self.project_path}. ' \
f'These overrides will be ignored.'
# if a default splash image is specified for this orientation, then copy it into the generic drawable-<orientation> folder
@@ -1092,7 +1085,8 @@ class AndroidProjectGenerator(object):
shutil.copyfile(src_default_splash_img_file.resolve(), dst_default_splash_img_file.resolve())
os.chmod(dst_default_splash_img_file.resolve(), stat.S_IWRITE | stat.S_IREAD)
else:
logging.debug(f'No default splash screen override specified for "%s" orientation in %s', orientation_key, self.game_name)
logging.debug(f'No default splash screen override specified for "%s" orientation in %s', orientation_key,
self.project_path)
# process each of the resolution overrides
warnings = []
@@ -1113,10 +1107,10 @@ class AndroidProjectGenerator(object):
section = f"{orientation_key}-{resolution}"
warnings.append(f'No splash screen override found for "{section}". Either supply one for "{resolution}" '
f'or a "default" in the android_settings "splash_screen-{orientation_key}" section of the '
f'project.json file for {self.game_name}.')
f'project.json file for {self.project_path}.')
else:
# if only the resolution is unspecified, remove the resolution specific version from the project
logging.debug('Default splash screen being used for "%s-%s" in %s', orientation_key, resolution, self.game_name)
logging.debug(f'Default splash screen being used for "{orientation_key}-{resolution}" in {self.project_path}')
common.remove_dir_path(target_directory)
continue
src_splash_img_file = self.construct_source_resource_path(splash_img_source)
@@ -1133,7 +1127,8 @@ class AndroidProjectGenerator(object):
for warning_msg in warnings:
logging.warning(warning_msg)
def clear_unused_assets(self, az_android_dst_path, az_android_package_env):
@staticmethod
def clear_unused_assets(az_android_dst_path, az_android_package_env):
"""
micro-optimization to clear assets from the final bundle that won't be used
@@ -1208,7 +1203,7 @@ class AndroidProjectGenerator(object):
else:
project_dependencies = ""
# Prepare an environemt for a basic, no-native (cmake) gradle project (java only)
# Prepare an environment for a basic, no-native (cmake) gradle project (java only)
build_gradle_env = {
'PROJECT_DEPENDENCIES': project_dependencies,
'TARGET_TYPE': 'library',
@@ -1478,6 +1473,7 @@ def verify_android_ndk(android_ndk_platform, argument_name, override_android_ndk
validated_android_platforms.append(dir_item.name)
# For NDK revisions 19 and up, there is a mapping file for version numbers that map to other version.
platforms_map_aliases = {}
if ndk_revision_number >= LooseVersion('19.0.0'):
platforms_map_file = check_android_ndk_path / 'meta/platforms.json'
if platforms_map_file.exists():
@@ -26,7 +26,6 @@ if ROOT_DEV_PATH not in sys.path:
from cmake.Tools import common
from cmake.Tools.Platform.Android import android_support
GRADLE_ARGUMENT_NAME = '--gradle-install-path'
GRADLE_MIN_VERSION = LooseVersion('4.10.1')
GRADLE_MAX_VERSION = LooseVersion('5.6.4')
@@ -148,12 +147,13 @@ def main(args):
parser = argparse.ArgumentParser(description="Prepare the android studio subfolder")
parser.add_argument('--dev-root',
help='The path to the dev root. Defaults to the current working directory.',
parser.add_argument('--engine-root',
help='The path to the engine root. Defaults to the current working directory.',
default=os.getcwd())
parser.add_argument('--build-dir',
help='The build dir subpath from the dev root',
help='The build dir path. It will be concatenated to the project-path using the rules of os.path.join',
type=pathlib.Path,
required=True)
parser.add_argument('--third-party-path',
@@ -196,8 +196,8 @@ def main(args):
default=None,
required=False)
parser.add_argument('-g', '--game-name',
help='The game project to base off of')
parser.add_argument('-g', '--project-path',
help='The project path to generate an android project')
# Asset Options
parser.add_argument(INCLUDE_APK_ASSETS_ARGUMENT_NAME,
@@ -266,15 +266,15 @@ def main(args):
verified_android_ndk_platform, verified_android_ndk_path = android_support.verify_android_ndk(android_ndk_platform=parsed_args.get_argument(ANDROID_NDK_PLATFORM_ARGUMENT_NAME),
argument_name=ANDROID_NDK_ARGUMENT_NAME,
override_android_ndk_path=parsed_args.get_argument(ANDROID_NDK_ARGUMENT_NAME))
if parsed_args.unit_test or parsed_args.game_name == android_support.TEST_RUNNER_PROJECT:
verified_game_name = android_support.TEST_RUNNER_PROJECT
_, verified_dev_root = common.verify_game_project_and_dev_root(game_name=None,
dev_root=parsed_args.dev_root)
if parsed_args.unit_test or parsed_args.project_path == android_support.TEST_RUNNER_PROJECT:
verified_project_path = android_support.TEST_RUNNER_PROJECT
_, verified_engine_root = common.verify_project_and_engine_root(project_root=None,
engine_root=parsed_args.dev_root)
is_test_project = True
else:
# Verify the dev-root and game name
verified_game_name, verified_dev_root = common.verify_game_project_and_dev_root(game_name=parsed_args.game_name,
dev_root=parsed_args.dev_root)
# Verify the engine root path and project path
verified_project_path, verified_engine_root = common.verify_project_and_engine_root(project_root=parsed_args.project_path,
engine_root=parsed_args.engine_root)
is_test_project = False
# Verify the 3rd Party Root Path
@@ -285,26 +285,26 @@ def main(args):
common.ERROR_CODE_INVALID_PARAMETER)
third_party_path = third_party_path.parent
build_dir = verified_dev_root / parsed_args.build_dir
build_dir = parsed_args.build_dir
signing_config = build_optional_signing_profile(store_file=parsed_args.get_argument(SIGNING_PROFILE_STORE_FILE_ARGUMENT_NAME),
store_password=parsed_args.get_argument(SIGNING_PROFILE_STORE_PASSWORD_ARGUMENT_NAME),
key_alias=parsed_args.get_argument(SIGNING_PROFILE_KEY_ALIAS_ARGUMENT_NAME),
key_password=parsed_args.get_argument(SIGNING_PROFILE_KEY_PASSWORD_ARGUMENT_NAME))
logging.debug("Dev Root : %s", str(verified_dev_root.resolve()))
logging.debug("Engine Root : %s", str(verified_engine_root.resolve()))
logging.debug("Build Path : %s", str(build_dir.resolve()))
logging.debug("Android NDK Path : %s", str(verified_android_ndk_path.resolve()))
logging.debug("Android SDK Path : %s", str(verified_android_sdk_path.resolve()))
# Prepare the generator and execute
generator = android_support.AndroidProjectGenerator(dev_root=verified_dev_root,
generator = android_support.AndroidProjectGenerator(engine_root=verified_engine_root,
project_path=verified_project_path,
build_dir=build_dir,
android_sdk_path=verified_android_sdk_path,
android_ndk_path=verified_android_ndk_path,
android_sdk_version=verified_android_sdk_platform,
android_ndk_platform=verified_android_ndk_platform,
game_name=verified_game_name,
third_party_path=third_party_path,
cmake_version=cmake_version,
override_cmake_path=override_cmake_path,
@@ -90,7 +90,6 @@ def test_adb_call(mock_check_output):
patch.object(android_deployment.AndroidDeployment, 'resolve_adb_tool', return_value=pathlib.Path("Foo")), \
patch.object(pathlib.Path, 'glob', return_value=["foo.bar"]):
local_asset_path = pathlib.Path("Foo")
inst = android_deployment.AndroidDeployment(dev_root=TEST_DEV_ROOT,
build_dir=TEST_BUILD_DIR,
configuration='profile',
@@ -115,7 +114,6 @@ def test_adb_shell(mock_adb_call):
patch.object(android_deployment.AndroidDeployment, 'resolve_adb_tool', return_value=pathlib.Path("Foo")), \
patch.object(pathlib.Path, 'glob', return_value=["foo.bar"]):
local_asset_path = pathlib.Path("Foo")
inst = android_deployment.AndroidDeployment(dev_root=TEST_DEV_ROOT,
build_dir=TEST_BUILD_DIR,
configuration='profile',
@@ -141,7 +139,6 @@ def test_adb_ls_success(mock_adb_shell):
patch.object(android_deployment.AndroidDeployment, 'resolve_adb_tool', return_value=pathlib.Path("Foo")), \
patch.object(pathlib.Path, 'glob', return_value=["foo.bar"]):
local_asset_path = pathlib.Path("Foo")
inst = android_deployment.AndroidDeployment(dev_root=TEST_DEV_ROOT,
build_dir=TEST_BUILD_DIR,
configuration='profile',
@@ -168,7 +165,6 @@ def test_adb_ls_error_no_output(mock_adb_shell):
patch.object(android_deployment.AndroidDeployment, 'resolve_adb_tool', return_value=pathlib.Path("Foo")), \
patch.object(pathlib.Path, 'glob', return_value=["foo.bar"]):
local_asset_path = pathlib.Path("Foo")
inst = android_deployment.AndroidDeployment(dev_root=TEST_DEV_ROOT,
build_dir=TEST_BUILD_DIR,
configuration='profile',
@@ -195,7 +191,6 @@ def test_adb_ls_error_no_such_file(mock_adb_shell):
patch.object(android_deployment.AndroidDeployment, 'resolve_adb_tool', return_value=pathlib.Path("Foo")), \
patch.object(pathlib.Path, 'glob', return_value=["foo.bar"]):
local_asset_path = pathlib.Path("Foo")
inst = android_deployment.AndroidDeployment(dev_root=TEST_DEV_ROOT,
build_dir=TEST_BUILD_DIR,
configuration='profile',
@@ -222,7 +217,6 @@ def test_adb_ls_error_permission_denied(mock_adb_shell):
patch.object(android_deployment.AndroidDeployment, 'resolve_adb_tool', return_value=pathlib.Path("Foo")), \
patch.object(pathlib.Path, 'glob', return_value=["foo.bar"]):
local_asset_path = pathlib.Path("Foo")
inst = android_deployment.AndroidDeployment(dev_root=TEST_DEV_ROOT,
build_dir=TEST_BUILD_DIR,
configuration='profile',
@@ -250,7 +244,6 @@ def test_get_target_android_devices(mock_adb_call):
patch.object(android_deployment.AndroidDeployment, 'resolve_adb_tool', return_value=pathlib.Path("Foo")), \
patch.object(pathlib.Path, 'glob', return_value=["foo.bar"]):
local_asset_path = pathlib.Path("Foo")
inst = android_deployment.AndroidDeployment(dev_root=TEST_DEV_ROOT,
build_dir=TEST_BUILD_DIR,
configuration='profile',
@@ -277,7 +270,6 @@ def test_check_known_android_paths_success(mock_adb_ls):
patch.object(android_deployment.AndroidDeployment, 'resolve_adb_tool', return_value=pathlib.Path("Foo")), \
patch.object(pathlib.Path, 'glob', return_value=["foo.bar"]):
local_asset_path = pathlib.Path("Foo")
inst = android_deployment.AndroidDeployment(dev_root=TEST_DEV_ROOT,
build_dir=TEST_BUILD_DIR,
configuration='profile',
@@ -303,7 +295,6 @@ def test_check_known_android_paths_fail(mock_adb_ls):
patch.object(android_deployment.AndroidDeployment, 'resolve_adb_tool', return_value=pathlib.Path("Foo")), \
patch.object(pathlib.Path, 'glob', return_value=["foo.bar"]):
local_asset_path = pathlib.Path("Foo")
inst = android_deployment.AndroidDeployment(dev_root=TEST_DEV_ROOT,
build_dir=TEST_BUILD_DIR,
configuration='profile',
@@ -330,7 +321,6 @@ def test_detect_device_storage_path_no_external_storage_env(mock_check_known_and
patch.object(android_deployment.AndroidDeployment, 'resolve_adb_tool', return_value=pathlib.Path("Foo")),\
patch.object(pathlib.Path, 'glob', return_value=["foo.bar"]):
local_asset_path = pathlib.Path("Foo")
inst = android_deployment.AndroidDeployment(dev_root=TEST_DEV_ROOT,
build_dir=TEST_BUILD_DIR,
configuration='profile',
@@ -357,7 +347,6 @@ def test_detect_device_storage_path_invalid_external_storage_env(mock_check_know
patch.object(android_deployment.AndroidDeployment, 'resolve_adb_tool', return_value=pathlib.Path("Foo")),\
patch.object(pathlib.Path, 'glob', return_value=["foo.bar"]):
local_asset_path = pathlib.Path("Foo")
inst = android_deployment.AndroidDeployment(dev_root=TEST_DEV_ROOT,
build_dir=TEST_BUILD_DIR,
configuration='profile',
@@ -384,7 +373,6 @@ def test_detect_device_storage_path_valid_external_storage_env(mock_adb_ls, mock
patch.object(android_deployment.AndroidDeployment, 'resolve_adb_tool', return_value=pathlib.Path("Foo")),\
patch.object(pathlib.Path, 'glob', return_value=["foo.bar"]):
local_asset_path = pathlib.Path("Foo")
inst = android_deployment.AndroidDeployment(dev_root=TEST_DEV_ROOT,
build_dir=TEST_BUILD_DIR,
configuration='profile',
@@ -427,7 +415,6 @@ def test_detect_device_storage_path_real_path():
patch.object(android_deployment.AndroidDeployment, 'adb_ls', wraps=_mock_adb_ls), \
patch.object(pathlib.Path, 'glob', return_value=["foo.bar"]):
local_asset_path = pathlib.Path("Foo")
inst = android_deployment.AndroidDeployment(dev_root=TEST_DEV_ROOT,
build_dir=TEST_BUILD_DIR,
configuration='profile',
@@ -469,7 +456,6 @@ def test_detect_device_storage_path_real_path_fail(mock_check_known_android_path
patch.object(android_deployment.AndroidDeployment, 'adb_ls', wraps=_mock_adb_ls), \
patch.object(pathlib.Path, 'glob', return_value=["foo.bar"]):
local_asset_path = pathlib.Path("Foo")
inst = android_deployment.AndroidDeployment(dev_root=TEST_DEV_ROOT,
build_dir=TEST_BUILD_DIR,
configuration='profile',
@@ -493,7 +479,6 @@ def test_get_device_file_timestamp_success(mock_adb_shell):
patch.object(android_deployment.AndroidDeployment, 'resolve_adb_tool', return_value=pathlib.Path("Foo")), \
patch.object(pathlib.Path, 'glob', return_value=["foo.bar"]):
local_asset_path = pathlib.Path("Foo")
inst = android_deployment.AndroidDeployment(dev_root=TEST_DEV_ROOT,
build_dir=TEST_BUILD_DIR,
configuration='profile',
@@ -522,7 +507,6 @@ def test_get_device_file_timestamp_no_file(mock_adb_shell):
patch.object(android_deployment.AndroidDeployment, 'resolve_adb_tool', return_value=pathlib.Path("Foo")), \
patch.object(pathlib.Path, 'glob', return_value=["foo.bar"]):
local_asset_path = pathlib.Path("Foo")
inst = android_deployment.AndroidDeployment(dev_root=TEST_DEV_ROOT,
build_dir=TEST_BUILD_DIR,
configuration='profile',
@@ -551,7 +535,6 @@ def test_get_device_file_timestamp_bad_timestamp_file(mock_adb_shell):
patch.object(android_deployment.AndroidDeployment, 'resolve_adb_tool', return_value=pathlib.Path("Foo")), \
patch.object(pathlib.Path, 'glob', return_value=["foo.bar"]):
local_asset_path = pathlib.Path("Foo")
inst = android_deployment.AndroidDeployment(dev_root=TEST_DEV_ROOT,
build_dir=TEST_BUILD_DIR,
configuration='profile',
@@ -576,7 +559,7 @@ def test_get_device_file_timestamp_bad_timestamp_file(mock_adb_shell):
def test_update_device_file_timestamp(tmpdir):
cache_dir = f'{TEST_DEV_ROOT}/Cache/{TEST_GAME_NAME}/{TEST_ASSET_TYPE}'
cache_dir = f'{TEST_DEV_ROOT}/{TEST_GAME_NAME}/Cache/{TEST_ASSET_TYPE}'
tmpdir.ensure(f'{cache_dir}/foo.txt')
mock_dev_root = tmpdir.join(TEST_DEV_ROOT).realpath()
@@ -585,7 +568,6 @@ def test_update_device_file_timestamp(tmpdir):
patch.object(android_deployment.AndroidDeployment, 'resolve_adb_tool', return_value=pathlib.Path("Foo")), \
patch.object(android_deployment.AndroidDeployment, 'adb_call', return_value="") as mock_adb_call:
local_asset_path = pathlib.Path(tmpdir.join(cache_dir).realpath())
inst = android_deployment.AndroidDeployment(dev_root=mock_dev_root,
build_dir=TEST_BUILD_DIR,
configuration='profile',
@@ -624,8 +606,8 @@ def test_execute_success(tmpdir, test_config, test_package_name, test_device_sto
tmpdir.join(f"{TEST_DEV_ROOT}/{TEST_BUILD_DIR}/app/build/outputs/apk/{test_config}/app-{test_config}.apk").ensure()
expected_apk_path = str(tmpdir.join(f"{TEST_DEV_ROOT}/{TEST_BUILD_DIR}/app/build/outputs/apk/{test_config}/app-{test_config}.apk").realpath())
tmpdir.join(f"{TEST_DEV_ROOT}/Cache/{TEST_GAME_NAME}/{TEST_ASSET_TYPE}/dummy.txt").ensure()
expected_asset_path = str(tmpdir.join(f"{TEST_DEV_ROOT}/Cache/{TEST_GAME_NAME}/{TEST_ASSET_TYPE}").realpath())
tmpdir.join(f"{TEST_DEV_ROOT}/{TEST_GAME_NAME}/Cache/{TEST_ASSET_TYPE}/dummy.txt").ensure()
expected_asset_path = str(tmpdir.join(f"{TEST_DEV_ROOT}/{TEST_GAME_NAME}/Cache/{TEST_ASSET_TYPE}").realpath())
tmpdir.join(f"{TEST_DEV_ROOT}/{TEST_BUILD_DIR}/app/src/main/assets/Registry/dummy.txt").ensure()
expected_registry_path = str(tmpdir.join(f"{TEST_DEV_ROOT}/{TEST_BUILD_DIR}/app/src/main/assets/Registry").realpath())
@@ -696,8 +678,8 @@ def test_execute_clean_deploy_success(tmpdir, test_game_name, test_config, test_
tmpdir.join(f"{TEST_DEV_ROOT}/{TEST_BUILD_DIR}/app/build/outputs/apk/{test_config}/app-{test_config}.apk").ensure()
expected_apk_path = str(tmpdir.join(f"{TEST_DEV_ROOT}/{TEST_BUILD_DIR}/app/build/outputs/apk/{test_config}/app-{test_config}.apk").realpath())
tmpdir.join(f"{TEST_DEV_ROOT}/Cache/{test_game_name}/{test_asset_type}/dummy.txt").ensure()
expected_asset_path = str(tmpdir.join(f"{TEST_DEV_ROOT}/Cache/{test_game_name}/{test_asset_type}").realpath())
tmpdir.join(f"{TEST_DEV_ROOT}/{test_game_name}/Cache/{test_asset_type}/dummy.txt").ensure()
expected_asset_path = str(tmpdir.join(f"{TEST_DEV_ROOT}/{test_game_name}/Cache/{test_asset_type}").realpath())
tmpdir.join(f"{TEST_DEV_ROOT}/{TEST_BUILD_DIR}/app/src/main/assets/Registry/dummy.txt").ensure()
expected_registry_path = str(tmpdir.join(f"{TEST_DEV_ROOT}/{TEST_BUILD_DIR}/app/src/main/assets/Registry").realpath())
@@ -792,8 +774,7 @@ def test_execute_incremental_deploy_success(tmpdir, test_config, test_package_na
tmpdir.join(f"{TEST_DEV_ROOT}/{TEST_BUILD_DIR}/app/build/outputs/apk/{test_config}/app-{test_config}.apk").ensure()
expected_apk_path = str(tmpdir.join(f"{TEST_DEV_ROOT}/{TEST_BUILD_DIR}/app/build/outputs/apk/{test_config}/app-{test_config}.apk").realpath())
tmpdir.join(f"{TEST_DEV_ROOT}/Cache/{TEST_GAME_NAME}/{TEST_ASSET_TYPE}/dummy.txt").ensure()
expected_asset_path = str(tmpdir.join(f"{TEST_DEV_ROOT}/Cache/{TEST_GAME_NAME}/{TEST_ASSET_TYPE}").realpath())
tmpdir.join(f"{TEST_DEV_ROOT}/{TEST_GAME_NAME}/Cache/{TEST_ASSET_TYPE}/dummy.txt").ensure()
tmpdir.join(f"{TEST_DEV_ROOT}/{TEST_BUILD_DIR}/app/src/main/assets/Registry/dummy.txt").ensure()
expected_registry_path = str(tmpdir.join(f"{TEST_DEV_ROOT}/{TEST_BUILD_DIR}/app/src/main/assets/Registry").realpath())
@@ -27,7 +27,7 @@ from cmake.Tools.Platform.Android import android_support, generate_android_proje
@pytest.mark.parametrize(
"from_override, version_str, expected_result", [
pytest.param(False, b"Gradle 4.10.1", LooseVersion('4.10.1'), id='equalMinVersion'),
pytest.param(False, b"Gradle 5.6.4", LooseVersion('5.6.4'), id='eualMaxVersion'),
pytest.param(False, b"Gradle 5.6.4", LooseVersion('5.6.4'), id='equalMaxVersion'),
pytest.param(False, b"Gradle 1.0", common.LmbrCmdError('error', common.ERROR_CODE_ENVIRONMENT_ERROR), id='lessThanMinVersion'),
pytest.param(False, b"Gradle 26.3", common.LmbrCmdError('error', common.ERROR_CODE_ENVIRONMENT_ERROR), id='greaterThanMaxVersion'),
pytest.param(True, b"Gradle 4.10.1", LooseVersion('4.10.1')),
+2 -2
View File
@@ -441,7 +441,7 @@ def add_remove_gem(add: bool,
def _run_add_gem(args: argparse) -> int:
return add_remove_gem(True,
common.determine_dev_root(),
common.determine_engine_root(),
args.gem_path,
args.project_path,
args.project_restricted_path,
@@ -451,7 +451,7 @@ def _run_add_gem(args: argparse) -> int:
def _run_remove_gem(args: argparse) -> int:
return add_remove_gem(False,
common.determine_dev_root(),
common.determine_engine_root(),
args.gem_path,
args.project_path,
args.project_restricted_path,
+69 -92
View File
@@ -30,9 +30,7 @@ from cmake.Tools import layout_tool
DEFAULT_TEXT_READ_ENCODING = 'UTF-8' # The default encoding to use when reading from a text file
DEFAULT_TEXT_WRITE_ENCODING = 'ascii' # The encoding to use when writing to a text file
ENCODING_ERROR_HANDLINGS = 'ignore' # What to do if we encounter any encoding errors
DEFAULT_PAK_ROOT = 'Pak' # The default Pak root folder under dev where the game paks are built
ROOT_DEV_PATH = os.path.realpath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..'))
DEFAULT_PAK_ROOT = 'Pak' # The default Pak root folder under engine root where the game paks are built
if platform.system() == 'Windows':
# Re-use microsoft error codes since this script is meant to only run on windows host platforms
@@ -53,7 +51,7 @@ else:
ERROR_CODE_ENVIRONMENT_ERROR = 1
ERROR_CODE_GENERAL_ERROR = 1
DEV_ROOT_CHECK_FILE = 'engine.json'
ENGINE_ROOT_CHECK_FILE = 'engine.json'
HASH_CHUNK_SIZE = 200000
@@ -75,9 +73,25 @@ class LmbrCmdError(Exception):
return str(self.msg)
def determine_dev_root(starting_path=None):
def read_project_name_from_project_json(project_path):
project_name = None
try:
with (pathlib.Path(project_path) / 'project.json').open('r') as project_file:
project_json = json.load(project_file)
project_name = project_json['project_name']
except OSError as os_error:
logging.warning(f'Unable to open "project.json" file: {os_error}')
except json.JSONDecodeError as json_error:
logging.warning(f'Unable to decode json in {project_file}: {json_error}')
except KeyError as key_error:
logging.warning(f'{project_file} is missing project_name key: {key_error}')
return project_name
def determine_engine_root(starting_path=None):
"""
Determine the dev root of the engine. By default, the dev root is the engine path, which is determined by walking
Determine the engine root of the engine. By default, the engine root is the engine path, which is determined by walking
up the current working directory until we find the engine.json marker
:param starting_path: Optional starting path to look for the engine.json marker file, otherwise use the current working path
@@ -86,14 +100,14 @@ def determine_dev_root(starting_path=None):
current_path = os.path.normpath(starting_path or os.getcwd())
check_file = os.path.join(current_path, DEV_ROOT_CHECK_FILE)
check_file = os.path.join(current_path, ENGINE_ROOT_CHECK_FILE)
while not os.path.isfile(check_file):
next_path = os.path.dirname(current_path)
if next_path == current_path:
# If going up one level results in the same path, we've hit the root
break
check_file = os.path.join(next_path, DEV_ROOT_CHECK_FILE)
check_file = os.path.join(next_path, ENGINE_ROOT_CHECK_FILE)
current_path = next_path
if not os.path.isfile(check_file):
@@ -123,34 +137,34 @@ def get_config_file_values(config_file_path, keys_to_extract):
return result_map
def get_bootstrap_values(dev_root, keys_to_extract):
def get_bootstrap_values(engine_root, keys_to_extract):
"""
Extract requested values from the bootstrap.cfg file in the def root folder
:param dev_root: The dev root folder where bootstrap.cfg exists
:param engine_root: The engine root folder where bootstrap.cfg exists
:param keys_to_extract: The keys to extract into a dictionary
:return: Dictionary of keys and its values (for matched keys)
"""
bootstrap_file = os.path.join(dev_root, 'bootstrap.cfg')
bootstrap_file = os.path.join(engine_root, 'bootstrap.cfg')
if not os.path.isfile(bootstrap_file):
raise LmbrCmdError("Missing 'bootstrap.cfg' file from dev root ('{}')".format(dev_root),
raise LmbrCmdError("Missing 'bootstrap.cfg' file from engine root ('{}')".format(engine_root),
ERROR_CODE_FILE_NOT_FOUND)
result_map = get_config_file_values(bootstrap_file, keys_to_extract)
return result_map
def validate_ap_config_asset_type_enabled(dev_root, bootstrap_asset_type):
def validate_ap_config_asset_type_enabled(engine_root, bootstrap_asset_type):
"""
Validate that the requested bootstrap asset type was enabled in the asset processor configuration file
:param dev_root: The dev root to lookup the AP config file
:param engine_root: The engine root to lookup the AP config file
:param bootstrap_asset_type: The asset type to validate
:return: True if the asset type was enabled, false if not
"""
ap_config_file = os.path.join(dev_root, 'AssetProcessorPlatformConfig.ini')
ap_config_file = os.path.join(engine_root, 'AssetProcessorPlatformConfig.setreg')
if not os.path.isfile(ap_config_file):
raise LmbrCmdError("Missing required asset processor configuration file at '{}'".format(dev_root),
raise LmbrCmdError("Missing required asset processor configuration file at '{}'".format(engine_root),
ERROR_CODE_FILE_NOT_FOUND)
parser = configparser.ConfigParser()
@@ -285,48 +299,44 @@ def verify_tool(override_tool_path, tool_name, tool_filename, argument_name, too
ERROR_CODE_ERROR_NOT_SUPPORTED)
def verify_game_project_and_dev_root(game_name, dev_root):
def verify_project_and_engine_root(project_root, engine_root):
"""
Verify the dev root folder and the game name against that dev root. This will perform basic minimal checks
Verify the engine root folder and the project root folder. This will perform basic minimal checks
for validation:
1. Make sure bootstrap.cfg exists
2. Make sure ${dev_root}/${game_name}/project.json exists
1. Make sure ${engine_root}/engine.json
2. Make sure ${project_root}/project.json exists
3. Make sure that the project.json minimally has a json structure with a 'project_name' attribute
The game name will be verified by returning the value of 'project_name' from the json file to minimize issues
on case-insensitive file systems because we rely on the fact that the game name matches the folder in which it resides
The project name will be verified by returning the value of 'project_name' from the json file to minimize issues
on case-insensitive file systems because we rely on the fact that the project name matches the folder in which it resides
:param game_name: The game name to verify. If None, skip the game name verification
:param dev_root: The dev root directory to verify
:return: A tuple of the actual 'project_name' from the game's project.json and the pathlib.Path of the dev root if verified
:param project_root: The project root to verify. If None, skip the project name verification
:param engine_root: The engine root directory to verify
:return: A tuple of the actual 'project_name' from the game's project.json and the pathlib.Path of the engine root if verified
"""
dev_root_path = pathlib.Path(dev_root)
if not dev_root_path.exists():
raise LmbrCmdError(f"Invalid dev root path ({dev_root})",
engine_root_path = pathlib.Path(engine_root)
if not engine_root_path.exists():
raise LmbrCmdError(f"Invalid engine root path ({engine_root})",
ERROR_CODE_INVALID_PARAMETER)
# Sanity check: bootstrap
bootstrap_path = dev_root_path / 'bootstrap.cfg'
if not bootstrap_path.exists():
raise LmbrCmdError(f"Invalid dev root path ({dev_root}). Missing bootstrap.cfg",
# Sanity check: engine.json
engine_json_path = engine_root_path / ENGINE_ROOT_CHECK_FILE
if not engine_json_path.exists():
raise LmbrCmdError(f"Invalid engine root path ({engine_root}). Missing {ENGINE_ROOT_CHECK_FILE}",
ERROR_CODE_INVALID_PARAMETER)
if game_name is None:
return None, dev_root_path
if project_root is None:
return None, engine_root_path
else:
game_folder = dev_root_path / game_name
game_folder_project_properties = game_folder / 'project.json'
if not game_folder_project_properties.is_file():
raise LmbrCmdError(f"Invalid game '{game_name}'. Make sure it exists under {dev_root}",
project_path = engine_root_path / project_root
project_path_project_properties = project_path / 'project.json'
if not project_path_project_properties.is_file():
raise LmbrCmdError(f'Invalid project at path "{project_path}". It is missing the project.json file',
ERROR_CODE_INVALID_PARAMETER)
try:
with open(game_folder_project_properties) as project_json_file:
project_json = json.load(project_json_file)
return project_json['project_name'], dev_root_path
except (json.JSONDecodeError, KeyError) as e:
raise LmbrCmdError(f"Invalid game '{game_name}'. Its project.json is corrupt or invalid: {str(e)}",
ERROR_CODE_INVALID_PARAMETER)
project_name = read_project_name_from_project_json(project_path)
if not project_name:
raise LmbrCmdError(f'Invalid project at path "{project_path}". Its project.json does not contains a "project_name" key',
ERROR_CODE_INVALID_PARAMETER)
return project_path, engine_root_path
def remove_dir_path(path):
"""
@@ -444,13 +454,13 @@ def validate_build_dir_and_config(build_dir_name, configuration):
return build_dir, build_config_dir
def validate_deployment_arguments(build_dir_name, configuration, game_name):
def validate_deployment_arguments(build_dir_name, configuration, project_path):
"""
Validate the minimal platform deployment arguments
@param build_dir_name: The name of the build directory relative to the current working directory
@param configuration: The configuration the deployment is based on
@param game_name: The name of the game project to deploy
@param project_path: The path the project to deploy
@return: Tuple of (resolved build_dir, game name, asset mode, asset_type, and Pak root folder)
"""
@@ -458,16 +468,16 @@ def validate_deployment_arguments(build_dir_name, configuration, game_name):
platform_settings = PlatformSettings(build_dir)
if not game_name:
if not project_path:
if not platform_settings.projects:
raise LmbrCmdError("Missing required game project argument. Unable to determine a default one.")
game_name = platform_settings.projects[0]
logging.info(f"Using default game project '{game_name}' as the game project")
internal_project_path = pathlib.PurePath(platform_settings.projects[0]).resolve()
logging.info(f"Using project_path '{internal_project_path}' as the game project")
else:
if game_name not in platform_settings.projects:
raise LmbrCmdError(f"Game project {game_name} not valid. Was not configured for build directory {build_dir_name}.")
if project_path not in platform_settings.projects:
raise LmbrCmdError(f"Game project {project_path} not valid. Was not configured for build directory {build_dir_name}.")
return build_dir, game_name, platform_settings.asset_deploy_mode, platform_settings.asset_deploy_type, platform_settings.override_pak_root or DEFAULT_PAK_ROOT
return build_dir, project_path, platform_settings.asset_deploy_mode, platform_settings.asset_deploy_type, platform_settings.override_pak_root or DEFAULT_PAK_ROOT
class CommandLineExec(object):
@@ -547,20 +557,18 @@ class CommandLineExec(object):
raise LmbrCmdError(f"Error trying to call '{self.executable_path}': {str(err)}")
def sync_platform_layout(platform_name, game_project, asset_mode, asset_type, layout_root):
def sync_platform_layout(platform_name, project_path, asset_mode, asset_type, layout_root):
"""
Perform a layout sync directly on the game project for a platform, game project, asset mode, asset type
@param platform_name: The platform (lower) name to sync from
@param game_project: The game project to sync to
@param project_path: The path to project to sync to
@param asset_mode: The asset mode to base the sync on
@param asset_type: The asset type to base the sync on
@param layout_root: The root of the layout to sync to
@param record_elapsed: Option to output the elapsed time
"""
layout_tool.ASSET_SYNC_MODE_FUNCTION[asset_mode](dev_root=ROOT_DEV_PATH,
target_platform=platform_name,
game=game_project,
layout_tool.ASSET_SYNC_MODE_FUNCTION[asset_mode](target_platform=platform_name,
project_path=project_path,
asset_type=asset_type,
warning_on_missing_assets=True,
layout_target=layout_root,
@@ -603,37 +611,6 @@ def get_cmake_dependency_modules(build_dir_path, target, module_type):
return dep_modules
GAME_FOLDER_REGEX = re.compile(r"sys_game_folder\s*=\s*(.*)")
GAME_NAME_REGEX = re.compile(r"sys_game_name\s*=\s*(.*)")
def transform_bootstrap_for_game(game_name, src_bootstrap, dst_bootstrap):
"""
Given a source bootstrap.cfg and game, write a copy of one to a different destination and transform it to
override its 'sys_game_folder' or 'sys_game_name' to match the input game_name
:param game_name: The name of the game to set in the destination bootstrap
:param src_bootstrap: The absolute path of the source bootstrap
:param dst_bootstrap: The absolute path of the destination bootstrap file to write to (or overwrite)
"""
with open(src_bootstrap, "r") as src_bootstrap_file:
bootstrap_lines = src_bootstrap_file.readlines()
with open(dst_bootstrap, "w") as dst_bootstrap_file:
sys_game_detected = False
for bootstrap_line in bootstrap_lines:
if GAME_FOLDER_REGEX.match(bootstrap_line):
dst_bootstrap_file.write(f'sys_game_folder={game_name}\n')
sys_game_detected = True
elif GAME_NAME_REGEX.match(bootstrap_line):
dst_bootstrap_file.write(f'sys_game_name={game_name}\n')
sys_game_detected = True
else:
dst_bootstrap_file.write(bootstrap_line)
if not sys_game_detected:
# If no sys_game* is detected, inject one to prevent an error at least in the target
dst_bootstrap_file.write(f'sys_game_folder={game_name}\n')
def get_test_module_registry(build_dir_path):
"""
Read a test module registry file for for all test modules that are enabled for a target build directory
+9 -9
View File
@@ -36,7 +36,7 @@ def set_current_project(dev_root: str,
try:
with open(os.path.join(dev_root, 'bootstrap.cfg'), 'r') as s:
data = s.read()
data = re.sub(r'(.*sys_game_folder\s*?[=:]\s*?)([^\n]+)\n', r'\1 {}\n'.format(project_path),
data = re.sub(r'(.*project_path\s*?[=:]\s*?)([^\n]+)\n', r'\1 {}\n'.format(project_path),
data, flags=re.IGNORECASE)
if os.path.isfile(os.path.join(dev_root, 'bootstrap.cfg')):
os.unlink(os.path.join(dev_root, 'bootstrap.cfg'))
@@ -52,29 +52,29 @@ def get_current_project(dev_root: str) -> str:
"""
get what the current project set is
:param dev_root: the dev root of the engine
:return: sys_game_folder or None on failure
:return: project_path or None on failure
"""
try:
with open(os.path.join(dev_root, 'bootstrap.cfg'), 'r') as s:
data = s.read()
sys_game_folder = re.search(r'(.*sys_game_folder\s*?[=:]\s*?)(?P<sys_game_folder>[^\n]+)\n',
data, flags=re.IGNORECASE).group('sys_game_folder').strip()
project_path = re.search(r'(.*project_path\s*?[=:]\s*?)(?P<project_path>[^\n]+)\n',
data, flags=re.IGNORECASE).group('project_path').strip()
except Exception as e:
logger.error('Failed to get current project. Exception: ' + str(e))
return ''
return sys_game_folder
return project_path
def _run_get_current_project(args: argparse) -> int:
sys_game_folder = get_current_project(common.determine_dev_root())
if sys_game_folder:
print(sys_game_folder)
project_path = get_current_project(common.determine_engine_root())
if project_path:
print(project_path)
return 0
return 1
def _run_set_current_project(args: argparse) -> int:
return set_current_project(common.determine_dev_root(), args.project_path)
return set_current_project(common.determine_engine_root(), args.project_path)
def add_args(parser, subparsers) -> None:
+4 -28
View File
@@ -416,17 +416,11 @@ def create_template(dev_root: str,
source_restricted_path = source_restricted_path.replace('\\', '/')
if not os.path.isabs(source_restricted_path):
source_restricted_path = f'{dev_root}/{source_restricted_path}'
if not os.path.isdir(source_restricted_path):
logger.error(f'Src restricted path {source_restricted_path} is not a folder.')
return 1
# template_restricted_path
template_restricted_path = template_restricted_path.replace('\\', '/')
if not os.path.isabs(template_restricted_path):
template_restricted_path = f'{dev_root}/{template_restricted_path}'
if not os.path.isdir(template_restricted_path):
logger.error(f'Template restricted path {template_restricted_path} is not a folder.')
return 1
# source restricted relative
source_restricted_platform_relative_path = source_restricted_platform_relative_path.replace('\\', '/')
@@ -1015,17 +1009,11 @@ def create_from_template(dev_root: str,
destination_restricted_path = destination_restricted_path.replace('\\', '/')
if not os.path.isabs(destination_restricted_path):
destination_restricted_path = f'{dev_root}/{destination_restricted_path}'
if not os.path.isdir(destination_restricted_path):
logger.error(f'Dst restricted path {destination_restricted_path} is not a folder.')
return 1
# template_restricted_path
template_restricted_path = template_restricted_path.replace('\\', '/')
if not os.path.isabs(template_restricted_path):
template_restricted_path = f'{dev_root}/{template_restricted_path}'
if not os.path.isdir(template_restricted_path):
logger.error(f'Template restricted path {template_restricted_path} is not a folder.')
return 1
# destination restricted relative
destination_restricted_platform_relative_path = destination_restricted_platform_relative_path.replace('\\', '/')
@@ -1137,17 +1125,11 @@ def create_project(dev_root: str,
project_restricted_path = project_restricted_path.replace('\\', '/')
if not os.path.isabs(project_restricted_path):
project_restricted_path = f'{dev_root}/{project_restricted_path}'
if not os.path.isdir(project_restricted_path):
logger.error(f'Project restricted path {project_restricted_path} is not a folder.')
return 1
# template_restricted_path
template_restricted_path = template_restricted_path.replace('\\', '/')
if not os.path.isabs(template_restricted_path):
template_restricted_path = f'{dev_root}/{template_restricted_path}'
if not os.path.isdir(template_restricted_path):
logger.error(f'Template restricted path {template_restricted_path} is not a folder.')
return 1
# project restricted relative
project_restricted_platform_relative_path = project_restricted_platform_relative_path.replace('\\', '/')
@@ -1313,17 +1295,11 @@ def create_gem(dev_root: str,
gem_restricted_path = gem_restricted_path.replace('\\', '/')
if not os.path.isabs(gem_restricted_path):
gem_restricted_path = f'{dev_root}/{gem_restricted_path}'
if not os.path.isdir(gem_restricted_path):
logger.error(f'Gem restricted path {gem_restricted_path} is not a folder.')
return 1
# template_restricted_path
template_restricted_path = template_restricted_path.replace('\\', '/')
if not os.path.isabs(template_restricted_path):
template_restricted_path = f'{dev_root}/{template_restricted_path}'
if not os.path.isdir(template_restricted_path):
logger.error(f'Template restricted path {template_restricted_path} is not a folder.')
return 1
# gem restricted relative
gem_restricted_platform_relative_path = gem_restricted_platform_relative_path.replace('\\', '/')
@@ -1385,7 +1361,7 @@ def create_gem(dev_root: str,
def _run_create_template(args: argparse) -> int:
return create_template(common.determine_dev_root(),
return create_template(common.determine_engine_root(),
args.source_path,
args.template_path,
args.source_restricted_path,
@@ -1398,7 +1374,7 @@ def _run_create_template(args: argparse) -> int:
def _run_create_from_template(args: argparse) -> int:
return create_from_template(common.determine_dev_root(),
return create_from_template(common.determine_engine_root(),
args.destination_path,
args.template_path,
args.destination_restricted_path,
@@ -1411,7 +1387,7 @@ def _run_create_from_template(args: argparse) -> int:
def _run_create_project(args: argparse) -> int:
return create_project(common.determine_dev_root(),
return create_project(common.determine_engine_root(),
args.project_path,
args.template_path,
args.project_restricted_path,
@@ -1427,7 +1403,7 @@ def _run_create_project(args: argparse) -> int:
def _run_create_gem(args: argparse) -> int:
return create_gem(common.determine_dev_root(),
return create_gem(common.determine_engine_root(),
args.gem_path,
args.template_path,
args.gem_restricted_path,
+2 -2
View File
@@ -176,10 +176,10 @@ def main(args):
parser.add_argument('-b', '--binfolder',
help='The relative location of the binary folder that contains the resource compiler and asset processor')
bootstrap = common.get_bootstrap_values(DEV_ROOT, ['sys_game_folder'])
bootstrap = common.get_bootstrap_values(DEV_ROOT, ['project_path'])
parser.add_argument('-g', '--game-name',
help='The name of the Game whose asset pak will be generated for',
default=bootstrap.get('sys_game_folder'))
default=bootstrap.get('project_path'))
parser.add_argument('-p', '--asset-platform',
help='The asset platform type to process')
+185 -201
View File
@@ -11,14 +11,13 @@
import argparse
import datetime
import hashlib
import logging
import os
import pathlib
import platform
import re
import shutil
import stat
import subprocess
import sys
import tempfile
@@ -26,9 +25,9 @@ import timeit
# Resolve the common python module
ROOT_DEV_PATH = os.path.realpath(os.path.join(os.path.dirname(__file__), '..', '..'))
if ROOT_DEV_PATH not in sys.path:
sys.path.append(ROOT_DEV_PATH)
ROOT_ENGINE_PATH = os.path.realpath(os.path.join(os.path.dirname(__file__), '..', '..'))
if ROOT_ENGINE_PATH not in sys.path:
sys.path.append(ROOT_ENGINE_PATH)
from cmake.Tools import common
@@ -51,21 +50,20 @@ PAK_ONLY_BUILD_CONFIGS = ['RELEASE']
PLATFORM_NAME = platform.system()
# List of files to blacklist from copying to the layout folder
COPY_ASSET_FILE_GENERAL_BLACKLIST_FILES = [
# List of files to deny from copying to the layout folder
COPY_ASSET_FILE_GENERAL_DENYLIST_FILES = [
'aztest_bootstrap.json',
'editor.cfg',
'assetprocessorplatformconfig.ini',
'assetprocessorplatformconfig.setreg',
]
def verify_layout(layout_dir, platform_name, game_name, asset_mode, asset_type):
def verify_layout(layout_dir, platform_name, project_path, asset_mode, asset_type):
"""
Verify a layout folder (WRT to assets and configs) against the bootstrap and system config files
@param layout_dir: The layout path to validate the asset mode against the bootstrap and system configs
@param platform_name: The name of the platform the deployment is for
@param game_name: The game (project) name being deployed
@param project_path: The path to the project being deployed
@param asset_mode: The desired asset mode (PAK, LOOSE, VFS)
@param asset_type: The asset type
@return: The number of possible errors in the configuration files based on the asset mode and type
@@ -98,8 +96,15 @@ def verify_layout(layout_dir, platform_name, game_name, asset_mode, asset_type):
warning_count = 0
# Look up the project_path from the project.json file
project_name = common.read_project_name_from_project_json(project_path)
# If the project-name could not be read from the project.json, then the supplied project path does not
# point to a valid project
if not project_name:
return 1
platform_name_lower = platform_name.lower()
game_name_lower = game_name.lower()
project_name_lower = project_path.lower()
layout_path = pathlib.Path(layout_dir)
# Validate bootstrap.cfg exists
@@ -108,9 +113,7 @@ def verify_layout(layout_dir, platform_name, game_name, asset_mode, asset_type):
warning_count += _warn(f"'bootstrap.cfg' is missing from {str(layout_path)}")
bootstrap_values = None
else:
bootstrap_values = common.get_config_file_values(str(bootstrap_file), ['sys_game_folder',
'sys_game_name',
f'{platform_name_lower}_remote_filesystem',
bootstrap_values = common.get_config_file_values(str(bootstrap_file), [f'{platform_name_lower}_remote_filesystem',
f'{platform_name_lower}_connect_to_remote',
f'{platform_name_lower}_wait_for_connect',
f'{platform_name_lower}_assets',
@@ -120,9 +123,9 @@ def verify_layout(layout_dir, platform_name, game_name, asset_mode, asset_type):
])
# Validate the system_{platform}_{asset type}.cfg exists
platform_system_cfg_file = layout_path / f'system_{platform_name}_{asset_type}.cfg'
platform_system_cfg_file = layout_path / f'system_{platform_name_lower}_{asset_type}.cfg'
if not platform_system_cfg_file.is_file():
warning_count += _warn(f"'system_{platform_name}_{asset_type}.cfg' is missing from {str(layout_path)}")
warning_count += _warn(f"'system_{platform_name_lower}_{asset_type}.cfg' is missing from {str(layout_path)}")
system_config_values = None
else:
system_config_values = common.get_config_file_values(str(platform_system_cfg_file), ['r_ShadersRemoteCompiler',
@@ -133,14 +136,7 @@ def verify_layout(layout_dir, platform_name, game_name, asset_mode, asset_type):
if bootstrap_values:
remote_ip = bootstrap_values.get(f'{platform_name_lower}_remote_ip') or bootstrap_values.get('remote_ip') or LOCAL_HOST
remote_connect = bootstrap_values.get(f'{platform_name}_connect_to_remote') or '0'
# Validate that the game name matches in bootstrap.cfg
bootstrap_game = bootstrap_values.get('sys_game_folder') or bootstrap_values.get('sys_game_name')
if not bootstrap_game:
warning_count += _warn("'bootstrap.cfg' is missing the game name set in 'sys_game_folder")
elif bootstrap_game != game_name:
warning_count += _warn(f"The game specified in bootstrap.cfg ({bootstrap_game}) does not match the game name specified for this deployment ({game_name})")
remote_connect = bootstrap_values.get(f'{platform_name_lower}_connect_to_remote') or '0'
# Validate that the asset type for the platform matches the one set for the build
bootstrap_asset_type = bootstrap_values.get(f'{platform_name_lower}_assets') or bootstrap_values.get('assets')
@@ -152,9 +148,9 @@ def verify_layout(layout_dir, platform_name, game_name, asset_mode, asset_type):
# Validate that if '<platform>_connect_to_remote is enabled, that the 'remote_ip' is not set to local host
warning_count += _validate_remote_ap(remote_ip, remote_connect, None)
game_asset_path = layout_path / game_name_lower
if not game_asset_path.is_dir():
warning_count += _warn(f"Asset folder for game {game_name} is missing from the deployment layout.")
project_asset_path = layout_path / project_name_lower
if not project_asset_path.is_dir():
warning_count += _warn(f"Asset folder for project {project_name} is missing from the deployment layout.")
elif system_config_values is not None:
@@ -183,9 +179,9 @@ def verify_layout(layout_dir, platform_name, game_name, asset_mode, asset_type):
# Validate that we have pak files
pak_count = 0
has_shader_pak = False
game_paks = game_asset_path.glob("*.pak")
for game_pak in game_paks:
if game_pak.name == 'shadercachestartup.pak':
project_paks = project_asset_path.glob("*.pak")
for project_pak in project_paks:
if project_pak.name == 'shadercachestartup.pak':
has_shader_pak = True
pak_count += 1
@@ -196,7 +192,7 @@ def verify_layout(layout_dir, platform_name, game_name, asset_mode, asset_type):
# If the shader paks are set, make sure that the remote shader compiler connection settings are set
# or that it is going through AP
if shaders_remote_compiler == '1':
warning_count += _warn(f"Shader paks are set for game {game_name} but remote shader compiling "
warning_count += _warn(f"Shader paks are set for project {project_name} but remote shader compiling "
f"(r_ShadersRemoteCompiler) is still enabled "
f"for it in system_{platform_name_lower}_{asset_type}.cfg.")
else:
@@ -205,7 +201,7 @@ def verify_layout(layout_dir, platform_name, game_name, asset_mode, asset_type):
warning_count += _validate_remote_ap(remote_ip, remote_connect, False)
if shaders_allow_compilation is not None and shaders_allow_compilation == '1':
warning_count += _warn(f"Shader paks are set for game {game_name} but shader compiling "
warning_count += _warn(f"Shader paks are set for project {project_name} but shader compiling "
f"(r_ShadersAllowCompilation) is still enabled "
f"for it in system_{platform_name_lower}_{asset_type}.cfg.")
@@ -226,26 +222,23 @@ def verify_layout(layout_dir, platform_name, game_name, asset_mode, asset_type):
return warning_count
def copy_asset_files_to_layout(game_name, game_asset_folder, target_platform, layout_target):
def copy_asset_files_to_layout(project_asset_folder, target_platform, layout_target):
"""
Perform the specific rules for copying files to the root level of the layout.
:param game_name: The name of the game
:param game_asset_folder: The source game asset folder to copy the files. (Will not traverse deeper than this folder)
:param target_platform: The target platform of the layout
:param layout_target: The target path of the target layout folder.
:param project_asset_folder: The source project asset folder to copy the files. (Will not traverse deeper than this folder)
:param target_platform: The target platform of the layout
:param layout_target: The target path of the target layout folder.
"""
src_asset_contents = os.listdir(game_asset_folder)
src_asset_contents = os.listdir(project_asset_folder)
allowed_system_config_prefix = 'system_{}'.format(target_platform.lower())
for src_file in src_asset_contents:
# For each source file found in the root of the source game asset folder, apply various rules to determine
# For each source file found in the root of the source project asset folder, apply various rules to determine
# if we will copy the file to the layout destination or not
if src_file in COPY_ASSET_FILE_GENERAL_BLACKLIST_FILES:
# The source file is black-listed from being copied
if src_file in COPY_ASSET_FILE_GENERAL_DENYLIST_FILES:
# The source file is denied from being copied
continue
if src_file.startswith('system_'):
@@ -255,7 +248,7 @@ def copy_asset_files_to_layout(game_name, game_asset_folder, target_platform, la
continue
# Resolve the absolute paths for source and destination to perform more specific checks
abs_src = os.path.join(game_asset_folder, src_file)
abs_src = os.path.join(project_asset_folder, src_file)
abs_dst = os.path.join(layout_target, src_file)
if os.path.isdir(abs_src):
@@ -280,35 +273,33 @@ def copy_asset_files_to_layout(game_name, game_asset_folder, target_platform, la
src_file,
src_hash)
continue
if os.path.basename(abs_src) == 'bootstrap.cfg':
logging.debug("Copying (%s) %s -> %s", game_name, abs_src, abs_dst)
common.transform_bootstrap_for_game(game_name, abs_src, abs_dst)
else:
logging.debug("Copying %s -> %s", abs_src, abs_dst)
shutil.copy2(abs_src, abs_dst)
def remove_link(link):
def remove_link(link:pathlib.PurePath):
"""
Helper function to either remove a symlink, or remove a folder
"""
link = pathlib.PurePath(link)
if os.path.isdir(link):
try:
os.unlink(link)
except:
if PLATFORM_NAME == 'Windows':
rmdir_cmd = ['cmd', '/c', 'rmdir', '/J', '/S', link]
else:
rmdir_cmd = ['rm', '-rf', link]
except OSError:
# If unlink fails use shutil.rmtree
def remove_readonly(func, path, _):
"Clear the readonly bit and reattempt the removal"
os.chmod(path, stat.S_IWRITE)
func(path)
try:
logging.debug('Executing call %s', ' '.join(rmdir_cmd))
subprocess.check_call(rmdir_cmd, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
except subprocess.CalledProcessError as e:
raise common.LmbrCmdError("Error trying remove directory {}: {}".format(link, e),
e.returncode)
shutil.rmtree(link, onerror=remove_readonly)
except shutil.Error as shutil_error:
raise common.LmbrCmdError(f'Error trying remove directory {link}: {shutil_error}', shutil_error.errno)
def create_link(src, tgt, copy):
def create_link(src:pathlib.Path, tgt:pathlib.Path, copy):
"""
Helper function to create a directory link or copy a directory. On windows, this will be a directory junction, and on mac/linux
this will be a soft link
@@ -317,68 +308,74 @@ def create_link(src, tgt, copy):
:param tgt: The target of the new link
:param copy: Perform a directory copy instead of a link
"""
src = pathlib.Path(src)
tgt = pathlib.Path(tgt)
if copy:
if os.path.isdir(tgt):
os.rmdir(tgt)
logging.debug("Copying from %s to %s", src, tgt)
shutil.copytree(src, tgt, symlinks=False)
else:
logging.debug('Creating internal junction %s => %s in %s', src, tgt)
if PLATFORM_NAME == 'Windows':
link_type = 'junction'
junction_cmd = ['cmd', '/c', 'mklink', '/J', tgt, src]
# Remove the exist target
if tgt.is_symlink():
tgt.unlink()
else:
link_type = 'soft link'
junction_cmd = ['ln', '-s', src, tgt]
def remove_readonly(func, path, _):
"Clear the readonly bit and reattempt the removal"
os.chmod(path, stat.S_IWRITE)
func(path)
shutil.rmtree(tgt, onerror=remove_readonly)
logging.debug(f'Copying from {src} to {tgt}')
shutil.copytree(str(src), str(tgt), symlinks=False)
else:
link_type = "symlink"
logging.debug(f'Creating symlink {src} =>{tgt}')
try:
logging.debug('Executing call %s', ' '.join(junction_cmd))
subprocess.check_call(junction_cmd, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
except subprocess.CalledProcessError as e:
raise common.LmbrCmdError(f"Error trying to create {link_type} {src} => {tgt} : {str(e)}", e.returncode)
if PLATFORM_NAME == "Windows":
link_type = "junction"
import _winapi
_winapi.CreateJunction(str(src), str(tgt))
else:
src.symlink_to(tgt, target_is_directory=True)
except OSError as e:
raise common.LmbrCmdError(f"Error trying to create {link_type} {src} => {tgt} : {e}", e.errno)
def construct_and_validate_cache_game_asset_folder(dev_root, game_name, asset_type, warn_on_missing_game_cache):
def construct_and_validate_cache_project_asset_folder(project_path, asset_type, warn_on_missing_project_cache):
"""
Given the parameters for a game (name, dev root, asset type), construct and validate the absolute path
Given the parameters for a project (project_path, asset type), construct and validate the absolute path
of where the built assets are (for LOOSE and VFS modes)
:param dev_root: The dev root to base the Cache folder search
:param game_name: The name of the game
:param asset_type: The type of asset
:param warn_on_missing_game_cache: Option to warn if the path is missing vs raising an exception
:return: The validated constructed cache game asset folder if it exists, None if not
:param project_path: The path to the project
:param asset_type: The type of asset
:param warn_on_missing_project_cache: Option to warn if the path is missing vs raising an exception
:return: The validated constructed cache project asset folder if it exists, None if not
"""
# Locate the Cache root folder
cache_game_folder_root = os.path.join(dev_root, CACHE_FOLDER_NAME, game_name)
if not os.path.isdir(cache_game_folder_root) and not warn_on_missing_game_cache:
cache_project_folder_root = os.path.join(project_path, CACHE_FOLDER_NAME)
if not os.path.isdir(cache_project_folder_root) and not warn_on_missing_project_cache:
raise common.LmbrCmdError(
"Missing Cache folder for the game in the current dev root. Make sure that assets have been built "
"for the game '{}'".format(game_name),
f"Missing Cache folder for the project at path {project_path}. Make sure that assets have been built ",
common.ERROR_CODE_ERROR_DIRECTORY)
# Locate based on the game's built asset type
cache_game_asset_folder = os.path.join(cache_game_folder_root, asset_type)
if os.path.isdir(cache_game_asset_folder):
# Locate based on the project's built asset type
cache_project_asset_folder = os.path.join(cache_project_folder_root, asset_type)
if os.path.isdir(cache_project_asset_folder):
# TODO: Note, this is only checking the existence of the folder, not for any content validation
return cache_game_asset_folder
return cache_project_asset_folder
# Expected source of the game assets was not found
if not warn_on_missing_game_cache:
# Expected source of the project assets was not found
if not warn_on_missing_project_cache:
raise common.LmbrCmdError(
"Missing compiled assets folder for the game. Make sure that assets for '{}' have been built "
"for the game '{}'".format(asset_type, game_name),
f'Missing compiled assets folder for the project at path {project_path}."'
f' Make sure that assets for "{asset_type}" have been built',
common.ERROR_CODE_ERROR_DIRECTORY)
return None
def sync_layout_vfs(dev_root, target_platform, game, asset_type, warning_on_missing_assets, layout_target, override_pak_folder, copy):
def sync_layout_vfs(target_platform, project_path, asset_type, warning_on_missing_assets, layout_target, override_pak_folder, copy):
"""
Perform the logic to sync the layout folder with assets in VFS mode
:param dev_root: The configured dev root
:param target_platform: The target platform the layout is based on
:param game: The name of the game being synced
:param project_path: The path to the project being synced
:param asset_type: The asset type being synced
:param warning_on_missing_assets: If the built assets cannot be located (LOOSE or PAKs), then optionally warn vs raising an error
:param layout_target: The target layout folder to perform the sync on
@@ -386,71 +383,68 @@ def sync_layout_vfs(dev_root, target_platform, game, asset_type, warning_on_miss
:param copy: Option to copy instead of attempting to symlink/junction
"""
logging.debug("Syncing VFS layout for game '%s' to layout path '%s'", game, layout_target)
logging.debug(f'Syncing VFS layout for project at path "{project_path}" to layout path "{layout_target}"')
game_asset_folder = construct_and_validate_cache_game_asset_folder(dev_root=dev_root,
game_name=game,
project_asset_folder = construct_and_validate_cache_project_asset_folder(project_path=project_path,
asset_type=asset_type,
warn_on_missing_game_cache=warning_on_missing_assets)
warn_on_missing_project_cache=warning_on_missing_assets)
game_folder = game.lower()
vfs_asset_source = os.path.join(game_asset_folder, game_folder, 'config')
vfs_asset_source = os.path.join(project_asset_folder, 'config')
if not os.path.isdir(vfs_asset_source):
raise common.LmbrCmdError("Cache folder for the game '{}' missing 'config' folder".format(game),
raise common.LmbrCmdError("Cache folder for the project '{}' missing 'config' folder".format(project_path),
common.ERROR_CODE_ERROR_DIRECTORY)
# create a temporary folder that will serve as a working junction point into the layout
hasher = hashlib.md5()
hasher.update(dev_root.encode('UTF-8'))
hasher.update(game_folder.encode('UTF-8'))
hasher.update(project_path.encode('UTF-8'))
result = hasher.hexdigest()
temp_dir = tempfile.gettempdir()
temp_vfs_layout_path = os.path.join(temp_dir, 'ly-layout-{}'.format(result), 'vfs')
temp_vfs_layout_game_path = os.path.join(temp_vfs_layout_path, game_folder)
temp_vfs_layout_project_path = temp_vfs_layout_path
temp_vfs_layout_game_config_path = os.path.join(temp_vfs_layout_game_path, 'config')
temp_vfs_layout_project_config_path = os.path.join(temp_vfs_layout_project_path, 'config')
# If the temporary folder was created previously, always reset it
if os.path.isdir(temp_vfs_layout_game_path):
if os.path.isdir(temp_vfs_layout_game_config_path):
os.rmdir(temp_vfs_layout_game_config_path)
shutil.rmtree(temp_vfs_layout_game_path)
os.makedirs(temp_vfs_layout_game_path, exist_ok=True)
if os.path.isdir(temp_vfs_layout_project_path):
if os.path.isdir(temp_vfs_layout_project_config_path):
os.rmdir(temp_vfs_layout_project_config_path)
shutil.rmtree(temp_vfs_layout_project_path)
os.makedirs(temp_vfs_layout_project_path, exist_ok=True)
# Create the 'project asset platform cache' junction before copying configuration files at the engine root to it
layout_project_folder_target = layout_target
# Remove previous layout folder if it is a directory
if os.path.isdir(layout_project_folder_target):
remove_link(layout_project_folder_target)
if os.path.isdir(temp_vfs_layout_project_path):
create_link(temp_vfs_layout_project_path, layout_project_folder_target, copy)
# Create the link
create_link(vfs_asset_source, temp_vfs_layout_game_config_path, copy)
create_link(vfs_asset_source, temp_vfs_layout_project_config_path, copy)
# Create the assets to the layout
copy_asset_files_to_layout(game_name=game,
game_asset_folder=game_asset_folder,
copy_asset_files_to_layout(project_asset_folder=project_asset_folder,
target_platform=target_platform,
layout_target=layout_target)
# Reset the 'gems' junction if any in the layout
layout_gems_folder_src = os.path.join(game_asset_folder, 'gems')
layout_gems_folder_src = os.path.join(project_asset_folder, 'gems')
layout_gems_folder_target = os.path.join(layout_target, 'gems')
if os.path.isdir(layout_gems_folder_target):
remove_link(layout_gems_folder_target)
if os.path.isdir(layout_gems_folder_src):
create_link(layout_gems_folder_src, layout_gems_folder_target, copy)
# Reset the <game_folder> junction
layout_game_folder_target = os.path.join(layout_target, game_folder)
if os.path.isdir(layout_game_folder_target):
remove_link(layout_game_folder_target)
if os.path.isdir(temp_vfs_layout_game_path):
create_link(temp_vfs_layout_game_path, layout_game_folder_target, copy)
def sync_layout_non_vfs(mode, target_platform, dev_root, game, asset_type, warning_on_missing_assets, layout_target, override_pak_folder, copy):
def sync_layout_non_vfs(mode, target_platform, project_path, asset_type, warning_on_missing_assets, layout_target, override_pak_folder, copy):
"""
Perform the logic to sync the layout folder with assets in non-VFS mode (LOOSE or PAK)
:param mode: 'LOOSE' or 'PAK' mode
:param target_platform: The target platform the layout is based on
:param dev_root: The configured dev root
:param game: The name of the game being synced
:param project_path: The path to the project being synced
:param asset_type: The asset type being synced
:param warning_on_missing_assets: If the built assets cannot be located (LOOSE or PAKs), then optionally warn vs raising an error
:param layout_target: The target layout folder to perform the sync on
@@ -460,66 +454,67 @@ def sync_layout_non_vfs(mode, target_platform, dev_root, game, asset_type, warni
assert mode in (ASSET_MODE_PAK, ASSET_MODE_LOOSE)
game_folder = game.lower()
project_name = common.read_project_name_from_project_json(project_path)
if not project_name:
raise common.LmbrCmdError(f'Project at path {project_path} does not have a valid project.json')
project_name_lower = project_name.lower()
layout_gems_folder_target = os.path.join(layout_target, 'gems')
if os.path.isdir(layout_gems_folder_target):
remove_link(layout_gems_folder_target)
layout_game_folder_target = os.path.join(layout_target, game_folder)
if os.path.isdir(layout_game_folder_target):
remove_link(layout_game_folder_target)
if mode == ASSET_MODE_PAK:
target_pak_folder_name = '{}_{}_paks'.format(game_folder, asset_type)
game_asset_folder = os.path.join(dev_root, override_pak_folder or PAK_FOLDER_NAME, target_pak_folder_name)
if not os.path.isdir(game_asset_folder):
target_pak_folder_name = '{}_{}_paks'.format(project_name_lower, asset_type)
project_asset_folder = os.path.join(project_path, override_pak_folder or PAK_FOLDER_NAME, target_pak_folder_name)
if not os.path.isdir(project_asset_folder):
if warning_on_missing_assets:
logging.warning("Pak folder for the game '{}' is missing (expected at '{}'). Skipping layout sync".format(game, game_asset_folder))
logging.warning(f'Pak folder for the project at path "{project_path}" is missing'
f' (expected at "{project_asset_folder}"). Skipping layout sync')
return
else:
raise common.LmbrCmdError("Pak folder for the game '{}' is missing (expected at '{}')".format(game, game_asset_folder),
raise common.LmbrCmdError(f'Pak folder for the project at path "{project_path}" is missing (expected at'
f' "{project_asset_folder}")',
common.ERROR_CODE_ERROR_DIRECTORY)
elif mode == ASSET_MODE_LOOSE:
game_asset_folder = construct_and_validate_cache_game_asset_folder(dev_root=dev_root,
game_name=game,
project_asset_folder = construct_and_validate_cache_project_asset_folder(project_path=project_path,
asset_type=asset_type,
warn_on_missing_game_cache=warning_on_missing_assets)
if not game_asset_folder:
warn_on_missing_project_cache=warning_on_missing_assets)
if not project_asset_folder:
logging.warning(
"Cannot locate built assets for game '{}' (expected at '{}'). Skipping layout sync".format(game,
game_asset_folder))
f'Cannot locate built assets for project at path "{project_path}" (expected at "{project_asset_folder}").'
f' Skipping layout sync')
return
else:
assert False, "Invalid Mode {}".format(mode)
# Create the 'project asset platform cache' junction before copying additional files to it
layout_project_folder_src = project_asset_folder
# Remove previous layout folder if it is a directory
if os.path.isdir(layout_target):
remove_link(layout_target)
if os.path.isdir(layout_project_folder_src):
create_link(layout_project_folder_src, layout_target, copy)
# Create the assets to the layout
copy_asset_files_to_layout(game_name=game,
game_asset_folder=game_asset_folder,
copy_asset_files_to_layout(project_asset_folder=project_asset_folder,
target_platform=target_platform,
layout_target=layout_target)
# Reset the 'gems' junction if any in the layout (only in loose mode).
layout_gems_folder_src = os.path.join(game_asset_folder, 'gems')
layout_gems_folder_src = os.path.join(project_asset_folder, 'gems')
# The gems link only is valid in LOOSE mode. If in PAK, then dont re-link
if mode == ASSET_MODE_LOOSE and os.path.isdir(layout_gems_folder_src):
if os.path.isdir(layout_gems_folder_src):
create_link(layout_gems_folder_src, layout_gems_folder_target, copy)
# Reset the <game_folder> junction
layout_game_folder_src = os.path.join(game_asset_folder, game_folder)
if os.path.isdir(layout_game_folder_src):
create_link(layout_game_folder_src, layout_game_folder_target, copy)
def sync_layout_pak(dev_root, target_platform, game, asset_type, warning_on_missing_assets, layout_target,
def sync_layout_pak(target_platform, project_path, asset_type, warning_on_missing_assets, layout_target,
override_pak_folder, copy):
sync_layout_non_vfs(mode=ASSET_MODE_PAK,
target_platform=target_platform,
dev_root=dev_root,
game=game,
project_path=project_path,
asset_type=asset_type,
warning_on_missing_assets=warning_on_missing_assets,
layout_target=layout_target,
@@ -527,12 +522,11 @@ def sync_layout_pak(dev_root, target_platform, game, asset_type, warning_on_miss
copy=copy)
def sync_layout_loose(dev_root, target_platform, game, asset_type, warning_on_missing_assets, layout_target,
def sync_layout_loose(target_platform, project_path, asset_type, warning_on_missing_assets, layout_target,
override_pak_folder, copy):
sync_layout_non_vfs(mode=ASSET_MODE_LOOSE,
target_platform=target_platform,
dev_root=dev_root,
game=game,
project_path=project_path,
asset_type=asset_type,
warning_on_missing_assets=warning_on_missing_assets,
layout_target=layout_target,
@@ -548,13 +542,10 @@ ASSET_SYNC_MODE_FUNCTION = {
def main(args):
parser = argparse.ArgumentParser(description="Synchronize a game's assets to a layout folder")
parser = argparse.ArgumentParser(description="Synchronize a project's assets to a layout folder")
parser.add_argument('--dev-root',
help='The path to the dev root',
required=True)
parser.add_argument('-g', '--game',
help='Name of the game whose assets we will sync.',
parser.add_argument('--project-path',
help='The project path whose assets we will sync.',
required=True)
parser.add_argument('-p', '--platform',
help='Target platform for the layout.',
@@ -567,7 +558,7 @@ def main(args):
help='Enable debug logs.')
parser.add_argument('--warn-on-missing-assets',
action='store_true',
help='If the game does not have any built assets, warn rather than return an error')
help='If the project does not have any built assets, warn rather than return an error')
parser.add_argument('-m', '--mode',
type=str,
choices=ALL_ASSET_MODES,
@@ -582,7 +573,7 @@ def main(args):
parser.add_argument('--override-pak-folder',
default='',
help='(optional) If provided, use this path as the path to the pak folder when creating layouts '
'in PAK mode. Otherwise, use the dev-root/pak/${game}_${asset_type}_pak as the source pak folder')
'in PAK mode. Otherwise, use the {project_path}/pak/${project}_${asset_type}_pak as the source pak folder')
parser.add_argument('--build-config',
default='',
help='(optional) If provided, will adjust the asset mode if the provided build-config is "release"')
@@ -599,11 +590,36 @@ def main(args):
parsed_args = parser.parse_args(args)
# Validate the dev_root exists
if not os.path.exists(parsed_args.dev_root):
raise common.LmbrCmdError("Invalid dev root folder. '{}' does not exist".format(parsed_args.dev_root),
# Prepare the logging
logging.basicConfig(format='%(levelname)s: %(message)s', level=logging.DEBUG if parsed_args.debug else logging.INFO)
# Validate the asset mode
input_asset_mode = parsed_args.mode.upper()
if input_asset_mode not in ALL_ASSET_MODES:
raise common.LmbrCmdError("Invalid asset mode '{}'. Must be one of : '{}'.".format(input_asset_mode, ','.join(ALL_ASSET_MODES)),
common.ERROR_CODE_INVALID_PARAMETER)
# Check if the build config is set, if so, check if its release
build_config = parsed_args.build_config.upper()
if build_config in PAK_ONLY_BUILD_CONFIGS:
input_asset_mode = ASSET_MODE_PAK
logging.info("Starting (%s) Asset Synchronization in %s mode and project %s", parsed_args.asset_type, input_asset_mode, parsed_args.project_path)
start_time = timeit.default_timer()
ASSET_SYNC_MODE_FUNCTION[input_asset_mode](target_platform=parsed_args.platform,
project_path=parsed_args.project_path,
asset_type=parsed_args.asset_type,
warning_on_missing_assets=parsed_args.warn_on_missing_assets,
layout_target=os.path.normpath(parsed_args.layout_root),
override_pak_folder=parsed_args.override_pak_folder,
copy=parsed_args.copy)
duration = timeit.default_timer() - start_time
logging.info("Asset Synchronization complete {:.2f} seconds".format(duration))
# Remove broken symlinks/junctions to the layout folder
if os.path.isdir(parsed_args.layout_root) and not os.path.exists(parsed_args.layout_root):
remove_link(parsed_args.layout_root)
if not os.path.isdir(parsed_args.layout_root):
# If the layout target doesnt exist, check if we want to create it
if parsed_args.create_layout_root:
@@ -617,42 +633,10 @@ def main(args):
raise common.LmbrCmdError("Invalid layout folder (--layout-root): '{}'".format(parsed_args.layout_root),
common.ERROR_CODE_ERROR_DIRECTORY)
# Prepare the logging
logging.basicConfig(format='%(levelname)s: %(message)s', level=logging.DEBUG if parsed_args.debug else logging.INFO)
# Validate the dev root
for check_file in ('bootstrap.cfg', 'engine.json'):
if not os.path.isfile(os.path.join(parsed_args.dev_root, check_file)):
raise common.LmbrCmdError("Invalid value for --dev-root. Path '{}' missing file '{}'".format(parsed_args.dev_root, check_file),
common.ERROR_CODE_INVALID_PARAMETER)
# Validate the asset mode
input_asset_mode = parsed_args.mode.upper()
if input_asset_mode not in ALL_ASSET_MODES:
raise common.LmbrCmdError("Invalid asset mode '{}'. Must be one of : '{}'.".format(input_asset_mode, ','.join(ALL_ASSET_MODES)),
common.ERROR_CODE_INVALID_PARAMETER)
# Check if the build config is set, if so, check if its release
build_config = parsed_args.build_config.upper()
if build_config in PAK_ONLY_BUILD_CONFIGS:
input_asset_mode = ASSET_MODE_PAK
logging.info("Starting (%s) Asset Synchronization in %s mode and game %s", parsed_args.asset_type, input_asset_mode, parsed_args.game)
start_time = timeit.default_timer()
ASSET_SYNC_MODE_FUNCTION[input_asset_mode](dev_root=os.path.normpath(parsed_args.dev_root),
target_platform=parsed_args.platform,
game=parsed_args.game,
asset_type=parsed_args.asset_type,
warning_on_missing_assets=parsed_args.warn_on_missing_assets,
layout_target=os.path.normpath(parsed_args.layout_root),
override_pak_folder=parsed_args.override_pak_folder,
copy=parsed_args.copy)
duration = timeit.default_timer() - start_time
logging.info("Asset Synchronization complete {:.2f} seconds".format(duration))
if parsed_args.verify:
warnings = verify_layout(layout_dir=os.path.normpath(parsed_args.layout_root),
platform_name=parsed_args.platform,
game_name=parsed_args.game,
project_path=parsed_args.project_path,
asset_mode=input_asset_mode,
asset_type=parsed_args.asset_type)
if warnings > 0:
+18 -52
View File
@@ -24,7 +24,7 @@ from . import common
pytest.param({'fake': 'foo'}, True, id="TestSuccess"),
pytest.param(None, False, id="TestFail")
])
def test_determine_dev_root(tmpdir, engine_json_content, expected_success):
def test_determine_engine_root(tmpdir, engine_json_content, expected_success):
test_folder_heirarchy = 'dev/foo1/foo2/foo3/'
tmpdir.ensure(test_folder_heirarchy)
@@ -40,7 +40,7 @@ def test_determine_dev_root(tmpdir, engine_json_content, expected_success):
expected_path = None
starting_path = str(tmpdir.join(test_folder_heirarchy).realpath())
result = common.determine_dev_root(starting_path)
result = common.determine_engine_root(starting_path)
if expected_path:
assert os.path.normcase(result) == os.path.normcase(expected_path)
@@ -49,7 +49,7 @@ def test_determine_dev_root(tmpdir, engine_json_content, expected_success):
TEST_BOOTSTRAP_CONTENT_1 = """
sys_game_folder = Game1
project_path = Game1
foo = bar
key1 = value1
key2 = value2
@@ -58,7 +58,7 @@ assets = pc
"""
TEST_BOOTSTRAP_CONTENT_2 = """
sys_game_folder = Game2
project_path = Game2
foo = bar
#-------------------------
key1 = value1
@@ -70,12 +70,12 @@ assets = pc
@pytest.mark.parametrize(
"contents, input_keys, expected_result_map", [
pytest.param(TEST_BOOTSTRAP_CONTENT_1, ['sys_game_folder', 'foo', 'assets'], {'sys_game_folder': 'Game1',
pytest.param(TEST_BOOTSTRAP_CONTENT_1, ['project_path', 'foo', 'assets'], {'project_path': 'Game1',
'foo': 'bar',
'assets': 'pc'}, id="TestFullMatch"),
pytest.param(TEST_BOOTSTRAP_CONTENT_2, ['sys_game_folder', 'foo', 'barnone'], {'sys_game_folder': 'Game2',
pytest.param(TEST_BOOTSTRAP_CONTENT_2, ['project_path', 'foo', 'barnone'], {'project_path': 'Game2',
'foo': 'bar'}, id="TestPartialMatch"),
pytest.param(TEST_BOOTSTRAP_CONTENT_2, ['sys_game_foldernone', 'foonone', 'barnone'], {}, id="TestNoMatch")
pytest.param(TEST_BOOTSTRAP_CONTENT_2, ['project_pathnone', 'foonone', 'barnone'], {}, id="TestNoMatch")
]
)
def test_get_bootstrap_values_success(tmpdir, contents, input_keys, expected_result_map):
@@ -223,9 +223,9 @@ subjectB = ${subject_B_value}
TEST_GAME_PROJECT_JSON_FORMAT = """
{{
"project_name": "{game_name}",
"product_name": "{game_name}",
"executable_name": "{game_name}.GameLauncher",
"project_name": "{project_name}",
"product_name": "{project_name}",
"executable_name": "{project_name}.GameLauncher",
"modules" : [],
"project_id": "{{4F3363D3-4A7C-47A6-B464-B21524771358}}",
@@ -244,7 +244,7 @@ def test_verify_game_project_and_dev_root_success(tmpdir):
dev_root = 'dev'
game_name = 'MyFoo'
game_folder = 'myfoo'
game_project_json = TEST_GAME_PROJECT_JSON_FORMAT.format(game_name=game_name)
game_project_json = TEST_GAME_PROJECT_JSON_FORMAT.format(project_name=game_name)
tmpdir.ensure(f'{dev_root}/bootstrap.cfg')
tmpdir.ensure(f'{dev_root}/{game_folder}/project.json')
project_json_path = tmpdir / dev_root / game_folder / 'project.json'
@@ -285,7 +285,7 @@ asset_deploy_type={test_asset_deploy_type}
assert result.asset_deploy_type == test_asset_deploy_type
def test_transform_bootstrap_sysgamefolder(tmpdir):
def test_transform_bootstrap_project_path(tmpdir):
tmpdir.ensure('bootstrap.cfg')
@@ -293,7 +293,7 @@ def test_transform_bootstrap_sysgamefolder(tmpdir):
-- Blah Blah
-- Blah Blah
sys_game_folder=OldProject
project_path=OldProject
-- remote_filesystem - enable Virtual File System (VFS)
-- This feature allows a remote instance of the game to run off assets
@@ -307,53 +307,19 @@ remote_filesystem=0
test_dst_bootstrap = tmpdir / 'bootstrap.transformed.cfg'
test_game_name = 'FooBar'
common.transform_bootstrap_for_game(game_name=test_game_name,
common.transform_bootstrap_for_project(game_name=test_game_name,
src_bootstrap=str(test_src_bootstrap),
dst_bootstrap=str(test_dst_bootstrap))
transformed_text = test_dst_bootstrap.read_text('ascii')
search_gamename = re.search(r"sys_game_folder\s*=\s*(.*)", transformed_text)
search_gamename = re.search(r"project_path\s*=\s*(.*)", transformed_text)
assert search_gamename
assert search_gamename.group(1)
assert search_gamename.group(1) == test_game_name
def test_transform_bootstrap_sysgamename(tmpdir):
tmpdir.ensure('bootstrap.cfg')
test_bootstrap_content = """
-- Blah Blah
-- Blah Blah
sys_game_name=OldProject
-- remote_filesystem - enable Virtual File System (VFS)
-- This feature allows a remote instance of the game to run off assets
-- on the asset processor computers cache instead of deploying them the remote device
-- By default it is off and can be overridden for any platform
remote_filesystem=0
"""
test_src_bootstrap = tmpdir / 'bootstrap.cfg'
test_src_bootstrap.write_text(test_bootstrap_content, encoding='ascii')
test_dst_bootstrap = tmpdir / 'bootstrap.transformed.cfg'
test_game_name = 'FooBar'
common.transform_bootstrap_for_game(game_name=test_game_name,
src_bootstrap=str(test_src_bootstrap),
dst_bootstrap=str(test_dst_bootstrap))
transformed_text = test_dst_bootstrap.read_text('ascii')
search_gamename = re.search(r"sys_game_name\s*=\s*(.*)", transformed_text)
assert search_gamename
assert search_gamename.group(1)
assert search_gamename.group(1) == test_game_name
def test_transform_bootstrap_sysgamefolder_missing(tmpdir):
def test_transform_bootstrap_project_path_missing(tmpdir):
tmpdir.ensure('bootstrap.cfg')
@@ -373,13 +339,13 @@ remote_filesystem=0
test_dst_bootstrap = tmpdir / 'bootstrap.transformed.cfg'
test_game_name = 'FooBar'
common.transform_bootstrap_for_game(game_name=test_game_name,
common.transform_bootstrap_for_project(game_name=test_game_name,
src_bootstrap=str(test_src_bootstrap),
dst_bootstrap=str(test_dst_bootstrap))
transformed_text = test_dst_bootstrap.read_text('ascii')
search_gamename = re.search(r"sys_game_folder\s*=\s*(.*)", transformed_text)
search_gamename = re.search(r"project_path\s*=\s*(.*)", transformed_text)
assert search_gamename
assert search_gamename.group(1)
assert search_gamename.group(1) == test_game_name
+5 -5
View File
@@ -15,35 +15,35 @@ import pytest
from . import current_project
TEST_BOOTSTRAP_CONTENT_1 = """
sys_game_folder = Game1
project_path = Game1
foo = bar
key1 = value1
key2 = value2
assets = pc
"""
TEST_BOOTSTRAP_CONTENT_2 = """
sys_game_folder=Game1
project_path=Game1
foo = bar
key1 = value1
key2 = value2
assets = pc
"""
TEST_BOOTSTRAP_CONTENT_3 = """
sys_game_folder= Game1
project_path= Game1
foo = bar
key1 = value1
key2 = value2
assets = pc
"""
TEST_BOOTSTRAP_CONTENT_4 = """
sys_game_folder =Game1
project_path =Game1
foo = bar
key1 = value1
key2 = value2
assets = pc
"""
TEST_BOOTSTRAP_CONTENT_5 = """
sys_game_folder = Game1
project_path = Game1
foo = bar
key1 = value1
key2 = value2
+39 -57
View File
@@ -37,9 +37,9 @@ def test_copy_asset_files_to_layout_success():
try:
# Setup test vectors
# Blacklisted files, should not show up in the result
test_blacklisted_file = [
'assetprocessorplatformconfig.ini'
# Denied files, should not show up in the result
test_denylist_file = [
'assetprocessorplatformconfig.setreg'
]
# System files that are not the same platform, so should skip
test_skip_system_files = [
@@ -69,18 +69,14 @@ def test_copy_asset_files_to_layout_success():
'good_src_2'
]
test_expected_copied_files = test_dest_diff_as_src + test_src_not_in_dst
test_dev_root = 'dev'
test_game = 'game1'
test_asset_type = 'pc'
test_game_asset_folder = 'game_cache'
test_layout_target = 'layout_target'
test_platform = 'goodplatform'
test_asset_mode = layout_tool.ASSET_MODE_LOOSE
def _mock_os_listdir(path):
assert path == test_game_asset_folder
mock_files = test_blacklisted_file + \
mock_files = test_denylist_file + \
test_skip_system_files + \
test_skip_source_folders + \
test_skip_dest_is_folder + \
@@ -130,8 +126,7 @@ def test_copy_asset_files_to_layout_success():
result_copy_files.append(basename)
shutil.copy2 = _mock_shutil_copy2
layout_tool.copy_asset_files_to_layout(game_name=test_game,
game_asset_folder=test_game_asset_folder,
layout_tool.copy_asset_files_to_layout(project_asset_folder=test_game_asset_folder,
target_platform=test_platform,
layout_target=test_layout_target)
@@ -217,17 +212,16 @@ def test_create_link_error():
@pytest.mark.parametrize(
"game_name, asset_type, ensure_path, warn_on_missing, expected_result", [
pytest.param('Foo', 'pc', 'dev/Cache/Foo/pc/bootstrap.cfg', False, 'dev/Cache/Foo/pc'),
"project_path, asset_type, ensure_path, warn_on_missing, expected_result", [
pytest.param('Foo', 'pc', 'Foo/Cache/pc/bootstrap.cfg', False, 'Foo/Cache/pc'),
pytest.param('Foo', 'pc', 'dev/bootstrap.cfg', True, None),
pytest.param('Foo', 'pc', 'dev/Cache/Foo/es3/bootstrap.cfg', True, None),
pytest.param('Foo', 'pc', 'Foo/Cache/es3/bootstrap.cfg', True, None),
pytest.param('Foo', 'pc', 'dev/bootstrap.cfg', False, common.LmbrCmdError),
pytest.param('Foo', 'pc', 'dev/Cache/Foo/es3/bootstrap.cfg', False, common.LmbrCmdError),
pytest.param('Foo', 'pc', 'Foo/Cache/es3/bootstrap.cfg', False, common.LmbrCmdError),
]
)
def test_construct_and_validate_cache_game_asset_folder_success(tmpdir, game_name, asset_type, ensure_path, warn_on_missing, expected_result):
def test_construct_and_validate_cache_game_asset_folder_success(tmpdir, project_path, asset_type, ensure_path, warn_on_missing, expected_result):
tmpdir.ensure(ensure_path)
dev_root_realpath = str(tmpdir.join('dev').realpath())
if isinstance(expected_result, str):
expected_path_realpath = str(tmpdir.join(expected_result).realpath())
elif expected_result == common.LmbrCmdError:
@@ -236,10 +230,9 @@ def test_construct_and_validate_cache_game_asset_folder_success(tmpdir, game_nam
expected_path_realpath = None
try:
result = layout_tool.construct_and_validate_cache_game_asset_folder(dev_root=dev_root_realpath,
game_name=game_name,
result = layout_tool.construct_and_validate_cache_project_asset_folder(project_path=project_path,
asset_type=asset_type,
warn_on_missing_game_cache=warn_on_missing)
warn_on_missing_project_cache=warn_on_missing)
assert expected_result != common.LmbrCmdError, "Expecting an error result"
if result == None:
@@ -273,31 +266,22 @@ def test_sync_layout_vfs_success(tmpdir, existing_temp_vfs_folder, existing_gems
try:
# Simple Test Parameters
test_dev_root = str(tmpdir.join('dev').realpath())
test_game = 'Foo'
test_engine_root = str(tmpdir.join('engine-root').realpath())
test_project_path = str(tmpdir.join('Foo').realpath())
test_project_name_lower = 'foo'
test_target_platform = 'bogus'
test_asset_type = 'pc'
game_folder = test_game.lower()
# Setup a test dev and game cache folder structure inside the temp folder
path_to_src_cache = 'dev/Cache/{}/pc'.format(test_game)
path_to_src_cache_config = '{}/{}/config'.format(path_to_src_cache, test_game.lower())
path_to_src_cache_config_file = '{}/game.xml'.format(path_to_src_cache_config)
tmpdir.ensure(path_to_src_cache_config_file)
# Make a dummy config file
config_file = tmpdir.join(path_to_src_cache_config_file)
config_file.write('<foo></foo>')
# Capture relevant real paths in the temp folder so we can verify our assertions
cache_game_folder = os.path.join(test_dev_root, 'Cache', test_game)
cache_game_folder = os.path.join(test_project_path, 'Cache')
cache_game_folder_gems = os.path.join(cache_game_folder, test_asset_type, 'gems')
path_to_src_config_realpath = str(tmpdir.join(path_to_src_cache_config).realpath())
layout_target_root_realpath = str(tmpdir.join('layout').realpath())
layout_target_gems_realpath = os.path.join(layout_target_root_realpath, 'gems')
layout_target_game_realpath = os.path.join(layout_target_root_realpath, test_game)
layout_target_game_realpath = os.path.join(layout_target_root_realpath)
# If we are optionally testing existing links in a layout folder, track the expected and actual rmdirs
actual_rmdir_paths = set()
@@ -331,8 +315,7 @@ def test_sync_layout_vfs_success(tmpdir, existing_temp_vfs_folder, existing_gems
# Predict the temp folder name
hasher = hashlib.md5()
hasher.update(test_dev_root.encode('UTF-8'))
hasher.update(game_folder.encode('UTF-8'))
hasher.update(test_project_path.encode('UTF-8'))
result = hasher.hexdigest()
tmp_folder_subfolder = 'ly-layout-{}'.format(result)
test_layout_folder = str(tmpdir.join('{}/vfs/foo'.format(tmp_folder_subfolder)).realpath())
@@ -347,7 +330,6 @@ def test_sync_layout_vfs_success(tmpdir, existing_temp_vfs_folder, existing_gems
os.rmdir = _mock_os_rmdir
mock_layout_tool_create_link_validation = {
os.path.normcase(path_to_src_config_realpath): os.path.normcase(test_layout_config_folder),
os.path.normcase(cache_game_folder_gems): os.path.normcase(layout_target_gems_realpath),
os.path.normcase(test_layout_folder): os.path.normcase(layout_target_game_realpath)
}
@@ -360,15 +342,14 @@ def test_sync_layout_vfs_success(tmpdir, existing_temp_vfs_folder, existing_gems
layout_tool.create_link = _mock_layout_tool_create_link
def _mock_copy_asset_files_to_layout(game_name, game_asset_folder, target_platform, layout_target):
def _mock_copy_asset_files_to_layout(project_path, project_asset_folder, target_platform, layout_target):
# Validate the correct call to copy asset files
assert target_platform == target_platform
assert os.path.normcase(layout_target) == os.path.normcase(layout_target_root_realpath)
layout_tool.copy_asset_files_to_layout = _mock_copy_asset_files_to_layout
layout_tool.sync_layout_vfs(dev_root = test_dev_root,
target_platform = test_target_platform,
game = test_game,
layout_tool.sync_layout_vfs(target_platform = test_target_platform,
project_path = test_project_path,
asset_type = test_asset_type,
warning_on_missing_assets = False,
layout_target = layout_target_root_realpath,
@@ -404,19 +385,19 @@ def test_sync_layout_non_vfs_success(tmpdir, mode, existing_game_link, existing_
old_remove_link = layout_tool.remove_link
try:
# Simple Test Parameters
tmpdir.ensure('dev/bootstrap.cfg')
dev_root_realpath = str(tmpdir.join('dev').realpath())
test_game = 'Foo'
tmpdir.ensure('engine-root/bootstrap.cfg')
engine_root_realpath = str(tmpdir.join('engine-root').realpath())
test_project_path = str(tmpdir.join('Foo').realpath())
test_project_name_lower = 'foo'
test_target_platform = 'bogus'
test_asset_type = 'pc'
game_folder = test_game.lower()
cache_game_folder_realpath = os.path.join(dev_root_realpath, 'Cache', test_game)
cache_game_folder_realpath = os.path.join(test_project_path, 'Cache')
# Make sure a dummy layout folder is created
tmpdir.ensure('layout/dummy.txt')
test_layout_target_realpath = str(tmpdir.join('layout').realpath())
test_layout_target_gems_realpath = os.path.join(test_layout_target_realpath, 'gems')
test_layout_target_game_realpath = os.path.join(test_layout_target_realpath, game_folder)
test_layout_target_game_realpath = os.path.join(test_layout_target_realpath,)
# If we are optionally testing existing links in a layout folder, track the expected and actual rmdirs
actual_rmdir_paths = set()
@@ -441,11 +422,13 @@ def test_sync_layout_non_vfs_success(tmpdir, mode, existing_game_link, existing_
if mode == 'PAK':
# In PAK Mode, the linking rules are slightly different. The 'game folder' link points to inside the pak folder, and there is no 'gems' link
if test_override_pak_folder:
test_game_asset_folder = os.path.join(dev_root_realpath, test_override_pak_folder, '{}_{}_paks'.format(game_folder, test_asset_type))
cache_game_folder_game_realpath = os.path.join(test_game_asset_folder, game_folder)
test_game_asset_folder = os.path.join(engine_root_realpath, test_override_pak_folder,
f'{test_project_name_lower}_{test_asset_type}_paks')
cache_game_folder_game_realpath = os.path.join(test_game_asset_folder)
else:
test_game_asset_folder = os.path.join(dev_root_realpath, 'Pak', '{}_{}_paks'.format(game_folder, test_asset_type))
cache_game_folder_game_realpath = os.path.join(test_game_asset_folder, game_folder)
test_game_asset_folder = os.path.join(engine_root_realpath, 'Pak',
f'{test_project_name_lower}_{test_asset_type}_paks')
cache_game_folder_game_realpath = os.path.join(test_game_asset_folder)
mock_layout_tool_create_link_validation[os.path.normcase(cache_game_folder_game_realpath)] = os.path.normcase(test_layout_target_game_realpath)
@@ -460,7 +443,7 @@ def test_sync_layout_non_vfs_success(tmpdir, mode, existing_game_link, existing_
test_game_asset_folder = os.path.join(cache_game_folder_realpath, test_asset_type)
cache_game_folder_gems_realpath = os.path.join(cache_game_folder_realpath, test_asset_type, 'gems')
cache_game_folder_game_realpath = os.path.join(cache_game_folder_realpath, test_asset_type, game_folder)
cache_game_folder_game_realpath = os.path.join(cache_game_folder_realpath, test_asset_type)
mock_layout_tool_create_link_validation[os.path.normcase(cache_game_folder_gems_realpath)] = os.path.normcase(test_layout_target_gems_realpath)
mock_layout_tool_create_link_validation[os.path.normcase(cache_game_folder_game_realpath)] = os.path.normcase(test_layout_target_game_realpath)
@@ -468,8 +451,8 @@ def test_sync_layout_non_vfs_success(tmpdir, mode, existing_game_link, existing_
assert False, "Invalid Mode {}".format(mode)
os.makedirs(test_game_asset_folder, exist_ok=True)
def _mock_copy_asset_files_to_layout(game_name, game_asset_folder, target_platform, layout_target):
assert os.path.normcase(game_asset_folder) == os.path.normcase(test_game_asset_folder)
def _mock_copy_asset_files_to_layout(project_path, project_asset_folder, target_platform, layout_target):
assert os.path.normcase(project_asset_folder) == os.path.normcase(test_game_asset_folder)
assert target_platform == test_target_platform
assert layout_target == test_layout_target_realpath
layout_tool.copy_asset_files_to_layout = _mock_copy_asset_files_to_layout
@@ -483,8 +466,7 @@ def test_sync_layout_non_vfs_success(tmpdir, mode, existing_game_link, existing_
layout_tool.sync_layout_non_vfs(mode = mode,
target_platform = test_target_platform,
dev_root = dev_root_realpath,
game = test_game,
project_path = test_project_path,
asset_type = test_asset_type,
warning_on_missing_assets = False,
layout_target = test_layout_target_realpath,
+1 -1
View File
@@ -70,7 +70,7 @@ set(test_json_template [[
set(test_module_template [[
"@stripped_test_target@":
{
"Module":"$<TARGET_FILE_NAME:@namespace_and_target@>"
"Modules":["$<TARGET_FILE_NAME:@namespace_and_target@>"]
}]]
)
+2 -3
View File
@@ -55,7 +55,6 @@ def getGemCMakeListsTemplate():
ly_add_target(
NAME {GEM_NAME} ${PAL_TRAIT_MONOLITHIC_DRIVEN_MODULE_TYPE}
NAMESPACE Gem
OUTPUT_NAME Gem.{GEM_NAME}.{GEM_UUID}.v{GEM_VERSION}
FILES_CMAKE
{GEM_NAME_LOWERCASE}_shared_files.cmake
INCLUDE_DIRECTORIES
@@ -70,9 +69,9 @@ ly_add_target(
if(PAL_TRAIT_BUILD_HOST_TOOLS)
ly_add_target(
NAME {GEM_NAME}.Editor MODULE
NAME {GEM_NAME}.Editor GEM_MODULE
NAMESPACE Gem
OUTPUT_NAME Gem.{GEM_NAME}.Editor.{GEM_UUID}.v{GEM_VERSION}
FILES_CMAKE
{GEM_NAME_LOWERCASE}_editor_files.cmake
INCLUDE_DIRECTORIES
+2 -3
View File
@@ -38,7 +38,6 @@ def getProjectGemCMakeListsTemplate():
ly_add_target(
NAME {GEM_NAME} ${PAL_TRAIT_MONOLITHIC_DRIVEN_MODULE_TYPE}
NAMESPACE Gem
OUTPUT_NAME Gem.{GEM_NAME}.{GEM_UUID}.v{GEM_VERSION}
FILES_CMAKE
{GEM_NAME_LOWERCASE}_shared_files.cmake
INCLUDE_DIRECTORIES
@@ -53,9 +52,9 @@ ly_add_target(
if(PAL_TRAIT_BUILD_HOST_TOOLS)
ly_add_target(
NAME {GEM_NAME}.Editor MODULE
NAME {GEM_NAME}.Editor GEM_MODULE
NAMESPACE Gem
OUTPUT_NAME Gem.{GEM_NAME}.Editor.{GEM_UUID}.v{GEM_VERSION}
FILES_CMAKE
{GEM_NAME_LOWERCASE}_editor_files.cmake
INCLUDE_DIRECTORIES
+1 -1
View File
@@ -22,7 +22,7 @@
# EditorPythonBindings need to be enabled for the project we launch
execute_process(
COMMAND ${CMD_ARG_EDITOR} -NullRenderer --skipWelcomeScreenDialog --autotest_mode --regset="/Amazon/AzCore/Bootstrap/sys_game_folder=${CMD_ARG_TEST_PROJECT}" --runpython ${CMD_ARG_PYTHON_SCRIPT}
COMMAND ${CMD_ARG_EDITOR} -NullRenderer --skipWelcomeScreenDialog --autotest_mode --regset="/Amazon/AzCore/Bootstrap/project_path=${CMD_ARG_TEST_PROJECT}" --runpython ${CMD_ARG_PYTHON_SCRIPT}
TIMEOUT 1800
RESULT_VARIABLE TEST_CMD_RESULT
)