diff --git a/AutomatedTesting/CMakeLists.txt b/AutomatedTesting/CMakeLists.txt index 1c5382ba4b..9621c0accb 100644 --- a/AutomatedTesting/CMakeLists.txt +++ b/AutomatedTesting/CMakeLists.txt @@ -27,5 +27,4 @@ else() set_property(GLOBAL APPEND PROPERTY LY_PROJECTS_TARGET_NAME ${project_target_name}) - add_subdirectory(Gem) endif() \ No newline at end of file diff --git a/AutomatedTesting/Gem/CMakeLists.txt b/AutomatedTesting/Gem/CMakeLists.txt index 7a411544ec..e3d8a4087a 100644 --- a/AutomatedTesting/Gem/CMakeLists.txt +++ b/AutomatedTesting/Gem/CMakeLists.txt @@ -6,6 +6,9 @@ # # +set(gem_path ${CMAKE_CURRENT_LIST_DIR}) +set(gem_json ${gem_path}/gem.json) +o3de_restricted_path(${gem_json} gem_restricted_path gem_parent_relative_path) + add_subdirectory(Code) -add_subdirectory(PythonTests) -add_subdirectory(PythonCoverage) +add_subdirectory(PythonTests) \ No newline at end of file diff --git a/AutomatedTesting/Gem/Code/CMakeLists.txt b/AutomatedTesting/Gem/Code/CMakeLists.txt index 8808507765..1a88d6e69a 100644 --- a/AutomatedTesting/Gem/Code/CMakeLists.txt +++ b/AutomatedTesting/Gem/Code/CMakeLists.txt @@ -6,7 +6,7 @@ # # -ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME}) +o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} ${gem_restricted_path} ${gem_path} ${gem_parent_relative_path}) ly_add_target( NAME AutomatedTesting ${PAL_TRAIT_MONOLITHIC_DRIVEN_MODULE_TYPE} diff --git a/AutomatedTesting/Gem/PythonCoverage/CMakeLists.txt b/AutomatedTesting/Gem/PythonCoverage/CMakeLists.txt index 2bb380fae3..50f9e78c74 100644 --- a/AutomatedTesting/Gem/PythonCoverage/CMakeLists.txt +++ b/AutomatedTesting/Gem/PythonCoverage/CMakeLists.txt @@ -6,4 +6,8 @@ # # +set(gem_path ${CMAKE_CURRENT_LIST_DIR}) +set(gem_json ${gem_path}/gem.json) +o3de_restricted_path(${gem_json} gem_restricted_path gem_parent_relative_path) + add_subdirectory(Code) diff --git a/AutomatedTesting/Gem/PythonCoverage/Code/CMakeLists.txt b/AutomatedTesting/Gem/PythonCoverage/Code/CMakeLists.txt index a865ccc49f..ea6db88c1c 100644 --- a/AutomatedTesting/Gem/PythonCoverage/Code/CMakeLists.txt +++ b/AutomatedTesting/Gem/PythonCoverage/Code/CMakeLists.txt @@ -6,7 +6,7 @@ # # -ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} ${o3de_gem_restricted_path} ${o3de_gem_path} ${o3de_gem_name}) +o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} ${gem_restricted_path} ${gem_path} ${gem_parent_relative_path}) include(${pal_dir}/PAL_${PAL_PLATFORM_NAME_LOWERCASE}.cmake) if(PAL_TRAIT_PYTHONCOVERAGE_SUPPORTED) diff --git a/AutomatedTesting/Gem/PythonCoverage/gem.json b/AutomatedTesting/Gem/PythonCoverage/gem.json index b99ce0daad..681696d78e 100644 --- a/AutomatedTesting/Gem/PythonCoverage/gem.json +++ b/AutomatedTesting/Gem/PythonCoverage/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Tool", "summary": "A tool for generating gem coverage for Python tests.", "canonical_tags": [ @@ -13,5 +14,8 @@ "PythonCoverage" ], "icon_path": "preview.png", - "requirements": "" + "requirements": "", + "documentation_url": "", + "dependencies": [ + ] } diff --git a/AutomatedTesting/Gem/PythonTests/Blast/CMakeLists.txt b/AutomatedTesting/Gem/PythonTests/Blast/CMakeLists.txt index aea2562e0b..64effb5b4c 100644 --- a/AutomatedTesting/Gem/PythonTests/Blast/CMakeLists.txt +++ b/AutomatedTesting/Gem/PythonTests/Blast/CMakeLists.txt @@ -6,7 +6,7 @@ # # -ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME}) +o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} ${gem_restricted_path} ${gem_path} ${gem_parent_relative_path}) include(${pal_dir}/PAL_${PAL_PLATFORM_NAME_LOWERCASE}.cmake) # for PAL_TRAIT_BLAST Traits diff --git a/AutomatedTesting/Gem/PythonTests/CMakeLists.txt b/AutomatedTesting/Gem/PythonTests/CMakeLists.txt index 800f347359..26c03e78c2 100644 --- a/AutomatedTesting/Gem/PythonTests/CMakeLists.txt +++ b/AutomatedTesting/Gem/PythonTests/CMakeLists.txt @@ -10,7 +10,7 @@ # Automated Tests ################################################################################ -ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME}) +o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} ${gem_restricted_path} ${gem_path} ${gem_parent_relative_path}) include(${pal_dir}/PAL_traits_${PAL_PLATFORM_NAME_LOWERCASE}.cmake) diff --git a/AutomatedTesting/Gem/PythonTests/WhiteBox/CMakeLists.txt b/AutomatedTesting/Gem/PythonTests/WhiteBox/CMakeLists.txt index 733e8edf29..d4554ee84b 100644 --- a/AutomatedTesting/Gem/PythonTests/WhiteBox/CMakeLists.txt +++ b/AutomatedTesting/Gem/PythonTests/WhiteBox/CMakeLists.txt @@ -6,7 +6,7 @@ # # -ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME}) +o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} ${gem_restricted_path} ${gem_path} ${gem_parent_relative_path}) include(${pal_dir}/PAL_${PAL_PLATFORM_NAME_LOWERCASE}.cmake) # for PAL_TRAIT_WHITEBOX Traits diff --git a/AutomatedTesting/Gem/Sponza/gem.json b/AutomatedTesting/Gem/Sponza/gem.json index 68749cd5f4..f36b22a805 100644 --- a/AutomatedTesting/Gem/Sponza/gem.json +++ b/AutomatedTesting/Gem/Sponza/gem.json @@ -4,14 +4,19 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Asset", "summary": "A standard test scene for Global Illumination (forked from crytek sponza scene)", "canonical_tags": [ - "Gem" + "Gem", + "Asset" ], "user_tags": [ - "Assets" + "Sponza" ], + "icon_path": "preview.png", "requirements": "", - "dependencies": [] + "documentation_url": "", + "dependencies": [ + ] } diff --git a/AutomatedTesting/Gem/gem.json b/AutomatedTesting/Gem/gem.json index df197df09d..90a0c8cb01 100644 --- a/AutomatedTesting/Gem/gem.json +++ b/AutomatedTesting/Gem/gem.json @@ -3,13 +3,21 @@ "display_name": "AutomatedTesting", "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", - "origin": "Amazon Web Services, Inc.", + "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", "summary": "Project Gem for customizing the AutomatedTesting project functionality.", "canonical_tags": [ "Gem" ], - "user_tags": [], + "user_tags": [ + "AutomatedTesting" + ], "icon_path": "preview.png", - "requirements": "" + "requirements": "", + "documentation_url": "", + "dependencies": [], + "external_subdirectories": [ + "PythonCoverage" + ] } diff --git a/AutomatedTesting/project.json b/AutomatedTesting/project.json index fc14645d2b..5a4b303570 100644 --- a/AutomatedTesting/project.json +++ b/AutomatedTesting/project.json @@ -5,12 +5,15 @@ "modules": [], "project_id": "{D816AFAE-4BB7-4FEF-88F4-E2B786DCF29D}", "android_settings": { - "package_name": "com.lumberyard.yourgame", + "package_name": "org.o3de.automatedtesting", "version_number": 1, "version_name": "1.0.0", "orientation": "landscape" }, "engine": "o3de", "display_name": "AutomatedTesting", - "icon_path": "preview.png" -} + "icon_path": "preview.png", + "external_subdirectories": [ + "Gem" + ] +} \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index f61a9561e8..c81581fe0f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -49,21 +49,56 @@ include(cmake/O3DEJson.cmake) # Subdirectory processing ################################################################################ -function(add_engine_json_external_subdirectories) - read_json_external_subdirs(external_subdis ${LY_ROOT_FOLDER}/engine.json) - foreach(external_subdir ${external_subdis}) - file(REAL_PATH ${external_subdir} real_external_subdir BASE_DIRECTORY ${LY_ROOT_FOLDER}) - list(APPEND engine_external_subdirs ${real_external_subdir}) - endforeach() +# this function is building up the LY_EXTERNAL_SUBDIRS global property +function(add_engine_gem_json_external_subdirectories gem_path) + set(gem_json_path ${gem_path}/gem.json) + if(EXISTS ${gem_json_path}) + read_json_external_subdirs(gem_external_subdirs ${gem_path}/gem.json) + foreach(gem_external_subdir ${gem_external_subdirs}) + file(REAL_PATH ${gem_external_subdir} real_external_subdir BASE_DIRECTORY ${gem_path}) + set_property(GLOBAL APPEND PROPERTY LY_EXTERNAL_SUBDIRS ${real_external_subdir}) + add_engine_gem_json_external_subdirectories(${real_external_subdir}) + endforeach() + endif() +endfunction() - set_property(GLOBAL APPEND PROPERTY LY_EXTERNAL_SUBDIRS ${engine_external_subdirs}) +function(add_engine_json_external_subdirectories) + read_json_external_subdirs(engine_external_subdirs ${LY_ROOT_FOLDER}/engine.json) + foreach(engine_external_subdir ${engine_external_subdirs}) + file(REAL_PATH ${engine_external_subdir} real_external_subdir BASE_DIRECTORY ${LY_ROOT_FOLDER}) + set_property(GLOBAL APPEND PROPERTY LY_EXTERNAL_SUBDIRS ${real_external_subdir}) + add_engine_gem_json_external_subdirectories(${real_external_subdir}) + endforeach() +endfunction() + +function(add_subdirectory_on_externalsubdirs) + get_property(external_subdirs GLOBAL PROPERTY LY_EXTERNAL_SUBDIRS) + list(APPEND LY_EXTERNAL_SUBDIRS ${external_subdirs}) + # Loop over the additional external subdirectories and invoke add_subdirectory on them + foreach(external_directory ${LY_EXTERNAL_SUBDIRS}) + # Hash the external_directory name and append it to the Binary Directory section of add_subdirectory + # This is to deal with potential situations where multiple external directories has the same last directory name + # For example if D:/Company1/RayTracingGem and F:/Company2/Path/RayTracingGem were both added as a subdirectory + file(REAL_PATH ${external_directory} full_directory_path) + 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) + # Use the last directory as the suffix path to use for the Binary Directory + get_filename_component(directory_name ${external_directory} NAME) + add_subdirectory(${external_directory} ${CMAKE_BINARY_DIR}/External/${directory_name}-${full_directory_hash}) + endforeach() endfunction() # Add the projects first so the Launcher can find them include(cmake/Projects.cmake) if(NOT INSTALLED_ENGINE) - + # Add external subdirectories listed in the engine.json. LY_EXTERNAL_SUBDIRS is a cache variable so the user can add extra + # external subdirectories. This should go before adding the rest of the targets so the targets are availbe to the launcher. + add_engine_json_external_subdirectories() + add_subdirectory_on_externalsubdirs() + # Add the rest of the targets add_subdirectory(Assets) add_subdirectory(Code) @@ -73,31 +108,11 @@ if(NOT INSTALLED_ENGINE) add_subdirectory(Templates) add_subdirectory(Tools) - # Add external subdirectories listed in the engine.json. LY_EXTERNAL_SUBDIRS is a cache variable so the user can add extra - # external subdirectories - add_engine_json_external_subdirectories() else() ly_find_o3de_packages() + add_subdirectory_on_externalsubdirs() endif() -get_property(external_subdirs GLOBAL PROPERTY LY_EXTERNAL_SUBDIRS) -list(APPEND LY_EXTERNAL_SUBDIRS ${external_subdirs}) - -# Loop over the additional external subdirectories and invoke add_subdirectory on them -foreach(external_directory ${LY_EXTERNAL_SUBDIRS}) - # Hash the extenal_directory name and append it to the Binary Directory section of add_subdirectory - # This is to deal with potential situations where multiple external directories has the same last directory name - # For example if D:/Company1/RayTracingGem and F:/Company2/Path/RayTracingGem were both added as a subdirectory - file(REAL_PATH ${external_directory} full_directory_path) - 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) - # Use the last directory as the suffix path to use for the Binary Directory - get_filename_component(directory_name ${external_directory} NAME) - add_subdirectory(${external_directory} ${CMAKE_BINARY_DIR}/External/${directory_name}-${full_directory_hash}) -endforeach() - ################################################################################ # Post-processing ################################################################################ diff --git a/Code/Editor/CMakeLists.txt b/Code/Editor/CMakeLists.txt index 3358b49dce..9d74f8e3a2 100644 --- a/Code/Editor/CMakeLists.txt +++ b/Code/Editor/CMakeLists.txt @@ -63,7 +63,7 @@ ly_add_target( set(pal_cmake_files "") foreach(enabled_platform ${LY_PAL_TOOLS_ENABLED}) string(TOLOWER ${enabled_platform} enabled_platform_lowercase) - ly_get_list_relative_pal_filename(pal_cmake_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${enabled_platform}) + o3de_pal_dir(pal_cmake_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${enabled_platform} ${O3DE_ENGINE_RESTRICTED_PATH} ${LY_ROOT_FOLDER}) list(APPEND pal_cmake_files ${pal_cmake_dir}/editor_lib_${enabled_platform_lowercase}_files.cmake) endforeach() diff --git a/Code/Framework/AzCore/CMakeLists.txt b/Code/Framework/AzCore/CMakeLists.txt index 838142f0df..01f4086a18 100644 --- a/Code/Framework/AzCore/CMakeLists.txt +++ b/Code/Framework/AzCore/CMakeLists.txt @@ -9,8 +9,8 @@ # TODO: would like to be able to build from this path, however, the whole setup is done at the workspace's root # we also dont want to drop cmake output files everywhere. -ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME}) -ly_get_list_relative_pal_filename(common_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/Common) +o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} ${O3DE_ENGINE_RESTRICTED_PATH} ${LY_ROOT_FOLDER}) +set(common_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/Common) if(PAL_TRAIT_PROF_PIX_SUPPORTED) set(LY_PIX_ENABLED OFF CACHE BOOL "Enables PIX profiler integration.") @@ -110,15 +110,15 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED) AZ::AzTest ) - ly_get_list_relative_pal_filename(pal_test_dir ${CMAKE_CURRENT_LIST_DIR}/Tests/Platform/${PAL_PLATFORM_NAME}) + o3de_pal_dir(pal_tests_dir ${CMAKE_CURRENT_LIST_DIR}/Tests/Platform/${PAL_PLATFORM_NAME} ${O3DE_ENGINE_RESTRICTED_PATH} ${LY_ROOT_FOLDER}) ly_add_target( NAME AzCore.Tests ${PAL_TRAIT_TEST_TARGET_TYPE} NAMESPACE AZ FILES_CMAKE Tests/azcoretests_files.cmake - ${pal_test_dir}/platform_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake + ${pal_tests_dir}/platform_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake PLATFORM_INCLUDE_FILES - ${pal_test_dir}/platform_${PAL_PLATFORM_NAME_LOWERCASE}.cmake + ${pal_tests_dir}/platform_${PAL_PLATFORM_NAME_LOWERCASE}.cmake INCLUDE_DIRECTORIES PRIVATE Tests diff --git a/Code/Framework/AzFramework/CMakeLists.txt b/Code/Framework/AzFramework/CMakeLists.txt index 9f30d23a19..bd7af2724e 100644 --- a/Code/Framework/AzFramework/CMakeLists.txt +++ b/Code/Framework/AzFramework/CMakeLists.txt @@ -8,8 +8,8 @@ include(AzFramework/feature_options.cmake) -ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME}) -ly_get_list_relative_pal_filename(common_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/Common) +o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} ${O3DE_ENGINE_RESTRICTED_PATH} ${LY_ROOT_FOLDER}) +set(common_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/Common) ly_add_target( NAME AzFramework STATIC @@ -44,7 +44,7 @@ ly_add_source_properties( if(PAL_TRAIT_BUILD_TESTS_SUPPORTED) - ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Tests/Platform/${PAL_PLATFORM_NAME}) + o3de_pal_dir(test_pal_dir ${CMAKE_CURRENT_LIST_DIR}/Tests/Platform/${PAL_PLATFORM_NAME} ${O3DE_ENGINE_RESTRICTED_PATH} ${LY_ROOT_FOLDER}) ly_add_target( NAME AzFrameworkTestShared STATIC @@ -86,11 +86,11 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED) NAMESPACE AZ FILES_CMAKE Tests/frameworktests_files.cmake - ${pal_dir}/platform_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake + ${test_pal_dir}/platform_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake INCLUDE_DIRECTORIES PRIVATE Tests - ${pal_dir} + ${test_pal_dir} BUILD_DEPENDENCIES PRIVATE AZ::AzFramework @@ -104,7 +104,7 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED) NAME AZ::AzFramework.Tests ) - include(${pal_dir}/platform_specific_test_targets.cmake) + include(${test_pal_dir}/platform_specific_test_targets.cmake) endif() diff --git a/Code/Framework/AzNetworking/CMakeLists.txt b/Code/Framework/AzNetworking/CMakeLists.txt index a0a3871201..ba2eecd023 100644 --- a/Code/Framework/AzNetworking/CMakeLists.txt +++ b/Code/Framework/AzNetworking/CMakeLists.txt @@ -6,8 +6,8 @@ # # -ly_get_list_relative_pal_filename(common_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/Common) -ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME}) +o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} ${O3DE_ENGINE_RESTRICTED_PATH} ${LY_ROOT_FOLDER}) +set(common_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/Common) ly_add_target( NAME AzNetworking STATIC diff --git a/Code/Framework/AzQtComponents/CMakeLists.txt b/Code/Framework/AzQtComponents/CMakeLists.txt index a24b68bcd7..76850e196b 100644 --- a/Code/Framework/AzQtComponents/CMakeLists.txt +++ b/Code/Framework/AzQtComponents/CMakeLists.txt @@ -10,7 +10,7 @@ if(NOT PAL_TRAIT_BUILD_HOST_TOOLS) return() endif() -ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME}) +o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} ${O3DE_ENGINE_RESTRICTED_PATH} ${LY_ROOT_FOLDER}) ly_add_target( NAME AzQtComponents SHARED diff --git a/Code/Framework/AzTest/CMakeLists.txt b/Code/Framework/AzTest/CMakeLists.txt index 95e444a1e9..2edc80f893 100644 --- a/Code/Framework/AzTest/CMakeLists.txt +++ b/Code/Framework/AzTest/CMakeLists.txt @@ -7,18 +7,18 @@ # if(NOT LY_MONOLITHIC_GAME) - ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/AzTest/Platform/${PAL_PLATFORM_NAME}) + o3de_pal_dir(pal_aztest_dir ${CMAKE_CURRENT_LIST_DIR}/AzTest/Platform/${PAL_PLATFORM_NAME} ${O3DE_ENGINE_RESTRICTED_PATH} ${LY_ROOT_FOLDER}) ly_add_target( NAME AzTest STATIC NAMESPACE AZ FILES_CMAKE AzTest/aztest_files.cmake - ${pal_dir}/platform_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake + ${pal_aztest_dir}/platform_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake INCLUDE_DIRECTORIES PUBLIC . - ${pal_dir} + ${pal_aztest_dir} BUILD_DEPENDENCIES PUBLIC 3rdParty::googletest::GMock @@ -26,6 +26,6 @@ if(NOT LY_MONOLITHIC_GAME) 3rdParty::GoogleBenchmark AZ::AzCore PLATFORM_INCLUDE_FILES - ${pal_dir}/platform_${PAL_PLATFORM_NAME_LOWERCASE}.cmake + ${pal_aztest_dir}/platform_${PAL_PLATFORM_NAME_LOWERCASE}.cmake ) endif() diff --git a/Code/Framework/GridMate/CMakeLists.txt b/Code/Framework/GridMate/CMakeLists.txt index 0da878081d..07c2f8b4a8 100644 --- a/Code/Framework/GridMate/CMakeLists.txt +++ b/Code/Framework/GridMate/CMakeLists.txt @@ -6,8 +6,8 @@ # # -ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME}) -ly_get_list_relative_pal_filename(common_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/Common) +o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} ${O3DE_ENGINE_RESTRICTED_PATH} ${LY_ROOT_FOLDER}) +set(common_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/Common) ly_add_target( NAME GridMate STATIC @@ -41,7 +41,7 @@ ly_add_source_properties( ################################################################################ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED) - ly_get_list_relative_pal_filename(pal_test_dir ${CMAKE_CURRENT_LIST_DIR}/Tests/Platform/${PAL_PLATFORM_NAME}) + o3de_pal_dir(pal_test_dir ${CMAKE_CURRENT_LIST_DIR}/Tests/Platform/${PAL_PLATFORM_NAME} ${O3DE_ENGINE_RESTRICTED_PATH} ${LY_ROOT_FOLDER}) ly_add_target( NAME GridMate.Tests ${PAL_TRAIT_TEST_TARGET_TYPE} NAMESPACE AZ diff --git a/Code/LauncherUnified/CMakeLists.txt b/Code/LauncherUnified/CMakeLists.txt index 845c2cd6c7..8097570462 100644 --- a/Code/LauncherUnified/CMakeLists.txt +++ b/Code/LauncherUnified/CMakeLists.txt @@ -6,7 +6,7 @@ # # -ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME}) +o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} ${O3DE_ENGINE_RESTRICTED_PATH} ${LY_ROOT_FOLDER}) include(${pal_dir}/LauncherUnified_traits_${PAL_PLATFORM_NAME_LOWERCASE}.cmake) diff --git a/Code/LauncherUnified/launcher_generator.cmake b/Code/LauncherUnified/launcher_generator.cmake index 550a67bc49..70bcf776af 100644 --- a/Code/LauncherUnified/launcher_generator.cmake +++ b/Code/LauncherUnified/launcher_generator.cmake @@ -201,7 +201,7 @@ function(ly_delayed_generate_static_modules_inl) foreach(game_gem_dependency ${all_game_gem_dependencies}) # Sometimes, a gem's Client variant may be an interface library - # which dependes on multiple gem targets. The interface libraries + # which depends on multiple gem targets. The interface libraries # should be skipped; the real dependencies of the interface will be processed if(TARGET ${game_gem_dependency}) get_target_property(target_type ${game_gem_dependency} TYPE) diff --git a/Code/Legacy/CryCommon/CMakeLists.txt b/Code/Legacy/CryCommon/CMakeLists.txt index 1556c6a099..629f26d217 100644 --- a/Code/Legacy/CryCommon/CMakeLists.txt +++ b/Code/Legacy/CryCommon/CMakeLists.txt @@ -6,7 +6,7 @@ # # -ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME}) +o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} ${O3DE_ENGINE_RESTRICTED_PATH} ${LY_ROOT_FOLDER}) ly_add_target( NAME CryCommon STATIC diff --git a/Code/Legacy/CrySystem/CMakeLists.txt b/Code/Legacy/CrySystem/CMakeLists.txt index ebfc866f4a..3153205b69 100644 --- a/Code/Legacy/CrySystem/CMakeLists.txt +++ b/Code/Legacy/CrySystem/CMakeLists.txt @@ -6,7 +6,7 @@ # # -ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME}) +o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} ${O3DE_ENGINE_RESTRICTED_PATH} ${LY_ROOT_FOLDER}) add_subdirectory(XML) diff --git a/Code/Tools/AWSNativeSDKInit/CMakeLists.txt b/Code/Tools/AWSNativeSDKInit/CMakeLists.txt index 57ee31d30d..04f61eb924 100644 --- a/Code/Tools/AWSNativeSDKInit/CMakeLists.txt +++ b/Code/Tools/AWSNativeSDKInit/CMakeLists.txt @@ -6,14 +6,14 @@ # # -ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/source/Platform/${PAL_PLATFORM_NAME}) +o3de_pal_dir(pal_source_dir ${CMAKE_CURRENT_LIST_DIR}/source/Platform/${PAL_PLATFORM_NAME} ${O3DE_ENGINE_RESTRICTED_PATH} ${LY_ROOT_FOLDER}) ly_add_target( NAME AWSNativeSDKInit STATIC NAMESPACE AZ FILES_CMAKE aws_native_sdk_init_files.cmake - ${pal_dir}/platform_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake + ${pal_source_dir}/platform_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake INCLUDE_DIRECTORIES PUBLIC include diff --git a/Code/Tools/AssetProcessor/AssetBuilderSDK/CMakeLists.txt b/Code/Tools/AssetProcessor/AssetBuilderSDK/CMakeLists.txt index bfbcc35663..f32d55844e 100644 --- a/Code/Tools/AssetProcessor/AssetBuilderSDK/CMakeLists.txt +++ b/Code/Tools/AssetProcessor/AssetBuilderSDK/CMakeLists.txt @@ -11,7 +11,7 @@ ly_get_pal_tool_dirs(pal_tool_dirs ${CMAKE_CURRENT_LIST_DIR}/AssetBuilderSDK/Pla set(pal_files "") foreach(enabled_platform ${LY_PAL_TOOLS_ENABLED}) string(TOLOWER ${enabled_platform} enabled_platform_lowercase) - ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/AssetBuilderSDK/Platform/${enabled_platform}) + o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/AssetBuilderSDK/Platform/${enabled_platform} ${O3DE_ENGINE_RESTRICTED_PATH} ${LY_ROOT_FOLDER}) list(APPEND pal_files ${pal_dir}/assetbuildersdk_${enabled_platform_lowercase}_files.cmake) endforeach() diff --git a/Code/Tools/AzTestRunner/CMakeLists.txt b/Code/Tools/AzTestRunner/CMakeLists.txt index 5f3bb829a8..2bd74fa1a1 100644 --- a/Code/Tools/AzTestRunner/CMakeLists.txt +++ b/Code/Tools/AzTestRunner/CMakeLists.txt @@ -6,7 +6,7 @@ # # -ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME}) +o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} ${O3DE_ENGINE_RESTRICTED_PATH} ${LY_ROOT_FOLDER}) include(${pal_dir}/platform_traits_${PAL_PLATFORM_NAME_LOWERCASE}.cmake) diff --git a/Code/Tools/CrashHandler/CMakeLists.txt b/Code/Tools/CrashHandler/CMakeLists.txt index 259a7d2891..db50741326 100644 --- a/Code/Tools/CrashHandler/CMakeLists.txt +++ b/Code/Tools/CrashHandler/CMakeLists.txt @@ -6,7 +6,7 @@ # # -ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME}) +o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} ${O3DE_ENGINE_RESTRICTED_PATH} ${LY_ROOT_FOLDER}) include(${pal_dir}/PAL_${PAL_PLATFORM_NAME_LOWERCASE}.cmake) diff --git a/Code/Tools/LuaIDE/CMakeLists.txt b/Code/Tools/LuaIDE/CMakeLists.txt index 98c8d7f04b..58e0fe505a 100644 --- a/Code/Tools/LuaIDE/CMakeLists.txt +++ b/Code/Tools/LuaIDE/CMakeLists.txt @@ -10,6 +10,8 @@ if(NOT PAL_TRAIT_BUILD_HOST_TOOLS) return() endif() +o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} ${O3DE_ENGINE_RESTRICTED_PATH} ${LY_ROOT_FOLDER}) + ly_add_target( NAME LuaIDE APPLICATION NAMESPACE AZ @@ -18,7 +20,7 @@ ly_add_target( AUTORCC FILES_CMAKE lua_ide_files.cmake - Platform/${PAL_PLATFORM_NAME}/lua_ide_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake + ${pal_dir}/lua_ide_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake INCLUDE_DIRECTORIES PRIVATE . diff --git a/Code/Tools/ProjectManager/Source/PythonBindings.cpp b/Code/Tools/ProjectManager/Source/PythonBindings.cpp index 35bdfe0031..7c436a3a70 100644 --- a/Code/Tools/ProjectManager/Source/PythonBindings.cpp +++ b/Code/Tools/ProjectManager/Source/PythonBindings.cpp @@ -1221,7 +1221,7 @@ namespace O3DE::ProjectManager auto result = ExecuteWithLockErrorHandling( [&] { - for (auto repoUri : m_manifest.attr("get_repos")()) + for (auto repoUri : m_manifest.attr("get_manifest_repos")()) { gemRepos.push_back(GetGemRepoInfo(repoUri)); } diff --git a/Code/Tools/RemoteConsole/CMakeLists.txt b/Code/Tools/RemoteConsole/CMakeLists.txt index d2685b2aea..b9a08650b6 100644 --- a/Code/Tools/RemoteConsole/CMakeLists.txt +++ b/Code/Tools/RemoteConsole/CMakeLists.txt @@ -6,7 +6,7 @@ # # -ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME}) +o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} ${O3DE_ENGINE_RESTRICTED_PATH} ${LY_ROOT_FOLDER}) ly_add_target( NAME RemoteConsoleCore STATIC diff --git a/Code/Tools/SceneAPI/SceneData/CMakeLists.txt b/Code/Tools/SceneAPI/SceneData/CMakeLists.txt index 5507ada2b9..0d4ef4a5df 100644 --- a/Code/Tools/SceneAPI/SceneData/CMakeLists.txt +++ b/Code/Tools/SceneAPI/SceneData/CMakeLists.txt @@ -10,7 +10,7 @@ if (NOT PAL_TRAIT_BUILD_HOST_TOOLS) return() endif() -ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME}) +o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} ${O3DE_ENGINE_RESTRICTED_PATH} ${LY_ROOT_FOLDER}) ly_add_target( NAME SceneData SHARED diff --git a/Code/Tools/TestImpactFramework/CMakeLists.txt b/Code/Tools/TestImpactFramework/CMakeLists.txt index 1cdf02d101..15d93b1a70 100644 --- a/Code/Tools/TestImpactFramework/CMakeLists.txt +++ b/Code/Tools/TestImpactFramework/CMakeLists.txt @@ -6,9 +6,9 @@ # # -ly_get_list_relative_pal_filename(pal_source_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME}) +o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} ${O3DE_ENGINE_RESTRICTED_PATH} ${LY_ROOT_FOLDER}) -include(${pal_source_dir}/PAL_${PAL_PLATFORM_NAME_LOWERCASE}.cmake) +include(${pal_dir}/PAL_${PAL_PLATFORM_NAME_LOWERCASE}.cmake) if(PAL_TRAIT_TEST_IMPACT_FRAMEWORK_SUPPORTED) add_subdirectory(Runtime) diff --git a/Code/Tools/TestImpactFramework/Runtime/Code/CMakeLists.txt b/Code/Tools/TestImpactFramework/Runtime/Code/CMakeLists.txt index 0b8432642a..f3262a26af 100644 --- a/Code/Tools/TestImpactFramework/Runtime/Code/CMakeLists.txt +++ b/Code/Tools/TestImpactFramework/Runtime/Code/CMakeLists.txt @@ -6,8 +6,8 @@ # # -ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME}) -ly_get_list_relative_pal_filename(common_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/Common) +o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME} ${O3DE_ENGINE_RESTRICTED_PATH} ${LY_ROOT_FOLDER}) +set(common_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/Common) ly_add_target( NAME TestImpact.Runtime.Static STATIC diff --git a/Gems/AWSClientAuth/CMakeLists.txt b/Gems/AWSClientAuth/CMakeLists.txt index 2bb380fae3..50f9e78c74 100644 --- a/Gems/AWSClientAuth/CMakeLists.txt +++ b/Gems/AWSClientAuth/CMakeLists.txt @@ -6,4 +6,8 @@ # # +set(gem_path ${CMAKE_CURRENT_LIST_DIR}) +set(gem_json ${gem_path}/gem.json) +o3de_restricted_path(${gem_json} gem_restricted_path gem_parent_relative_path) + add_subdirectory(Code) diff --git a/Gems/AWSClientAuth/Code/CMakeLists.txt b/Gems/AWSClientAuth/Code/CMakeLists.txt index 1f0c119f5a..ac9d221f07 100644 --- a/Gems/AWSClientAuth/Code/CMakeLists.txt +++ b/Gems/AWSClientAuth/Code/CMakeLists.txt @@ -6,7 +6,7 @@ # # -ly_get_list_relative_pal_filename(pal_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME}) +o3de_pal_dir(pal_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME} ${gem_restricted_path} ${gem_path} ${gem_parent_relative_path}) ly_add_target( NAME AWSClientAuth.Static STATIC diff --git a/Gems/AWSClientAuth/gem.json b/Gems/AWSClientAuth/gem.json index 9c7188f103..d6729cee99 100644 --- a/Gems/AWSClientAuth/gem.json +++ b/Gems/AWSClientAuth/gem.json @@ -3,7 +3,8 @@ "display_name": "AWS Client Authorization", "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", - "origin": "Amazon Web Services, Inc.", + "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", "summary": "AWS Client Auth provides client authentication and AWS authorization solution.", "canonical_tags": [ @@ -15,6 +16,7 @@ "SDK" ], "icon_path": "preview.png", + "requirements": "", "documentation_url": "https://o3de.org/docs/user-guide/gems/reference/aws/aws-client-auth/", "dependencies": [ "AWSCore", diff --git a/Gems/AWSCore/CMakeLists.txt b/Gems/AWSCore/CMakeLists.txt index 2bb380fae3..50f9e78c74 100644 --- a/Gems/AWSCore/CMakeLists.txt +++ b/Gems/AWSCore/CMakeLists.txt @@ -6,4 +6,8 @@ # # +set(gem_path ${CMAKE_CURRENT_LIST_DIR}) +set(gem_json ${gem_path}/gem.json) +o3de_restricted_path(${gem_json} gem_restricted_path gem_parent_relative_path) + add_subdirectory(Code) diff --git a/Gems/AWSCore/Code/CMakeLists.txt b/Gems/AWSCore/Code/CMakeLists.txt index 877696e26c..3911aefce6 100644 --- a/Gems/AWSCore/Code/CMakeLists.txt +++ b/Gems/AWSCore/Code/CMakeLists.txt @@ -6,7 +6,7 @@ # # -ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME}) +o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} ${gem_restricted_path} ${gem_path} ${gem_parent_relative_path}) ly_add_target( NAME AWSCore.Static STATIC @@ -61,7 +61,7 @@ ly_create_alias( if (PAL_TRAIT_BUILD_HOST_TOOLS) - include(${CMAKE_CURRENT_SOURCE_DIR}/Platform/${PAL_PLATFORM_NAME}/PAL_traits_editor_${PAL_PLATFORM_NAME_LOWERCASE}.cmake) + include(${pal_dir}/PAL_traits_editor_${PAL_PLATFORM_NAME_LOWERCASE}.cmake) ly_add_target( NAME AWSCore.Editor.Static STATIC diff --git a/Gems/AWSCore/gem.json b/Gems/AWSCore/gem.json index 3bced07e8d..3bc8e6f77c 100644 --- a/Gems/AWSCore/gem.json +++ b/Gems/AWSCore/gem.json @@ -3,7 +3,8 @@ "display_name": "AWS Core", "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", - "origin": "Amazon Web Services, Inc.", + "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", "summary": "The AWS Core Gem provides basic shared AWS functionality such as AWS SDK initialization and client configuration, and is automatically added when selecting any AWS feature Gem.", "canonical_tags": [ @@ -15,5 +16,8 @@ "SDK" ], "icon_path": "preview.png", - "documentation_url": "https://o3de.org/docs/user-guide/gems/reference/aws/aws-core/" + "requirements": "", + "documentation_url": "https://o3de.org/docs/user-guide/gems/reference/aws/aws-core/", + "dependencies": [ + ] } diff --git a/Gems/AWSGameLift/gem.json b/Gems/AWSGameLift/gem.json index 1ac65c4526..e1b80cb9fe 100644 --- a/Gems/AWSGameLift/gem.json +++ b/Gems/AWSGameLift/gem.json @@ -3,7 +3,8 @@ "display_name": "AWS GameLift", "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", - "origin": "Amazon Web Services, Inc.", + "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", "summary": "The AWS GameLift Gem provides a framework to extend O3DE networking layer to work with GameLift resources via GameLift server and client SDK.", "canonical_tags": [ @@ -12,7 +13,7 @@ "user_tags": [ "AWS", "Framework", - "Network", + "Network", "SDK" ], "icon_path": "preview.png", diff --git a/Gems/AWSMetrics/gem.json b/Gems/AWSMetrics/gem.json index 054c3624c4..bd462edec3 100644 --- a/Gems/AWSMetrics/gem.json +++ b/Gems/AWSMetrics/gem.json @@ -3,7 +3,8 @@ "display_name": "AWS Metrics", "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", - "origin": "Amazon Web Services, Inc.", + "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", "summary": "The AWS Metrics Gem provides a solution for AWS metrics submission and analytics.", "canonical_tags": [ @@ -15,6 +16,7 @@ "SDK" ], "icon_path": "preview.png", + "requirements": "", "documentation_url": "https://o3de.org/docs/user-guide/gems/reference/aws/aws-metrics/", "dependencies": [ "AWSCore" diff --git a/Gems/Achievements/CMakeLists.txt b/Gems/Achievements/CMakeLists.txt index 2bb380fae3..50f9e78c74 100644 --- a/Gems/Achievements/CMakeLists.txt +++ b/Gems/Achievements/CMakeLists.txt @@ -6,4 +6,8 @@ # # +set(gem_path ${CMAKE_CURRENT_LIST_DIR}) +set(gem_json ${gem_path}/gem.json) +o3de_restricted_path(${gem_json} gem_restricted_path gem_parent_relative_path) + add_subdirectory(Code) diff --git a/Gems/Achievements/Code/CMakeLists.txt b/Gems/Achievements/Code/CMakeLists.txt index 2d00ac2fb2..5ac43e9736 100644 --- a/Gems/Achievements/Code/CMakeLists.txt +++ b/Gems/Achievements/Code/CMakeLists.txt @@ -6,16 +6,16 @@ # # -ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_SOURCE_DIR}/Source/Platform/${PAL_PLATFORM_NAME}) +o3de_pal_dir(pal_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME} ${gem_restricted_path} ${gem_path} ${gem_parent_relative_path}) ly_add_target( NAME Achievements.Static STATIC NAMESPACE Gem PLATFORM_INCLUDE_FILES - ${pal_dir}/platform_${PAL_PLATFORM_NAME_LOWERCASE}.cmake + ${pal_source_dir}/platform_${PAL_PLATFORM_NAME_LOWERCASE}.cmake FILES_CMAKE achievements_files.cmake - ${pal_dir}/platform_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake + ${pal_source_dir}/platform_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake INCLUDE_DIRECTORIES PUBLIC Include diff --git a/Gems/Achievements/gem.json b/Gems/Achievements/gem.json index 8180584500..5fc83aefe2 100644 --- a/Gems/Achievements/gem.json +++ b/Gems/Achievements/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", "summary": "The Achievements Gem provides a target platform agnostic interface for retrieving achievement details and unlocking achievements.", "canonical_tags": [ diff --git a/Gems/AssetValidation/gem.json b/Gems/AssetValidation/gem.json index 55cdffb9f3..de1d36ffb4 100644 --- a/Gems/AssetValidation/gem.json +++ b/Gems/AssetValidation/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", "summary": "The Asset Validation Gem provides seed-related commands to ensure assets have valid seeds for asset bundling.", "canonical_tags": [ diff --git a/Gems/Atom/Asset/CMakeLists.txt b/Gems/Atom/Asset/CMakeLists.txt deleted file mode 100644 index 3ed20148a2..0000000000 --- a/Gems/Atom/Asset/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ -# -# Copyright (c) Contributors to the Open 3D Engine Project. -# For complete copyright and license terms please see the LICENSE at the root of this distribution. -# -# SPDX-License-Identifier: Apache-2.0 OR MIT -# -# - -add_subdirectory(ImageProcessingAtom) -add_subdirectory(Shader) diff --git a/Gems/Atom/Asset/ImageProcessingAtom/CMakeLists.txt b/Gems/Atom/Asset/ImageProcessingAtom/CMakeLists.txt index 54543a000a..92079d35be 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/CMakeLists.txt +++ b/Gems/Atom/Asset/ImageProcessingAtom/CMakeLists.txt @@ -7,4 +7,8 @@ # # +set(gem_path ${CMAKE_CURRENT_LIST_DIR}) +set(gem_json ${gem_path}/gem.json) +o3de_restricted_path(${gem_json} gem_restricted_path gem_parent_relative_path) + add_subdirectory(Code) diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Code/CMakeLists.txt b/Gems/Atom/Asset/ImageProcessingAtom/Code/CMakeLists.txt index 982ec43715..74876994f6 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Code/CMakeLists.txt +++ b/Gems/Atom/Asset/ImageProcessingAtom/Code/CMakeLists.txt @@ -26,15 +26,15 @@ set(pal_tools_include_dirs) foreach(enabled_platform ${LY_PAL_TOOLS_ENABLED}) string(TOLOWER ${enabled_platform} enabled_platform_lowercase) - ly_get_list_relative_pal_filename(pal_tools_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${enabled_platform}) + o3de_pal_dir(pal_tools_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${enabled_platform} ${gem_restricted_path} ${gem_path} ${gem_parent_relative_path}) list(APPEND pal_tools_include_dirs ${pal_tools_source_dir}) list(APPEND platform_tools_files ${pal_tools_source_dir}/pal_tools_${enabled_platform_lowercase}.cmake) list(APPEND pal_tools_include_files ${pal_tools_source_dir}/pal_tools_${enabled_platform_lowercase}_files.cmake) endforeach() -ly_get_list_relative_pal_filename(pal_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME}) -ly_get_list_relative_pal_filename(common_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/Common) +o3de_pal_dir(pal_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME} ${gem_restricted_path} ${gem_path} ${gem_parent_relative_path}) +set(common_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/Common) ly_add_target( NAME ImageProcessingAtom.Editor.Static STATIC diff --git a/Gems/Atom/Asset/ImageProcessingAtom/gem.json b/Gems/Atom/Asset/ImageProcessingAtom/gem.json index 4fd437d298..c2af4b7e7e 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/gem.json +++ b/Gems/Atom/Asset/ImageProcessingAtom/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", "summary": "", "canonical_tags": [ @@ -11,6 +12,7 @@ ], "user_tags": [], "requirements": "", + "documentation_url": "", "dependencies": [ "Atom_RPI", "Atom_RHI", diff --git a/Gems/Atom/Asset/Shader/CMakeLists.txt b/Gems/Atom/Asset/Shader/CMakeLists.txt index 2bb380fae3..50f9e78c74 100644 --- a/Gems/Atom/Asset/Shader/CMakeLists.txt +++ b/Gems/Atom/Asset/Shader/CMakeLists.txt @@ -6,4 +6,8 @@ # # +set(gem_path ${CMAKE_CURRENT_LIST_DIR}) +set(gem_json ${gem_path}/gem.json) +o3de_restricted_path(${gem_json} gem_restricted_path gem_parent_relative_path) + add_subdirectory(Code) diff --git a/Gems/Atom/Asset/Shader/Code/CMakeLists.txt b/Gems/Atom/Asset/Shader/Code/CMakeLists.txt index ed5aa45bbf..9ebd5e6d2d 100644 --- a/Gems/Atom/Asset/Shader/Code/CMakeLists.txt +++ b/Gems/Atom/Asset/Shader/Code/CMakeLists.txt @@ -10,8 +10,8 @@ if(NOT PAL_TRAIT_BUILD_HOST_TOOLS) return() endif() -ly_get_list_relative_pal_filename(pal_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME}) -ly_get_list_relative_pal_filename(common_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/Common) +o3de_pal_dir(pal_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME} ${gem_restricted_path} ${gem_path} ${gem_parent_relative_path}) +set(common_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/Common) include(${pal_source_dir}/PAL_${PAL_PLATFORM_NAME_LOWERCASE}.cmake) #for PAL_TRAIT_BUILD_ATOM_ASSET_SHADER_SUPPORTED @@ -71,7 +71,7 @@ ly_add_target( set(builder_tools_include_files) foreach(enabled_platform ${LY_PAL_TOOLS_ENABLED}) string(TOLOWER ${enabled_platform} enabled_platform_lowercase) - ly_get_list_relative_pal_filename(builder_tools_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${enabled_platform}) + o3de_pal_dir(builder_tools_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${enabled_platform} ${gem_restricted_path} ${gem_path} ${gem_parent_relative_path}) list(APPEND builder_tools_include_files ${builder_tools_source_dir}/platform_builders_${enabled_platform_lowercase}.cmake) endforeach() diff --git a/Gems/Atom/Asset/Shader/gem.json b/Gems/Atom/Asset/Shader/gem.json index 9f59c65f78..8b4ba4fb0d 100644 --- a/Gems/Atom/Asset/Shader/gem.json +++ b/Gems/Atom/Asset/Shader/gem.json @@ -4,13 +4,17 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", - "summary": "", + "summary": "Atom Shader Builder", "canonical_tags": [ "Gem" ], - "user_tags": [], + "user_tags": [ + "AtomShader" + ], "requirements": "", + "documentation_url": "", "dependencies": [ "Atom_RHI", "Atom_RPI" diff --git a/Gems/Atom/Bootstrap/CMakeLists.txt b/Gems/Atom/Bootstrap/CMakeLists.txt index 2bb380fae3..50f9e78c74 100644 --- a/Gems/Atom/Bootstrap/CMakeLists.txt +++ b/Gems/Atom/Bootstrap/CMakeLists.txt @@ -6,4 +6,8 @@ # # +set(gem_path ${CMAKE_CURRENT_LIST_DIR}) +set(gem_json ${gem_path}/gem.json) +o3de_restricted_path(${gem_json} gem_restricted_path gem_parent_relative_path) + add_subdirectory(Code) diff --git a/Gems/Atom/Bootstrap/Code/CMakeLists.txt b/Gems/Atom/Bootstrap/Code/CMakeLists.txt index fd9df96124..0ba8d17865 100644 --- a/Gems/Atom/Bootstrap/Code/CMakeLists.txt +++ b/Gems/Atom/Bootstrap/Code/CMakeLists.txt @@ -6,7 +6,7 @@ # # -ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME}) +o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME} ${gem_restricted_path} ${gem_path} ${gem_parent_relative_path}) ly_add_target( NAME Atom_Bootstrap.Headers HEADERONLY diff --git a/Gems/Atom/Bootstrap/gem.json b/Gems/Atom/Bootstrap/gem.json index df615366da..543efe0f34 100644 --- a/Gems/Atom/Bootstrap/gem.json +++ b/Gems/Atom/Bootstrap/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", "summary": "", "canonical_tags": [ @@ -11,6 +12,7 @@ ], "user_tags": [], "requirements": "", + "documentation_url": "", "dependencies": [ "Atom_RPI" ] diff --git a/Gems/Atom/CMakeLists.txt b/Gems/Atom/CMakeLists.txt index a71afa64e0..b5dd311e5a 100644 --- a/Gems/Atom/CMakeLists.txt +++ b/Gems/Atom/CMakeLists.txt @@ -6,12 +6,10 @@ # # -add_subdirectory(Asset) -add_subdirectory(Bootstrap) -add_subdirectory(Component) -add_subdirectory(Feature) -add_subdirectory(RHI) -add_subdirectory(RPI) +set(gem_path ${CMAKE_CURRENT_LIST_DIR}) +set(gem_json ${gem_path}/gem.json) +o3de_restricted_path(${gem_json} gem_restricted_path gem_parent_relative_path) + add_subdirectory(Tools) add_subdirectory(Utils) diff --git a/Gems/Atom/Component/CMakeLists.txt b/Gems/Atom/Component/CMakeLists.txt deleted file mode 100644 index 8b867b8c67..0000000000 --- a/Gems/Atom/Component/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -# -# Copyright (c) Contributors to the Open 3D Engine Project. -# For complete copyright and license terms please see the LICENSE at the root of this distribution. -# -# SPDX-License-Identifier: Apache-2.0 OR MIT -# -# - -add_subdirectory(DebugCamera) diff --git a/Gems/Atom/Component/DebugCamera/CMakeLists.txt b/Gems/Atom/Component/DebugCamera/CMakeLists.txt index 2bb380fae3..50f9e78c74 100644 --- a/Gems/Atom/Component/DebugCamera/CMakeLists.txt +++ b/Gems/Atom/Component/DebugCamera/CMakeLists.txt @@ -6,4 +6,8 @@ # # +set(gem_path ${CMAKE_CURRENT_LIST_DIR}) +set(gem_json ${gem_path}/gem.json) +o3de_restricted_path(${gem_json} gem_restricted_path gem_parent_relative_path) + add_subdirectory(Code) diff --git a/Gems/Atom/Component/DebugCamera/gem.json b/Gems/Atom/Component/DebugCamera/gem.json index 8eab74f41d..74d88a21b6 100644 --- a/Gems/Atom/Component/DebugCamera/gem.json +++ b/Gems/Atom/Component/DebugCamera/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", "summary": "", "canonical_tags": [ @@ -11,6 +12,7 @@ ], "user_tags": [], "requirements": "", + "documentation_url": "", "dependencies": [ "Atom_RPI" ] diff --git a/Gems/Atom/Feature/CMakeLists.txt b/Gems/Atom/Feature/CMakeLists.txt deleted file mode 100644 index 32d654d5c4..0000000000 --- a/Gems/Atom/Feature/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -# -# Copyright (c) Contributors to the Open 3D Engine Project. -# For complete copyright and license terms please see the LICENSE at the root of this distribution. -# -# SPDX-License-Identifier: Apache-2.0 OR MIT -# -# - -add_subdirectory(Common) diff --git a/Gems/Atom/Feature/Common/CMakeLists.txt b/Gems/Atom/Feature/Common/CMakeLists.txt index 2bb380fae3..50f9e78c74 100644 --- a/Gems/Atom/Feature/Common/CMakeLists.txt +++ b/Gems/Atom/Feature/Common/CMakeLists.txt @@ -6,4 +6,8 @@ # # +set(gem_path ${CMAKE_CURRENT_LIST_DIR}) +set(gem_json ${gem_path}/gem.json) +o3de_restricted_path(${gem_json} gem_restricted_path gem_parent_relative_path) + add_subdirectory(Code) diff --git a/Gems/Atom/Feature/Common/Code/CMakeLists.txt b/Gems/Atom/Feature/Common/Code/CMakeLists.txt index db9ac8560f..a832c46539 100644 --- a/Gems/Atom/Feature/Common/Code/CMakeLists.txt +++ b/Gems/Atom/Feature/Common/Code/CMakeLists.txt @@ -6,8 +6,8 @@ # # -ly_get_list_relative_pal_filename(pal_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME}) -ly_get_list_relative_pal_filename(common_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/Common) +o3de_pal_dir(pal_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME} ${gem_restricted_path} ${gem_path} ${gem_parent_relative_path}) +set(common_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/Common) ly_add_target( NAME Atom_Feature_Common.Static STATIC diff --git a/Gems/Atom/Feature/Common/gem.json b/Gems/Atom/Feature/Common/gem.json index 84ab07a9f9..f4c936dc4a 100644 --- a/Gems/Atom/Feature/Common/gem.json +++ b/Gems/Atom/Feature/Common/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", "summary": "", "canonical_tags": [ @@ -11,6 +12,7 @@ ], "user_tags": [], "requirements": "", + "documentation_url": "", "dependencies": [ "Atom_RPI", "Atom", diff --git a/Gems/Atom/RHI/CMakeLists.txt b/Gems/Atom/RHI/CMakeLists.txt index 074f6acfd7..5812828c1a 100644 --- a/Gems/Atom/RHI/CMakeLists.txt +++ b/Gems/Atom/RHI/CMakeLists.txt @@ -6,10 +6,10 @@ # # +set(gem_path ${CMAKE_CURRENT_LIST_DIR}) +set(gem_json ${gem_path}/gem.json) +o3de_restricted_path(${gem_json} gem_restricted_path gem_parent_relative_path) + ly_add_external_target_path(${CMAKE_CURRENT_LIST_DIR}/3rdParty) add_subdirectory(Code) -add_subdirectory(DX12) -add_subdirectory(Metal) -add_subdirectory(Vulkan) -add_subdirectory(Null) diff --git a/Gems/Atom/RHI/Code/CMakeLists.txt b/Gems/Atom/RHI/Code/CMakeLists.txt index 5238985feb..fe9db107a8 100644 --- a/Gems/Atom/RHI/Code/CMakeLists.txt +++ b/Gems/Atom/RHI/Code/CMakeLists.txt @@ -6,8 +6,8 @@ # # -ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME}) -ly_get_list_relative_pal_filename(pal_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME}) +o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} ${gem_restricted_path} ${gem_path} ${gem_parent_relative_path}) +o3de_pal_dir(pal_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME} ${gem_restricted_path} ${gem_path} ${gem_parent_relative_path}) include(${pal_dir}/AtomRHITests_traits_${PAL_PLATFORM_NAME_LOWERCASE}.cmake) diff --git a/Gems/Atom/RHI/DX12/CMakeLists.txt b/Gems/Atom/RHI/DX12/CMakeLists.txt index 51912a5ff0..5812828c1a 100644 --- a/Gems/Atom/RHI/DX12/CMakeLists.txt +++ b/Gems/Atom/RHI/DX12/CMakeLists.txt @@ -6,6 +6,10 @@ # # +set(gem_path ${CMAKE_CURRENT_LIST_DIR}) +set(gem_json ${gem_path}/gem.json) +o3de_restricted_path(${gem_json} gem_restricted_path gem_parent_relative_path) + ly_add_external_target_path(${CMAKE_CURRENT_LIST_DIR}/3rdParty) add_subdirectory(Code) diff --git a/Gems/Atom/RHI/DX12/Code/CMakeLists.txt b/Gems/Atom/RHI/DX12/Code/CMakeLists.txt index 975b838ffa..95118c60a7 100644 --- a/Gems/Atom/RHI/DX12/Code/CMakeLists.txt +++ b/Gems/Atom/RHI/DX12/Code/CMakeLists.txt @@ -6,8 +6,8 @@ # # -ly_get_list_relative_pal_filename(pal_include_dir ${CMAKE_CURRENT_LIST_DIR}/Include/Platform/${PAL_PLATFORM_NAME}) -ly_get_list_relative_pal_filename(pal_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME}) +o3de_pal_dir(pal_include_dir ${CMAKE_CURRENT_LIST_DIR}/Include/Platform/${PAL_PLATFORM_NAME} ${gem_restricted_path} ${gem_path} ${gem_parent_relative_path}) +o3de_pal_dir(pal_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME} ${gem_restricted_path} ${gem_path} ${gem_parent_relative_path}) include(${pal_source_dir}/PAL_${PAL_PLATFORM_NAME_LOWERCASE}.cmake) # PAL_TRAIT_ATOM_RHI_DX12_SUPPORTED @@ -23,7 +23,7 @@ set(pal_builder_tools_files) set(pal_builder_tools_includes) foreach(enabled_platform ${LY_PAL_TOOLS_ENABLED}) string(TOLOWER ${enabled_platform} enabled_platform_lowercase) - ly_get_list_relative_pal_filename(pal_builder_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${enabled_platform}) + o3de_pal_dir(pal_builder_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${enabled_platform} ${gem_restricted_path} ${gem_path} ${gem_parent_relative_path}) list(APPEND pal_builder_tools_includes ${pal_builder_source_dir}) list(APPEND pal_builder_tools_files ${pal_builder_source_dir}/platform_builders_${enabled_platform_lowercase}_tools_files.cmake) endforeach() diff --git a/Gems/Atom/RHI/DX12/gem.json b/Gems/Atom/RHI/DX12/gem.json index 868acd43db..803ae4f4d0 100644 --- a/Gems/Atom/RHI/DX12/gem.json +++ b/Gems/Atom/RHI/DX12/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", "summary": "", "canonical_tags": [ @@ -11,6 +12,7 @@ ], "user_tags": [], "requirements": "", + "documentation_url": "", "dependencies": [ "Atom_RHI" ] diff --git a/Gems/Atom/RHI/Metal/CMakeLists.txt b/Gems/Atom/RHI/Metal/CMakeLists.txt index 2bb380fae3..50f9e78c74 100644 --- a/Gems/Atom/RHI/Metal/CMakeLists.txt +++ b/Gems/Atom/RHI/Metal/CMakeLists.txt @@ -6,4 +6,8 @@ # # +set(gem_path ${CMAKE_CURRENT_LIST_DIR}) +set(gem_json ${gem_path}/gem.json) +o3de_restricted_path(${gem_json} gem_restricted_path gem_parent_relative_path) + add_subdirectory(Code) diff --git a/Gems/Atom/RHI/Metal/Code/CMakeLists.txt b/Gems/Atom/RHI/Metal/Code/CMakeLists.txt index 11876e0a30..3df00a30e0 100644 --- a/Gems/Atom/RHI/Metal/Code/CMakeLists.txt +++ b/Gems/Atom/RHI/Metal/Code/CMakeLists.txt @@ -6,8 +6,8 @@ # # -ly_get_list_relative_pal_filename(pal_include_dir ${CMAKE_CURRENT_LIST_DIR}/Include/Platform/${PAL_PLATFORM_NAME}) -ly_get_list_relative_pal_filename(pal_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME}) +o3de_pal_dir(pal_include_dir ${CMAKE_CURRENT_LIST_DIR}/Include/Platform/${PAL_PLATFORM_NAME} ${gem_restricted_path} ${gem_path} ${gem_parent_relative_path}) +o3de_pal_dir(pal_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME} ${gem_restricted_path} ${gem_path} ${gem_parent_relative_path}) include(${pal_source_dir}/PAL2_${PAL_PLATFORM_NAME_LOWERCASE}.cmake) diff --git a/Gems/Atom/RHI/Metal/gem.json b/Gems/Atom/RHI/Metal/gem.json index 6e983ba505..0257048bd3 100644 --- a/Gems/Atom/RHI/Metal/gem.json +++ b/Gems/Atom/RHI/Metal/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", "summary": "", "canonical_tags": [ @@ -11,6 +12,7 @@ ], "user_tags": [], "requirements": "", + "documentation_url": "", "dependencies": [ "Atom_RHI" ] diff --git a/Gems/Atom/RHI/Null/CMakeLists.txt b/Gems/Atom/RHI/Null/CMakeLists.txt index 2bb380fae3..50f9e78c74 100644 --- a/Gems/Atom/RHI/Null/CMakeLists.txt +++ b/Gems/Atom/RHI/Null/CMakeLists.txt @@ -6,4 +6,8 @@ # # +set(gem_path ${CMAKE_CURRENT_LIST_DIR}) +set(gem_json ${gem_path}/gem.json) +o3de_restricted_path(${gem_json} gem_restricted_path gem_parent_relative_path) + add_subdirectory(Code) diff --git a/Gems/Atom/RHI/Null/Code/CMakeLists.txt b/Gems/Atom/RHI/Null/Code/CMakeLists.txt index 71df9f696f..081edd4c44 100644 --- a/Gems/Atom/RHI/Null/Code/CMakeLists.txt +++ b/Gems/Atom/RHI/Null/Code/CMakeLists.txt @@ -6,8 +6,8 @@ # # -ly_get_list_relative_pal_filename(pal_include_dir ${CMAKE_CURRENT_LIST_DIR}/Include/Platform/${PAL_PLATFORM_NAME}) -ly_get_list_relative_pal_filename(pal_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME}) +o3de_pal_dir(pal_include_dir ${CMAKE_CURRENT_LIST_DIR}/Include/Platform/${PAL_PLATFORM_NAME} ${gem_restricted_path} ${gem_path} ${gem_parent_relative_path}) +o3de_pal_dir(pal_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME} ${gem_restricted_path} ${gem_path} ${gem_parent_relative_path}) ly_add_target( diff --git a/Gems/Atom/RHI/Null/gem.json b/Gems/Atom/RHI/Null/gem.json index e9f22c5fcb..1ea2eb4cb0 100644 --- a/Gems/Atom/RHI/Null/gem.json +++ b/Gems/Atom/RHI/Null/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", "summary": "", "canonical_tags": [ @@ -11,6 +12,7 @@ ], "user_tags": [], "requirements": "", + "documentation_url": "", "dependencies": [ "Atom_RHI" ] diff --git a/Gems/Atom/RHI/Vulkan/CMakeLists.txt b/Gems/Atom/RHI/Vulkan/CMakeLists.txt index 51912a5ff0..5812828c1a 100644 --- a/Gems/Atom/RHI/Vulkan/CMakeLists.txt +++ b/Gems/Atom/RHI/Vulkan/CMakeLists.txt @@ -6,6 +6,10 @@ # # +set(gem_path ${CMAKE_CURRENT_LIST_DIR}) +set(gem_json ${gem_path}/gem.json) +o3de_restricted_path(${gem_json} gem_restricted_path gem_parent_relative_path) + ly_add_external_target_path(${CMAKE_CURRENT_LIST_DIR}/3rdParty) add_subdirectory(Code) diff --git a/Gems/Atom/RHI/Vulkan/Code/CMakeLists.txt b/Gems/Atom/RHI/Vulkan/Code/CMakeLists.txt index fb13d1fddb..674e5aff9e 100644 --- a/Gems/Atom/RHI/Vulkan/Code/CMakeLists.txt +++ b/Gems/Atom/RHI/Vulkan/Code/CMakeLists.txt @@ -6,8 +6,8 @@ # # -ly_get_list_relative_pal_filename(pal_include_dir ${CMAKE_CURRENT_LIST_DIR}/Include/Platform/${PAL_PLATFORM_NAME}) -ly_get_list_relative_pal_filename(pal_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME}) +o3de_pal_dir(pal_include_dir ${CMAKE_CURRENT_LIST_DIR}/Include/Platform/${PAL_PLATFORM_NAME} ${gem_restricted_path} ${gem_path} ${gem_parent_relative_path}) +o3de_pal_dir(pal_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME} ${gem_restricted_path} ${gem_path} ${gem_parent_relative_path}) include(${pal_source_dir}/PAL_${PAL_PLATFORM_NAME_LOWERCASE}.cmake) # PAL_TRAIT_ATOM_RHI_VULKAN_SUPPORTED / PAL_TRAIT_ATOM_RHI_VULKAN_TARGETS_ALREADY_DEFINED diff --git a/Gems/Atom/RHI/Vulkan/gem.json b/Gems/Atom/RHI/Vulkan/gem.json index 1dfeb9eafa..508ad85c75 100644 --- a/Gems/Atom/RHI/Vulkan/gem.json +++ b/Gems/Atom/RHI/Vulkan/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", "summary": "", "canonical_tags": [ @@ -11,6 +12,7 @@ ], "user_tags": [], "requirements": "", + "documentation_url": "", "dependencies": [ "Atom_RHI" ] diff --git a/Gems/Atom/RHI/gem.json b/Gems/Atom/RHI/gem.json index de46c312ad..858a64fc17 100644 --- a/Gems/Atom/RHI/gem.json +++ b/Gems/Atom/RHI/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", "summary": "", "canonical_tags": [ @@ -11,6 +12,12 @@ ], "user_tags": [], "requirements": "", + "external_subdirectories": [ + "DX12", + "Metal", + "Null", + "Vulkan" + ], "dependencies": [ "Atom_RHI_DX12", "Atom_RHI_Metal", diff --git a/Gems/Atom/RPI/CMakeLists.txt b/Gems/Atom/RPI/CMakeLists.txt index 6d148328ec..2c2cee5804 100644 --- a/Gems/Atom/RPI/CMakeLists.txt +++ b/Gems/Atom/RPI/CMakeLists.txt @@ -6,6 +6,10 @@ # # +set(gem_path ${CMAKE_CURRENT_LIST_DIR}) +set(gem_json ${gem_path}/gem.json) +o3de_restricted_path(${gem_json} gem_restricted_path gem_parent_relative_path) + add_subdirectory(Code) add_subdirectory(Tools) diff --git a/Gems/Atom/RPI/Code/CMakeLists.txt b/Gems/Atom/RPI/Code/CMakeLists.txt index f0459a23c2..dcdad13c10 100644 --- a/Gems/Atom/RPI/Code/CMakeLists.txt +++ b/Gems/Atom/RPI/Code/CMakeLists.txt @@ -6,7 +6,7 @@ # # -ly_get_list_relative_pal_filename(pal_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME}) +o3de_pal_dir(pal_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME} ${gem_restricted_path} ${gem_path} ${gem_parent_relative_path}) #for PAL_TRAIT_BUILD_ATOM_RPI_ASSETS_SUPPORTED and PAL_TRAIT_BUILD_ATOM_RPI_MASKED_OCCLUSION_CULLING_SUPPORTED include(${pal_source_dir}/PAL_${PAL_PLATFORM_NAME_LOWERCASE}.cmake) @@ -176,8 +176,8 @@ endif() if(PAL_TRAIT_BUILD_HOST_TOOLS) - ly_get_list_relative_pal_filename(pal_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME}) - ly_get_list_relative_pal_filename(common_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/Common) + o3de_pal_dir(pal_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME} ${gem_restricted_path} ${gem_path} ${gem_parent_relative_path}) + set(common_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/Common) if(NOT PAL_TRAIT_BUILD_ATOM_RPI_ASSETS_SUPPORTED) diff --git a/Gems/Atom/RPI/gem.json b/Gems/Atom/RPI/gem.json index 885f150508..0acef5179b 100644 --- a/Gems/Atom/RPI/gem.json +++ b/Gems/Atom/RPI/gem.json @@ -1,16 +1,18 @@ { "gem_name": "Atom_RPI", "display_name": "Atom API", - "summary": "", "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", + "summary": "", "canonical_tags": [ "Gem" ], "user_tags": [], "requirements": "", + "documentation_url": "", "dependencies": [ "Atom_RHI" ] diff --git a/Gems/Atom/Tools/AtomToolsFramework/CMakeLists.txt b/Gems/Atom/Tools/AtomToolsFramework/CMakeLists.txt index 2bb380fae3..50f9e78c74 100644 --- a/Gems/Atom/Tools/AtomToolsFramework/CMakeLists.txt +++ b/Gems/Atom/Tools/AtomToolsFramework/CMakeLists.txt @@ -6,4 +6,8 @@ # # +set(gem_path ${CMAKE_CURRENT_LIST_DIR}) +set(gem_json ${gem_path}/gem.json) +o3de_restricted_path(${gem_json} gem_restricted_path gem_parent_relative_path) + add_subdirectory(Code) diff --git a/Gems/Atom/Tools/AtomToolsFramework/Code/CMakeLists.txt b/Gems/Atom/Tools/AtomToolsFramework/Code/CMakeLists.txt index e7e8208722..0fc896e88a 100644 --- a/Gems/Atom/Tools/AtomToolsFramework/Code/CMakeLists.txt +++ b/Gems/Atom/Tools/AtomToolsFramework/Code/CMakeLists.txt @@ -10,7 +10,7 @@ if(NOT PAL_TRAIT_BUILD_HOST_TOOLS) return() endif() -ly_get_list_relative_pal_filename(pal_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME}) +o3de_pal_dir(pal_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME} ${gem_restricted_path} ${gem_path} ${gem_parent_relative_path}) ly_add_target( NAME AtomToolsFramework.Static STATIC diff --git a/Gems/Atom/Tools/AtomToolsFramework/gem.json b/Gems/Atom/Tools/AtomToolsFramework/gem.json index de2a9e06f2..6e5a7b311a 100644 --- a/Gems/Atom/Tools/AtomToolsFramework/gem.json +++ b/Gems/Atom/Tools/AtomToolsFramework/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", "summary": "", "canonical_tags": [ @@ -11,6 +12,7 @@ ], "user_tags": [], "requirements": "", + "documentation_url": "", "dependencies": [ "Atom_RPI", "Atom_RHI", diff --git a/Gems/Atom/Tools/CMakeLists.txt b/Gems/Atom/Tools/CMakeLists.txt index 653babd0b3..82a803bdef 100644 --- a/Gems/Atom/Tools/CMakeLists.txt +++ b/Gems/Atom/Tools/CMakeLists.txt @@ -6,6 +6,4 @@ # # -add_subdirectory(AtomToolsFramework) -add_subdirectory(MaterialEditor) add_subdirectory(ShaderManagementConsole) diff --git a/Gems/Atom/Tools/MaterialEditor/CMakeLists.txt b/Gems/Atom/Tools/MaterialEditor/CMakeLists.txt index 2bb380fae3..50f9e78c74 100644 --- a/Gems/Atom/Tools/MaterialEditor/CMakeLists.txt +++ b/Gems/Atom/Tools/MaterialEditor/CMakeLists.txt @@ -6,4 +6,8 @@ # # +set(gem_path ${CMAKE_CURRENT_LIST_DIR}) +set(gem_json ${gem_path}/gem.json) +o3de_restricted_path(${gem_json} gem_restricted_path gem_parent_relative_path) + add_subdirectory(Code) diff --git a/Gems/Atom/Tools/MaterialEditor/Code/CMakeLists.txt b/Gems/Atom/Tools/MaterialEditor/Code/CMakeLists.txt index 99beb721d6..1d9295f9b3 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/CMakeLists.txt +++ b/Gems/Atom/Tools/MaterialEditor/Code/CMakeLists.txt @@ -10,7 +10,7 @@ if(NOT PAL_TRAIT_BUILD_HOST_TOOLS) return() endif() -ly_get_list_relative_pal_filename(pal_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME}) +o3de_pal_dir(pal_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME} ${gem_restricted_path} ${gem_path} ${gem_parent_relative_path}) include(${pal_source_dir}/PAL_${PAL_PLATFORM_NAME_LOWERCASE}.cmake) # PAL_TRAIT_ATOM_MATERIAL_EDITOR_APPLICATION_SUPPORTED diff --git a/Gems/Atom/Tools/MaterialEditor/gem.json b/Gems/Atom/Tools/MaterialEditor/gem.json index 807e3fa65f..463553c27d 100644 --- a/Gems/Atom/Tools/MaterialEditor/gem.json +++ b/Gems/Atom/Tools/MaterialEditor/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Tool", "summary": "Editor for creating, modifying, and previewing materials", "canonical_tags": [ @@ -11,6 +12,7 @@ ], "user_tags": [], "requirements": "", + "documentation_url": "", "dependencies": [ "AtomToolsFramework", "Atom_RPI", diff --git a/Gems/Atom/Tools/ShaderManagementConsole/Code/CMakeLists.txt b/Gems/Atom/Tools/ShaderManagementConsole/Code/CMakeLists.txt index d384378b09..3f7788418a 100644 --- a/Gems/Atom/Tools/ShaderManagementConsole/Code/CMakeLists.txt +++ b/Gems/Atom/Tools/ShaderManagementConsole/Code/CMakeLists.txt @@ -10,7 +10,7 @@ if(NOT PAL_TRAIT_BUILD_HOST_TOOLS) return() endif() -ly_get_list_relative_pal_filename(pal_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME}) +o3de_pal_dir(pal_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME} ${gem_restricted_path} ${gem_path} ${gem_parent_relative_path}) include(${pal_source_dir}/PAL_${PAL_PLATFORM_NAME_LOWERCASE}.cmake) # PAL_TRAIT_ATOM_SHADER_MANAGEMENT_CONSOLE_APPLICATION_SUPPORTED diff --git a/Gems/Atom/Utils/Code/CMakeLists.txt b/Gems/Atom/Utils/Code/CMakeLists.txt index 90d7ce501b..a657262f2d 100644 --- a/Gems/Atom/Utils/Code/CMakeLists.txt +++ b/Gems/Atom/Utils/Code/CMakeLists.txt @@ -6,8 +6,6 @@ # # -ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME}) - ly_add_target( NAME Atom_Utils.Static STATIC NAMESPACE Gem @@ -52,6 +50,9 @@ endif() # Tests ################################################################################ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED) + + o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} ${gem_restricted_path} ${gem_path} ${gem_parent_relative_path}) + ly_add_target( NAME Atom_Utils.Tests ${PAL_TRAIT_TEST_TARGET_TYPE} NAMESPACE Gem diff --git a/Gems/Atom/gem.json b/Gems/Atom/gem.json index 0f409ad993..ee6a617ee7 100644 --- a/Gems/Atom/gem.json +++ b/Gems/Atom/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", "summary": "The Atom Renderer Gem provides Atom Renderer and its associated tools (such as Material Editor), utilites, libraries, and interfaces.", "canonical_tags": [ @@ -15,6 +16,17 @@ ], "requirements": "", "documentation_url": "https://o3de.org/docs/user-guide/gems/reference/rendering/atom/atom/", + "external_subdirectories": [ + "Asset/ImageProcessingAtom", + "Asset/Shader", + "Bootstrap", + "Component/DebugCamera", + "Feature/Common", + "RHI", + "RPI", + "Tools/AtomToolsFramework", + "Tools/MaterialEditor" + ], "dependencies": [ "Atom_Feature_Common", "AtomShader", diff --git a/Gems/AtomContent/CMakeLists.txt b/Gems/AtomContent/CMakeLists.txt index ee06f07bc3..29477608b9 100644 --- a/Gems/AtomContent/CMakeLists.txt +++ b/Gems/AtomContent/CMakeLists.txt @@ -5,8 +5,6 @@ # SPDX-License-Identifier: Apache-2.0 OR MIT # # -add_subdirectory(ReferenceMaterials) -add_subdirectory(Sponza) if(PAL_TRAIT_BUILD_HOST_TOOLS) ly_create_alias(NAME AtomContent.Builders NAMESPACE Gem TARGETS Gem::AtomContent_ReferenceMaterials.Builders Gem::AtomContent_Sponza.Builders) diff --git a/Gems/AtomContent/ReferenceMaterials/gem.json b/Gems/AtomContent/ReferenceMaterials/gem.json index b75b01e1ae..49a488b9d3 100644 --- a/Gems/AtomContent/ReferenceMaterials/gem.json +++ b/Gems/AtomContent/ReferenceMaterials/gem.json @@ -2,7 +2,9 @@ "gem_name": "ReferenceMaterials", "display_name": "PBR Reference Materials", "license": "Code, text, data files: Apache-2.0 Or MIT, assets/content/images: CC BY 4.0", - "origin": "https://github.com/aws-lumberyard-dev/o3de.git", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", + "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Asset", "summary": "Atom Asset Gem with a library of reference materials for StandardPBR (and others in the future)", "canonical_tags": [ @@ -14,6 +16,8 @@ "Materials" ], "icon_path": "preview.png", - "dependencies": [], - "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt" + "requirements": "", + "documentation_url": "", + "dependencies": [ + ] } diff --git a/Gems/AtomContent/Sponza/gem.json b/Gems/AtomContent/Sponza/gem.json index 68749cd5f4..f15d57a4d1 100644 --- a/Gems/AtomContent/Sponza/gem.json +++ b/Gems/AtomContent/Sponza/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Asset", "summary": "A standard test scene for Global Illumination (forked from crytek sponza scene)", "canonical_tags": [ @@ -13,5 +14,7 @@ "Assets" ], "requirements": "", - "dependencies": [] + "documentation_url": "", + "dependencies": [ + ] } diff --git a/Gems/AtomContent/gem.json b/Gems/AtomContent/gem.json index 400e897a3b..9be15f7da8 100644 --- a/Gems/AtomContent/gem.json +++ b/Gems/AtomContent/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Asset", "summary": "The Atom Content Gem provides assets for Atom Renderer and a modified version of the Pixar Look Development Studio.", "canonical_tags": [ @@ -17,7 +18,11 @@ "requirements": "", "documentation_url": "https://o3de.org/docs/user-guide/gems/reference/rendering/atom/atom-content/", "dependencies": [ - "ReferenceMaterials", - "Sponza" + "Sponza", + "ReferenceMaterials" + ], + "external_subdirectories": [ + "Sponza", + "ReferenceMaterials" ] } diff --git a/Gems/AtomLyIntegration/AtomBridge/CMakeLists.txt b/Gems/AtomLyIntegration/AtomBridge/CMakeLists.txt index 2bb380fae3..50f9e78c74 100644 --- a/Gems/AtomLyIntegration/AtomBridge/CMakeLists.txt +++ b/Gems/AtomLyIntegration/AtomBridge/CMakeLists.txt @@ -6,4 +6,8 @@ # # +set(gem_path ${CMAKE_CURRENT_LIST_DIR}) +set(gem_json ${gem_path}/gem.json) +o3de_restricted_path(${gem_json} gem_restricted_path gem_parent_relative_path) + add_subdirectory(Code) diff --git a/Gems/AtomLyIntegration/AtomBridge/Code/CMakeLists.txt b/Gems/AtomLyIntegration/AtomBridge/Code/CMakeLists.txt index 67f28767e0..fa3669d7c2 100644 --- a/Gems/AtomLyIntegration/AtomBridge/Code/CMakeLists.txt +++ b/Gems/AtomLyIntegration/AtomBridge/Code/CMakeLists.txt @@ -6,7 +6,7 @@ # # -ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME}) +o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME} ${gem_restricted_path} ${gem_path} ${gem_parent_relative_path}) ly_add_target( NAME Atom_AtomBridge.Static STATIC diff --git a/Gems/AtomLyIntegration/AtomBridge/gem.json b/Gems/AtomLyIntegration/AtomBridge/gem.json index e8ca413023..5a8512c90d 100644 --- a/Gems/AtomLyIntegration/AtomBridge/gem.json +++ b/Gems/AtomLyIntegration/AtomBridge/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", "summary": "", "canonical_tags": [ @@ -11,6 +12,7 @@ ], "user_tags": [], "requirements": "", + "documentation_url": "", "dependencies": [ "Atom_RPI", "Atom_Bootstrap", diff --git a/Gems/AtomLyIntegration/AtomFont/CMakeLists.txt b/Gems/AtomLyIntegration/AtomFont/CMakeLists.txt index 2bb380fae3..50f9e78c74 100644 --- a/Gems/AtomLyIntegration/AtomFont/CMakeLists.txt +++ b/Gems/AtomLyIntegration/AtomFont/CMakeLists.txt @@ -6,4 +6,8 @@ # # +set(gem_path ${CMAKE_CURRENT_LIST_DIR}) +set(gem_json ${gem_path}/gem.json) +o3de_restricted_path(${gem_json} gem_restricted_path gem_parent_relative_path) + add_subdirectory(Code) diff --git a/Gems/AtomLyIntegration/AtomFont/Code/CMakeLists.txt b/Gems/AtomLyIntegration/AtomFont/Code/CMakeLists.txt index 6567736f02..79d97e797d 100644 --- a/Gems/AtomLyIntegration/AtomFont/Code/CMakeLists.txt +++ b/Gems/AtomLyIntegration/AtomFont/Code/CMakeLists.txt @@ -6,7 +6,7 @@ # # -ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME}) +o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} ${gem_restricted_path} ${gem_path} ${gem_parent_relative_path}) ly_add_target( NAME AtomFont ${PAL_TRAIT_MONOLITHIC_DRIVEN_MODULE_TYPE} diff --git a/Gems/AtomLyIntegration/AtomFont/gem.json b/Gems/AtomLyIntegration/AtomFont/gem.json index 8907ec0979..d979509059 100644 --- a/Gems/AtomLyIntegration/AtomFont/gem.json +++ b/Gems/AtomLyIntegration/AtomFont/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", "summary": "", "canonical_tags": [ @@ -11,6 +12,7 @@ ], "user_tags": [], "requirements": "", + "documentation_url": "", "dependencies": [ "Atom_RHI", "Atom_RPI", diff --git a/Gems/AtomLyIntegration/AtomImGuiTools/gem.json b/Gems/AtomLyIntegration/AtomImGuiTools/gem.json index e188ba0cb8..205120f6f0 100644 --- a/Gems/AtomLyIntegration/AtomImGuiTools/gem.json +++ b/Gems/AtomLyIntegration/AtomImGuiTools/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Tool", "summary": "", "canonical_tags": [ @@ -14,6 +15,7 @@ "Rendering" ], "requirements": "", + "documentation_url": "", "dependencies": [ "ImguiAtom", "Atom" diff --git a/Gems/AtomLyIntegration/AtomViewportDisplayIcons/gem.json b/Gems/AtomLyIntegration/AtomViewportDisplayIcons/gem.json index 5a0763e0da..cff957c1f1 100644 --- a/Gems/AtomLyIntegration/AtomViewportDisplayIcons/gem.json +++ b/Gems/AtomLyIntegration/AtomViewportDisplayIcons/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", "summary": "", "canonical_tags": [ @@ -11,6 +12,7 @@ ], "user_tags": [], "requirements": "", + "documentation_url": "", "dependencies": [ "Atom_RHI", "Atom_RPI", diff --git a/Gems/AtomLyIntegration/AtomViewportDisplayInfo/gem.json b/Gems/AtomLyIntegration/AtomViewportDisplayInfo/gem.json index 639d93d301..a2bc92c76d 100644 --- a/Gems/AtomLyIntegration/AtomViewportDisplayInfo/gem.json +++ b/Gems/AtomLyIntegration/AtomViewportDisplayInfo/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", "summary": "", "canonical_tags": [ @@ -11,6 +12,7 @@ ], "user_tags": [], "requirements": "", + "documentation_url": "", "dependencies": [ "Atom_RHI", "Atom_RPI" diff --git a/Gems/AtomLyIntegration/CMakeLists.txt b/Gems/AtomLyIntegration/CMakeLists.txt index 4ab976d68f..25d7356b01 100644 --- a/Gems/AtomLyIntegration/CMakeLists.txt +++ b/Gems/AtomLyIntegration/CMakeLists.txt @@ -6,13 +6,4 @@ # # -add_subdirectory(CommonFeatures) -add_subdirectory(ImguiAtom) -add_subdirectory(AtomImGuiTools) -add_subdirectory(EMotionFXAtom) -add_subdirectory(AtomFont) -add_subdirectory(TechnicalArt) -add_subdirectory(AtomBridge) -add_subdirectory(AtomViewportDisplayInfo) -add_subdirectory(AtomViewportDisplayIcons) diff --git a/Gems/AtomLyIntegration/CommonFeatures/CMakeLists.txt b/Gems/AtomLyIntegration/CommonFeatures/CMakeLists.txt index 2bb380fae3..50f9e78c74 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/CMakeLists.txt +++ b/Gems/AtomLyIntegration/CommonFeatures/CMakeLists.txt @@ -6,4 +6,8 @@ # # +set(gem_path ${CMAKE_CURRENT_LIST_DIR}) +set(gem_json ${gem_path}/gem.json) +o3de_restricted_path(${gem_json} gem_restricted_path gem_parent_relative_path) + add_subdirectory(Code) diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/CMakeLists.txt b/Gems/AtomLyIntegration/CommonFeatures/Code/CMakeLists.txt index 7b685ece13..3234db2292 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/CMakeLists.txt +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/CMakeLists.txt @@ -6,8 +6,8 @@ # # -ly_get_list_relative_pal_filename(pal_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME}) -ly_get_list_relative_pal_filename(common_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/Common) +o3de_pal_dir(pal_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME} ${gem_restricted_path} ${gem_path} ${gem_parent_relative_path}) +set(common_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/Common) ly_add_target( NAME AtomLyIntegration_CommonFeatures.Public HEADERONLY diff --git a/Gems/AtomLyIntegration/CommonFeatures/gem.json b/Gems/AtomLyIntegration/CommonFeatures/gem.json index 6fa8938332..a06f607fab 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/gem.json +++ b/Gems/AtomLyIntegration/CommonFeatures/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", "summary": "", "canonical_tags": [ @@ -11,6 +12,7 @@ ], "user_tags": [], "requirements": "", + "documentation_url": "", "dependencies": [ "Atom_Feature_Common", "LmbrCentral", diff --git a/Gems/AtomLyIntegration/EMotionFXAtom/gem.json b/Gems/AtomLyIntegration/EMotionFXAtom/gem.json index 3514d4c1b9..8bea93da91 100644 --- a/Gems/AtomLyIntegration/EMotionFXAtom/gem.json +++ b/Gems/AtomLyIntegration/EMotionFXAtom/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", "summary": "", "canonical_tags": [ @@ -11,6 +12,7 @@ ], "user_tags": [], "requirements": "", + "documentation_url": "", "dependencies": [ "EMotionFX", "Atom", diff --git a/Gems/AtomLyIntegration/ImguiAtom/gem.json b/Gems/AtomLyIntegration/ImguiAtom/gem.json index fa611d8224..4c65d80e33 100644 --- a/Gems/AtomLyIntegration/ImguiAtom/gem.json +++ b/Gems/AtomLyIntegration/ImguiAtom/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", "summary": "", "canonical_tags": [ @@ -11,6 +12,7 @@ ], "user_tags": [], "requirements": "", + "documentation_url": "", "dependencies": [ "ImGui", "Atom_Feature_Common" diff --git a/Gems/AtomLyIntegration/TechnicalArt/CMakeLists.txt b/Gems/AtomLyIntegration/TechnicalArt/CMakeLists.txt deleted file mode 100644 index 4fc1e5241d..0000000000 --- a/Gems/AtomLyIntegration/TechnicalArt/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -# -# Copyright (c) Contributors to the Open 3D Engine Project. -# For complete copyright and license terms please see the LICENSE at the root of this distribution. -# -# SPDX-License-Identifier: Apache-2.0 OR MIT -# -# - -add_subdirectory(DccScriptingInterface) diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/CMakeLists.txt b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/CMakeLists.txt index 5780172755..f26d18b90e 100644 --- a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/CMakeLists.txt +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/CMakeLists.txt @@ -6,5 +6,4 @@ # # -add_subdirectory(Code) update_pip_requirements(${CMAKE_CURRENT_LIST_DIR}/requirements.txt DccScriptingInterface) diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/gem.json b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/gem.json index 4cc6fff169..7786a8adf4 100644 --- a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/gem.json +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/gem.json @@ -1,11 +1,12 @@ { "gem_name": "DccScriptingInterface", "display_name": "Atom DccScriptingInterface (DCCsi)", - "summary": "A python framework for working with various DCC tools and workflows.", "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", + "summary": "A python framework for working with various DCC tools and workflows.", "canonical_tags": [ "Gem" ], @@ -16,5 +17,6 @@ "Creation" ], "requirements": "", + "documentation_url": "", "dependencies": [] } diff --git a/Gems/AtomLyIntegration/gem.json b/Gems/AtomLyIntegration/gem.json index d9e526aee0..c491126269 100644 --- a/Gems/AtomLyIntegration/gem.json +++ b/Gems/AtomLyIntegration/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", "summary": "The Atom O3DE Integration Gem provides components, libraries, and functionality to support and integrate Atom Renderer in Open 3D Engine.", "canonical_tags": [ @@ -25,5 +26,16 @@ "CommonFeaturesAtom", "EMotionFX_Atom", "ImguiAtom" + ], + "external_subdirectories": [ + "AtomBridge", + "AtomFont", + "AtomImGuiTools", + "AtomViewportDisplayIcons", + "AtomViewportDisplayInfo", + "CommonFeatures", + "EMotionFXAtom", + "ImguiAtom", + "TechnicalArt/DccScriptingInterface" ] } diff --git a/Gems/AtomTressFX/gem.json b/Gems/AtomTressFX/gem.json index b7588ea374..1bd619a418 100644 --- a/Gems/AtomTressFX/gem.json +++ b/Gems/AtomTressFX/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", "summary": "Atom TressFX Gem provides a cutting edge hair and fur simulation and rendering in Atom enhancing the AMD TressFX 4.1. The open source TressFX can be found here: https://github.com/GPUOpen-Effects/TressFX", "canonical_tags": [ @@ -15,5 +16,7 @@ "Animation" ], "requirements": "", - "documentation_url": "https://o3de.org/docs/user-guide/gems/reference/rendering/amd/atom-tressfx/" + "documentation_url": "https://o3de.org/docs/user-guide/gems/reference/rendering/amd/atom-tressfx/", + "dependencies": [ + ] } diff --git a/Gems/AudioEngineWwise/CMakeLists.txt b/Gems/AudioEngineWwise/CMakeLists.txt index 2bb380fae3..50f9e78c74 100644 --- a/Gems/AudioEngineWwise/CMakeLists.txt +++ b/Gems/AudioEngineWwise/CMakeLists.txt @@ -6,4 +6,8 @@ # # +set(gem_path ${CMAKE_CURRENT_LIST_DIR}) +set(gem_json ${gem_path}/gem.json) +o3de_restricted_path(${gem_json} gem_restricted_path gem_parent_relative_path) + add_subdirectory(Code) diff --git a/Gems/AudioEngineWwise/Code/CMakeLists.txt b/Gems/AudioEngineWwise/Code/CMakeLists.txt index 33c80bc31c..02d4f1e6c8 100644 --- a/Gems/AudioEngineWwise/Code/CMakeLists.txt +++ b/Gems/AudioEngineWwise/Code/CMakeLists.txt @@ -6,8 +6,8 @@ # # -ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME}) -ly_get_list_relative_pal_filename(common_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/Common) +o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} ${gem_restricted_path} ${gem_path} ${gem_parent_relative_path}) +set(common_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/Common) include(${pal_dir}/PAL_${PAL_PLATFORM_NAME_LOWERCASE}.cmake) #for PAL_TRAIT_AUDIO_ENGINE_WWISE Traits diff --git a/Gems/AudioEngineWwise/gem.json b/Gems/AudioEngineWwise/gem.json index 2b0af30d40..f0d8c73be2 100644 --- a/Gems/AudioEngineWwise/gem.json +++ b/Gems/AudioEngineWwise/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", "summary": "The Wwise Audio Engine Gem provides support for Audiokinetic Wave Works Interactive Sound Engine (Wwise).", "canonical_tags": [ diff --git a/Gems/AudioSystem/CMakeLists.txt b/Gems/AudioSystem/CMakeLists.txt index 2bb380fae3..50f9e78c74 100644 --- a/Gems/AudioSystem/CMakeLists.txt +++ b/Gems/AudioSystem/CMakeLists.txt @@ -6,4 +6,8 @@ # # +set(gem_path ${CMAKE_CURRENT_LIST_DIR}) +set(gem_json ${gem_path}/gem.json) +o3de_restricted_path(${gem_json} gem_restricted_path gem_parent_relative_path) + add_subdirectory(Code) diff --git a/Gems/AudioSystem/Code/CMakeLists.txt b/Gems/AudioSystem/Code/CMakeLists.txt index 17dbd91878..e5778e9152 100644 --- a/Gems/AudioSystem/Code/CMakeLists.txt +++ b/Gems/AudioSystem/Code/CMakeLists.txt @@ -10,7 +10,7 @@ set(AUDIOSYSTEM_COMPILEDEFINITIONS $,AUDIO_RELEASE,ENABLE_AUDIO_LOGGING> ) -ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME}) +o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} ${gem_restricted_path} ${gem_path} ${gem_parent_relative_path}) ly_add_target( NAME AudioSystem.Static STATIC @@ -65,7 +65,7 @@ ly_create_alias(NAME AudioSystem.Clients NAMESPACE Gem TARGETS Gem::AudioSystem # Tests ################################################################################ if (PAL_TRAIT_BUILD_TESTS_SUPPORTED) - ly_get_list_relative_pal_filename(common_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/Common) + set(common_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/Common) ly_add_target( NAME AudioSystem.Tests ${PAL_TRAIT_TEST_TARGET_TYPE} NAMESPACE Gem diff --git a/Gems/AudioSystem/gem.json b/Gems/AudioSystem/gem.json index ed028068a1..be618ee44e 100644 --- a/Gems/AudioSystem/gem.json +++ b/Gems/AudioSystem/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", "summary": "The Audio System Gem provides the Audio Translation Layer (ATL) and Audio Controls Editor, which add support for audio in Open 3D Engine.", "canonical_tags": [ diff --git a/Gems/BarrierInput/gem.json b/Gems/BarrierInput/gem.json index 72d6398550..e8dcf0d93c 100644 --- a/Gems/BarrierInput/gem.json +++ b/Gems/BarrierInput/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", "summary": "The Barrier Input Gem allows the Open 3D Engine to function as a Barrier client so that it can receive input from a remote Barrier server.", "canonical_tags": [ @@ -16,6 +17,7 @@ ], "icon_path": "preview.png", "requirements": "", + "documentation_url": "", "dependencies": [ "Atom_RPI" ] diff --git a/Gems/Blast/CMakeLists.txt b/Gems/Blast/CMakeLists.txt index 7c478ef2b2..e2fe57d8cc 100644 --- a/Gems/Blast/CMakeLists.txt +++ b/Gems/Blast/CMakeLists.txt @@ -6,5 +6,9 @@ # # +set(gem_path ${CMAKE_CURRENT_LIST_DIR}) +set(gem_json ${gem_path}/gem.json) +o3de_restricted_path(${gem_json} gem_restricted_path gem_parent_relative_path) + add_subdirectory(Code) diff --git a/Gems/Blast/Code/CMakeLists.txt b/Gems/Blast/Code/CMakeLists.txt index d3555b2855..7f478054b8 100644 --- a/Gems/Blast/Code/CMakeLists.txt +++ b/Gems/Blast/Code/CMakeLists.txt @@ -6,7 +6,7 @@ # # -ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME}) +o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} ${gem_restricted_path} ${gem_path} ${gem_parent_relative_path}) include(${pal_dir}/PAL_${PAL_PLATFORM_NAME_LOWERCASE}.cmake) # for PAL_TRAIT_BLAST Traits diff --git a/Gems/Blast/gem.json b/Gems/Blast/gem.json index 761eb04761..dc90c587d7 100644 --- a/Gems/Blast/gem.json +++ b/Gems/Blast/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", "summary": "The NVIDIA Blast Gem provides tools to author fractured mesh assets in Houdini, and functionality to create realistic destruction simulations in Open 3D Engine.", "canonical_tags": [ diff --git a/Gems/Camera/gem.json b/Gems/Camera/gem.json index 4cf0747c7b..c6367d4663 100644 --- a/Gems/Camera/gem.json +++ b/Gems/Camera/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", "summary": "The Camera Gem provides a basic camera component that defines a frustum for runtime rendering.", "canonical_tags": [ diff --git a/Gems/CameraFramework/gem.json b/Gems/CameraFramework/gem.json index d24014be61..0803fd7522 100644 --- a/Gems/CameraFramework/gem.json +++ b/Gems/CameraFramework/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", "summary": "The Camera Framework Gem provides a base for implementing more complex camera systems.", "canonical_tags": [ diff --git a/Gems/CertificateManager/gem.json b/Gems/CertificateManager/gem.json index 11ea14ea5e..c582e932be 100644 --- a/Gems/CertificateManager/gem.json +++ b/Gems/CertificateManager/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", "summary": "The Certificate Manager Gem provides access to authentication files for secure game connections from Amazon S3, files on disk, and other 3rd party sources.", "canonical_tags": [ diff --git a/Gems/CrashReporting/CMakeLists.txt b/Gems/CrashReporting/CMakeLists.txt index 2bb380fae3..50f9e78c74 100644 --- a/Gems/CrashReporting/CMakeLists.txt +++ b/Gems/CrashReporting/CMakeLists.txt @@ -6,4 +6,8 @@ # # +set(gem_path ${CMAKE_CURRENT_LIST_DIR}) +set(gem_json ${gem_path}/gem.json) +o3de_restricted_path(${gem_json} gem_restricted_path gem_parent_relative_path) + add_subdirectory(Code) diff --git a/Gems/CrashReporting/Code/CMakeLists.txt b/Gems/CrashReporting/Code/CMakeLists.txt index 8bcb143d1c..7d7b2c76da 100644 --- a/Gems/CrashReporting/Code/CMakeLists.txt +++ b/Gems/CrashReporting/Code/CMakeLists.txt @@ -6,7 +6,7 @@ # # -ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME}) +o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} ${gem_restricted_path} ${gem_path} ${gem_parent_relative_path}) include(${pal_dir}/PAL_${PAL_PLATFORM_NAME_LOWERCASE}.cmake) diff --git a/Gems/CrashReporting/gem.json b/Gems/CrashReporting/gem.json index b8c75548a4..1651bad7b8 100644 --- a/Gems/CrashReporting/gem.json +++ b/Gems/CrashReporting/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", "summary": "The Crash Reporting Gem provides support for external crash reporting for Open 3D Engine projects.", "canonical_tags": [ diff --git a/Gems/CustomAssetExample/gem.json b/Gems/CustomAssetExample/gem.json index 89492ee6ea..ba1030b280 100644 --- a/Gems/CustomAssetExample/gem.json +++ b/Gems/CustomAssetExample/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", "summary": "The Custom Asset Example Gem provides example code for creating a custom asset for Open 3D Engine's asset pipeline.", "canonical_tags": [ diff --git a/Gems/DebugDraw/gem.json b/Gems/DebugDraw/gem.json index 58eff5f87a..e140d642b8 100644 --- a/Gems/DebugDraw/gem.json +++ b/Gems/DebugDraw/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", "summary": "The Debug Draw Gem provides Editor and runtime debug visualization features for Open 3D Engine.", "canonical_tags": [ diff --git a/Gems/DevTextures/gem.json b/Gems/DevTextures/gem.json index 00cafbd6fb..f8c436887d 100644 --- a/Gems/DevTextures/gem.json +++ b/Gems/DevTextures/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Asset", "summary": "The Dev Textures Gem provides a collection of general purpose texture assets useful for prototypes and preproduction.", "canonical_tags": [ diff --git a/Gems/EMotionFX/CMakeLists.txt b/Gems/EMotionFX/CMakeLists.txt index 2bb380fae3..50f9e78c74 100644 --- a/Gems/EMotionFX/CMakeLists.txt +++ b/Gems/EMotionFX/CMakeLists.txt @@ -6,4 +6,8 @@ # # +set(gem_path ${CMAKE_CURRENT_LIST_DIR}) +set(gem_json ${gem_path}/gem.json) +o3de_restricted_path(${gem_json} gem_restricted_path gem_parent_relative_path) + add_subdirectory(Code) diff --git a/Gems/EMotionFX/Code/CMakeLists.txt b/Gems/EMotionFX/Code/CMakeLists.txt index 67d0ba6d85..bd90e589c9 100644 --- a/Gems/EMotionFX/Code/CMakeLists.txt +++ b/Gems/EMotionFX/Code/CMakeLists.txt @@ -6,10 +6,9 @@ # # -ly_get_list_relative_pal_filename(core_pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME}) - -ly_get_list_relative_pal_filename(editor_pal_dir ${CMAKE_CURRENT_LIST_DIR}/Editor/Platform/${PAL_PLATFORM_NAME}) -ly_get_list_relative_pal_filename(editor_common_dir ${CMAKE_CURRENT_LIST_DIR}/Editor/Platform/Common) +o3de_pal_dir(core_pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} ${gem_restricted_path} ${gem_path} ${gem_parent_relative_path}) +o3de_pal_dir(editor_pal_dir ${CMAKE_CURRENT_LIST_DIR}/Editor/Platform/${PAL_PLATFORM_NAME} ${gem_restricted_path} ${gem_path} ${gem_parent_relative_path}) +set(editor_common_dir ${CMAKE_CURRENT_LIST_DIR}/Editor/Platform/Common) ly_add_target( NAME EMotionFXStaticLib STATIC diff --git a/Gems/EMotionFX/gem.json b/Gems/EMotionFX/gem.json index ed80517af1..c07c8368c2 100644 --- a/Gems/EMotionFX/gem.json +++ b/Gems/EMotionFX/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", "summary": "The EMotion FX Animation Gem provides Open 3D Engine's animation system for rigged actors and includes Animation Editor, a tool for creating animated behaviors, simulated objects, and colliders for rigged actors.", "canonical_tags": [ diff --git a/Gems/EditorPythonBindings/gem.json b/Gems/EditorPythonBindings/gem.json index 475483f13b..a5ee9f5631 100644 --- a/Gems/EditorPythonBindings/gem.json +++ b/Gems/EditorPythonBindings/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Tool", "summary": "The Editor Python Bindings Gem provides Python commands for Open 3D Engine Editor functions.", "canonical_tags": [ diff --git a/Gems/ExpressionEvaluation/gem.json b/Gems/ExpressionEvaluation/gem.json index cd712f4da9..667eebbcb5 100644 --- a/Gems/ExpressionEvaluation/gem.json +++ b/Gems/ExpressionEvaluation/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", "summary": "The Expression Evaluation Gem provides a method for parsing and executing string expressions in Open 3D Engine.", "canonical_tags": [ diff --git a/Gems/FastNoise/gem.json b/Gems/FastNoise/gem.json index d8dfb878b4..a9c0f1f42d 100644 --- a/Gems/FastNoise/gem.json +++ b/Gems/FastNoise/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", "summary": "The FastNoise Gradient Gem uses the third-party, open source FastNoise library to provide a variety of high-performance noise generation algorithms.", "canonical_tags": [ diff --git a/Gems/GameState/gem.json b/Gems/GameState/gem.json index fe3a338997..d3e2d76c5a 100644 --- a/Gems/GameState/gem.json +++ b/Gems/GameState/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", "summary": "The Game State Gem provides a generic framework to determine and manage game states and game state transitions in Open 3D Engine.", "canonical_tags": [ diff --git a/Gems/GameStateSamples/CMakeLists.txt b/Gems/GameStateSamples/CMakeLists.txt index 2bb380fae3..50f9e78c74 100644 --- a/Gems/GameStateSamples/CMakeLists.txt +++ b/Gems/GameStateSamples/CMakeLists.txt @@ -6,4 +6,8 @@ # # +set(gem_path ${CMAKE_CURRENT_LIST_DIR}) +set(gem_json ${gem_path}/gem.json) +o3de_restricted_path(${gem_json} gem_restricted_path gem_parent_relative_path) + add_subdirectory(Code) diff --git a/Gems/GameStateSamples/Code/CMakeLists.txt b/Gems/GameStateSamples/Code/CMakeLists.txt index a07bef6a06..939b2ce1bd 100644 --- a/Gems/GameStateSamples/Code/CMakeLists.txt +++ b/Gems/GameStateSamples/Code/CMakeLists.txt @@ -6,7 +6,7 @@ # # -ly_get_list_relative_pal_filename(include_pal_dir ${CMAKE_CURRENT_LIST_DIR}/Include/Platform/${PAL_PLATFORM_NAME}) +o3de_pal_dir(include_pal_dir ${CMAKE_CURRENT_LIST_DIR}/Include/Platform/${PAL_PLATFORM_NAME} ${gem_restricted_path} ${gem_path} ${gem_parent_relative_path}) ly_add_target( NAME GameStateSamples.Headers HEADERONLY diff --git a/Gems/GameStateSamples/gem.json b/Gems/GameStateSamples/gem.json index 80018ff1a8..94556ee677 100644 --- a/Gems/GameStateSamples/gem.json +++ b/Gems/GameStateSamples/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", "summary": "The Game State Samples Gem provides a set of sample game states (built on top of the Game State Gem), including primary user selection, main menu, level loading, level running, and level paused.", "canonical_tags": [ diff --git a/Gems/Gestures/gem.json b/Gems/Gestures/gem.json index 8efd389d53..c0609c8d54 100644 --- a/Gems/Gestures/gem.json +++ b/Gems/Gestures/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", "summary": "The Gestures Gem provides detection for common gesture-based input actions on iOS and Android devices.", "canonical_tags": [ diff --git a/Gems/GradientSignal/gem.json b/Gems/GradientSignal/gem.json index aac4c652c5..f0136ef104 100644 --- a/Gems/GradientSignal/gem.json +++ b/Gems/GradientSignal/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", "summary": "The Gradient Signal Gem provides a number of components for generating, modifying, and mixing gradient signals.", "canonical_tags": [ diff --git a/Gems/GraphCanvas/gem.json b/Gems/GraphCanvas/gem.json index 4762cfef35..c2038f4645 100644 --- a/Gems/GraphCanvas/gem.json +++ b/Gems/GraphCanvas/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Tool", "summary": "The Graph Canvas Gem provides a C++ framework for creating custom graphical node based editors for Open 3D Engine.", "canonical_tags": [ diff --git a/Gems/GraphModel/gem.json b/Gems/GraphModel/gem.json index ad6b592430..ece520278b 100644 --- a/Gems/GraphModel/gem.json +++ b/Gems/GraphModel/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", "summary": "The Graph Model Gem provides a generic node graph data model framework for Open 3D Engine.", "canonical_tags": [ diff --git a/Gems/HttpRequestor/CMakeLists.txt b/Gems/HttpRequestor/CMakeLists.txt index 2bb380fae3..50f9e78c74 100644 --- a/Gems/HttpRequestor/CMakeLists.txt +++ b/Gems/HttpRequestor/CMakeLists.txt @@ -6,4 +6,8 @@ # # +set(gem_path ${CMAKE_CURRENT_LIST_DIR}) +set(gem_json ${gem_path}/gem.json) +o3de_restricted_path(${gem_json} gem_restricted_path gem_parent_relative_path) + add_subdirectory(Code) diff --git a/Gems/HttpRequestor/Code/CMakeLists.txt b/Gems/HttpRequestor/Code/CMakeLists.txt index 831eb52231..4ebca5518c 100644 --- a/Gems/HttpRequestor/Code/CMakeLists.txt +++ b/Gems/HttpRequestor/Code/CMakeLists.txt @@ -6,7 +6,7 @@ # # -ly_get_list_relative_pal_filename(source_pal_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME}) +o3de_pal_dir(source_pal_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME} ${gem_restricted_path} ${gem_path} ${gem_parent_relative_path}) ly_add_target( NAME HttpRequestor.Static STATIC diff --git a/Gems/HttpRequestor/gem.json b/Gems/HttpRequestor/gem.json index 582bfa0071..a8e111ac63 100644 --- a/Gems/HttpRequestor/gem.json +++ b/Gems/HttpRequestor/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", "summary": "The HTTP Requestor Gem provides functionality to make asynchronous HTTP/HTTPS requests and return data through a user-provided call back function.", "canonical_tags": [ diff --git a/Gems/ImGui/CMakeLists.txt b/Gems/ImGui/CMakeLists.txt index 2bb380fae3..50f9e78c74 100644 --- a/Gems/ImGui/CMakeLists.txt +++ b/Gems/ImGui/CMakeLists.txt @@ -6,4 +6,8 @@ # # +set(gem_path ${CMAKE_CURRENT_LIST_DIR}) +set(gem_json ${gem_path}/gem.json) +o3de_restricted_path(${gem_json} gem_restricted_path gem_parent_relative_path) + add_subdirectory(Code) diff --git a/Gems/ImGui/Code/CMakeLists.txt b/Gems/ImGui/Code/CMakeLists.txt index e345e3d546..c293065636 100644 --- a/Gems/ImGui/Code/CMakeLists.txt +++ b/Gems/ImGui/Code/CMakeLists.txt @@ -8,7 +8,7 @@ set(config_base_defines $,IMGUI_DISABLED,IMGUI_ENABLED>) -ly_get_list_relative_pal_filename(pal_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME}) +o3de_pal_dir(pal_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME} ${gem_restricted_path} ${gem_path} ${gem_parent_relative_path}) # This library is the 3rdParty imgui that is in the Gem's External ly_add_target( diff --git a/Gems/ImGui/gem.json b/Gems/ImGui/gem.json index dfc12f64b4..0ed889f693 100644 --- a/Gems/ImGui/gem.json +++ b/Gems/ImGui/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Tool", "summary": "The Immediate Mode GUI Gem provides the 3rdParty library IMGUI which can be used to create run time immediate mode overlays for debugging and profiling information in Open 3D Engine.", "canonical_tags": [ diff --git a/Gems/InAppPurchases/CMakeLists.txt b/Gems/InAppPurchases/CMakeLists.txt index 2bb380fae3..50f9e78c74 100644 --- a/Gems/InAppPurchases/CMakeLists.txt +++ b/Gems/InAppPurchases/CMakeLists.txt @@ -6,4 +6,8 @@ # # +set(gem_path ${CMAKE_CURRENT_LIST_DIR}) +set(gem_json ${gem_path}/gem.json) +o3de_restricted_path(${gem_json} gem_restricted_path gem_parent_relative_path) + add_subdirectory(Code) diff --git a/Gems/InAppPurchases/Code/CMakeLists.txt b/Gems/InAppPurchases/Code/CMakeLists.txt index 99fc937919..e7b34296d1 100644 --- a/Gems/InAppPurchases/Code/CMakeLists.txt +++ b/Gems/InAppPurchases/Code/CMakeLists.txt @@ -6,7 +6,7 @@ # # -ly_get_list_relative_pal_filename(pal_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME}) +o3de_pal_dir(pal_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME} ${gem_restricted_path} ${gem_path} ${gem_parent_relative_path}) ly_add_target( NAME InAppPurchases.Static STATIC diff --git a/Gems/InAppPurchases/gem.json b/Gems/InAppPurchases/gem.json index 21febbfeca..0b3d2e65e4 100644 --- a/Gems/InAppPurchases/gem.json +++ b/Gems/InAppPurchases/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", "summary": "The In-App Purchases Gem provides functionality for in app purchases for iOS and Android.", "canonical_tags": [ diff --git a/Gems/LandscapeCanvas/gem.json b/Gems/LandscapeCanvas/gem.json index 8653da40e1..f1e326efce 100644 --- a/Gems/LandscapeCanvas/gem.json +++ b/Gems/LandscapeCanvas/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Tool", "summary": "The Landscape Canvas Gem provides the Landscape Canvas editor, a node-based graph tool for authoring workflows to populate landscape with dynamic vegetation.", "canonical_tags": [ diff --git a/Gems/LmbrCentral/CMakeLists.txt b/Gems/LmbrCentral/CMakeLists.txt index 2bb380fae3..50f9e78c74 100644 --- a/Gems/LmbrCentral/CMakeLists.txt +++ b/Gems/LmbrCentral/CMakeLists.txt @@ -6,4 +6,8 @@ # # +set(gem_path ${CMAKE_CURRENT_LIST_DIR}) +set(gem_json ${gem_path}/gem.json) +o3de_restricted_path(${gem_json} gem_restricted_path gem_parent_relative_path) + add_subdirectory(Code) diff --git a/Gems/LmbrCentral/Code/CMakeLists.txt b/Gems/LmbrCentral/Code/CMakeLists.txt index 4401d3b752..a4c94a7b40 100644 --- a/Gems/LmbrCentral/Code/CMakeLists.txt +++ b/Gems/LmbrCentral/Code/CMakeLists.txt @@ -6,8 +6,8 @@ # # -ly_get_list_relative_pal_filename(common_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/Common) -ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME}) +o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} ${gem_restricted_path} ${gem_path} ${gem_parent_relative_path}) +set(common_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/Common) ly_add_target( NAME LmbrCentral.Static STATIC diff --git a/Gems/LmbrCentral/gem.json b/Gems/LmbrCentral/gem.json index a0a6ea813f..4eea28d26e 100644 --- a/Gems/LmbrCentral/gem.json +++ b/Gems/LmbrCentral/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", "summary": "The O3DE Core (LmbrCentral) Gem provides required code and assets for running Open 3D Engine Editor.", "canonical_tags": [ diff --git a/Gems/LocalUser/CMakeLists.txt b/Gems/LocalUser/CMakeLists.txt index 2bb380fae3..50f9e78c74 100644 --- a/Gems/LocalUser/CMakeLists.txt +++ b/Gems/LocalUser/CMakeLists.txt @@ -6,4 +6,8 @@ # # +set(gem_path ${CMAKE_CURRENT_LIST_DIR}) +set(gem_json ${gem_path}/gem.json) +o3de_restricted_path(${gem_json} gem_restricted_path gem_parent_relative_path) + add_subdirectory(Code) diff --git a/Gems/LocalUser/Code/CMakeLists.txt b/Gems/LocalUser/Code/CMakeLists.txt index 055cfe6c7c..ce937e9dc5 100644 --- a/Gems/LocalUser/Code/CMakeLists.txt +++ b/Gems/LocalUser/Code/CMakeLists.txt @@ -6,7 +6,7 @@ # # -ly_get_list_relative_pal_filename(pal_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME}) +o3de_pal_dir(pal_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME} ${gem_restricted_path} ${gem_path} ${gem_parent_relative_path}) ly_add_target( NAME LocalUser.Static STATIC diff --git a/Gems/LocalUser/gem.json b/Gems/LocalUser/gem.json index 5199b4f777..04f2145956 100644 --- a/Gems/LocalUser/gem.json +++ b/Gems/LocalUser/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", "summary": "The Local User Gem provides functionality for mapping local user ids to local player slots and managing local user profiles.", "canonical_tags": [ diff --git a/Gems/LyShine/CMakeLists.txt b/Gems/LyShine/CMakeLists.txt index 2bb380fae3..50f9e78c74 100644 --- a/Gems/LyShine/CMakeLists.txt +++ b/Gems/LyShine/CMakeLists.txt @@ -6,4 +6,8 @@ # # +set(gem_path ${CMAKE_CURRENT_LIST_DIR}) +set(gem_json ${gem_path}/gem.json) +o3de_restricted_path(${gem_json} gem_restricted_path gem_parent_relative_path) + add_subdirectory(Code) diff --git a/Gems/LyShine/Code/CMakeLists.txt b/Gems/LyShine/Code/CMakeLists.txt index 2b550b0e36..76d7742ddf 100644 --- a/Gems/LyShine/Code/CMakeLists.txt +++ b/Gems/LyShine/Code/CMakeLists.txt @@ -6,8 +6,8 @@ # # -ly_get_list_relative_pal_filename(pal_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME}) -ly_get_list_relative_pal_filename(common_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/Common) +o3de_pal_dir(pal_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME} ${gem_restricted_path} ${gem_path} ${gem_parent_relative_path}) +set(common_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/Common) ly_add_target( NAME LyShine.Static STATIC diff --git a/Gems/LyShine/gem.json b/Gems/LyShine/gem.json index 8dcac6404a..7ebb733b0f 100644 --- a/Gems/LyShine/gem.json +++ b/Gems/LyShine/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", "summary": "The LyShine Gem provides the runtime UI system and creation tools for Open 3D Engine projects.", "canonical_tags": [ diff --git a/Gems/LyShineExamples/gem.json b/Gems/LyShineExamples/gem.json index 74d2b6fe51..c91e9b819e 100644 --- a/Gems/LyShineExamples/gem.json +++ b/Gems/LyShineExamples/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Asset", "summary": "The LyShine Examples Gem provides example code and assets for LyShine, the runtime UI system and editor for Open 3D Engine projects.", "canonical_tags": [ diff --git a/Gems/Maestro/gem.json b/Gems/Maestro/gem.json index d8f884e271..95aa43c179 100644 --- a/Gems/Maestro/gem.json +++ b/Gems/Maestro/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", "summary": "The Maestro Cinematics Gem provides Track View, Open 3D Engine's animated sequence and cinematics editor.", "canonical_tags": [ diff --git a/Gems/MessagePopup/gem.json b/Gems/MessagePopup/gem.json index fb44dd93a5..5e1b4843b0 100644 --- a/Gems/MessagePopup/gem.json +++ b/Gems/MessagePopup/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", "summary": "The Message Popup Gem provides an example implementation of popup messages using LyShine in Open 3D Engine.", "canonical_tags": [ diff --git a/Gems/Metastream/CMakeLists.txt b/Gems/Metastream/CMakeLists.txt index 2bb380fae3..50f9e78c74 100644 --- a/Gems/Metastream/CMakeLists.txt +++ b/Gems/Metastream/CMakeLists.txt @@ -6,4 +6,8 @@ # # +set(gem_path ${CMAKE_CURRENT_LIST_DIR}) +set(gem_json ${gem_path}/gem.json) +o3de_restricted_path(${gem_json} gem_restricted_path gem_parent_relative_path) + add_subdirectory(Code) diff --git a/Gems/Metastream/Code/CMakeLists.txt b/Gems/Metastream/Code/CMakeLists.txt index a032fc34ff..f1652058ac 100644 --- a/Gems/Metastream/Code/CMakeLists.txt +++ b/Gems/Metastream/Code/CMakeLists.txt @@ -6,8 +6,8 @@ # # -ly_get_list_relative_pal_filename(pal_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME}) -ly_get_list_relative_pal_filename(common_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/Common) +o3de_pal_dir(pal_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME} ${gem_restricted_path} ${gem_path} ${gem_parent_relative_path}) +set(common_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/Common) ly_add_target( NAME Metastream.Static STATIC diff --git a/Gems/Metastream/gem.json b/Gems/Metastream/gem.json index 309f16b221..9a37a0a8ee 100644 --- a/Gems/Metastream/gem.json +++ b/Gems/Metastream/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", "summary": "The Metastream Gem provides functionality for an HTTP server that allows broadcasters to customize game streams with overlays of statistics and event data from a game session.", "canonical_tags": [ diff --git a/Gems/Microphone/CMakeLists.txt b/Gems/Microphone/CMakeLists.txt index 2bb380fae3..50f9e78c74 100644 --- a/Gems/Microphone/CMakeLists.txt +++ b/Gems/Microphone/CMakeLists.txt @@ -6,4 +6,8 @@ # # +set(gem_path ${CMAKE_CURRENT_LIST_DIR}) +set(gem_json ${gem_path}/gem.json) +o3de_restricted_path(${gem_json} gem_restricted_path gem_parent_relative_path) + add_subdirectory(Code) diff --git a/Gems/Microphone/Code/CMakeLists.txt b/Gems/Microphone/Code/CMakeLists.txt index 5b40521f6a..873d05e98d 100644 --- a/Gems/Microphone/Code/CMakeLists.txt +++ b/Gems/Microphone/Code/CMakeLists.txt @@ -6,7 +6,7 @@ # # -ly_get_list_relative_pal_filename(pal_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME}) +o3de_pal_dir(pal_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME} ${gem_restricted_path} ${gem_path} ${gem_parent_relative_path}) ly_add_target( NAME Microphone.Static STATIC diff --git a/Gems/Microphone/gem.json b/Gems/Microphone/gem.json index 6e57bec854..6a5b415a22 100644 --- a/Gems/Microphone/gem.json +++ b/Gems/Microphone/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", "summary": "The Microphone Gem provides support for audio input through microphones.", "canonical_tags": [ diff --git a/Gems/Multiplayer/CMakeLists.txt b/Gems/Multiplayer/CMakeLists.txt index 2bb380fae3..50f9e78c74 100644 --- a/Gems/Multiplayer/CMakeLists.txt +++ b/Gems/Multiplayer/CMakeLists.txt @@ -6,4 +6,8 @@ # # +set(gem_path ${CMAKE_CURRENT_LIST_DIR}) +set(gem_json ${gem_path}/gem.json) +o3de_restricted_path(${gem_json} gem_restricted_path gem_parent_relative_path) + add_subdirectory(Code) diff --git a/Gems/Multiplayer/Code/CMakeLists.txt b/Gems/Multiplayer/Code/CMakeLists.txt index afe40408ab..66085476e5 100644 --- a/Gems/Multiplayer/Code/CMakeLists.txt +++ b/Gems/Multiplayer/Code/CMakeLists.txt @@ -6,6 +6,8 @@ # # +o3de_pal_dir(pal_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME} ${gem_restricted_path} ${gem_path} ${gem_parent_relative_path}) + ly_add_target( NAME Multiplayer.Static STATIC NAMESPACE Gem diff --git a/Gems/Multiplayer/gem.json b/Gems/Multiplayer/gem.json index f895c78c5d..2b412084af 100644 --- a/Gems/Multiplayer/gem.json +++ b/Gems/Multiplayer/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", "summary": "The Multiplayer Gem provides a public API for multiplayer functionality such as connecting and hosting.", "canonical_tags": [ @@ -16,6 +17,7 @@ ], "icon_path": "preview.png", "requirements": "", + "documentation_url": "", "dependencies": [ "CertificateManager", "Atom_Feature_Common", diff --git a/Gems/MultiplayerCompression/gem.json b/Gems/MultiplayerCompression/gem.json index 98156cc404..a9cf3fa460 100644 --- a/Gems/MultiplayerCompression/gem.json +++ b/Gems/MultiplayerCompression/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", "summary": "The Multiplayer Compression Gem provides an open source Compressor for use with AzNetworking's transport layer.", "canonical_tags": [ diff --git a/Gems/NvCloth/CMakeLists.txt b/Gems/NvCloth/CMakeLists.txt index 2bb380fae3..50f9e78c74 100644 --- a/Gems/NvCloth/CMakeLists.txt +++ b/Gems/NvCloth/CMakeLists.txt @@ -6,4 +6,8 @@ # # +set(gem_path ${CMAKE_CURRENT_LIST_DIR}) +set(gem_json ${gem_path}/gem.json) +o3de_restricted_path(${gem_json} gem_restricted_path gem_parent_relative_path) + add_subdirectory(Code) diff --git a/Gems/NvCloth/Code/CMakeLists.txt b/Gems/NvCloth/Code/CMakeLists.txt index 5b5bba9d8b..76f5bcfeb8 100644 --- a/Gems/NvCloth/Code/CMakeLists.txt +++ b/Gems/NvCloth/Code/CMakeLists.txt @@ -6,7 +6,7 @@ # # -ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME}) +o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} ${gem_restricted_path} ${gem_path} ${gem_parent_relative_path}) include(${pal_dir}/PAL_${PAL_PLATFORM_NAME_LOWERCASE}.cmake) #for PAL_TRAIT_NVCLOTH Traits diff --git a/Gems/NvCloth/gem.json b/Gems/NvCloth/gem.json index 86a70b9373..9494d65e82 100644 --- a/Gems/NvCloth/gem.json +++ b/Gems/NvCloth/gem.json @@ -2,8 +2,9 @@ "gem_name": "NvCloth", "display_name": "NVIDIA Cloth (NvCloth)", "license": "Apache-2.0 Or MIT", - "origin": "Open 3D Engine - o3de.org", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", + "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", "summary": "The NVIDIA Cloth Gem provides functionality to create fast, realistic cloth simulation with the NVIDIA Cloth library.", "canonical_tags": [ diff --git a/Gems/PhysX/CMakeLists.txt b/Gems/PhysX/CMakeLists.txt index 2bb380fae3..50f9e78c74 100644 --- a/Gems/PhysX/CMakeLists.txt +++ b/Gems/PhysX/CMakeLists.txt @@ -6,4 +6,8 @@ # # +set(gem_path ${CMAKE_CURRENT_LIST_DIR}) +set(gem_json ${gem_path}/gem.json) +o3de_restricted_path(${gem_json} gem_restricted_path gem_parent_relative_path) + add_subdirectory(Code) diff --git a/Gems/PhysX/Code/CMakeLists.txt b/Gems/PhysX/Code/CMakeLists.txt index f045d6b00d..1cad877542 100644 --- a/Gems/PhysX/Code/CMakeLists.txt +++ b/Gems/PhysX/Code/CMakeLists.txt @@ -8,7 +8,7 @@ add_subdirectory(NumericalMethods) -ly_get_list_relative_pal_filename(pal_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME}) +o3de_pal_dir(pal_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME} ${gem_restricted_path} ${gem_path} ${gem_parent_relative_path}) include(${pal_source_dir}/PAL_${PAL_PLATFORM_NAME_LOWERCASE}.cmake) # for PAL_TRAIT_PHYSX_SUPPORTED set(LY_PHYSX_ENABLE_RUNNING_BENCHMARKS OFF CACHE BOOL "Adds a target to allow running of the physx benchmarks.") diff --git a/Gems/PhysXDebug/CMakeLists.txt b/Gems/PhysXDebug/CMakeLists.txt index 2bb380fae3..50f9e78c74 100644 --- a/Gems/PhysXDebug/CMakeLists.txt +++ b/Gems/PhysXDebug/CMakeLists.txt @@ -6,4 +6,8 @@ # # +set(gem_path ${CMAKE_CURRENT_LIST_DIR}) +set(gem_json ${gem_path}/gem.json) +o3de_restricted_path(${gem_json} gem_restricted_path gem_parent_relative_path) + add_subdirectory(Code) diff --git a/Gems/PhysXDebug/Code/CMakeLists.txt b/Gems/PhysXDebug/Code/CMakeLists.txt index 3ddec9d105..0886f2bf34 100644 --- a/Gems/PhysXDebug/Code/CMakeLists.txt +++ b/Gems/PhysXDebug/Code/CMakeLists.txt @@ -6,7 +6,11 @@ # # -ly_get_list_relative_pal_filename(physx_pal_source_dir ${LY_ROOT_FOLDER}/Gems/PhysX/Code/Source/Platform/${PAL_PLATFORM_NAME}) +# This gem relies on the PhysX gem +o3de_find_gem("PhysX" physx_gem_path) +set(physx_gem_json ${physx_gem_path}/gem.json) +o3de_restricted_path(${physx_gem_json} physx_gem_restricted_path physx_gem_parent_relative_path) +o3de_pal_dir(physx_pal_source_dir ${physx_gem_path}/Code/Source/Platform/${PAL_PLATFORM_NAME} ${physx_gem_restricted_path} ${physx_gem_path} ${physx_gem_parent_relative_path}) include(${physx_pal_source_dir}/PAL_${PAL_PLATFORM_NAME_LOWERCASE}.cmake) # for PAL_TRAIT_PHYSX_SUPPORTED diff --git a/Gems/PhysXDebug/gem.json b/Gems/PhysXDebug/gem.json index 2d9f4dc24d..1087eefad4 100644 --- a/Gems/PhysXDebug/gem.json +++ b/Gems/PhysXDebug/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Tool", "summary": "The PhysX Debug Gem provides debugging functionality and visualizations for NVIDIA PhysX in Open 3D Engine.", "canonical_tags": [ diff --git a/Gems/Prefab/PrefabBuilder/gem.json b/Gems/Prefab/PrefabBuilder/gem.json index 2233a7235e..1c0dcd9a72 100644 --- a/Gems/Prefab/PrefabBuilder/gem.json +++ b/Gems/Prefab/PrefabBuilder/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", "summary": "The Prefab Builder Gem provides an Asset Processor module for prefabs, which are complex assets built by combining smaller entities.", "canonical_tags": [ diff --git a/Gems/Presence/CMakeLists.txt b/Gems/Presence/CMakeLists.txt index 2bb380fae3..50f9e78c74 100644 --- a/Gems/Presence/CMakeLists.txt +++ b/Gems/Presence/CMakeLists.txt @@ -6,4 +6,8 @@ # # +set(gem_path ${CMAKE_CURRENT_LIST_DIR}) +set(gem_json ${gem_path}/gem.json) +o3de_restricted_path(${gem_json} gem_restricted_path gem_parent_relative_path) + add_subdirectory(Code) diff --git a/Gems/Presence/Code/CMakeLists.txt b/Gems/Presence/Code/CMakeLists.txt index c1c807d432..cc84771201 100644 --- a/Gems/Presence/Code/CMakeLists.txt +++ b/Gems/Presence/Code/CMakeLists.txt @@ -6,7 +6,7 @@ # # -ly_get_list_relative_pal_filename(pal_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME}) +o3de_pal_dir(pal_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME} ${gem_restricted_path} ${gem_path} ${gem_parent_relative_path}) ly_add_target( NAME Presence.Headers HEADERONLY diff --git a/Gems/Presence/gem.json b/Gems/Presence/gem.json index 624af2e62d..48d9dd5ef0 100644 --- a/Gems/Presence/gem.json +++ b/Gems/Presence/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", "summary": "The Presence Gem provides a target platform agnostic interface for Presence services.", "canonical_tags": [ diff --git a/Gems/PrimitiveAssets/gem.json b/Gems/PrimitiveAssets/gem.json index 0e4c4689dc..7669477220 100644 --- a/Gems/PrimitiveAssets/gem.json +++ b/Gems/PrimitiveAssets/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Asset", "summary": "The Primitive Assets Gem provides primitive shape mesh assets with physics enabled.", "canonical_tags": [ diff --git a/Gems/Profiler/gem.json b/Gems/Profiler/gem.json index b160bc4b3c..40478deae1 100644 --- a/Gems/Profiler/gem.json +++ b/Gems/Profiler/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", "summary": "A collection of utilities for capturing performance data", "canonical_tags": [ diff --git a/Gems/PythonAssetBuilder/gem.json b/Gems/PythonAssetBuilder/gem.json index 8046104f03..54fbb949f9 100644 --- a/Gems/PythonAssetBuilder/gem.json +++ b/Gems/PythonAssetBuilder/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", "summary": "The Python Asset Builder Gem provides functionality to implement custom asset builders in Python for Asset Processor.", "canonical_tags": [ diff --git a/Gems/QtForPython/Code/CMakeLists.txt b/Gems/QtForPython/Code/CMakeLists.txt index da763978a6..d63c71492d 100644 --- a/Gems/QtForPython/Code/CMakeLists.txt +++ b/Gems/QtForPython/Code/CMakeLists.txt @@ -9,7 +9,7 @@ if(NOT PAL_TRAIT_BUILD_HOST_TOOLS) return() endif() -ly_get_list_relative_pal_filename(common_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/Common) +set(common_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/Common) include(${CMAKE_CURRENT_SOURCE_DIR}/Source/Platform/${PAL_PLATFORM_NAME}/PAL_${PAL_PLATFORM_NAME_LOWERCASE}.cmake) diff --git a/Gems/QtForPython/gem.json b/Gems/QtForPython/gem.json index 17d3a26f21..63805a5bc7 100644 --- a/Gems/QtForPython/gem.json +++ b/Gems/QtForPython/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Tool", "summary": "The Qt for Python Gem provides the PySide2 Python libraries to manage Qt widgets.", "canonical_tags": [ diff --git a/Gems/SaveData/CMakeLists.txt b/Gems/SaveData/CMakeLists.txt index 2bb380fae3..50f9e78c74 100644 --- a/Gems/SaveData/CMakeLists.txt +++ b/Gems/SaveData/CMakeLists.txt @@ -6,4 +6,8 @@ # # +set(gem_path ${CMAKE_CURRENT_LIST_DIR}) +set(gem_json ${gem_path}/gem.json) +o3de_restricted_path(${gem_json} gem_restricted_path gem_parent_relative_path) + add_subdirectory(Code) diff --git a/Gems/SaveData/Code/CMakeLists.txt b/Gems/SaveData/Code/CMakeLists.txt index 38d145f8e5..5d4eb361cc 100644 --- a/Gems/SaveData/Code/CMakeLists.txt +++ b/Gems/SaveData/Code/CMakeLists.txt @@ -6,7 +6,7 @@ # # -ly_get_list_relative_pal_filename(pal_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME}) +o3de_pal_dir(pal_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME} ${gem_restricted_path} ${gem_path} ${gem_parent_relative_path}) ly_add_target( NAME SaveData.Static STATIC diff --git a/Gems/SaveData/gem.json b/Gems/SaveData/gem.json index 1ee5a54cec..3a686242d7 100644 --- a/Gems/SaveData/gem.json +++ b/Gems/SaveData/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", "summary": "The Save Data Gem provides a platform independent API to save and load persistent user data in Open 3D Engine projects.", "canonical_tags": [ diff --git a/Gems/SceneLoggingExample/gem.json b/Gems/SceneLoggingExample/gem.json index ad950f3992..dc6b5179b6 100644 --- a/Gems/SceneLoggingExample/gem.json +++ b/Gems/SceneLoggingExample/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Asset", "summary": "The Scene Logging Example Gem demonstrates the basics of extending the Open 3D Engine Scene API by adding additional logging to the pipeline.", "canonical_tags": [ diff --git a/Gems/SceneProcessing/gem.json b/Gems/SceneProcessing/gem.json index 576460d0a9..3689c2500a 100644 --- a/Gems/SceneProcessing/gem.json +++ b/Gems/SceneProcessing/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Tool", "summary": "The Scene Processing Gem provides Scene Settings, a tool you can use to specify the default settings for processing asset files for actors, meshes, motions, and PhysX.", "canonical_tags": [ diff --git a/Gems/ScriptCanvas/gem.json b/Gems/ScriptCanvas/gem.json index fc8a504917..ace6bca50c 100644 --- a/Gems/ScriptCanvas/gem.json +++ b/Gems/ScriptCanvas/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Tool", "summary": "The Script Canvas Gem provides Open 3D Engine's visual scripting environment, Script Canvas.", "canonical_tags": [ diff --git a/Gems/ScriptCanvasDeveloper/gem.json b/Gems/ScriptCanvasDeveloper/gem.json index fe1fdea0fc..c7e23dab9a 100644 --- a/Gems/ScriptCanvasDeveloper/gem.json +++ b/Gems/ScriptCanvasDeveloper/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Tool", "summary": "The Script Canvas Developer Gem provides a suite of utility features for the development and debugging of Script Canvas systems.", "canonical_tags": [ diff --git a/Gems/ScriptCanvasPhysics/gem.json b/Gems/ScriptCanvasPhysics/gem.json index 2e35e85c46..fdf83fe479 100644 --- a/Gems/ScriptCanvasPhysics/gem.json +++ b/Gems/ScriptCanvasPhysics/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", "summary": "The Script Canvas Physics Gem provides Script Canvas nodes for physics scene queries such as raycasts.", "canonical_tags": [ diff --git a/Gems/ScriptCanvasTesting/gem.json b/Gems/ScriptCanvasTesting/gem.json index 5cb718e674..f62ec46fd4 100644 --- a/Gems/ScriptCanvasTesting/gem.json +++ b/Gems/ScriptCanvasTesting/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Tool", "summary": "The Script Canvas Testing Gem provides a framework for testing for and with Script Canvas.", "canonical_tags": [ diff --git a/Gems/ScriptEvents/gem.json b/Gems/ScriptEvents/gem.json index 5640e08489..c9391da996 100644 --- a/Gems/ScriptEvents/gem.json +++ b/Gems/ScriptEvents/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", "summary": "The Script Events Gem provides a framework for creating event assets usable from any scripting solution in Open 3D Engine.", "canonical_tags": [ diff --git a/Gems/ScriptedEntityTweener/gem.json b/Gems/ScriptedEntityTweener/gem.json index 477345093c..bf7eec470f 100644 --- a/Gems/ScriptedEntityTweener/gem.json +++ b/Gems/ScriptedEntityTweener/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Tool", "summary": "The Scripted Entity Tweener Gem provides a script driven animation system for Open 3D Engine projects.", "canonical_tags": [ diff --git a/Gems/SliceFavorites/gem.json b/Gems/SliceFavorites/gem.json index c4536dc042..bbb873b20b 100644 --- a/Gems/SliceFavorites/gem.json +++ b/Gems/SliceFavorites/gem.json @@ -4,13 +4,18 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", "summary": "Add the ability to favorite a slice to allow easy access and instantiation", + "canonical_tags": [ + "Gem" + ], "user_tags": [ "Editor", "Slices" ], "icon_path": "preview.png", "requirements": "", + "documentation_url": "", "dependencies": [] } diff --git a/Gems/StartingPointCamera/gem.json b/Gems/StartingPointCamera/gem.json index 1033770022..1a736d6e74 100644 --- a/Gems/StartingPointCamera/gem.json +++ b/Gems/StartingPointCamera/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", "summary": "The Starting Point Camera Gem provides the behaviors used with the Camera Framework Gem to define a camera rig.", "canonical_tags": [ diff --git a/Gems/StartingPointInput/gem.json b/Gems/StartingPointInput/gem.json index ee1655b794..77a683658d 100644 --- a/Gems/StartingPointInput/gem.json +++ b/Gems/StartingPointInput/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", "summary": "The Starting Point Input Gem provides functionality to map low-level input events to high-level actions.", "canonical_tags": [ diff --git a/Gems/StartingPointMovement/gem.json b/Gems/StartingPointMovement/gem.json index 188d8483bc..a9941098fa 100644 --- a/Gems/StartingPointMovement/gem.json +++ b/Gems/StartingPointMovement/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", "summary": "The Starting Point Movement Gem provides a series of Lua scripts that listen and respond to input events and trigger transform operations such as translation and rotation.", "canonical_tags": [ diff --git a/Gems/SurfaceData/gem.json b/Gems/SurfaceData/gem.json index d16254040f..10100e3b90 100644 --- a/Gems/SurfaceData/gem.json +++ b/Gems/SurfaceData/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", "summary": "The Surface Data Gem provides functionality to emit signals or tags from surfaces such as meshes and terrain.", "canonical_tags": [ diff --git a/Gems/Terrain/gem.json b/Gems/Terrain/gem.json index 0ca470c4d3..f038eb4d90 100644 --- a/Gems/Terrain/gem.json +++ b/Gems/Terrain/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "summary": "The Terrain Gem is an experimental terrain system. The terrain system maps height, color, and surface data to regions of the world, provides gradient-based and shape-based authoring tools and workflows, includes specialized rendering for efficient display, and integrates with physics for physical simulation.", "canonical_tags": [ "Gem" diff --git a/Gems/TestAssetBuilder/gem.json b/Gems/TestAssetBuilder/gem.json index 68ed706499..96c3bb4ffb 100644 --- a/Gems/TestAssetBuilder/gem.json +++ b/Gems/TestAssetBuilder/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", "summary": "The Test Asset Builder Gem is used to feature test Asset Processor.", "canonical_tags": [ diff --git a/Gems/TextureAtlas/gem.json b/Gems/TextureAtlas/gem.json index 142f0fb082..970982fb48 100644 --- a/Gems/TextureAtlas/gem.json +++ b/Gems/TextureAtlas/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", "summary": "The Texture Atlas Gem provides the formatting for texture atlases from 2D textures for LyShine.", "canonical_tags": [ diff --git a/Gems/TickBusOrderViewer/gem.json b/Gems/TickBusOrderViewer/gem.json index a6a6fd23ac..78b4d96c5c 100644 --- a/Gems/TickBusOrderViewer/gem.json +++ b/Gems/TickBusOrderViewer/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Tool", "summary": "The Tick Bus Order Viewer Gem provides a console variable that displays the order of runtime tick events.", "canonical_tags": [ diff --git a/Gems/Twitch/CMakeLists.txt b/Gems/Twitch/CMakeLists.txt index 2bb380fae3..50f9e78c74 100644 --- a/Gems/Twitch/CMakeLists.txt +++ b/Gems/Twitch/CMakeLists.txt @@ -6,4 +6,8 @@ # # +set(gem_path ${CMAKE_CURRENT_LIST_DIR}) +set(gem_json ${gem_path}/gem.json) +o3de_restricted_path(${gem_json} gem_restricted_path gem_parent_relative_path) + add_subdirectory(Code) diff --git a/Gems/Twitch/Code/CMakeLists.txt b/Gems/Twitch/Code/CMakeLists.txt index 80c74e5bd4..75b18627cf 100644 --- a/Gems/Twitch/Code/CMakeLists.txt +++ b/Gems/Twitch/Code/CMakeLists.txt @@ -6,8 +6,8 @@ # # -ly_get_list_relative_pal_filename(pal_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME}) -ly_get_list_relative_pal_filename(common_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/Common) +o3de_pal_dir(pal_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME} ${gem_restricted_path} ${gem_path} ${gem_parent_relative_path}) +set(common_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/Common) ly_add_target( NAME Twitch.Static STATIC diff --git a/Gems/Twitch/gem.json b/Gems/Twitch/gem.json index 42ec1b971e..70386e057f 100644 --- a/Gems/Twitch/gem.json +++ b/Gems/Twitch/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", "summary": "The Twitch Gem provides access to the Twitch API v5 SDK including social functions, channels, and other APIs.", "canonical_tags": [ @@ -12,7 +13,8 @@ "user_tags": [ "Network", "SDK", - "Multiplayer" + "Multiplayer", + "Twitch" ], "icon_path": "preview.png", "requirements": "", diff --git a/Gems/UiBasics/gem.json b/Gems/UiBasics/gem.json index bb2416c235..4734aef779 100644 --- a/Gems/UiBasics/gem.json +++ b/Gems/UiBasics/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Asset", "summary": "The UI Basics Gem provides a collection of basic UI prefabs such as image, text, and button, that can be used with LyShine, the Open 3D Engine runtime User Interface system and editor.", "canonical_tags": [ diff --git a/Gems/Vegetation/gem.json b/Gems/Vegetation/gem.json index 75416933f0..8dfd3b3a59 100644 --- a/Gems/Vegetation/gem.json +++ b/Gems/Vegetation/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", "summary": "The Vegetation Gem provides tools to place natural-looking vegetation in Open 3D Engine.", "canonical_tags": [ diff --git a/Gems/VideoPlaybackFramework/gem.json b/Gems/VideoPlaybackFramework/gem.json index 381738ab4b..9115148c50 100644 --- a/Gems/VideoPlaybackFramework/gem.json +++ b/Gems/VideoPlaybackFramework/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", "summary": "The Video Playback Framework Gem provides the interface to play back video.", "canonical_tags": [ diff --git a/Gems/VirtualGamepad/gem.json b/Gems/VirtualGamepad/gem.json index 637776ac85..a2a669bb11 100644 --- a/Gems/VirtualGamepad/gem.json +++ b/Gems/VirtualGamepad/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", "summary": "The Virtual Gamepad Gem provides controls that emulate a gamepad on touch screen devices.", "canonical_tags": [ diff --git a/Gems/WhiteBox/CMakeLists.txt b/Gems/WhiteBox/CMakeLists.txt index 2bb380fae3..50f9e78c74 100644 --- a/Gems/WhiteBox/CMakeLists.txt +++ b/Gems/WhiteBox/CMakeLists.txt @@ -6,4 +6,8 @@ # # +set(gem_path ${CMAKE_CURRENT_LIST_DIR}) +set(gem_json ${gem_path}/gem.json) +o3de_restricted_path(${gem_json} gem_restricted_path gem_parent_relative_path) + add_subdirectory(Code) diff --git a/Gems/WhiteBox/Code/CMakeLists.txt b/Gems/WhiteBox/Code/CMakeLists.txt index bfc4eb724a..91536503ac 100644 --- a/Gems/WhiteBox/Code/CMakeLists.txt +++ b/Gems/WhiteBox/Code/CMakeLists.txt @@ -6,8 +6,8 @@ # # -ly_get_list_relative_pal_filename(pal_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME}) -ly_get_list_relative_pal_filename(common_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/Common) +o3de_pal_dir(pal_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME} ${gem_restricted_path} ${gem_path} ${gem_parent_relative_path}) +set(common_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/Common) include(${pal_source_dir}/PAL_${PAL_PLATFORM_NAME_LOWERCASE}.cmake) diff --git a/Gems/WhiteBox/gem.json b/Gems/WhiteBox/gem.json index 2d173e9a6b..18a3022b74 100644 --- a/Gems/WhiteBox/gem.json +++ b/Gems/WhiteBox/gem.json @@ -4,6 +4,7 @@ "license": "Apache-2.0 Or MIT", "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Tool", "summary": "The White Box Gem provides White Box rapid design components for Open 3D Engine.", "canonical_tags": [ diff --git a/Templates/AssetGem/Template/gem.json b/Templates/AssetGem/Template/gem.json index 2a02362256..b04ecf9dd8 100644 --- a/Templates/AssetGem/Template/gem.json +++ b/Templates/AssetGem/Template/gem.json @@ -1,18 +1,21 @@ { "gem_name": "${Name}", "display_name": "${Name}", - "license": "What license ${Name} uses goes here: i.e. Apache-2.0 Or MIT", - "license_url": "", - "origin": "The primary repo for ${Name} goes here: i.e. http://www.mydomain.com", + "license": "What license ${Name} uses goes here: i.e. Apache-2.0 or MIT", + "license_url": "Link to the license web site goes here: i.e. https://opensource.org/licenses/Apache-2.0 Or https://opensource.org/licenses/MIT", + "origin": "The name of the originator goes here. i.e. XYZ Inc.", + "origin_url": "The primary repo for ${Name} goes here: i.e. http://www.mydomain.com", "type": "Asset", - "summary": "A short description of ${Name}.", + "summary": "A short description of ${Name} goes here.", "canonical_tags": [ "Gem" ], "user_tags": [ - "Assets", "${Name}" ], "icon_path": "preview.png", - "requirements": "" + "requirements": "Notice of any requirements ${Name} has goes here. i.e. This requires X other gem", + "documentation_url": "Link to any documentation of ${Name} goes here: i.e. https://o3de.org/docs/user-guide/gems/reference/design/white-box/", + "dependencies": [ + ] } diff --git a/Templates/AssetGem/template.json b/Templates/AssetGem/template.json index e858dc526d..2f390f2077 100644 --- a/Templates/AssetGem/template.json +++ b/Templates/AssetGem/template.json @@ -1,10 +1,17 @@ { "template_name": "AssetGem", - "origin": "The primary repo for AssetGem goes here: i.e. http://www.mydomain.com", - "license": "What license AssetGem uses goes here: i.e. https://opensource.org/licenses/MIT", - "display_name": "AssetGem", - "summary": "A short description of AssetGem template.", - "canonical_tags": [], + "template_restricted_platform_relative_path": "Templates/AssetGem", + "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", + "license": "Apache-2.0 or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", + "display_name": "Asset Gem Template", + "summary": "Use this gem template to create the minimal gem needed for adding asset(s).", + "canonical_tags": [ + "Template", + "Gem", + "Asset" + ], "user_tags": [ "AssetGem" ], @@ -12,27 +19,20 @@ "copyFiles": [ { "file": "CMakeLists.txt", - "origin": "CMakeLists.txt", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "gem.json", - "origin": "gem.json", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "preview.png", - "origin": "preview.png", - "isTemplated": false, - "isOptional": false + "isTemplated": false } ], "createDirectories": [ { - "dir": "Assets", - "origin": "Assets" + "dir": "Assets" } ] } diff --git a/Templates/CppToolGem/Template/gem.json b/Templates/CppToolGem/Template/gem.json index 079b7152ff..05be122226 100644 --- a/Templates/CppToolGem/Template/gem.json +++ b/Templates/CppToolGem/Template/gem.json @@ -1,11 +1,12 @@ { "gem_name": "${Name}", "display_name": "${Name}", - "license": "What license ${Name} uses goes here: i.e. Apache-2.0 Or MIT", - "license_url": "", - "origin": "The primary repo for ${Name} goes here: i.e. http://www.mydomain.com", + "license": "What license ${Name} uses goes here: i.e. Apache-2.0 or MIT", + "license_url": "Link to the license web site goes here: i.e. https://opensource.org/licenses/Apache-2.0 Or https://opensource.org/licenses/MIT", + "origin": "The name of the originator goes here. i.e. XYZ Inc.", + "origin_url": "The primary repo for ${Name} goes here: i.e. http://www.mydomain.com", "type": "Code", - "summary": "A short description of ${Name}.", + "summary": "A short description of ${Name} goes here.", "canonical_tags": [ "Gem" ], @@ -13,6 +14,8 @@ "${Name}" ], "icon_path": "preview.png", - "requirements": "", - "restricted_name": "gems" + "requirements": "Notice of any requirements ${Name} has goes here. i.e. This requires X other gem", + "documentation_url": "Link to any documentation of ${Name} goes here: i.e. https://o3de.org/docs/user-guide/gems/reference/design/white-box/", + "dependencies": [ + ] } diff --git a/Templates/CppToolGem/template.json b/Templates/CppToolGem/template.json index b516dbaec3..16874326ef 100644 --- a/Templates/CppToolGem/template.json +++ b/Templates/CppToolGem/template.json @@ -1,10 +1,16 @@ { "template_name": "CppToolGem", - "origin": "The primary repo for CppToolGem goes here: i.e. http://www.mydomain.com", - "license": "What license CppToolGem uses goes here: i.e. https://opensource.org/licenses/MIT", + "template_restricted_platform_relative_path": "Templates/CppToolGem", + "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", + "license": "Apache-2.0 or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "display_name": "CppToolGem", "summary": "A gem template for a custom tool in C++ that gets registered with the Editor.", - "canonical_tags": [], + "canonical_tags": [ + "Template", + "Gem" + ], "user_tags": [ "CppToolGem" ], @@ -12,371 +18,255 @@ "copyFiles": [ { "file": "CMakeLists.txt", - "origin": "CMakeLists.txt", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Code/${NameLower}_editor_files.cmake", - "origin": "Code/${NameLower}_editor_files.cmake", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/${NameLower}_editor_shared_files.cmake", - "origin": "Code/${NameLower}_editor_shared_files.cmake", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/${NameLower}_editor_tests_files.cmake", - "origin": "Code/${NameLower}_editor_tests_files.cmake", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/${NameLower}_files.cmake", - "origin": "Code/${NameLower}_files.cmake", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/${NameLower}_shared_files.cmake", - "origin": "Code/${NameLower}_shared_files.cmake", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/${NameLower}_tests_files.cmake", - "origin": "Code/${NameLower}_tests_files.cmake", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/CMakeLists.txt", - "origin": "Code/CMakeLists.txt", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/Include/${Name}/${Name}Bus.h", - "origin": "Code/Include/${Name}/${Name}Bus.h", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/Platform/Android/${NameLower}_android_files.cmake", - "origin": "Code/Platform/Android/${NameLower}_android_files.cmake", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/Platform/Android/${NameLower}_shared_android_files.cmake", - "origin": "Code/Platform/Android/${NameLower}_shared_android_files.cmake", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/Platform/Android/PAL_android.cmake", - "origin": "Code/Platform/Android/PAL_android.cmake", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/Platform/Linux/${NameLower}_linux_files.cmake", - "origin": "Code/Platform/Linux/${NameLower}_linux_files.cmake", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/Platform/Linux/${NameLower}_shared_linux_files.cmake", - "origin": "Code/Platform/Linux/${NameLower}_shared_linux_files.cmake", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/Platform/Linux/PAL_linux.cmake", - "origin": "Code/Platform/Linux/PAL_linux.cmake", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/Platform/Mac/${NameLower}_mac_files.cmake", - "origin": "Code/Platform/Mac/${NameLower}_mac_files.cmake", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/Platform/Mac/${NameLower}_shared_mac_files.cmake", - "origin": "Code/Platform/Mac/${NameLower}_shared_mac_files.cmake", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/Platform/Mac/PAL_mac.cmake", - "origin": "Code/Platform/Mac/PAL_mac.cmake", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/Platform/Windows/${NameLower}_shared_windows_files.cmake", - "origin": "Code/Platform/Windows/${NameLower}_shared_windows_files.cmake", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/Platform/Windows/${NameLower}_windows_files.cmake", - "origin": "Code/Platform/Windows/${NameLower}_windows_files.cmake", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/Platform/Windows/PAL_windows.cmake", - "origin": "Code/Platform/Windows/PAL_windows.cmake", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/Platform/iOS/${NameLower}_ios_files.cmake", - "origin": "Code/Platform/iOS/${NameLower}_ios_files.cmake", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/Platform/iOS/${NameLower}_shared_ios_files.cmake", - "origin": "Code/Platform/iOS/${NameLower}_shared_ios_files.cmake", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/Platform/iOS/PAL_ios.cmake", - "origin": "Code/Platform/iOS/PAL_ios.cmake", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/Source/${Name}.qrc", - "origin": "Code/Source/${Name}.qrc", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/Source/${Name}EditorModule.cpp", - "origin": "Code/Source/${Name}EditorModule.cpp", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/Source/${Name}EditorSystemComponent.cpp", - "origin": "Code/Source/${Name}EditorSystemComponent.cpp", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/Source/${Name}EditorSystemComponent.h", - "origin": "Code/Source/${Name}EditorSystemComponent.h", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/Source/${Name}Module.cpp", - "origin": "Code/Source/${Name}Module.cpp", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/Source/${Name}ModuleInterface.h", - "origin": "Code/Source/${Name}ModuleInterface.h", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/Source/${Name}SystemComponent.cpp", - "origin": "Code/Source/${Name}SystemComponent.cpp", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/Source/${Name}SystemComponent.h", - "origin": "Code/Source/${Name}SystemComponent.h", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/Source/${Name}Widget.cpp", - "origin": "Code/Source/${Name}Widget.cpp", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/Source/${Name}Widget.h", - "origin": "Code/Source/${Name}Widget.h", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/Source/toolbar_icon.svg", - "origin": "Code/Source/toolbar_icon.svg", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Code/Tests/${Name}EditorTest.cpp", - "origin": "Code/Tests/${Name}EditorTest.cpp", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Code/Tests/${Name}Test.cpp", - "origin": "Code/Tests/${Name}Test.cpp", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Platform/Android/android_gem.cmake", - "origin": "Platform/Android/android_gem.cmake", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Platform/Android/android_gem.json", - "origin": "Platform/Android/android_gem.json", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Platform/Linux/linux_gem.cmake", - "origin": "Platform/Linux/linux_gem.cmake", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Platform/Linux/linux_gem.json", - "origin": "Platform/Linux/linux_gem.json", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Platform/Mac/mac_gem.cmake", - "origin": "Platform/Mac/mac_gem.cmake", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Platform/Mac/mac_gem.json", - "origin": "Platform/Mac/mac_gem.json", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Platform/Windows/windows_gem.cmake", - "origin": "Platform/Windows/windows_gem.cmake", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Platform/Windows/windows_gem.json", - "origin": "Platform/Windows/windows_gem.json", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Platform/iOS/ios_gem.cmake", - "origin": "Platform/iOS/ios_gem.cmake", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Platform/iOS/ios_gem.json", - "origin": "Platform/iOS/ios_gem.json", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "gem.json", - "origin": "gem.json", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "preview.png", - "origin": "preview.png", - "isTemplated": false, - "isOptional": false + "isTemplated": false } ], "createDirectories": [ { - "dir": "Assets", - "origin": "Assets" + "dir": "Assets" }, { - "dir": "Code", - "origin": "Code" + "dir": "Code" }, { - "dir": "Code/Include", - "origin": "Code/Include" + "dir": "Code/Include" }, { - "dir": "Code/Include/${Name}", - "origin": "Code/Include/${Name}" + "dir": "Code/Include/${Name}" }, { - "dir": "Code/Platform", - "origin": "Code/Platform" + "dir": "Code/Platform" }, { - "dir": "Code/Platform/Android", - "origin": "Code/Platform/Android" + "dir": "Code/Platform/Android" }, { - "dir": "Code/Platform/Linux", - "origin": "Code/Platform/Linux" + "dir": "Code/Platform/Linux" }, { - "dir": "Code/Platform/Mac", - "origin": "Code/Platform/Mac" + "dir": "Code/Platform/Mac" }, { - "dir": "Code/Platform/Windows", - "origin": "Code/Platform/Windows" + "dir": "Code/Platform/Windows" }, { - "dir": "Code/Platform/iOS", - "origin": "Code/Platform/iOS" + "dir": "Code/Platform/iOS" }, { - "dir": "Code/Source", - "origin": "Code/Source" + "dir": "Code/Source" }, { - "dir": "Code/Tests", - "origin": "Code/Tests" + "dir": "Code/Tests" }, { - "dir": "Platform", - "origin": "Platform" + "dir": "Platform" }, { - "dir": "Platform/Android", - "origin": "Platform/Android" + "dir": "Platform/Android" }, { - "dir": "Platform/Linux", - "origin": "Platform/Linux" + "dir": "Platform/Linux" }, { - "dir": "Platform/Mac", - "origin": "Platform/Mac" + "dir": "Platform/Mac" }, { - "dir": "Platform/Windows", - "origin": "Platform/Windows" + "dir": "Platform/Windows" }, { - "dir": "Platform/iOS", - "origin": "Platform/iOS" + "dir": "Platform/iOS" } ] } diff --git a/Templates/DefaultGem/Template/CMakeLists.txt b/Templates/DefaultGem/Template/CMakeLists.txt index b19ea2edce..f4c55dd1a5 100644 --- a/Templates/DefaultGem/Template/CMakeLists.txt +++ b/Templates/DefaultGem/Template/CMakeLists.txt @@ -6,12 +6,11 @@ # # {END_LICENSE} -set(o3de_gem_path ${CMAKE_CURRENT_LIST_DIR}) -set(o3de_gem_json ${o3de_gem_path}/gem.json) -o3de_read_json_key(o3de_gem_name ${o3de_gem_json} "gem_name") -o3de_restricted_path(${o3de_gem_json} o3de_gem_restricted_path) +set(gem_path ${CMAKE_CURRENT_LIST_DIR}) +set(gem_json ${gem_path}/gem.json) +o3de_restricted_path(${gem_json} gem_restricted_path gem_parent_relative_path) -ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} "${o3de_gem_restricted_path}" ${o3de_gem_path} ${o3de_gem_name}) +o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} ${gem_restricted_path} ${gem_path} ${gem_parent_relative_path}) # Now that we have the platform abstraction layer (PAL) folder for this folder, thats where we will find the # project cmake for this platform. diff --git a/Templates/DefaultGem/Template/Code/CMakeLists.txt b/Templates/DefaultGem/Template/Code/CMakeLists.txt index f462e7f2d4..c5ff305b2a 100644 --- a/Templates/DefaultGem/Template/Code/CMakeLists.txt +++ b/Templates/DefaultGem/Template/Code/CMakeLists.txt @@ -8,11 +8,11 @@ # Currently we are in the Code folder: ${CMAKE_CURRENT_LIST_DIR} # Get the platform specific folder ${pal_dir} for the current folder: ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} -# Note: ly_get_list_relative_pal_filename will take care of the details for us, as this may be a restricted platform +# Note: o3de_pal_dir will take care of the details for us, as this may be a restricted platform # in which case it will see if that platform is present here or in the restricted folder. # i.e. It could here in our gem : Gems/${Name}/Code/Platform/ or # //Gems/${Name}/Code -ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} ${o3de_gem_restricted_path} ${o3de_gem_path} ${o3de_gem_name}) +o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} ${o3de_gem_restricted_path} ${o3de_gem_path} ${o3de_gem_name}) # Now that we have the platform abstraction layer (PAL) folder for this folder, thats where we will find the # traits for this platform. Traits for a platform are defines for things like whether or not something in this gem diff --git a/Templates/DefaultGem/Template/gem.json b/Templates/DefaultGem/Template/gem.json index d4ff637bee..05be122226 100644 --- a/Templates/DefaultGem/Template/gem.json +++ b/Templates/DefaultGem/Template/gem.json @@ -1,11 +1,12 @@ { "gem_name": "${Name}", "display_name": "${Name}", - "license": "What license ${Name} uses goes here: i.e. Apache-2.0 Or MIT", - "license_url": "", - "origin": "The primary repo for ${Name} goes here: i.e. http://www.mydomain.com", + "license": "What license ${Name} uses goes here: i.e. Apache-2.0 or MIT", + "license_url": "Link to the license web site goes here: i.e. https://opensource.org/licenses/Apache-2.0 Or https://opensource.org/licenses/MIT", + "origin": "The name of the originator goes here. i.e. XYZ Inc.", + "origin_url": "The primary repo for ${Name} goes here: i.e. http://www.mydomain.com", "type": "Code", - "summary": "A short description of ${Name}.", + "summary": "A short description of ${Name} goes here.", "canonical_tags": [ "Gem" ], @@ -13,5 +14,8 @@ "${Name}" ], "icon_path": "preview.png", - "requirements": "" + "requirements": "Notice of any requirements ${Name} has goes here. i.e. This requires X other gem", + "documentation_url": "Link to any documentation of ${Name} goes here: i.e. https://o3de.org/docs/user-guide/gems/reference/design/white-box/", + "dependencies": [ + ] } diff --git a/Templates/DefaultGem/template.json b/Templates/DefaultGem/template.json index e24632d6a0..e5dc570cbe 100644 --- a/Templates/DefaultGem/template.json +++ b/Templates/DefaultGem/template.json @@ -1,12 +1,16 @@ { "template_name": "DefaultGem", + "template_restricted_platform_relative_path": "Templates/DefaultGem", "restricted_name": "o3de", - "restricted_platform_relative_path": "Templates", - "origin": "The primary repo for DefaultGem goes here: i.e. http://www.mydomain.com", - "license": "What license DefaultGem uses goes here: i.e. https://opensource.org/licenses/MIT", - "display_name": "DefaultGem", - "summary": "A short description of DefaultGem.", - "canonical_tags": [], + "restricted_platform_relative_path": "Templates/DefaultGem", + "license": "Apache-2.0 or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", + "display_name": "Default Gem Template", + "summary": "This is the gem template that will be used if no gem template is specified during gem creation.", + "canonical_tags": [ + "Template", + "Gem" + ], "user_tags": [ "DefaultGem" ], @@ -14,347 +18,239 @@ "copyFiles": [ { "file": "CMakeLists.txt", - "origin": "CMakeLists.txt", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/${NameLower}_editor_files.cmake", - "origin": "Code/${NameLower}_editor_files.cmake", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/${NameLower}_editor_shared_files.cmake", - "origin": "Code/${NameLower}_editor_shared_files.cmake", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/${NameLower}_editor_tests_files.cmake", - "origin": "Code/${NameLower}_editor_tests_files.cmake", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/${NameLower}_files.cmake", - "origin": "Code/${NameLower}_files.cmake", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/${NameLower}_shared_files.cmake", - "origin": "Code/${NameLower}_shared_files.cmake", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/${NameLower}_tests_files.cmake", - "origin": "Code/${NameLower}_tests_files.cmake", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/CMakeLists.txt", - "origin": "Code/CMakeLists.txt", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/Include/${Name}/${Name}Bus.h", - "origin": "Code/Include/${Name}/${Name}Bus.h", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/Platform/Android/${NameLower}_android_files.cmake", - "origin": "Code/Platform/Android/${NameLower}_android_files.cmake", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/Platform/Android/${NameLower}_shared_android_files.cmake", - "origin": "Code/Platform/Android/${NameLower}_shared_android_files.cmake", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/Platform/Android/PAL_android.cmake", - "origin": "Code/Platform/Android/PAL_android.cmake", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/Platform/Linux/${NameLower}_linux_files.cmake", - "origin": "Code/Platform/Linux/${NameLower}_linux_files.cmake", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/Platform/Linux/${NameLower}_shared_linux_files.cmake", - "origin": "Code/Platform/Linux/${NameLower}_shared_linux_files.cmake", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/Platform/Linux/PAL_linux.cmake", - "origin": "Code/Platform/Linux/PAL_linux.cmake", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/Platform/Mac/${NameLower}_mac_files.cmake", - "origin": "Code/Platform/Mac/${NameLower}_mac_files.cmake", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/Platform/Mac/${NameLower}_shared_mac_files.cmake", - "origin": "Code/Platform/Mac/${NameLower}_shared_mac_files.cmake", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/Platform/Mac/PAL_mac.cmake", - "origin": "Code/Platform/Mac/PAL_mac.cmake", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/Platform/Windows/${NameLower}_shared_windows_files.cmake", - "origin": "Code/Platform/Windows/${NameLower}_shared_windows_files.cmake", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/Platform/Windows/${NameLower}_windows_files.cmake", - "origin": "Code/Platform/Windows/${NameLower}_windows_files.cmake", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/Platform/Windows/PAL_windows.cmake", - "origin": "Code/Platform/Windows/PAL_windows.cmake", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/Platform/iOS/${NameLower}_ios_files.cmake", - "origin": "Code/Platform/iOS/${NameLower}_ios_files.cmake", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/Platform/iOS/${NameLower}_shared_ios_files.cmake", - "origin": "Code/Platform/iOS/${NameLower}_shared_ios_files.cmake", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/Platform/iOS/PAL_ios.cmake", - "origin": "Code/Platform/iOS/PAL_ios.cmake", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/Source/${Name}EditorModule.cpp", - "origin": "Code/Source/${Name}EditorModule.cpp", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/Source/${Name}EditorSystemComponent.cpp", - "origin": "Code/Source/${Name}EditorSystemComponent.cpp", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/Source/${Name}EditorSystemComponent.h", - "origin": "Code/Source/${Name}EditorSystemComponent.h", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/Source/${Name}Module.cpp", - "origin": "Code/Source/${Name}Module.cpp", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/Source/${Name}ModuleInterface.h", - "origin": "Code/Source/${Name}ModuleInterface.h", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/Source/${Name}SystemComponent.cpp", - "origin": "Code/Source/${Name}SystemComponent.cpp", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/Source/${Name}SystemComponent.h", - "origin": "Code/Source/${Name}SystemComponent.h", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/Tests/${Name}EditorTest.cpp", - "origin": "Code/Tests/${Name}EditorTest.cpp", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/Tests/${Name}Test.cpp", - "origin": "Code/Tests/${Name}Test.cpp", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Platform/Android/android_gem.cmake", - "origin": "Platform/Android/android_gem.cmake", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Platform/Android/android_gem.json", - "origin": "Platform/Android/android_gem.json", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Platform/Linux/linux_gem.cmake", - "origin": "Platform/Linux/linux_gem.cmake", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Platform/Linux/linux_gem.json", - "origin": "Platform/Linux/linux_gem.json", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Platform/Mac/mac_gem.cmake", - "origin": "Platform/Mac/mac_gem.cmake", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Platform/Mac/mac_gem.json", - "origin": "Platform/Mac/mac_gem.json", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Platform/Windows/windows_gem.cmake", - "origin": "Platform/Windows/windows_gem.cmake", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Platform/Windows/windows_gem.json", - "origin": "Platform/Windows/windows_gem.json", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Platform/iOS/ios_gem.cmake", - "origin": "Platform/iOS/ios_gem.cmake", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Platform/iOS/ios_gem.json", - "origin": "Platform/iOS/ios_gem.json", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "gem.json", - "origin": "gem.json", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "preview.png", - "origin": "preview.png", - "isTemplated": false, - "isOptional": false + "isTemplated": false } ], "createDirectories": [ { - "dir": "Assets", - "origin": "Assets" + "dir": "Assets" }, { - "dir": "Code", - "origin": "Code" + "dir": "Code" }, { - "dir": "Code/Include", - "origin": "Code/Include" + "dir": "Code/Include" }, { - "dir": "Code/Include/${Name}", - "origin": "Code/Include/${Name}" + "dir": "Code/Include/${Name}" }, { - "dir": "Code/Platform", - "origin": "Code/Platform" + "dir": "Code/Platform" }, { - "dir": "Code/Platform/Android", - "origin": "Code/Platform/Android" + "dir": "Code/Platform/Android" }, { - "dir": "Code/Platform/Linux", - "origin": "Code/Platform/Linux" + "dir": "Code/Platform/Linux" }, { - "dir": "Code/Platform/Mac", - "origin": "Code/Platform/Mac" + "dir": "Code/Platform/Mac" }, { - "dir": "Code/Platform/Windows", - "origin": "Code/Platform/Windows" + "dir": "Code/Platform/Windows" }, { - "dir": "Code/Platform/iOS", - "origin": "Code/Platform/iOS" + "dir": "Code/Platform/iOS" }, { - "dir": "Code/Source", - "origin": "Code/Source" + "dir": "Code/Source" }, { - "dir": "Code/Tests", - "origin": "Code/Tests" + "dir": "Code/Tests" }, { - "dir": "Platform", - "origin": "Platform" + "dir": "Platform" }, { - "dir": "Platform/Android", - "origin": "Platform/Android" + "dir": "Platform/Android" }, { - "dir": "Platform/Linux", - "origin": "Platform/Linux" + "dir": "Platform/Linux" }, { - "dir": "Platform/Mac", - "origin": "Platform/Mac" + "dir": "Platform/Mac" }, { - "dir": "Platform/Windows", - "origin": "Platform/Windows" + "dir": "Platform/Windows" }, { - "dir": "Platform/iOS", - "origin": "Platform/iOS" + "dir": "Platform/iOS" } ] } diff --git a/Templates/DefaultProject/Template/CMakeLists.txt b/Templates/DefaultProject/Template/CMakeLists.txt index ae4bb662a3..420a92948d 100644 --- a/Templates/DefaultProject/Template/CMakeLists.txt +++ b/Templates/DefaultProject/Template/CMakeLists.txt @@ -29,5 +29,4 @@ else() set_property(GLOBAL APPEND PROPERTY LY_PROJECTS_TARGET_NAME ${project_target_name}) - add_subdirectory(Code) endif() diff --git a/Templates/DefaultProject/Template/Code/${NameLower}_files.cmake b/Templates/DefaultProject/Template/Gem/${NameLower}_files.cmake similarity index 100% rename from Templates/DefaultProject/Template/Code/${NameLower}_files.cmake rename to Templates/DefaultProject/Template/Gem/${NameLower}_files.cmake diff --git a/Templates/DefaultProject/Template/Code/${NameLower}_shared_files.cmake b/Templates/DefaultProject/Template/Gem/${NameLower}_shared_files.cmake similarity index 100% rename from Templates/DefaultProject/Template/Code/${NameLower}_shared_files.cmake rename to Templates/DefaultProject/Template/Gem/${NameLower}_shared_files.cmake diff --git a/Templates/MinimalProject/Template/Code/CMakeLists.txt b/Templates/DefaultProject/Template/Gem/CMakeLists.txt similarity index 87% rename from Templates/MinimalProject/Template/Code/CMakeLists.txt rename to Templates/DefaultProject/Template/Gem/CMakeLists.txt index 5e646c0704..fc3eab6535 100644 --- a/Templates/MinimalProject/Template/Code/CMakeLists.txt +++ b/Templates/DefaultProject/Template/Gem/CMakeLists.txt @@ -6,13 +6,17 @@ # # {END_LICENSE} +set(gem_path ${CMAKE_CURRENT_LIST_DIR}) +set(gem_json ${gem_path}/gem.json) +o3de_restricted_path(${gem_json} gem_restricted_path gem_parent_relative_path) + # Currently we are in the ${Name}/Code folder: ${CMAKE_CURRENT_LIST_DIR} # Get the platform specific folder ${pal_dir} for the current folder: ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} -# Note: ly_get_list_relative_pal_filename will take care of the details for us, as this may be a restricted platform +# Note: o3de_pal_dir will take care of the details for us, as this may be a restricted platform # in which case it will see if that platform is present here or in the restricted folder. -# i.e. It could here : ${Name}/Code/Platform/ or +# i.e. It could here : ${Name}/Code/Platform/ or # //${Name}/Code -ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} ${o3de_project_restricted_path} ${o3de_project_path} ${o3de_project_name}) +o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} ${gem_restricted_path} ${gem_path} ${gem_parent_relative_path}) # Now that we have the platform abstraction layer (PAL) folder for this folder, thats where we will find the # traits for this platform. Traits for a platform are defines for things like whether or not something in this project @@ -71,7 +75,6 @@ ly_create_alias(NAME ${Name}.Servers NAMESPACE Gem TARGETS Gem::${Name}) # Enable the specified list of gems from GEM_FILE or GEMS list for this specific project: ly_enable_gems(PROJECT_NAME ${Name} GEM_FILE enabled_gems.cmake) - if(PAL_TRAIT_BUILD_SERVER_SUPPORTED) # this property causes it to actually make a ServerLauncher. # if you don't want a Server application, you can remove this and the diff --git a/Templates/DefaultProject/Template/Code/Include/${Name}/${Name}Bus.h b/Templates/DefaultProject/Template/Gem/Include/${Name}/${Name}Bus.h similarity index 99% rename from Templates/DefaultProject/Template/Code/Include/${Name}/${Name}Bus.h rename to Templates/DefaultProject/Template/Gem/Include/${Name}/${Name}Bus.h index d09bb2b009..d72b5785c3 100644 --- a/Templates/DefaultProject/Template/Code/Include/${Name}/${Name}Bus.h +++ b/Templates/DefaultProject/Template/Gem/Include/${Name}/${Name}Bus.h @@ -22,7 +22,7 @@ namespace ${SanitizedCppName} virtual ~${SanitizedCppName}Requests() = default; // Put your public methods here }; - + class ${SanitizedCppName}BusTraits : public AZ::EBusTraits { diff --git a/Templates/DefaultProject/Template/Code/Platform/Android/${NameLower}_android_files.cmake b/Templates/DefaultProject/Template/Gem/Platform/Android/${NameLower}_android_files.cmake similarity index 100% rename from Templates/DefaultProject/Template/Code/Platform/Android/${NameLower}_android_files.cmake rename to Templates/DefaultProject/Template/Gem/Platform/Android/${NameLower}_android_files.cmake diff --git a/Templates/DefaultProject/Template/Code/Platform/Android/${NameLower}_shared_android_files.cmake b/Templates/DefaultProject/Template/Gem/Platform/Android/${NameLower}_shared_android_files.cmake similarity index 100% rename from Templates/DefaultProject/Template/Code/Platform/Android/${NameLower}_shared_android_files.cmake rename to Templates/DefaultProject/Template/Gem/Platform/Android/${NameLower}_shared_android_files.cmake diff --git a/Templates/DefaultProject/Template/Code/Platform/Android/PAL_android.cmake b/Templates/DefaultProject/Template/Gem/Platform/Android/PAL_android.cmake similarity index 100% rename from Templates/DefaultProject/Template/Code/Platform/Android/PAL_android.cmake rename to Templates/DefaultProject/Template/Gem/Platform/Android/PAL_android.cmake diff --git a/Templates/DefaultProject/Template/Code/Platform/Linux/${NameLower}_linux_files.cmake b/Templates/DefaultProject/Template/Gem/Platform/Linux/${NameLower}_linux_files.cmake similarity index 100% rename from Templates/DefaultProject/Template/Code/Platform/Linux/${NameLower}_linux_files.cmake rename to Templates/DefaultProject/Template/Gem/Platform/Linux/${NameLower}_linux_files.cmake diff --git a/Templates/DefaultProject/Template/Code/Platform/Linux/${NameLower}_shared_linux_files.cmake b/Templates/DefaultProject/Template/Gem/Platform/Linux/${NameLower}_shared_linux_files.cmake similarity index 100% rename from Templates/DefaultProject/Template/Code/Platform/Linux/${NameLower}_shared_linux_files.cmake rename to Templates/DefaultProject/Template/Gem/Platform/Linux/${NameLower}_shared_linux_files.cmake diff --git a/Templates/DefaultProject/Template/Code/Platform/Linux/PAL_linux.cmake b/Templates/DefaultProject/Template/Gem/Platform/Linux/PAL_linux.cmake similarity index 100% rename from Templates/DefaultProject/Template/Code/Platform/Linux/PAL_linux.cmake rename to Templates/DefaultProject/Template/Gem/Platform/Linux/PAL_linux.cmake diff --git a/Templates/DefaultProject/Template/Code/Platform/Mac/${NameLower}_mac_files.cmake b/Templates/DefaultProject/Template/Gem/Platform/Mac/${NameLower}_mac_files.cmake similarity index 100% rename from Templates/DefaultProject/Template/Code/Platform/Mac/${NameLower}_mac_files.cmake rename to Templates/DefaultProject/Template/Gem/Platform/Mac/${NameLower}_mac_files.cmake diff --git a/Templates/DefaultProject/Template/Code/Platform/Mac/${NameLower}_shared_mac_files.cmake b/Templates/DefaultProject/Template/Gem/Platform/Mac/${NameLower}_shared_mac_files.cmake similarity index 100% rename from Templates/DefaultProject/Template/Code/Platform/Mac/${NameLower}_shared_mac_files.cmake rename to Templates/DefaultProject/Template/Gem/Platform/Mac/${NameLower}_shared_mac_files.cmake diff --git a/Templates/DefaultProject/Template/Code/Platform/Mac/PAL_mac.cmake b/Templates/DefaultProject/Template/Gem/Platform/Mac/PAL_mac.cmake similarity index 100% rename from Templates/DefaultProject/Template/Code/Platform/Mac/PAL_mac.cmake rename to Templates/DefaultProject/Template/Gem/Platform/Mac/PAL_mac.cmake diff --git a/Templates/DefaultProject/Template/Code/Platform/Windows/${NameLower}_shared_windows_files.cmake b/Templates/DefaultProject/Template/Gem/Platform/Windows/${NameLower}_shared_windows_files.cmake similarity index 100% rename from Templates/DefaultProject/Template/Code/Platform/Windows/${NameLower}_shared_windows_files.cmake rename to Templates/DefaultProject/Template/Gem/Platform/Windows/${NameLower}_shared_windows_files.cmake diff --git a/Templates/DefaultProject/Template/Code/Platform/Windows/${NameLower}_windows_files.cmake b/Templates/DefaultProject/Template/Gem/Platform/Windows/${NameLower}_windows_files.cmake similarity index 100% rename from Templates/DefaultProject/Template/Code/Platform/Windows/${NameLower}_windows_files.cmake rename to Templates/DefaultProject/Template/Gem/Platform/Windows/${NameLower}_windows_files.cmake diff --git a/Templates/DefaultProject/Template/Code/Platform/Windows/PAL_windows.cmake b/Templates/DefaultProject/Template/Gem/Platform/Windows/PAL_windows.cmake similarity index 100% rename from Templates/DefaultProject/Template/Code/Platform/Windows/PAL_windows.cmake rename to Templates/DefaultProject/Template/Gem/Platform/Windows/PAL_windows.cmake diff --git a/Templates/DefaultProject/Template/Code/Platform/iOS/${NameLower}_ios_files.cmake b/Templates/DefaultProject/Template/Gem/Platform/iOS/${NameLower}_ios_files.cmake similarity index 100% rename from Templates/DefaultProject/Template/Code/Platform/iOS/${NameLower}_ios_files.cmake rename to Templates/DefaultProject/Template/Gem/Platform/iOS/${NameLower}_ios_files.cmake diff --git a/Templates/DefaultProject/Template/Code/Platform/iOS/${NameLower}_shared_ios_files.cmake b/Templates/DefaultProject/Template/Gem/Platform/iOS/${NameLower}_shared_ios_files.cmake similarity index 100% rename from Templates/DefaultProject/Template/Code/Platform/iOS/${NameLower}_shared_ios_files.cmake rename to Templates/DefaultProject/Template/Gem/Platform/iOS/${NameLower}_shared_ios_files.cmake diff --git a/Templates/DefaultProject/Template/Code/Platform/iOS/PAL_ios.cmake b/Templates/DefaultProject/Template/Gem/Platform/iOS/PAL_ios.cmake similarity index 100% rename from Templates/DefaultProject/Template/Code/Platform/iOS/PAL_ios.cmake rename to Templates/DefaultProject/Template/Gem/Platform/iOS/PAL_ios.cmake diff --git a/Templates/DefaultProject/Template/Code/Source/${Name}Module.cpp b/Templates/DefaultProject/Template/Gem/Source/${Name}Module.cpp similarity index 100% rename from Templates/DefaultProject/Template/Code/Source/${Name}Module.cpp rename to Templates/DefaultProject/Template/Gem/Source/${Name}Module.cpp diff --git a/Templates/DefaultProject/Template/Code/Source/${Name}SystemComponent.cpp b/Templates/DefaultProject/Template/Gem/Source/${Name}SystemComponent.cpp similarity index 99% rename from Templates/DefaultProject/Template/Code/Source/${Name}SystemComponent.cpp rename to Templates/DefaultProject/Template/Gem/Source/${Name}SystemComponent.cpp index cfb6ae3c42..487391c716 100644 --- a/Templates/DefaultProject/Template/Code/Source/${Name}SystemComponent.cpp +++ b/Templates/DefaultProject/Template/Gem/Source/${Name}SystemComponent.cpp @@ -52,7 +52,7 @@ namespace ${SanitizedCppName} void ${SanitizedCppName}SystemComponent::GetDependentServices([[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& dependent) { } - + ${SanitizedCppName}SystemComponent::${SanitizedCppName}SystemComponent() { if (${SanitizedCppName}Interface::Get() == nullptr) diff --git a/Templates/DefaultProject/Template/Code/Source/${Name}SystemComponent.h b/Templates/DefaultProject/Template/Gem/Source/${Name}SystemComponent.h similarity index 100% rename from Templates/DefaultProject/Template/Code/Source/${Name}SystemComponent.h rename to Templates/DefaultProject/Template/Gem/Source/${Name}SystemComponent.h diff --git a/Templates/DefaultProject/Template/Code/enabled_gems.cmake b/Templates/DefaultProject/Template/Gem/enabled_gems.cmake similarity index 100% rename from Templates/DefaultProject/Template/Code/enabled_gems.cmake rename to Templates/DefaultProject/Template/Gem/enabled_gems.cmake diff --git a/Templates/DefaultProject/Template/Gem/gem.json b/Templates/DefaultProject/Template/Gem/gem.json new file mode 100644 index 0000000000..b60f512006 --- /dev/null +++ b/Templates/DefaultProject/Template/Gem/gem.json @@ -0,0 +1,21 @@ +{ + "gem_name": "${Name}", + "display_name": "${Name}", + "license": "What license ${Name} uses goes here: i.e. Apache-2.0 or MIT", + "license_url": "Link to the license web site goes here: i.e. https://opensource.org/licenses/Apache-2.0 Or https://opensource.org/licenses/MIT", + "origin": "The name of the originator goes here. i.e. XYZ Inc.", + "origin_url": "The primary repo for ${Name} goes here: i.e. http://www.mydomain.com", + "type": "", + "summary": "A short description of ${Name}.", + "canonical_tags": [ + "Gem" + ], + "user_tags": [ + "${Name}" + ], + "icon_path": "preview.png", + "requirements": "", + "documentation_url": "", + "dependencies": [ + ] +} diff --git a/Templates/DefaultProject/Template/project.json b/Templates/DefaultProject/Template/project.json index f8d4643ce9..6d1875fcaa 100644 --- a/Templates/DefaultProject/Template/project.json +++ b/Templates/DefaultProject/Template/project.json @@ -2,7 +2,7 @@ "project_name": "${Name}", "project_id": "${ProjectId}", "origin": "The primary repo for ${Name} goes here: i.e. http://www.mydomain.com", - "license": "What license ${Name} uses goes here: i.e. https://opensource.org/licenses/MIT", + "license": "What license ${Name} uses goes here: i.e. https://opensource.org/licenses/Apache-2.0 Or https://opensource.org/licenses/MIT etc.", "display_name": "${Name}", "summary": "A short description of ${Name}.", "canonical_tags": [ @@ -13,5 +13,8 @@ ], "icon_path": "preview.png", "engine": "o3de", - "external_subdirectories": [] + "external_subdirectories": [ + "Gem" + ], + "restricted": "${Name}" } diff --git a/Templates/DefaultProject/template.json b/Templates/DefaultProject/template.json index fcffafcb34..203e1ec4ef 100644 --- a/Templates/DefaultProject/template.json +++ b/Templates/DefaultProject/template.json @@ -1,12 +1,18 @@ { "template_name": "DefaultProject", + "template_restricted_platform_relative_path": "Templates/DefaultProject", "restricted_name": "o3de", - "restricted_platform_relative_path": "Templates", - "origin": "The primary repo for DefaultProject goes here: i.e. http://www.mydomain.com", - "license": "What license DefaultProject uses goes here: i.e. https://opensource.org/licenses/MIT", - "display_name": "Standard", - "summary": "This template has everything you need to build a full online 3D game or application.", - "canonical_tags": [], + "restricted_platform_relative_path": "Templates/DefaultProject", + "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", + "license": "Apache-2.0 or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", + "display_name": "Default Project Template", + "summary": "This is the project template that will be used if no project template is specified during project creation.", + "canonical_tags": [ + "Template", + "Project" + ], "user_tags": [ "DefaultProject" ], @@ -14,657 +20,459 @@ "copyFiles": [ { "file": ".gitignore", - "origin": ".gitignore", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "CMakeLists.txt", - "origin": "CMakeLists.txt", - "isTemplated": true, - "isOptional": false - }, - { - "file": "Code/${NameLower}_files.cmake", - "origin": "Code/${NameLower}_files.cmake", - "isTemplated": true, - "isOptional": false - }, - { - "file": "Code/${NameLower}_shared_files.cmake", - "origin": "Code/${NameLower}_shared_files.cmake", - "isTemplated": true, - "isOptional": false - }, - { - "file": "Code/CMakeLists.txt", - "origin": "Code/CMakeLists.txt", - "isTemplated": true, - "isOptional": false - }, - { - "file": "Code/Include/${Name}/${Name}Bus.h", - "origin": "Code/Include/${Name}/${Name}Bus.h", - "isTemplated": true, - "isOptional": false - }, - { - "file": "Code/Platform/Android/${NameLower}_android_files.cmake", - "origin": "Code/Platform/Android/${NameLower}_android_files.cmake", - "isTemplated": true, - "isOptional": false - }, - { - "file": "Code/Platform/Android/${NameLower}_shared_android_files.cmake", - "origin": "Code/Platform/Android/${NameLower}_shared_android_files.cmake", - "isTemplated": true, - "isOptional": false - }, - { - "file": "Code/Platform/Android/PAL_android.cmake", - "origin": "Code/Platform/Android/PAL_android.cmake", - "isTemplated": true, - "isOptional": false - }, - { - "file": "Code/Platform/Linux/${NameLower}_linux_files.cmake", - "origin": "Code/Platform/Linux/${NameLower}_linux_files.cmake", - "isTemplated": true, - "isOptional": false - }, - { - "file": "Code/Platform/Linux/${NameLower}_shared_linux_files.cmake", - "origin": "Code/Platform/Linux/${NameLower}_shared_linux_files.cmake", - "isTemplated": true, - "isOptional": false - }, - { - "file": "Code/Platform/Linux/PAL_linux.cmake", - "origin": "Code/Platform/Linux/PAL_linux.cmake", - "isTemplated": true, - "isOptional": false - }, - { - "file": "Code/Platform/Mac/${NameLower}_mac_files.cmake", - "origin": "Code/Platform/Mac/${NameLower}_mac_files.cmake", - "isTemplated": true, - "isOptional": false - }, - { - "file": "Code/Platform/Mac/${NameLower}_shared_mac_files.cmake", - "origin": "Code/Platform/Mac/${NameLower}_shared_mac_files.cmake", - "isTemplated": true, - "isOptional": false - }, - { - "file": "Code/Platform/Mac/PAL_mac.cmake", - "origin": "Code/Platform/Mac/PAL_mac.cmake", - "isTemplated": true, - "isOptional": false - }, - { - "file": "Code/Platform/Windows/${NameLower}_shared_windows_files.cmake", - "origin": "Code/Platform/Windows/${NameLower}_shared_windows_files.cmake", - "isTemplated": true, - "isOptional": false - }, - { - "file": "Code/Platform/Windows/${NameLower}_windows_files.cmake", - "origin": "Code/Platform/Windows/${NameLower}_windows_files.cmake", - "isTemplated": true, - "isOptional": false - }, - { - "file": "Code/Platform/Windows/PAL_windows.cmake", - "origin": "Code/Platform/Windows/PAL_windows.cmake", - "isTemplated": true, - "isOptional": false - }, - { - "file": "Code/Platform/iOS/${NameLower}_ios_files.cmake", - "origin": "Code/Platform/iOS/${NameLower}_ios_files.cmake", - "isTemplated": true, - "isOptional": false - }, - { - "file": "Code/Platform/iOS/${NameLower}_shared_ios_files.cmake", - "origin": "Code/Platform/iOS/${NameLower}_shared_ios_files.cmake", - "isTemplated": true, - "isOptional": false - }, - { - "file": "Code/Platform/iOS/PAL_ios.cmake", - "origin": "Code/Platform/iOS/PAL_ios.cmake", - "isTemplated": true, - "isOptional": false - }, - { - "file": "Code/Source/${Name}Module.cpp", - "origin": "Code/Source/${Name}Module.cpp", - "isTemplated": true, - "isOptional": false - }, - { - "file": "Code/Source/${Name}SystemComponent.cpp", - "origin": "Code/Source/${Name}SystemComponent.cpp", - "isTemplated": true, - "isOptional": false - }, - { - "file": "Code/Source/${Name}SystemComponent.h", - "origin": "Code/Source/${Name}SystemComponent.h", - "isTemplated": true, - "isOptional": false - }, - { - "file": "Code/enabled_gems.cmake", - "origin": "Code/enabled_gems.cmake", - "isTemplated": true, - "isOptional": false - }, - { - "file": "Code/gem.json", - "origin": "Code/gem.json", - "isTemplated": true, - "isOptional": true - }, - { - "file": "Config/shader_global_build_options.json", - "origin": "Config/shader_global_build_options.json", - "isTemplated": false, - "isOptional": false - }, - { - "file": "Config/default_aws_resource_mappings.json", - "origin": "Config/default_aws_resource_mappings.json", - "isTemplated": false, - "isOptional": false + "isTemplated": true }, { "file": "cmake/EngineFinder.cmake", - "origin": "cmake/EngineFinder.cmake", - "isTemplated": false, - "isOptional": false + "isTemplated": true }, { "file": "cmake/CompilerSettings.cmake", - "origin": "cmake/CompilerSettings.cmake", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "cmake/Platform/Linux/CompilerSettings_linux.cmake", - "origin": "cmake/Platform/Linux/CompilerSettings_linux.cmake", - "isTemplated": false, - "isOptional": false + "isTemplated": false + }, + { + "file": "Config/default_aws_resource_mappings.json", + "isTemplated": false + }, + { + "file": "Config/shader_global_build_options.json", + "isTemplated": false + }, + { + "file": "Gem/${NameLower}_files.cmake", + "isTemplated": true + }, + { + "file": "Gem/${NameLower}_shared_files.cmake", + "isTemplated": true + }, + { + "file": "Gem/CMakeLists.txt", + "isTemplated": true + }, + { + "file": "Gem/Include/${Name}/${Name}Bus.h", + "isTemplated": true + }, + { + "file": "Gem/Platform/Android/${NameLower}_android_files.cmake", + "isTemplated": false + }, + { + "file": "Gem/Platform/Android/${NameLower}_shared_android_files.cmake", + "isTemplated": false + }, + { + "file": "Gem/Platform/Android/PAL_android.cmake", + "isTemplated": true + }, + { + "file": "Gem/Platform/Linux/${NameLower}_linux_files.cmake", + "isTemplated": false + }, + { + "file": "Gem/Platform/Linux/${NameLower}_shared_linux_files.cmake", + "isTemplated": false + }, + { + "file": "Gem/Platform/Linux/PAL_linux.cmake", + "isTemplated": true + }, + { + "file": "Gem/Platform/Mac/${NameLower}_mac_files.cmake", + "isTemplated": false + }, + { + "file": "Gem/Platform/Mac/${NameLower}_shared_mac_files.cmake", + "isTemplated": false + }, + { + "file": "Gem/Platform/Mac/PAL_mac.cmake", + "isTemplated": true + }, + { + "file": "Gem/Platform/Windows/${NameLower}_shared_windows_files.cmake", + "isTemplated": false + }, + { + "file": "Gem/Platform/Windows/${NameLower}_windows_files.cmake", + "isTemplated": false + }, + { + "file": "Gem/Platform/Windows/PAL_windows.cmake", + "isTemplated": true + }, + { + "file": "Gem/Platform/iOS/${NameLower}_ios_files.cmake", + "isTemplated": false + }, + { + "file": "Gem/Platform/iOS/${NameLower}_shared_ios_files.cmake", + "isTemplated": false + }, + { + "file": "Gem/Platform/iOS/PAL_ios.cmake", + "isTemplated": true + }, + { + "file": "Gem/Source/${Name}Module.cpp", + "isTemplated": true + }, + { + "file": "Gem/Source/${Name}SystemComponent.cpp", + "isTemplated": true + }, + { + "file": "Gem/Source/${Name}SystemComponent.h", + "isTemplated": true + }, + { + "file": "Gem/enabled_gems.cmake", + "isTemplated": true + }, + { + "file": "Gem/gem.json", + "isTemplated": true }, { "file": "Platform/Android/android_project.cmake", - "origin": "Platform/Android/android_project.cmake", - "isTemplated": true, - "isOptional": false + "isTemplated": false }, { "file": "Platform/Android/android_project.json", - "origin": "Platform/Android/android_project.json", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Platform/Linux/linux_project.cmake", - "origin": "Platform/Linux/linux_project.cmake", - "isTemplated": true, - "isOptional": false + "isTemplated": false }, { "file": "Platform/Linux/linux_project.json", - "origin": "Platform/Linux/linux_project.json", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Platform/Mac/mac_project.cmake", - "origin": "Platform/Mac/mac_project.cmake", - "isTemplated": true, - "isOptional": false + "isTemplated": false }, { "file": "Platform/Mac/mac_project.json", - "origin": "Platform/Mac/mac_project.json", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Platform/Windows/windows_project.cmake", - "origin": "Platform/Windows/windows_project.cmake", - "isTemplated": true, - "isOptional": false + "isTemplated": false }, { "file": "Platform/Windows/windows_project.json", - "origin": "Platform/Windows/windows_project.json", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Platform/iOS/ios_project.cmake", - "origin": "Platform/iOS/ios_project.cmake", - "isTemplated": true, - "isOptional": false + "isTemplated": false }, { "file": "Platform/iOS/ios_project.json", - "origin": "Platform/iOS/ios_project.json", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Registry/assets_scan_folders.setreg", - "origin": "Registry/assets_scan_folders.setreg", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Registry/awscoreconfiguration.setreg", - "origin": "Registry/awscoreconfiguration.setreg", - "isTemplated": false, - "isOptional": false - }, - { - "file": "Resources/LegacyLogoLauncher.bmp", - "origin": "Resources/LegacyLogoLauncher.bmp", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Resources/GameSDK.ico", - "origin": "Resources/GameSDK.ico", - "isTemplated": false, - "isOptional": false + "isTemplated": false + }, + { + "file": "Resources/LegacyLogoLauncher.bmp", + "isTemplated": false }, { "file": "Resources/Platform/Mac/Images.xcassets/Contents.json", - "origin": "Resources/Platform/Mac/Images.xcassets/Contents.json", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/Contents.json", - "origin": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/Contents.json", - "isTemplated": false, - "isOptional": false - }, - { - "file": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_128_2x.png", - "origin": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_128_2x.png", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_128.png", - "origin": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_128.png", - "isTemplated": false, - "isOptional": false + "isTemplated": false + }, + { + "file": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_128_2x.png", + "isTemplated": false }, { "file": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_16.png", - "origin": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_16.png", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_16_2x.png", - "origin": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_16_2x.png", - "isTemplated": false, - "isOptional": false - }, - { - "file": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_256_2x.png", - "origin": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_256_2x.png", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_256.png", - "origin": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_256.png", - "isTemplated": false, - "isOptional": false + "isTemplated": false + }, + { + "file": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_256_2x.png", + "isTemplated": false }, { "file": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_32.png", - "origin": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_32.png", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_32_2x.png", - "origin": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_32_2x.png", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_512.png", - "origin": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_512.png", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_512_2x.png", - "origin": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_512_2x.png", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Resources/Platform/Mac/Info.plist", - "origin": "Resources/Platform/Mac/Info.plist", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Resources/Platform/iOS/Images.xcassets/Contents.json", - "origin": "Resources/Platform/iOS/Images.xcassets/Contents.json", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage/Contents.json", - "origin": "Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage/Contents.json", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage/iPadLaunchImage1024x768.png", - "origin": "Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage/iPadLaunchImage1024x768.png", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage/iPadLaunchImage1536x2048.png", - "origin": "Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage/iPadLaunchImage1536x2048.png", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage/iPadLaunchImage2048x1536.png", - "origin": "Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage/iPadLaunchImage2048x1536.png", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage/iPadLaunchImage768x1024.png", - "origin": "Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage/iPadLaunchImage768x1024.png", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage/iPhoneLaunchImage640x1136.png", - "origin": "Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage/iPhoneLaunchImage640x1136.png", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage/iPhoneLaunchImage640x960.png", - "origin": "Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage/iPhoneLaunchImage640x960.png", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/Contents.json", - "origin": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/Contents.json", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPadAppIcon152x152.png", - "origin": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPadAppIcon152x152.png", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPadAppIcon76x76.png", - "origin": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPadAppIcon76x76.png", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPadProAppIcon167x167.png", - "origin": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPadProAppIcon167x167.png", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPadSettingsIcon29x29.png", - "origin": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPadSettingsIcon29x29.png", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPadSettingsIcon58x58.png", - "origin": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPadSettingsIcon58x58.png", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPadSpotlightIcon40x40.png", - "origin": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPadSpotlightIcon40x40.png", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPadSpotlightIcon80x80.png", - "origin": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPadSpotlightIcon80x80.png", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPhoneAppIcon120x120.png", - "origin": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPhoneAppIcon120x120.png", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPhoneAppIcon180x180.png", - "origin": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPhoneAppIcon180x180.png", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPhoneSettingsIcon58x58.png", - "origin": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPhoneSettingsIcon58x58.png", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPhoneSettingsIcon87x87.png", - "origin": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPhoneSettingsIcon87x87.png", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPhoneSpotlightIcon120x120.png", - "origin": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPhoneSpotlightIcon120x120.png", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPhoneSpotlightIcon80x80.png", - "origin": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPhoneSpotlightIcon80x80.png", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Resources/Platform/iOS/Info.plist", - "origin": "Resources/Platform/iOS/Info.plist", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "ShaderLib/README.md", - "origin": "ShaderLib/README.md", - "isTemplated": false, - "isOptional": true + "isTemplated": false }, { "file": "ShaderLib/scenesrg.srgi", - "origin": "ShaderLib/scenesrg.srgi", - "isTemplated": true, - "isOptional": false + "isTemplated": false }, { "file": "ShaderLib/viewsrg.srgi", - "origin": "ShaderLib/viewsrg.srgi", - "isTemplated": true, - "isOptional": false + "isTemplated": false }, { "file": "autoexec.cfg", - "origin": "autoexec.cfg", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "game.cfg", - "origin": "game.cfg", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "preview.png", - "origin": "preview.png", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "project.json", - "origin": "project.json", - "isTemplated": true, - "isOptional": false + "isTemplated": true } ], "createDirectories": [ { - "dir": "Assets", - "origin": "Assets" + "dir": "Assets" }, { - "dir": "Code", - "origin": "Code" + "dir": "cmake" }, { - "dir": "Code/Include", - "origin": "Code/Include" + "dir": "cmake/Platform" }, { - "dir": "Code/Include/${Name}", - "origin": "Code/Include/${Name}" + "dir": "cmake/Platform/Linux" }, { - "dir": "Code/Platform", - "origin": "Code/Platform" + "dir": "Config" }, { - "dir": "Code/Platform/Android", - "origin": "Code/Platform/Android" + "dir": "Gem" }, { - "dir": "Code/Platform/Linux", - "origin": "Code/Platform/Linux" + "dir": "Gem/Include" }, { - "dir": "Code/Platform/Mac", - "origin": "Code/Platform/Mac" + "dir": "Gem/Include/${Name}" }, { - "dir": "Code/Platform/Windows", - "origin": "Code/Platform/Windows" + "dir": "Gem/Platform" }, { - "dir": "Code/Platform/iOS", - "origin": "Code/Platform/iOS" + "dir": "Gem/Platform/Android" }, { - "dir": "Code/Source", - "origin": "Code/Source" + "dir": "Gem/Platform/Linux" }, { - "dir": "Config", - "origin": "Config" + "dir": "Gem/Platform/Mac" }, { - "dir": "Platform", - "origin": "Platform" + "dir": "Gem/Platform/Windows" }, { - "dir": "Platform/Android", - "origin": "Platform/Android" + "dir": "Gem/Platform/iOS" }, { - "dir": "Platform/Linux", - "origin": "Platform/Linux" + "dir": "Gem/Source" }, { - "dir": "Platform/Mac", - "origin": "Platform/Mac" + "dir": "Platform" }, { - "dir": "Platform/Windows", - "origin": "Platform/Windows" + "dir": "Platform/Android" }, { - "dir": "Platform/iOS", - "origin": "Platform/iOS" + "dir": "Platform/Linux" }, { - "dir": "Registry", - "origin": "Registry" + "dir": "Platform/Mac" }, { - "dir": "Resources", - "origin": "Resources" + "dir": "Platform/Windows" }, { - "dir": "Resources/Platform", - "origin": "Resources/Platform" + "dir": "Platform/iOS" }, { - "dir": "Resources/Platform/Mac", - "origin": "Resources/Platform/Mac" + "dir": "Registry" }, { - "dir": "Resources/Platform/Mac/Images.xcassets", - "origin": "Resources/Platform/Mac/Images.xcassets" + "dir": "Resources" }, { - "dir": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset", - "origin": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset" + "dir": "Resources/Platform" }, { - "dir": "Resources/Platform/iOS", - "origin": "Resources/Platform/iOS" + "dir": "Resources/Platform/Mac" }, { - "dir": "Resources/Platform/iOS/Images.xcassets", - "origin": "Resources/Platform/iOS/Images.xcassets" + "dir": "Resources/Platform/Mac/Images.xcassets" }, { - "dir": "Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage", - "origin": "Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage" + "dir": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset" }, { - "dir": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset", - "origin": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset" + "dir": "Resources/Platform/iOS" }, { - "dir": "ShaderLib", - "origin": "ShaderLib" + "dir": "Resources/Platform/iOS/Images.xcassets" }, { - "dir": "Shaders", - "origin": "Shaders" + "dir": "Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage" }, { - "dir": "Shaders/ShaderResourceGroups", - "origin": "Shaders/ShaderResourceGroups" + "dir": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset" + }, + { + "dir": "ShaderLib" + }, + { + "dir": "Shaders" + }, + { + "dir": "Shaders/ShaderResourceGroups" } ] } diff --git a/Templates/GemRepo/Template/gem.json b/Templates/GemRepo/Template/gem.json index 292681b2b5..7ba555a127 100644 --- a/Templates/GemRepo/Template/gem.json +++ b/Templates/GemRepo/Template/gem.json @@ -1,19 +1,23 @@ { - "gem_name": "${Name}Gem", - "display_name": "${Name}Gem", - "license": "What license ${Name}Gem uses goes here: i.e. Apache-2.0 Or MIT", - "license_url": "", - "origin": "The primary repo for ${Name}Gem goes here: i.e. http://www.mydomain.com", - "summary": "A short description of ${Name}Gem which is zipped up in an archive named gem.zip in the root of the Gem Repo. Though not required, it is recommended that the sha256 of the gem.zip file should be placed in the sha256 field of this gem.json so the download can be verified.", + "gem_name": "${Name}", + "display_name": "${Name}", + "license": "What license ${Name} uses goes here: i.e. Apache-2.0 or MIT", + "license_url": "Link to the license web site goes here: i.e. https://opensource.org/licenses/Apache-2.0 Or https://opensource.org/licenses/MIT", + "origin": "The name of the originator goes here. i.e. XYZ Inc.", + "origin_url": "The primary repo for ${Name} goes here: i.e. http://www.mydomain.com", + "type": "Code", + "summary": "A short description of ${Name} which is zipped up in an archive named gem.zip in the root of the Gem Repo. Though not required, it is recommended that the sha256 of the gem.zip file be placed in the sha256 field of this gem.json so the download can be verified.", "origin_uri": "${RepoURI}/gem.zip", "sha256": "", - "type": "Code", "canonical_tags": [ "Gem" ], "user_tags": [ - "${Name}Gem" + "${Name}" ], "icon_path": "preview.png", - "requirements": "" + "requirements": "", + "documentation_url": "", + "dependencies": [ + ] } diff --git a/Templates/GemRepo/template.json b/Templates/GemRepo/template.json index 88123a9dae..ca042329be 100644 --- a/Templates/GemRepo/template.json +++ b/Templates/GemRepo/template.json @@ -1,10 +1,14 @@ { "template_name": "GemRepo", - "origin": "The primary repo for GemRepo goes here: i.e. http://www.mydomain.com", - "license": "What license GemRepo uses goes here: i.e. https://opensource.org/licenses/MIT", + "origin_url": "https://github.com/o3de/o3de", + "license": "Apache-2.0 or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "display_name": "GemRepo", "summary": "A Gem Repository that contains a single Gem.", - "canonical_tags": [], + "canonical_tags": [ + "Gem", + "Repo" + ], "user_tags": [ "GemRepo" ], @@ -12,15 +16,11 @@ "copyFiles": [ { "file": "gem.json", - "origin": "gem.json", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "repo.json", - "origin": "repo.json", - "isTemplated": true, - "isOptional": false + "isTemplated": true } ], "createDirectories": [] diff --git a/Templates/MinimalProject/Template/CMakeLists.txt b/Templates/MinimalProject/Template/CMakeLists.txt index ae4bb662a3..420a92948d 100644 --- a/Templates/MinimalProject/Template/CMakeLists.txt +++ b/Templates/MinimalProject/Template/CMakeLists.txt @@ -29,5 +29,4 @@ else() set_property(GLOBAL APPEND PROPERTY LY_PROJECTS_TARGET_NAME ${project_target_name}) - add_subdirectory(Code) endif() diff --git a/Templates/MinimalProject/Template/Code/${NameLower}_files.cmake b/Templates/MinimalProject/Template/Gem/${NameLower}_files.cmake similarity index 100% rename from Templates/MinimalProject/Template/Code/${NameLower}_files.cmake rename to Templates/MinimalProject/Template/Gem/${NameLower}_files.cmake diff --git a/Templates/MinimalProject/Template/Code/${NameLower}_shared_files.cmake b/Templates/MinimalProject/Template/Gem/${NameLower}_shared_files.cmake similarity index 100% rename from Templates/MinimalProject/Template/Code/${NameLower}_shared_files.cmake rename to Templates/MinimalProject/Template/Gem/${NameLower}_shared_files.cmake diff --git a/Templates/DefaultProject/Template/Code/CMakeLists.txt b/Templates/MinimalProject/Template/Gem/CMakeLists.txt similarity index 87% rename from Templates/DefaultProject/Template/Code/CMakeLists.txt rename to Templates/MinimalProject/Template/Gem/CMakeLists.txt index 7bbb9a0852..6b1dcf9172 100644 --- a/Templates/DefaultProject/Template/Code/CMakeLists.txt +++ b/Templates/MinimalProject/Template/Gem/CMakeLists.txt @@ -6,13 +6,17 @@ # # {END_LICENSE} +set(gem_path ${CMAKE_CURRENT_LIST_DIR}) +set(gem_json ${gem_path}/gem.json) +o3de_restricted_path(${gem_json} gem_restricted_path gem_parent_relative_path) + # Currently we are in the ${Name}/Code folder: ${CMAKE_CURRENT_LIST_DIR} # Get the platform specific folder ${pal_dir} for the current folder: ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} -# Note: ly_get_list_relative_pal_filename will take care of the details for us, as this may be a restricted platform +# Note: o3de_pal_dir will take care of the details for us, as this may be a restricted platform # in which case it will see if that platform is present here or in the restricted folder. -# i.e. It could here : ${Name}/Code/Platform/ or +# i.e. It could here : ${Name}/Code/Platform/ or # //${Name}/Code -ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} ${o3de_project_restricted_path} ${o3de_project_path} ${o3de_project_name}) +o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} ${gem_restricted_path} ${gem_path} ${gem_parent_relative_path}) # Now that we have the platform abstraction layer (PAL) folder for this folder, thats where we will find the # traits for this platform. Traits for a platform are defines for things like whether or not something in this project @@ -71,6 +75,7 @@ ly_create_alias(NAME ${Name}.Servers NAMESPACE Gem TARGETS Gem::${Name}) # Enable the specified list of gems from GEM_FILE or GEMS list for this specific project: ly_enable_gems(PROJECT_NAME ${Name} GEM_FILE enabled_gems.cmake) + if(PAL_TRAIT_BUILD_SERVER_SUPPORTED) # this property causes it to actually make a ServerLauncher. # if you don't want a Server application, you can remove this and the diff --git a/Templates/MinimalProject/Template/Code/Include/${Name}/${Name}Bus.h b/Templates/MinimalProject/Template/Gem/Include/${Name}/${Name}Bus.h similarity index 100% rename from Templates/MinimalProject/Template/Code/Include/${Name}/${Name}Bus.h rename to Templates/MinimalProject/Template/Gem/Include/${Name}/${Name}Bus.h diff --git a/Templates/MinimalProject/Template/Code/Platform/Android/${NameLower}_android_files.cmake b/Templates/MinimalProject/Template/Gem/Platform/Android/${NameLower}_android_files.cmake similarity index 100% rename from Templates/MinimalProject/Template/Code/Platform/Android/${NameLower}_android_files.cmake rename to Templates/MinimalProject/Template/Gem/Platform/Android/${NameLower}_android_files.cmake diff --git a/Templates/MinimalProject/Template/Code/Platform/Android/${NameLower}_shared_android_files.cmake b/Templates/MinimalProject/Template/Gem/Platform/Android/${NameLower}_shared_android_files.cmake similarity index 100% rename from Templates/MinimalProject/Template/Code/Platform/Android/${NameLower}_shared_android_files.cmake rename to Templates/MinimalProject/Template/Gem/Platform/Android/${NameLower}_shared_android_files.cmake diff --git a/Templates/MinimalProject/Template/Code/Platform/Android/PAL_android.cmake b/Templates/MinimalProject/Template/Gem/Platform/Android/PAL_android.cmake similarity index 100% rename from Templates/MinimalProject/Template/Code/Platform/Android/PAL_android.cmake rename to Templates/MinimalProject/Template/Gem/Platform/Android/PAL_android.cmake diff --git a/Templates/MinimalProject/Template/Code/Platform/Linux/${NameLower}_linux_files.cmake b/Templates/MinimalProject/Template/Gem/Platform/Linux/${NameLower}_linux_files.cmake similarity index 100% rename from Templates/MinimalProject/Template/Code/Platform/Linux/${NameLower}_linux_files.cmake rename to Templates/MinimalProject/Template/Gem/Platform/Linux/${NameLower}_linux_files.cmake diff --git a/Templates/MinimalProject/Template/Code/Platform/Linux/${NameLower}_shared_linux_files.cmake b/Templates/MinimalProject/Template/Gem/Platform/Linux/${NameLower}_shared_linux_files.cmake similarity index 100% rename from Templates/MinimalProject/Template/Code/Platform/Linux/${NameLower}_shared_linux_files.cmake rename to Templates/MinimalProject/Template/Gem/Platform/Linux/${NameLower}_shared_linux_files.cmake diff --git a/Templates/MinimalProject/Template/Code/Platform/Linux/PAL_linux.cmake b/Templates/MinimalProject/Template/Gem/Platform/Linux/PAL_linux.cmake similarity index 100% rename from Templates/MinimalProject/Template/Code/Platform/Linux/PAL_linux.cmake rename to Templates/MinimalProject/Template/Gem/Platform/Linux/PAL_linux.cmake diff --git a/Templates/MinimalProject/Template/Code/Platform/Mac/${NameLower}_mac_files.cmake b/Templates/MinimalProject/Template/Gem/Platform/Mac/${NameLower}_mac_files.cmake similarity index 100% rename from Templates/MinimalProject/Template/Code/Platform/Mac/${NameLower}_mac_files.cmake rename to Templates/MinimalProject/Template/Gem/Platform/Mac/${NameLower}_mac_files.cmake diff --git a/Templates/MinimalProject/Template/Code/Platform/Mac/${NameLower}_shared_mac_files.cmake b/Templates/MinimalProject/Template/Gem/Platform/Mac/${NameLower}_shared_mac_files.cmake similarity index 100% rename from Templates/MinimalProject/Template/Code/Platform/Mac/${NameLower}_shared_mac_files.cmake rename to Templates/MinimalProject/Template/Gem/Platform/Mac/${NameLower}_shared_mac_files.cmake diff --git a/Templates/MinimalProject/Template/Code/Platform/Mac/PAL_mac.cmake b/Templates/MinimalProject/Template/Gem/Platform/Mac/PAL_mac.cmake similarity index 100% rename from Templates/MinimalProject/Template/Code/Platform/Mac/PAL_mac.cmake rename to Templates/MinimalProject/Template/Gem/Platform/Mac/PAL_mac.cmake diff --git a/Templates/MinimalProject/Template/Code/Platform/Windows/${NameLower}_shared_windows_files.cmake b/Templates/MinimalProject/Template/Gem/Platform/Windows/${NameLower}_shared_windows_files.cmake similarity index 100% rename from Templates/MinimalProject/Template/Code/Platform/Windows/${NameLower}_shared_windows_files.cmake rename to Templates/MinimalProject/Template/Gem/Platform/Windows/${NameLower}_shared_windows_files.cmake diff --git a/Templates/MinimalProject/Template/Code/Platform/Windows/${NameLower}_windows_files.cmake b/Templates/MinimalProject/Template/Gem/Platform/Windows/${NameLower}_windows_files.cmake similarity index 100% rename from Templates/MinimalProject/Template/Code/Platform/Windows/${NameLower}_windows_files.cmake rename to Templates/MinimalProject/Template/Gem/Platform/Windows/${NameLower}_windows_files.cmake diff --git a/Templates/MinimalProject/Template/Code/Platform/Windows/PAL_windows.cmake b/Templates/MinimalProject/Template/Gem/Platform/Windows/PAL_windows.cmake similarity index 100% rename from Templates/MinimalProject/Template/Code/Platform/Windows/PAL_windows.cmake rename to Templates/MinimalProject/Template/Gem/Platform/Windows/PAL_windows.cmake diff --git a/Templates/MinimalProject/Template/Code/Platform/iOS/${NameLower}_ios_files.cmake b/Templates/MinimalProject/Template/Gem/Platform/iOS/${NameLower}_ios_files.cmake similarity index 100% rename from Templates/MinimalProject/Template/Code/Platform/iOS/${NameLower}_ios_files.cmake rename to Templates/MinimalProject/Template/Gem/Platform/iOS/${NameLower}_ios_files.cmake diff --git a/Templates/MinimalProject/Template/Code/Platform/iOS/${NameLower}_shared_ios_files.cmake b/Templates/MinimalProject/Template/Gem/Platform/iOS/${NameLower}_shared_ios_files.cmake similarity index 100% rename from Templates/MinimalProject/Template/Code/Platform/iOS/${NameLower}_shared_ios_files.cmake rename to Templates/MinimalProject/Template/Gem/Platform/iOS/${NameLower}_shared_ios_files.cmake diff --git a/Templates/MinimalProject/Template/Code/Platform/iOS/PAL_ios.cmake b/Templates/MinimalProject/Template/Gem/Platform/iOS/PAL_ios.cmake similarity index 100% rename from Templates/MinimalProject/Template/Code/Platform/iOS/PAL_ios.cmake rename to Templates/MinimalProject/Template/Gem/Platform/iOS/PAL_ios.cmake diff --git a/Templates/MinimalProject/Template/Code/Source/${Name}Module.cpp b/Templates/MinimalProject/Template/Gem/Source/${Name}Module.cpp similarity index 100% rename from Templates/MinimalProject/Template/Code/Source/${Name}Module.cpp rename to Templates/MinimalProject/Template/Gem/Source/${Name}Module.cpp diff --git a/Templates/MinimalProject/Template/Code/Source/${Name}SystemComponent.cpp b/Templates/MinimalProject/Template/Gem/Source/${Name}SystemComponent.cpp similarity index 100% rename from Templates/MinimalProject/Template/Code/Source/${Name}SystemComponent.cpp rename to Templates/MinimalProject/Template/Gem/Source/${Name}SystemComponent.cpp diff --git a/Templates/MinimalProject/Template/Code/Source/${Name}SystemComponent.h b/Templates/MinimalProject/Template/Gem/Source/${Name}SystemComponent.h similarity index 100% rename from Templates/MinimalProject/Template/Code/Source/${Name}SystemComponent.h rename to Templates/MinimalProject/Template/Gem/Source/${Name}SystemComponent.h diff --git a/Templates/MinimalProject/Template/Code/enabled_gems.cmake b/Templates/MinimalProject/Template/Gem/enabled_gems.cmake similarity index 100% rename from Templates/MinimalProject/Template/Code/enabled_gems.cmake rename to Templates/MinimalProject/Template/Gem/enabled_gems.cmake diff --git a/Templates/MinimalProject/Template/Gem/gem.json b/Templates/MinimalProject/Template/Gem/gem.json new file mode 100644 index 0000000000..b60f512006 --- /dev/null +++ b/Templates/MinimalProject/Template/Gem/gem.json @@ -0,0 +1,21 @@ +{ + "gem_name": "${Name}", + "display_name": "${Name}", + "license": "What license ${Name} uses goes here: i.e. Apache-2.0 or MIT", + "license_url": "Link to the license web site goes here: i.e. https://opensource.org/licenses/Apache-2.0 Or https://opensource.org/licenses/MIT", + "origin": "The name of the originator goes here. i.e. XYZ Inc.", + "origin_url": "The primary repo for ${Name} goes here: i.e. http://www.mydomain.com", + "type": "", + "summary": "A short description of ${Name}.", + "canonical_tags": [ + "Gem" + ], + "user_tags": [ + "${Name}" + ], + "icon_path": "preview.png", + "requirements": "", + "documentation_url": "", + "dependencies": [ + ] +} diff --git a/Templates/MinimalProject/Template/cmake/CompilerSettings.cmake b/Templates/MinimalProject/Template/cmake/CompilerSettings.cmake index 60bda1d45b..4efaecd60f 100644 --- a/Templates/MinimalProject/Template/cmake/CompilerSettings.cmake +++ b/Templates/MinimalProject/Template/cmake/CompilerSettings.cmake @@ -1,10 +1,10 @@ -# +# {BEGIN_LICENSE} # Copyright (c) Contributors to the Open 3D Engine Project. # For complete copyright and license terms please see the LICENSE at the root of this distribution. # # SPDX-License-Identifier: Apache-2.0 OR MIT # -# +# {END_LICENSE} # File to tweak compiler settings before compiler detection happens (before project() is called) # We dont have PAL enabled at this point, so we can only use pure-CMake variables diff --git a/Templates/MinimalProject/Template/cmake/Platform/Linux/CompilerSettings_linux.cmake b/Templates/MinimalProject/Template/cmake/Platform/Linux/CompilerSettings_linux.cmake index 9bb629c53b..386117873f 100644 --- a/Templates/MinimalProject/Template/cmake/Platform/Linux/CompilerSettings_linux.cmake +++ b/Templates/MinimalProject/Template/cmake/Platform/Linux/CompilerSettings_linux.cmake @@ -1,10 +1,10 @@ -# +# {BEGIN_LICENSE} # Copyright (c) Contributors to the Open 3D Engine Project. # For complete copyright and license terms please see the LICENSE at the root of this distribution. # # SPDX-License-Identifier: Apache-2.0 OR MIT # -# +# {END_LICENSE} if(NOT CMAKE_C_COMPILER AND NOT CMAKE_CXX_COMPILER AND NOT "$ENV{CC}" AND NOT "$ENV{CXX}") set(path_search diff --git a/Templates/MinimalProject/Template/project.json b/Templates/MinimalProject/Template/project.json index f8d4643ce9..a303186a64 100644 --- a/Templates/MinimalProject/Template/project.json +++ b/Templates/MinimalProject/Template/project.json @@ -2,7 +2,7 @@ "project_name": "${Name}", "project_id": "${ProjectId}", "origin": "The primary repo for ${Name} goes here: i.e. http://www.mydomain.com", - "license": "What license ${Name} uses goes here: i.e. https://opensource.org/licenses/MIT", + "license": "What license ${Name} uses goes here: i.e. https://opensource.org/licenses/Apache-2.0 Or https://opensource.org/licenses/MIT etc.", "display_name": "${Name}", "summary": "A short description of ${Name}.", "canonical_tags": [ @@ -13,5 +13,7 @@ ], "icon_path": "preview.png", "engine": "o3de", - "external_subdirectories": [] + "external_subdirectories": [ + "Gem" + ] } diff --git a/Templates/MinimalProject/template.json b/Templates/MinimalProject/template.json index 7d6a4f9b94..4cc3031ff5 100644 --- a/Templates/MinimalProject/template.json +++ b/Templates/MinimalProject/template.json @@ -1,10 +1,18 @@ { "template_name": "MinimalProject", - "origin": "The primary repo for MinimalProject goes here: i.e. http://www.mydomain.com", - "license": "What license MinimalProject uses goes here: i.e. https://opensource.org/licenses/MIT", - "display_name": "Minimal", - "summary": "This will be a good starting point for developers who are looking for building the game with the bare minimum of gems in O3DE, and adding more when needed. ", - "canonical_tags": [], + "template_restricted_platform_relative_path": "Templates/MinimalProject", + "restricted_name": "o3de", + "restricted_platform_relative_path": "Templates/MinimalProject", + "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", + "license": "Apache-2.0 or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", + "display_name": "Minimal Project Template", + "summary": "Use this project template to create project that is the absolute minimum needed to get started in O3DE.", + "canonical_tags": [ + "Template", + "Project" + ], "user_tags": [ "MinimalProject" ], @@ -12,645 +20,454 @@ "copyFiles": [ { "file": ".gitignore", - "origin": ".gitignore", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "CMakeLists.txt", - "origin": "CMakeLists.txt", - "isTemplated": true, - "isOptional": false - }, - { - "file": "Code/${NameLower}_files.cmake", - "origin": "Code/${NameLower}_files.cmake", - "isTemplated": true, - "isOptional": false - }, - { - "file": "Code/${NameLower}_shared_files.cmake", - "origin": "Code/${NameLower}_shared_files.cmake", - "isTemplated": true, - "isOptional": false - }, - { - "file": "Code/CMakeLists.txt", - "origin": "Code/CMakeLists.txt", - "isTemplated": true, - "isOptional": false - }, - { - "file": "Code/Include/${Name}/${Name}Bus.h", - "origin": "Code/Include/${Name}/${Name}Bus.h", - "isTemplated": true, - "isOptional": false - }, - { - "file": "Code/Platform/Android/${NameLower}_android_files.cmake", - "origin": "Code/Platform/Android/${NameLower}_android_files.cmake", - "isTemplated": true, - "isOptional": false - }, - { - "file": "Code/Platform/Android/${NameLower}_shared_android_files.cmake", - "origin": "Code/Platform/Android/${NameLower}_shared_android_files.cmake", - "isTemplated": true, - "isOptional": false - }, - { - "file": "Code/Platform/Android/PAL_android.cmake", - "origin": "Code/Platform/Android/PAL_android.cmake", - "isTemplated": true, - "isOptional": false - }, - { - "file": "Code/Platform/Linux/${NameLower}_linux_files.cmake", - "origin": "Code/Platform/Linux/${NameLower}_linux_files.cmake", - "isTemplated": true, - "isOptional": false - }, - { - "file": "Code/Platform/Linux/${NameLower}_shared_linux_files.cmake", - "origin": "Code/Platform/Linux/${NameLower}_shared_linux_files.cmake", - "isTemplated": true, - "isOptional": false - }, - { - "file": "Code/Platform/Linux/PAL_linux.cmake", - "origin": "Code/Platform/Linux/PAL_linux.cmake", - "isTemplated": true, - "isOptional": false - }, - { - "file": "Code/Platform/Mac/${NameLower}_mac_files.cmake", - "origin": "Code/Platform/Mac/${NameLower}_mac_files.cmake", - "isTemplated": true, - "isOptional": false - }, - { - "file": "Code/Platform/Mac/${NameLower}_shared_mac_files.cmake", - "origin": "Code/Platform/Mac/${NameLower}_shared_mac_files.cmake", - "isTemplated": true, - "isOptional": false - }, - { - "file": "Code/Platform/Mac/PAL_mac.cmake", - "origin": "Code/Platform/Mac/PAL_mac.cmake", - "isTemplated": true, - "isOptional": false - }, - { - "file": "Code/Platform/Windows/${NameLower}_shared_windows_files.cmake", - "origin": "Code/Platform/Windows/${NameLower}_shared_windows_files.cmake", - "isTemplated": true, - "isOptional": false - }, - { - "file": "Code/Platform/Windows/${NameLower}_windows_files.cmake", - "origin": "Code/Platform/Windows/${NameLower}_windows_files.cmake", - "isTemplated": true, - "isOptional": false - }, - { - "file": "Code/Platform/Windows/PAL_windows.cmake", - "origin": "Code/Platform/Windows/PAL_windows.cmake", - "isTemplated": true, - "isOptional": false - }, - { - "file": "Code/Platform/iOS/${NameLower}_ios_files.cmake", - "origin": "Code/Platform/iOS/${NameLower}_ios_files.cmake", - "isTemplated": true, - "isOptional": false - }, - { - "file": "Code/Platform/iOS/${NameLower}_shared_ios_files.cmake", - "origin": "Code/Platform/iOS/${NameLower}_shared_ios_files.cmake", - "isTemplated": true, - "isOptional": false - }, - { - "file": "Code/Platform/iOS/PAL_ios.cmake", - "origin": "Code/Platform/iOS/PAL_ios.cmake", - "isTemplated": true, - "isOptional": false - }, - { - "file": "Code/Source/${Name}Module.cpp", - "origin": "Code/Source/${Name}Module.cpp", - "isTemplated": true, - "isOptional": false - }, - { - "file": "Code/Source/${Name}SystemComponent.cpp", - "origin": "Code/Source/${Name}SystemComponent.cpp", - "isTemplated": true, - "isOptional": false - }, - { - "file": "Code/Source/${Name}SystemComponent.h", - "origin": "Code/Source/${Name}SystemComponent.h", - "isTemplated": true, - "isOptional": false - }, - { - "file": "Code/enabled_gems.cmake", - "origin": "Code/enabled_gems.cmake", - "isTemplated": true, - "isOptional": false - }, - { - "file": "Code/gem.json", - "origin": "Code/gem.json", - "isTemplated": true, - "isOptional": true - }, - { - "file": "Config/shader_global_build_options.json", - "origin": "Config/shader_global_build_options.json", - "isTemplated": false, - "isOptional": false + "isTemplated": true }, { "file": "cmake/EngineFinder.cmake", - "origin": "cmake/EngineFinder.cmake", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "cmake/CompilerSettings.cmake", - "origin": "cmake/CompilerSettings.cmake", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "cmake/Platform/Linux/CompilerSettings_linux.cmake", - "origin": "cmake/Platform/Linux/CompilerSettings_linux.cmake", - "isTemplated": false, - "isOptional": false + "isTemplated": false + }, + { + "file": "Config/shader_global_build_options.json", + "isTemplated": false + }, + { + "file": "Gem/${NameLower}_files.cmake", + "isTemplated": true + }, + { + "file": "Gem/${NameLower}_shared_files.cmake", + "isTemplated": true + }, + { + "file": "Gem/CMakeLists.txt", + "isTemplated": true + }, + { + "file": "Gem/Include/${Name}/${Name}Bus.h", + "isTemplated": true + }, + { + "file": "Gem/Platform/Android/${NameLower}_android_files.cmake", + "isTemplated": true + }, + { + "file": "Gem/Platform/Android/${NameLower}_shared_android_files.cmake", + "isTemplated": true + }, + { + "file": "Gem/Platform/Android/PAL_android.cmake", + "isTemplated": true + }, + { + "file": "Gem/Platform/Linux/${NameLower}_linux_files.cmake", + "isTemplated": true + }, + { + "file": "Gem/Platform/Linux/${NameLower}_shared_linux_files.cmake", + "isTemplated": true + }, + { + "file": "Gem/Platform/Linux/PAL_linux.cmake", + "isTemplated": true + }, + { + "file": "Gem/Platform/Mac/${NameLower}_mac_files.cmake", + "isTemplated": true + }, + { + "file": "Gem/Platform/Mac/${NameLower}_shared_mac_files.cmake", + "isTemplated": true + }, + { + "file": "Gem/Platform/Mac/PAL_mac.cmake", + "isTemplated": true + }, + { + "file": "Gem/Platform/Windows/${NameLower}_shared_windows_files.cmake", + "isTemplated": true + }, + { + "file": "Gem/Platform/Windows/${NameLower}_windows_files.cmake", + "isTemplated": true + }, + { + "file": "Gem/Platform/Windows/PAL_windows.cmake", + "isTemplated": true + }, + { + "file": "Gem/Platform/iOS/${NameLower}_ios_files.cmake", + "isTemplated": true + }, + { + "file": "Gem/Platform/iOS/${NameLower}_shared_ios_files.cmake", + "isTemplated": true + }, + { + "file": "Gem/Platform/iOS/PAL_ios.cmake", + "isTemplated": true + }, + { + "file": "Gem/Source/${Name}Module.cpp", + "isTemplated": true + }, + { + "file": "Gem/Source/${Name}SystemComponent.cpp", + "isTemplated": true + }, + { + "file": "Gem/Source/${Name}SystemComponent.h", + "isTemplated": true + }, + { + "file": "Gem/enabled_gems.cmake", + "isTemplated": true + }, + { + "file": "Gem/gem.json", + "isTemplated": true }, { "file": "Platform/Android/android_project.cmake", - "origin": "Platform/Android/android_project.cmake", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Platform/Android/android_project.json", - "origin": "Platform/Android/android_project.json", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Platform/Linux/linux_project.cmake", - "origin": "Platform/Linux/linux_project.cmake", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Platform/Linux/linux_project.json", - "origin": "Platform/Linux/linux_project.json", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Platform/Mac/mac_project.cmake", - "origin": "Platform/Mac/mac_project.cmake", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Platform/Mac/mac_project.json", - "origin": "Platform/Mac/mac_project.json", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Platform/Windows/windows_project.cmake", - "origin": "Platform/Windows/windows_project.cmake", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Platform/Windows/windows_project.json", - "origin": "Platform/Windows/windows_project.json", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Platform/iOS/ios_project.cmake", - "origin": "Platform/iOS/ios_project.cmake", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Platform/iOS/ios_project.json", - "origin": "Platform/iOS/ios_project.json", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Registry/assets_scan_folders.setreg", - "origin": "Registry/assets_scan_folders.setreg", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Resources/LegacyLogoLauncher.bmp", - "origin": "Resources/LegacyLogoLauncher.bmp", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Resources/GameSDK.ico", - "origin": "Resources/GameSDK.ico", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Resources/Platform/Mac/Images.xcassets/Contents.json", - "origin": "Resources/Platform/Mac/Images.xcassets/Contents.json", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/Contents.json", - "origin": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/Contents.json", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_128_2x.png", - "origin": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_128_2x.png", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_128.png", - "origin": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_128.png", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_16.png", - "origin": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_16.png", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_16_2x.png", - "origin": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_16_2x.png", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_256_2x.png", - "origin": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_256_2x.png", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_256.png", - "origin": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_256.png", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_32.png", - "origin": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_32.png", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_32_2x.png", - "origin": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_32_2x.png", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_512.png", - "origin": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_512.png", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_512_2x.png", - "origin": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset/icon_512_2x.png", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Resources/Platform/Mac/Info.plist", - "origin": "Resources/Platform/Mac/Info.plist", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Resources/Platform/iOS/Images.xcassets/Contents.json", - "origin": "Resources/Platform/iOS/Images.xcassets/Contents.json", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage/Contents.json", - "origin": "Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage/Contents.json", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage/iPadLaunchImage1024x768.png", - "origin": "Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage/iPadLaunchImage1024x768.png", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage/iPadLaunchImage1536x2048.png", - "origin": "Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage/iPadLaunchImage1536x2048.png", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage/iPadLaunchImage2048x1536.png", - "origin": "Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage/iPadLaunchImage2048x1536.png", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage/iPadLaunchImage768x1024.png", - "origin": "Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage/iPadLaunchImage768x1024.png", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage/iPhoneLaunchImage640x1136.png", - "origin": "Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage/iPhoneLaunchImage640x1136.png", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage/iPhoneLaunchImage640x960.png", - "origin": "Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage/iPhoneLaunchImage640x960.png", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/Contents.json", - "origin": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/Contents.json", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPadAppIcon152x152.png", - "origin": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPadAppIcon152x152.png", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPadAppIcon76x76.png", - "origin": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPadAppIcon76x76.png", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPadProAppIcon167x167.png", - "origin": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPadProAppIcon167x167.png", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPadSettingsIcon29x29.png", - "origin": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPadSettingsIcon29x29.png", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPadSettingsIcon58x58.png", - "origin": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPadSettingsIcon58x58.png", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPadSpotlightIcon40x40.png", - "origin": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPadSpotlightIcon40x40.png", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPadSpotlightIcon80x80.png", - "origin": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPadSpotlightIcon80x80.png", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPhoneAppIcon120x120.png", - "origin": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPhoneAppIcon120x120.png", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPhoneAppIcon180x180.png", - "origin": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPhoneAppIcon180x180.png", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPhoneSettingsIcon58x58.png", - "origin": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPhoneSettingsIcon58x58.png", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPhoneSettingsIcon87x87.png", - "origin": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPhoneSettingsIcon87x87.png", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPhoneSpotlightIcon120x120.png", - "origin": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPhoneSpotlightIcon120x120.png", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPhoneSpotlightIcon80x80.png", - "origin": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset/iPhoneSpotlightIcon80x80.png", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Resources/Platform/iOS/Info.plist", - "origin": "Resources/Platform/iOS/Info.plist", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "ShaderLib/README.md", - "origin": "ShaderLib/README.md", - "isTemplated": false, - "isOptional": true + "isTemplated": false }, { "file": "ShaderLib/scenesrg.srgi", - "origin": "ShaderLib/scenesrg.srgi", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "ShaderLib/viewsrg.srgi", - "origin": "ShaderLib/viewsrg.srgi", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "autoexec.cfg", - "origin": "autoexec.cfg", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "game.cfg", - "origin": "game.cfg", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "preview.png", - "origin": "preview.png", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "project.json", - "origin": "project.json", - "isTemplated": true, - "isOptional": false + "isTemplated": true } ], "createDirectories": [ { - "dir": "Assets", - "origin": "Assets" + "dir": "Assets" }, { - "dir": "Code", - "origin": "Code" + "dir": "cmake" }, { - "dir": "Code/Include", - "origin": "Code/Include" + "dir": "cmake/Platform" }, { - "dir": "Code/Include/${Name}", - "origin": "Code/Include/${Name}" + "dir": "cmake/Platform/Linux" }, { - "dir": "Code/Platform", - "origin": "Code/Platform" + "dir": "Config" }, { - "dir": "Code/Platform/Android", - "origin": "Code/Platform/Android" + "dir": "Gem" }, { - "dir": "Code/Platform/Linux", - "origin": "Code/Platform/Linux" + "dir": "Gem/Include" }, { - "dir": "Code/Platform/Mac", - "origin": "Code/Platform/Mac" + "dir": "Gem/Include/${Name}" }, { - "dir": "Code/Platform/Windows", - "origin": "Code/Platform/Windows" + "dir": "Gem/Platform" }, { - "dir": "Code/Platform/iOS", - "origin": "Code/Platform/iOS" + "dir": "Gem/Platform/Android" }, { - "dir": "Code/Source", - "origin": "Code/Source" + "dir": "Gem/Platform/Linux" }, { - "dir": "Config", - "origin": "Config" + "dir": "Gem/Platform/Mac" }, { - "dir": "Platform", - "origin": "Platform" + "dir": "Gem/Platform/Windows" }, { - "dir": "Platform/Android", - "origin": "Platform/Android" + "dir": "Gem/Platform/iOS" }, { - "dir": "Platform/Linux", - "origin": "Platform/Linux" + "dir": "Gem/Source" }, { - "dir": "Platform/Mac", - "origin": "Platform/Mac" + "dir": "Config" }, { - "dir": "Platform/Windows", - "origin": "Platform/Windows" + "dir": "Platform" }, { - "dir": "Platform/iOS", - "origin": "Platform/iOS" + "dir": "Platform/Android" }, { - "dir": "Registry", - "origin": "Registry" + "dir": "Platform/Linux" }, { - "dir": "Resources", - "origin": "Resources" + "dir": "Platform/Mac" }, { - "dir": "Resources/Platform", - "origin": "Resources/Platform" + "dir": "Platform/Windows" }, { - "dir": "Resources/Platform/Mac", - "origin": "Resources/Platform/Mac" + "dir": "Platform/iOS" }, { - "dir": "Resources/Platform/Mac/Images.xcassets", - "origin": "Resources/Platform/Mac/Images.xcassets" + "dir": "Registry" }, { - "dir": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset", - "origin": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset" + "dir": "Resources" }, { - "dir": "Resources/Platform/iOS", - "origin": "Resources/Platform/iOS" + "dir": "Resources/Platform" }, { - "dir": "Resources/Platform/iOS/Images.xcassets", - "origin": "Resources/Platform/iOS/Images.xcassets" + "dir": "Resources/Platform/Mac" }, { - "dir": "Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage", - "origin": "Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage" + "dir": "Resources/Platform/Mac/Images.xcassets" }, { - "dir": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset", - "origin": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset" + "dir": "Resources/Platform/Mac/Images.xcassets/TestDPAppIcon.appiconset" }, { - "dir": "ShaderLib", - "origin": "ShaderLib" + "dir": "Resources/Platform/iOS" }, { - "dir": "Shaders", - "origin": "Shaders" + "dir": "Resources/Platform/iOS/Images.xcassets" }, { - "dir": "Shaders/ShaderResourceGroups", - "origin": "Shaders/ShaderResourceGroups" + "dir": "Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage" + }, + { + "dir": "Resources/Platform/iOS/Images.xcassets/TestDPAppIcon.appiconset" + }, + { + "dir": "ShaderLib" + }, + { + "dir": "Shaders" + }, + { + "dir": "Shaders/ShaderResourceGroups" } ] } diff --git a/Templates/PythonToolGem/Template/gem.json b/Templates/PythonToolGem/Template/gem.json index 84f5b65a3e..3164c7b5b8 100644 --- a/Templates/PythonToolGem/Template/gem.json +++ b/Templates/PythonToolGem/Template/gem.json @@ -2,8 +2,9 @@ "gem_name": "${Name}", "display_name": "${Name}", "license": "What license ${Name} uses goes here: i.e. Apache-2.0 Or MIT", - "license_url": "", - "origin": "The primary repo for ${Name} goes here: i.e. http://www.mydomain.com", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", + "origin": "The name of the originator goes here. i.e. XYZ Inc.", + "origin_url": "The primary repo for ${Name} goes here: i.e. http://www.mydomain.com", "type": "Code", "summary": "A short description of ${Name}.", "canonical_tags": [ @@ -14,6 +15,7 @@ ], "icon_path": "preview.png", "requirements": "", + "documentation_url": "", "dependencies": [ "QtForPython" ] diff --git a/Templates/PythonToolGem/template.json b/Templates/PythonToolGem/template.json index 6dc68de3fc..3af74eb49f 100644 --- a/Templates/PythonToolGem/template.json +++ b/Templates/PythonToolGem/template.json @@ -1,12 +1,18 @@ { "template_name": "PythonToolGem", + "template_restricted_platform_relative_path": "Templates/PythonToolGem", "restricted_name": "o3de", - "restricted_platform_relative_path": "Templates", - "origin": "The primary repo for PythonToolGem goes here: i.e. http://www.mydomain.com", - "license": "What license PythonToolGem uses goes here: i.e. https://opensource.org/licenses/MIT", + "restricted_platform_relative_path": "Templates/PythonToolGem", + "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", + "license": "Apache-2.0 or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "display_name": "PythonToolGem", "summary": "A gem template for a custom tool in Python that gets registered with the Editor.", - "canonical_tags": [], + "canonical_tags": [ + "Python", + "Gem" + ], "user_tags": [ "PythonToolGem" ], @@ -14,221 +20,153 @@ "copyFiles": [ { "file": ".gitignore", - "origin": ".gitignore", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "CMakeLists.txt", - "origin": "CMakeLists.txt", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/${NameLower}_editor_files.cmake", - "origin": "Code/${NameLower}_editor_files.cmake", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/${NameLower}_editor_shared_files.cmake", - "origin": "Code/${NameLower}_editor_shared_files.cmake", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/${NameLower}_editor_tests_files.cmake", - "origin": "Code/${NameLower}_editor_tests_files.cmake", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/CMakeLists.txt", - "origin": "Code/CMakeLists.txt", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/Include/${Name}/${Name}Bus.h", - "origin": "Code/Include/${Name}/${Name}Bus.h", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/Platform/Linux/${NameLower}_linux_files.cmake", - "origin": "Code/Platform/Linux/${NameLower}_linux_files.cmake", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/Platform/Linux/${NameLower}_shared_linux_files.cmake", - "origin": "Code/Platform/Linux/${NameLower}_shared_linux_files.cmake", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/Platform/Linux/PAL_linux.cmake", - "origin": "Code/Platform/Linux/PAL_linux.cmake", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/Platform/Mac/${NameLower}_mac_files.cmake", - "origin": "Code/Platform/Mac/${NameLower}_mac_files.cmake", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/Platform/Mac/${NameLower}_shared_mac_files.cmake", - "origin": "Code/Platform/Mac/${NameLower}_shared_mac_files.cmake", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/Platform/Mac/PAL_mac.cmake", - "origin": "Code/Platform/Mac/PAL_mac.cmake", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/Platform/Windows/${NameLower}_shared_windows_files.cmake", - "origin": "Code/Platform/Windows/${NameLower}_shared_windows_files.cmake", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/Platform/Windows/${NameLower}_windows_files.cmake", - "origin": "Code/Platform/Windows/${NameLower}_windows_files.cmake", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/Platform/Windows/PAL_windows.cmake", - "origin": "Code/Platform/Windows/PAL_windows.cmake", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/Source/${Name}.qrc", - "origin": "Code/Source/${Name}.qrc", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/Source/${Name}EditorModule.cpp", - "origin": "Code/Source/${Name}EditorModule.cpp", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/Source/${Name}EditorSystemComponent.cpp", - "origin": "Code/Source/${Name}EditorSystemComponent.cpp", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/Source/${Name}EditorSystemComponent.h", - "origin": "Code/Source/${Name}EditorSystemComponent.h", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/Source/${Name}ModuleInterface.h", - "origin": "Code/Source/${Name}ModuleInterface.h", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Code/Source/toolbar_icon.svg", - "origin": "Code/Source/toolbar_icon.svg", - "isTemplated": false, - "isOptional": false + "isTemplated": false }, { "file": "Code/Tests/${Name}EditorTest.cpp", - "origin": "Code/Tests/${Name}EditorTest.cpp", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Editor/Scripts/__init__.py", - "origin": "Editor/Scripts/__init__.py", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Editor/Scripts/bootstrap.py", - "origin": "Editor/Scripts/bootstrap.py", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "Editor/Scripts/${NameLower}_dialog.py", - "origin": "Editor/Scripts/${NameLower}_dialog.py", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "gem.json", - "origin": "gem.json", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "preview.png", - "origin": "preview.png", - "isTemplated": false, - "isOptional": false + "isTemplated": false } ], "createDirectories": [ { - "dir": "Assets", - "origin": "Assets" + "dir": "Assets" }, { - "dir": "Code", - "origin": "Code" + "dir": "Code" }, { - "dir": "Editor", - "origin": "Editor" + "dir": "Editor" }, { - "dir": "Editor/Scripts", - "origin": "Editor/Scripts" + "dir": "Editor/Scripts" }, { - "dir": "Code/Include", - "origin": "Code/Include" + "dir": "Code/Include" }, { - "dir": "Code/Include/${Name}", - "origin": "Code/Include/${Name}" + "dir": "Code/Include/${Name}" }, { - "dir": "Code/Platform", - "origin": "Code/Platform" + "dir": "Code/Platform" }, { - "dir": "Code/Platform/Linux", - "origin": "Code/Platform/Linux" + "dir": "Code/Platform/Linux" }, { - "dir": "Code/Platform/Mac", - "origin": "Code/Platform/Mac" + "dir": "Code/Platform/Mac" }, { - "dir": "Code/Platform/Windows", - "origin": "Code/Platform/Windows" + "dir": "Code/Platform/Windows" }, { - "dir": "Code/Source", - "origin": "Code/Source" + "dir": "Code/Source" }, { - "dir": "Code/Tests", - "origin": "Code/Tests" + "dir": "Code/Tests" } ] } diff --git a/cmake/3rdParty.cmake b/cmake/3rdParty.cmake index 7d98c3ea3e..1bea5f4f67 100644 --- a/cmake/3rdParty.cmake +++ b/cmake/3rdParty.cmake @@ -186,7 +186,7 @@ function(ly_add_external_target) endif() # Check if there is a pal file - ly_get_absolute_pal_filename(pal_file ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME}/${ly_add_external_target_PACKAGE}_${PAL_PLATFORM_NAME_LOWERCASE}.cmake) + o3de_pal_dir(pal_file ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME}/${ly_add_external_target_PACKAGE}_${PAL_PLATFORM_NAME_LOWERCASE}.cmake ${O3DE_ENGINE_RESTRICTED_PATH} ${LY_ROOT_FOLDER}) if(NOT EXISTS ${pal_file}) set(pal_file ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME}/${ly_add_external_target_PACKAGE}_${PAL_PLATFORM_NAME_LOWERCASE}.cmake) endif() @@ -357,12 +357,12 @@ endfunction() # Add the 3rdParty folder to find the modules list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/3rdParty) -ly_get_absolute_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/3rdParty/Platform/${PAL_PLATFORM_NAME}) +o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/3rdParty/Platform/${PAL_PLATFORM_NAME} ${O3DE_ENGINE_RESTRICTED_PATH} ${LY_ROOT_FOLDER}) list(APPEND CMAKE_MODULE_PATH ${pal_dir}) if(NOT INSTALLED_ENGINE) # Add the 3rdParty cmake files to the IDE 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}) + o3de_pal_dir(pal_3rdparty_dir ${CMAKE_CURRENT_SOURCE_DIR}/cmake/3rdParty/Platform/${PAL_PLATFORM_NAME} ${O3DE_ENGINE_RESTRICTED_PATH} ${LY_ROOT_FOLDER}) ly_include_cmake_file_list(${pal_3rdparty_dir}/cmake_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake) endif() diff --git a/cmake/3rdParty/BuiltInPackages.cmake b/cmake/3rdParty/BuiltInPackages.cmake index 743e2e983e..e81cfffe01 100644 --- a/cmake/3rdParty/BuiltInPackages.cmake +++ b/cmake/3rdParty/BuiltInPackages.cmake @@ -12,9 +12,9 @@ # cmake/3rdParty/Platform/Windows/BuiltInPackages_windows.cmake #include the platform-specific 3rd party packages. -ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME}) +o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} ${O3DE_ENGINE_RESTRICTED_PATH} ${LY_ROOT_FOLDER}) -set(LY_PAL_PACKAGE_FILE_NAME ${CMAKE_CURRENT_LIST_DIR}/${pal_dir}/BuiltInPackages_${PAL_PLATFORM_NAME_LOWERCASE}.cmake) +set(LY_PAL_PACKAGE_FILE_NAME ${pal_dir}/BuiltInPackages_${PAL_PLATFORM_NAME_LOWERCASE}.cmake) include(${LY_PAL_PACKAGE_FILE_NAME}) # add the above file to the ALLFILES list, so that they show up in IDEs diff --git a/cmake/3rdPartyPackages.cmake b/cmake/3rdPartyPackages.cmake index a3f15bdb22..f9a72672c0 100644 --- a/cmake/3rdPartyPackages.cmake +++ b/cmake/3rdPartyPackages.cmake @@ -614,7 +614,7 @@ endfunction() # and ensure the path to the package root is added to the find_package search paths. # For example # ly_associate_package(TARGETS zlib PACKAGE_NAME zlib-1.2.8-multiplatform PACKAGE_HASH e6f34b8ac16acf881e3d666ef9fd0c1aee94c3f69283fb6524d35d6f858eebbb) -# - this waill cause it to automatically download and activate this package if it finds a target that +# - this will cause it to automatically download and activate this package if it finds a target that # depends on '3rdParty::zlib' in its runtime or its build time dependency list. # - note that '3rdParty' is implied, do not specify it in the TARGETS list. function(ly_associate_package) @@ -684,6 +684,7 @@ endmacro() # is associated with a package, as above. If it is, it makes sure that the package # is brought into scope (and if necessary, downloaded.) macro(ly_download_associated_package find_library_name) + unset(package_name) ly_get_package_association(${find_library_name} package_name) if (package_name) # it is an associated package. diff --git a/cmake/Configurations.cmake b/cmake/Configurations.cmake index 51dee2f07b..709c81e3d2 100644 --- a/cmake/Configurations.cmake +++ b/cmake/Configurations.cmake @@ -189,5 +189,5 @@ foreach(conf IN LISTS CMAKE_CONFIGURATION_TYPES) endforeach() # flags are defined per platform, follow platform files under Platform//Configurations_.cmake -ly_get_absolute_pal_filename(pal_dir ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Platform/${PAL_PLATFORM_NAME}) +o3de_pal_dir(pal_dir ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Platform/${PAL_PLATFORM_NAME} ${O3DE_ENGINE_RESTRICTED_PATH} ${LY_ROOT_FOLDER}) include(${pal_dir}/Configurations_${PAL_PLATFORM_NAME_LOWERCASE}.cmake) diff --git a/cmake/FileUtil.cmake b/cmake/FileUtil.cmake index 4607e14452..5721cf452c 100644 --- a/cmake/FileUtil.cmake +++ b/cmake/FileUtil.cmake @@ -26,8 +26,16 @@ function(ly_include_cmake_file_list file) include(${file}) get_filename_component(file_path "${file}" PATH) if(file_path) - list(TRANSFORM FILES PREPEND ${file_path}/) + foreach(f ${FILES}) + cmake_path(IS_RELATIVE f is_relative) + if(is_relative) + string(PREPEND f ${file_path}/) + endif() + list(APPEND TRANSFORMED_FILES ${f}) + endforeach() + set(FILES ${TRANSFORMED_FILES}) endif() + foreach(f ${FILES}) get_filename_component(absolute_path ${f} ABSOLUTE) if(NOT EXISTS ${absolute_path}) @@ -41,12 +49,19 @@ function(ly_include_cmake_file_list file) list(APPEND UNITY_AUTO_EXCLUSIONS ${f}) endif() endif() - endforeach() + list(APPEND FILES ${file}) # Add the _files.cmake to the list so it shows in the IDE if(file_path) - list(TRANSFORM SKIP_UNITY_BUILD_INCLUSION_FILES PREPEND ${file_path}/) + foreach(f ${SKIP_UNITY_BUILD_INCLUSION_FILES}) + cmake_path(IS_RELATIVE f is_relative) + if(is_relative) + string(PREPEND f ${file_path}/) + endif() + list(APPEND SKIP_UNITY_BUILD_INCLUSION_TRANSFORMED_FILES ${f}) + endforeach() + set(SKIP_UNITY_BUILD_INCLUSION_FILES ${SKIP_UNITY_BUILD_INCLUSION_TRANSFORMED_FILES}) endif() # Check if there are any files to exclude from unity groupings diff --git a/cmake/Install.cmake b/cmake/Install.cmake index b558590b9e..55f56b05e8 100644 --- a/cmake/Install.cmake +++ b/cmake/Install.cmake @@ -30,7 +30,7 @@ function(ly_install) install(CODE "endif()\n" ALL_COMPONENTS) else() install(${ARGN}) - endif() + endif() endfunction() @@ -195,6 +195,6 @@ function(ly_install_run_script SCRIPT) endfunction() if(LY_INSTALL_ENABLED) - ly_get_absolute_pal_filename(pal_dir ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Platform/${PAL_PLATFORM_NAME}) + o3de_pal_dir(pal_dir ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Platform/${PAL_PLATFORM_NAME} ${O3DE_ENGINE_RESTRICTED_PATH} ${LY_ROOT_FOLDER}) include(${pal_dir}/Install_${PAL_PLATFORM_NAME_LOWERCASE}.cmake) endif() diff --git a/cmake/LYTestWrappers.cmake b/cmake/LYTestWrappers.cmake index 03146b6045..9f4cd41a47 100644 --- a/cmake/LYTestWrappers.cmake +++ b/cmake/LYTestWrappers.cmake @@ -141,7 +141,7 @@ function(ly_add_test) set(wrapper_file ${CMAKE_CURRENT_FUNCTION_LIST_DIR}/Platform/${PAL_PLATFORM_NAME}/LYTestWrappers_${PAL_PLATFORM_NAME_LOWERCASE}.cmake) if(NOT EXISTS ${wrapper_file}) - ly_get_absolute_pal_filename(wrapper_file ${wrapper_file}) + o3de_pal_dir(wrapper_file ${wrapper_file} ${O3DE_ENGINE_RESTRICTED_PATH} ${LY_ROOT_FOLDER}) endif() include(${wrapper_file}) diff --git a/cmake/LYWrappers.cmake b/cmake/LYWrappers.cmake index d4bf1d7423..a2f4359fd5 100644 --- a/cmake/LYWrappers.cmake +++ b/cmake/LYWrappers.cmake @@ -11,7 +11,7 @@ set(LY_UNITY_BUILD ON CACHE BOOL "UNITY builds") include(CMakeFindDependencyMacro) include(cmake/LyAutoGen.cmake) -ly_get_absolute_pal_filename(pal_dir ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Platform/${PAL_PLATFORM_NAME}) +o3de_pal_dir(pal_dir ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Platform/${PAL_PLATFORM_NAME} ${O3DE_ENGINE_RESTRICTED_PATH} ${LY_ROOT_FOLDER}) include(${pal_dir}/LYWrappers_${PAL_PLATFORM_NAME_LOWERCASE}.cmake) # Not all platforms support unity builds diff --git a/cmake/PAL.cmake b/cmake/PAL.cmake index 67ed17b6d4..d0d1ad5396 100644 --- a/cmake/PAL.cmake +++ b/cmake/PAL.cmake @@ -15,67 +15,205 @@ # PAL_PLATFORM_NAME_LOWERCASE: name of the platform in lower case (part of filenames) # -file(GLOB detection_files "cmake/Platform/*/PALDetection_*.cmake") -foreach(detection_file ${detection_files}) - include(${detection_file}) -endforeach() - - -#! o3de_restricted_id: Reads the "restricted" key from the o3de manifest +#! o3de_get_home_path: returns the home path # -# \arg:o3de_json_file name of the o3de json file to read the "restricted_name" key from -# \arg:restricted returns the restricted association element from an o3de json, otherwise engine 'o3de' is assumed -# \arg:o3de_json_file name of the o3de json file -function(o3de_restricted_id o3de_json_file restricted) - ly_file_read(${o3de_json_file} json_data) - string(JSON restricted_entry ERROR_VARIABLE json_error GET ${json_data} "restricted_name") +# \arg:o3de_manifest_path returns the path of the manifest +function(o3de_get_home_path o3de_home_path) + # The o3de_manifest.json is in the home directory / .o3de folder + file(TO_CMAKE_PATH "$ENV{USERPROFILE}" home_path) # Windows + if(NOT EXISTS ${home_path}) + file(TO_CMAKE_PATH "$ENV{HOME}" home_path) # Unix + if (NOT EXISTS ${home_path}) + message(FATAL_ERROR "o3de Home path not found") + endif() + endif() + set(${o3de_home_path} ${home_path} PARENT_SCOPE) +endfunction() + +#! o3de_get_manifest_path: returns the path to the manifest +# +# \arg:o3de_manifest_path returns the path of the manifest +function(o3de_get_manifest_path o3de_manifest_path) + # The o3de_manifest.json is in the home directory / .o3de folder + o3de_get_home_path(o3de_home_path) + set(${o3de_manifest_path} ${o3de_home_path}/.o3de/o3de_manifest.json PARENT_SCOPE) +endfunction() + +#! o3de_read_manifest: returns the contents of the manifest +# +# \arg:restricted_subdirs returns the restricted elements from the manifest +function(o3de_read_manifest o3de_manifest_json_data) + #get the manifest path + o3de_get_manifest_path(o3de_manifest_path) + if(EXISTS ${o3de_manifest_path}) + ly_file_read(${o3de_manifest_path} json_data) + set(${o3de_manifest_json_data} ${json_data} PARENT_SCOPE) + endif() +endfunction() + +#! o3de_recurse_gems: returns the gem paths +# +# \arg:object json path +# \arg:gems returns the gems from the external subdirectory elements from the manifest +function(o3de_recurse_gems object_json_path gems) + get_filename_component(object_json_parent_path ${object_json_path} DIRECTORY) + ly_file_read(${object_json_path} json_data) + string(JSON external_subdirectories_count ERROR_VARIABLE json_error LENGTH ${json_data} "external_subdirectories") + if(NOT json_error) + if(external_subdirectories_count GREATER 0) + math(EXPR external_subdirectories_range "${external_subdirectories_count}-1") + foreach(external_subdirectories_index RANGE ${external_subdirectories_range}) + string(JSON external_subdirectories_entry ERROR_VARIABLE json_error GET ${json_data} "external_subdirectories" "${external_subdirectories_index}") + cmake_path(IS_RELATIVE external_subdirectories_entry is_relative) + if(${is_relative}) + cmake_path(ABSOLUTE_PATH external_subdirectories_entry BASE_DIRECTORY ${object_json_parent_path} NORMALIZE OUTPUT_VARIABLE external_subdirectories_entry) + endif() + if(EXISTS ${external_subdirectories_entry}/gem.json) + list(APPEND gem_entries ${external_subdirectories_entry}) + o3de_recurse_gems(${external_subdirectories_entry}/gem.json gem_entries) + endif() + endforeach() + endif() + endif() + set(${gems} ${gem_entries} PARENT_SCOPE) +endfunction() + +#! o3de_find_gem: returns the gem path +# +# \arg:gem_name the gem name to find +# \arg:the path of the gem +function(o3de_find_gem gem_name gem_path) + o3de_get_manifest_path(manifest_path) + if(EXISTS ${manifest_path}) + o3de_recurse_gems(${manifest_path} gems) + endif() + o3de_recurse_gems(${LY_ROOT_FOLDER}/engine.json gems) + foreach(gem ${gems}) + ly_file_read(${gem}/gem.json json_data) + string(JSON gem_json_name ERROR_VARIABLE json_error GET ${json_data} "gem_name") + if(gem_json_name STREQUAL gem_name) + set(${gem_path} ${gem} PARENT_SCOPE) + return() + endif() + endforeach() +endfunction() + +#! o3de_manifest_restricted: returns the manifests restricted paths +# +# \arg:restricted returns the restricted elements from the manifest +function(o3de_manifest_restricted restricted) + #read the manifest + o3de_read_manifest(o3de_manifest_json_data) + string(JSON restricted_count ERROR_VARIABLE json_error LENGTH ${o3de_manifest_json_data} "restricted") if(json_error) # Restricted fields can never be a requirement so no warning is issued return() endif() - if(restricted_entry) - set(${restricted} ${restricted_entry} PARENT_SCOPE) + if(restricted_count GREATER 0) + math(EXPR restricted_range "${restricted_count}-1") + foreach(restricted_index RANGE ${restricted_range}) + string(JSON restricted_entry ERROR_VARIABLE json_error GET ${o3de_manifest_json_data} "restricted" "${restricted_index}") + list(APPEND restricted_entries ${restricted_entry}) + endforeach() endif() + set(${restricted} ${restricted_entries} PARENT_SCOPE) +endfunction() + +#! o3de_json_restricted: returns the restricted element from a json +# +# \arg:restricted returns the restricted element of the json +function(o3de_json_restricted json_path restricted) + if(EXISTS ${json_path}) + ly_file_read(${json_path} json_data) + string(JSON restricted_entry ERROR_VARIABLE json_error GET ${json_data} "restricted") + if(json_error) + # Restricted fields can never be a requirement so no warning is issued + return() + endif() + set(${restricted} ${restricted_entry} PARENT_SCOPE) + endif() +endfunction() + +#! o3de_restricted_id: determines the restricted object for this json +# +# Find this objects restricted name. If the object has a "restricted" element +# If it does not have one it inherits its parents "restricted" element if it has one +# If the parent does not have one it inherits its parents parent "restricted" element is it has one and so on... +# We stop looking if the object or parent is in the manifest, as the manifest only has top level objects +# which means they have no children. +# +# \arg:o3de_json_file name of the o3de json file to read the "restricted" key from +# \arg:restricted returns the restricted association element from an o3de json, otherwise its doesnt change anything +# \arg:o3de_json_file name of the o3de json file +function(o3de_restricted_id o3de_json_file restricted parent_relative_path) + # read the passed in o3de json and see if "restricted" is set + o3de_json_restricted(${o3de_json_file} restricted_name) + if(restricted_name) + set(${parent_relative_path} "" PARENT_SCOPE) + set(${restricted} ${restricted_name} PARENT_SCOPE) + return() + endif() + + # This object did not have a "restricted" set, now we must look at the parent + # Stop if this is a top level object + o3de_manifest_restricted(manifest_restricted_paths) + get_filename_component(o3de_json_file_parent ${o3de_json_file} DIRECTORY) + get_filename_component(relative_path ${o3de_json_file_parent} NAME) + get_filename_component(o3de_json_file_parent ${o3de_json_file_parent} DIRECTORY) + if(${o3de_json_file_parent} IN_LIST manifest_restricted_paths) + set(${parent_relative_path} "" PARENT_SCOPE) + set(${restricted} "" PARENT_SCOPE) + return() + endif() + + string(LENGTH ${o3de_json_file_parent} parent_len) + while(parent_len) + if(EXISTS ${o3de_json_file_parent}/engine.json) + o3de_json_restricted(${o3de_json_file_parent}/engine.json restricted_name) + if(restricted_name) + set(${parent_relative_path} ${relative_path} PARENT_SCOPE) + set(${restricted} ${restricted_name} PARENT_SCOPE) + return() + endif() + endif() + if(EXISTS ${o3de_json_file_parent}/project.json) + o3de_json_restricted(${o3de_json_file_parent}/project.json restricted_name) + if(restricted_name) + set(${parent_relative_path} ${relative_path} PARENT_SCOPE) + set(${restricted} ${restricted_name} PARENT_SCOPE) + return() + endif() + endif() + if(EXISTS ${o3de_json_file_parent}/gem.json) + o3de_json_restricted(${o3de_json_file_parent}/gem.json restricted_name) + if(restricted_name) + set(${parent_relative_path} ${relative_path} PARENT_SCOPE) + set(${restricted} ${restricted_name} PARENT_SCOPE) + return() + endif() + endif() + + if(${o3de_json_file_parent} IN_LIST manifest_restricted_paths) + set(${parent_relative_path} "" PARENT_SCOPE) + set(${restricted} "" PARENT_SCOPE) + return() + endif() + + get_filename_component(parent ${o3de_json_file_parent} NAME) + string(PREPEND relative_path ${parent}/) + get_filename_component(o3de_json_file_parent ${o3de_json_file_parent} DIRECTORY) + string(LENGTH ${o3de_json_file_parent} parent_len) + endwhile() endfunction() #! o3de_find_restricted_folder: # -# \arg:restricted_path returns the path of the o3de restricted folder with name restricted_name +# \arg:restricted_path returns the path of the o3de restricted folder using the restricted_name # \arg:restricted_name name of the restricted function(o3de_find_restricted_folder restricted_name restricted_path) - # Read the restricted path from engine.json if one EXISTS - ly_file_read(${LY_ROOT_FOLDER}/engine.json engine_json_data) - string(JSON restricted_subdirs_count ERROR_VARIABLE engine_json_error LENGTH ${engine_json_data} "restricted") - if(restricted_subdirs_count GREATER 0) - string(JSON restricted_subdir ERROR_VARIABLE engine_json_error GET ${engine_json_data} "restricted" "0") - set(${restricted_path} ${restricted_subdir} PARENT_SCOPE) - return() - endif() - - - file(TO_CMAKE_PATH "$ENV{USERPROFILE}" home_directory) # Windows - if(NOT EXISTS ${home_directory}) - file(TO_CMAKE_PATH "$ENV{HOME}" home_directory) # Unix - if (NOT EXISTS ${home_directory}) - return() - endif() - endif() - - # Examine the o3de manifest file for the list of restricted directories - set(o3de_manifest_path ${home_directory}/.o3de/o3de_manifest.json) - if(EXISTS ${o3de_manifest_path}) - ly_file_read(${o3de_manifest_path} o3de_manifest_json_data) - string(JSON restricted_subdirs_count ERROR_VARIABLE engine_json_error LENGTH ${o3de_manifest_json_data} "restricted") - if(restricted_subdirs_count GREATER 0) - math(EXPR restricted_subdirs_range "${restricted_subdirs_count}-1") - foreach(restricted_subdir_index RANGE ${restricted_subdirs_range}) - string(JSON restricted_subdir ERROR_VARIABLE engine_json_error GET ${o3de_manifest_json_data} "restricted" "${restricted_subdir_index}") - list(APPEND restricted_subdirs ${restricted_subdir}) - endforeach() - endif() - endif() + o3de_manifest_restricted(restricted_entries) # Iterate over the restricted directories from the manifest file - foreach(restricted_entry ${restricted_subdirs}) + foreach(restricted_entry ${restricted_entries}) set(restricted_json_file ${restricted_entry}/restricted.json) ly_file_read(${restricted_json_file} restricted_json) string(JSON this_restricted_name ERROR_VARIABLE json_error GET ${restricted_json} "restricted_name") @@ -95,30 +233,30 @@ endfunction() # # \arg:o3de_json_file json file to read restricted id from # \arg:restricted_name name of the restricted object -function(o3de_restricted_path o3de_json_file restricted_path) - o3de_restricted_id(${o3de_json_file} restricted_name) +function(o3de_restricted_path o3de_json_file restricted_path parent_relative_path) + o3de_restricted_id(${o3de_json_file} restricted_name parent_relative) + set(${parent_relative_path} ${parent_relative} PARENT_SCOPE) if(restricted_name) o3de_find_restricted_folder(${restricted_name} restricted_folder) if(restricted_folder) set(${restricted_path} ${restricted_folder} PARENT_SCOPE) + else() + get_filename_component(o3de_json_file_parent ${o3de_json_file} DIRECTORY) + set(${restricted_path} ${o3de_json_file_parent}/restricted PARENT_SCOPE) endif() endif() endfunction() -#! read_engine_restricted_path: Locates the restricted path within the engine from a json file -# -# \arg:output_restricted_path returns the path of the o3de restricted folder with name restricted_name -function(read_engine_restricted_path output_restricted_path) - # Set manifest path to path in the user home directory - set(manifest_path ${LY_ROOT_FOLDER}/engine.json) - if(EXISTS ${manifest_path}) - o3de_restricted_path(${manifest_path} read_restricted_path) - set(${output_restricted_path} ${read_restricted_path} PARENT_SCOPE) - endif() -endfunction() +# detect open platforms +file(GLOB detection_files "cmake/Platform/*/PALDetection_*.cmake") +foreach(detection_file ${detection_files}) + include(${detection_file}) +endforeach() -read_engine_restricted_path(O3DE_ENGINE_RESTRICTED_PATH) +# set the O3DE_ENGINE_RESTRICTED_PATH +o3de_restricted_path(${LY_ROOT_FOLDER}/engine.json O3DE_ENGINE_RESTRICTED_PATH engine_has_no_parent) +# detect platforms in the restricted path file(GLOB detection_files ${O3DE_ENGINE_RESTRICTED_PATH}/*/cmake/PALDetection_*.cmake) foreach(detection_file ${detection_files}) include(${detection_file}) @@ -146,21 +284,16 @@ foreach(pal_restricted_file ${pal_restricted_files}) string(TOLOWER ${platform} platform_lower) list(APPEND PAL_RESTRICTED_PLATFORMS ${platform_lower}) endforeach() +list(REMOVE_DUPLICATES PAL_RESTRICTED_PLATFORMS) + ly_set(PAL_RESTRICTED_PLATFORMS ${PAL_RESTRICTED_PLATFORMS}) function(ly_get_absolute_pal_filename out_name in_name) - set(full_name ${in_name}) + message(DEPRECATION "ly_get_list_relative_pal_filename is being deprecated, change your code to use o3de_pal_dir instead.") + # parent relative path is optional if(${ARGC} GREATER 4) - # The object name is used to resolve ambiguities when a PAL directory is requested from - # two different external subdirectory root paths - # Such as if a PAL directory for two root object paths with same relative structure was requested to be Palified - # i.e /Platform//IO and /Platform//IO - # Normally the restricted PAL path for both gems would be "//IO". - # The object name can be used to make this path unique - # "///IO" for gem 1 and - # "///IO" for gem 2 - set(object_name ${ARGV4}) + set(parent_relative_path ${ARGV4}) endif() # The Default object path for path is the LY_ROOT_FOLDER @@ -170,14 +303,30 @@ function(ly_get_absolute_pal_filename out_name in_name) cmake_path(SET object_path NORMALIZE ${ARGV3}) endif() - # The Default restricted object path is the result of the read_engine_restricted_path function + # The default restricted object path is O3DE_ENGINE_RESTRICTED_PATH cmake_path(SET object_restricted_path NORMALIZE "${O3DE_ENGINE_RESTRICTED_PATH}") if(${ARGC} GREATER 2) # The user has supplied an object restricted path cmake_path(SET object_restricted_path NORMALIZE ${ARGV2}) endif() - # The input path must exist in order to form a PAL path + if(${ARGC} GREATER 4) + o3de_pal_dir(abs_name ${in_name} ${object_restricted_path} ${object_path} ${parent_relative_path}) + else() + o3de_pal_dir(abs_name ${in_name} ${object_restricted_path} ${object_path}) + endif() + set(${out_name} ${abs_name} PARENT_SCOPE) +endfunction() + +function(o3de_pal_dir out_name in_name object_restricted_path object_path) #parent_relative_path) + set(full_name ${in_name}) + + # parent relative path is optional + if(${ARGC} GREATER 4) + set(parent_relative_path ${ARGV4}) + endif() + + # The input path must not exist in order to form a restricted PAL path if (NOT EXISTS ${full_name}) # if the file is not in the object path then we cannot determine a PAL file for it cmake_path(IS_PREFIX object_path ${full_name} is_input_path_in_root) @@ -222,7 +371,7 @@ function(ly_get_absolute_pal_filename out_name in_name) if(NOT EXISTS ${candidate_PAL_path}) string(TOLOWER ${candidate_platform_name} candidate_platform_name_lower) if("${candidate_platform_name_lower}" IN_LIST PAL_RESTRICTED_PLATFORMS) - cmake_path(APPEND object_restricted_path ${candidate_platform_name} ${object_name} + cmake_path(APPEND object_restricted_path ${candidate_platform_name} ${parent_relative_path} ${pre_platform_paths} OUTPUT_VARIABLE candidate_PAL_path) endif() endif() @@ -236,17 +385,43 @@ function(ly_get_absolute_pal_filename out_name in_name) endfunction() function(ly_get_list_relative_pal_filename out_name in_name) - ly_get_absolute_pal_filename(abs_name ${in_name} ${ARGN}) + message(DEPRECATION "ly_get_list_relative_pal_filename is being deprecated, change your code to use o3de_pal_dir instead.") + + # parent relative path is optional + if(${ARGC} GREATER 4) + set(parent_relative_path ${ARGV4}) + endif() + + # The Default object path for path is the LY_ROOT_FOLDER + cmake_path(SET object_path NORMALIZE "${LY_ROOT_FOLDER}") + if(${ARGC} GREATER 3) + # The user has supplied an object restricted path, the object path for consideration + cmake_path(SET object_path NORMALIZE ${ARGV3}) + endif() + + # The default restricted object path is O3DE_ENGINE_RESTRICTED_PATH + cmake_path(SET object_restricted_path NORMALIZE "${O3DE_ENGINE_RESTRICTED_PATH}") + if(${ARGC} GREATER 2) + # The user has supplied an object restricted path + cmake_path(SET object_restricted_path NORMALIZE ${ARGV2}) + endif() + + if(${ARGC} GREATER 4) + o3de_pal_dir(abs_name ${in_name} ${object_restricted_path} ${object_path} ${parent_relative_path}) + else() + o3de_pal_dir(abs_name ${in_name} ${object_restricted_path} ${object_path}) + endif() + cmake_path(RELATIVE_PATH abs_name BASE_DIRECTORY ${CMAKE_CURRENT_LIST_DIR} OUTPUT_VARIABLE relative_name) set(${out_name} ${relative_name} PARENT_SCOPE) endfunction() -ly_get_absolute_pal_filename(pal_dir ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Platform/${PAL_PLATFORM_NAME}) +o3de_pal_dir(pal_cmake_dir ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Platform/${PAL_PLATFORM_NAME} ${O3DE_ENGINE_RESTRICTED_PATH} ${LY_ROOT_FOLDER}) -ly_include_cmake_file_list(${pal_dir}/platform_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake) +ly_include_cmake_file_list(${pal_cmake_dir}/platform_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake) -include(${pal_dir}/PAL_${PAL_PLATFORM_NAME_LOWERCASE}.cmake) -include(${pal_dir}/Toolchain_${PAL_PLATFORM_NAME_LOWERCASE}.cmake OPTIONAL) +include(${pal_cmake_dir}/PAL_${PAL_PLATFORM_NAME_LOWERCASE}.cmake) +include(${pal_cmake_dir}/Toolchain_${PAL_PLATFORM_NAME_LOWERCASE}.cmake OPTIONAL) set(LY_DISABLE_TEST_MODULES FALSE CACHE BOOL "Option to forcibly disable the inclusion of test targets in the build") diff --git a/cmake/PALTools.cmake b/cmake/PALTools.cmake index 2204abf5ae..88e827f9c2 100644 --- a/cmake/PALTools.cmake +++ b/cmake/PALTools.cmake @@ -35,14 +35,14 @@ ly_set(LY_PAL_TOOLS_DEFINES ${LY_PAL_TOOLS_DEFINES}) # Include files to the CMakeFiles project foreach(enabled_platform ${LY_PAL_TOOLS_ENABLED}) string(TOLOWER ${enabled_platform} enabled_platform_lowercase) - ly_get_absolute_pal_filename(pal_dir ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Platform/${enabled_platform}) + o3de_pal_dir(pal_dir ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Platform/${enabled_platform}) ly_include_cmake_file_list(${pal_dir}/pal_tools_${enabled_platform_lowercase}_files.cmake) endforeach() function(ly_get_pal_tool_dirs out_list pal_path) set(pal_paths "") foreach(platform ${LY_PAL_TOOLS_ENABLED}) - ly_get_absolute_pal_filename(path ${pal_path}/${platform}) + o3d_pal_dir(path ${pal_path}/${platform} ${O3DE_ENGINE_RESTRICTED_PATH} ${LY_ROOT_FOLDER}) list(APPEND pal_paths ${path}) endforeach() set(${out_list} ${pal_paths} PARENT_SCOPE) diff --git a/cmake/Packaging.cmake b/cmake/Packaging.cmake index ecef5261b1..81409369dc 100644 --- a/cmake/Packaging.cmake +++ b/cmake/Packaging.cmake @@ -73,7 +73,7 @@ set(CPACK_PROJECT_CONFIG_FILE ${CPACK_SOURCE_DIR}/PackagingConfig.cmake) set(CPACK_AUTO_GEN_TAG ${LY_INSTALLER_AUTO_GEN_TAG}) # attempt to apply platform specific settings -ly_get_absolute_pal_filename(pal_dir ${CPACK_SOURCE_DIR}/Platform/${PAL_HOST_PLATFORM_NAME}) +o3de_pal_dir(pal_dir ${CPACK_SOURCE_DIR}/Platform/${PAL_HOST_PLATFORM_NAME} ${O3DE_ENGINE_RESTRICTED_PATH} ${LY_ROOT_FOLDER}) include(${pal_dir}/Packaging_${PAL_HOST_PLATFORM_NAME_LOWERCASE}.cmake) # if we get here and the generator hasn't been set, then a non fatal error occurred disabling packaging support diff --git a/cmake/Projects.cmake b/cmake/Projects.cmake index 13161c9e0f..c6aa6c382a 100644 --- a/cmake/Projects.cmake +++ b/cmake/Projects.cmake @@ -118,17 +118,27 @@ function(ly_generate_project_build_path_setreg project_real_path) file(GENERATE OUTPUT ${project_user_build_path_setreg_file} CONTENT ${project_build_path_setreg_content}) endfunction() +function(add_gem_json_external_subdirectories gem_path) + set(gem_json_path ${gem_path}/gem.json) + if(EXISTS ${gem_json_path}) + read_json_external_subdirs(gem_external_subdirs ${gem_path}/gem.json) + foreach(gem_external_subdir ${gem_external_subdirs}) + file(REAL_PATH ${gem_external_subdir} real_external_subdir BASE_DIRECTORY ${gem_path}) + set_property(GLOBAL APPEND PROPERTY LY_EXTERNAL_SUBDIRS ${real_external_subdir}) + add_gem_json_external_subdirectories(${real_external_subdir}) + endforeach() + endif() +endfunction() function(add_project_json_external_subdirectories project_path) set(project_json_path ${project_path}/project.json) if(EXISTS ${project_json_path}) - read_json_external_subdirs(external_subdirs ${project_path}/project.json) - foreach(external_subdir ${external_subdirs}) - file(REAL_PATH ${external_subdir} real_external_subdir BASE_DIRECTORY ${project_path}) - list(APPEND project_external_subdirs ${real_external_subdir}) + read_json_external_subdirs(project_external_subdirs ${project_path}/project.json) + foreach(project_external_subdir ${project_external_subdirs}) + file(REAL_PATH ${project_external_subdir} real_external_subdir BASE_DIRECTORY ${project_path}) + set_property(GLOBAL APPEND PROPERTY LY_EXTERNAL_SUBDIRS ${real_external_subdir}) + add_gem_json_external_subdirectories(${real_external_subdir}) endforeach() - - set_property(GLOBAL APPEND PROPERTY LY_EXTERNAL_SUBDIRS ${project_external_subdirs}) endif() endfunction() diff --git a/cmake/RuntimeDependencies.cmake b/cmake/RuntimeDependencies.cmake index 9cc7315b08..d36789791f 100644 --- a/cmake/RuntimeDependencies.cmake +++ b/cmake/RuntimeDependencies.cmake @@ -6,6 +6,6 @@ # # -ly_get_absolute_pal_filename(pal_dir ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Platform/${PAL_PLATFORM_NAME}) +o3de_pal_dir(pal_dir ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Platform/${PAL_PLATFORM_NAME} ${O3DE_ENGINE_RESTRICTED_PATH} ${LY_ROOT_FOLDER}) include(${pal_dir}/RuntimeDependencies_${PAL_PLATFORM_NAME_LOWERCASE}.cmake) diff --git a/engine.json b/engine.json index 737ac24fea..51b6738001 100644 --- a/engine.json +++ b/engine.json @@ -1,6 +1,6 @@ { "engine_name": "o3de", - "restricted_name": "o3de", + "restricted": "o3de", "FileVersion": 1, "O3DEVersion": "0.0.0.0", "O3DECopyrightYear": 2021, diff --git a/scripts/o3de/CMakeLists.txt b/scripts/o3de/CMakeLists.txt index 79836305c0..fced0f7727 100644 --- a/scripts/o3de/CMakeLists.txt +++ b/scripts/o3de/CMakeLists.txt @@ -8,7 +8,7 @@ add_subdirectory(tests) -ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME}) +o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} ${O3DE_ENGINE_RESTRICTED_PATH} ${LY_ROOT_FOLDER}) include(${pal_dir}/o3de_install_${PAL_PLATFORM_NAME_LOWERCASE}.cmake) ly_install_files(FILES ../o3de.py diff --git a/scripts/o3de/o3de/disable_gem.py b/scripts/o3de/o3de/disable_gem.py index 0b0e465d12..eecc765d32 100644 --- a/scripts/o3de/o3de/disable_gem.py +++ b/scripts/o3de/o3de/disable_gem.py @@ -98,9 +98,6 @@ def disable_gem_in_project(gem_name: str = None, def _run_disable_gem_in_project(args: argparse) -> int: - if args.override_home_folder: - manifest.override_home_folder = args.override_home_folder - return disable_gem_in_project(args.gem_name, args.gem_path, args.project_name, @@ -133,9 +130,6 @@ def add_parser_args(parser): help='The cmake enabled gem file in which gem names are to be removed from.' 'If not specified it will assume ') - parser.add_argument('-ohf', '--override-home-folder', type=pathlib.Path, required=False, - help='By default the home folder is the user folder, override it to this folder.') - parser.set_defaults(func=_run_disable_gem_in_project) diff --git a/scripts/o3de/o3de/download.py b/scripts/o3de/o3de/download.py index 8e28561e50..a7d5b56440 100644 --- a/scripts/o3de/o3de/download.py +++ b/scripts/o3de/o3de/download.py @@ -277,9 +277,6 @@ def is_o3de_restricted_update_available(restricted_name: str, local_last_updated return is_o3de_object_update_available(restricted_name, 'restricted_name', local_last_updated) def _run_download(args: argparse) -> int: - if args.override_home_folder: - manifest.override_home_folder = args.override_home_folder - if args.engine_name: return download_engine(args.engine_name, args.dest_path, @@ -331,8 +328,6 @@ def add_parser_args(parser): parser.add_argument('-f', '--force', action='store_true', required=False, default=False, help = 'Force overwrite the current object') - parser.add_argument('-ohf', '--override-home-folder', type=str, required=False, - help='By default the home folder is the user folder, override it to this folder.') parser.set_defaults(func=_run_download) diff --git a/scripts/o3de/o3de/enable_gem.py b/scripts/o3de/o3de/enable_gem.py index fc4dc6e9cf..ea79f6c73f 100644 --- a/scripts/o3de/o3de/enable_gem.py +++ b/scripts/o3de/o3de/enable_gem.py @@ -115,9 +115,6 @@ def enable_gem_in_project(gem_name: str = None, def _run_enable_gem_in_project(args: argparse) -> int: - if args.override_home_folder: - manifest.override_home_folder = args.override_home_folder - return enable_gem_in_project(args.gem_name, args.gem_path, args.project_name, @@ -150,9 +147,6 @@ def add_parser_args(parser): help='The cmake enabled_gem file in which the gem names are specified.' 'If not specified it will assume enabled_gems.cmake') - parser.add_argument('-ohf', '--override-home-folder', type=pathlib.Path, required=False, - help='By default the home folder is the user folder, override it to this folder.') - parser.set_defaults(func=_run_enable_gem_in_project) diff --git a/scripts/o3de/o3de/engine_template.py b/scripts/o3de/o3de/engine_template.py index 6b2e098cf0..d9993fb5d0 100755 --- a/scripts/o3de/o3de/engine_template.py +++ b/scripts/o3de/o3de/engine_template.py @@ -80,10 +80,20 @@ restricted_platforms = { 'Provo', 'Salem', 'Jasper', - 'Paris' + 'Paris', + 'Xenia', + 'Lancaster' } -template_file_name = 'template.json' +O3DE_LICENSE_TEXT = \ + """'# {BEGIN_LICENSE} +# Copyright (c) Contributors to the Open 3D Engine Project. +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# {END_LICENSE} +""" + this_script_parent = pathlib.Path(os.path.dirname(os.path.realpath(__file__))) @@ -165,7 +175,8 @@ def _execute_template_json(json_data: dict, destination_path: pathlib.Path, template_path: pathlib.Path, replacements: list, - keep_license_text: bool = False) -> None: + keep_license_text: bool = False, + keep_restricted_in_instance: bool = False) -> None: # create dirs first # for each createDirectory entry, transform the folder name for create_directory in json_data['createDirectories']: @@ -174,6 +185,18 @@ def _execute_template_json(json_data: dict, # transform the folder name new_dir = _transform(new_dir.as_posix(), replacements, keep_license_text) + new_dir = pathlib.Path(new_dir) + + if not keep_restricted_in_instance and 'Platform' in new_dir.parts: + try: + # the name of the Platform should follow the '/Platform/' + pattern = r'/Platform/(?P[^/:*?\"<>|\r\n]+/?)' + found_platform = re.search(pattern, new_dir.as_posix()).group('Platform') + found_platform = found_platform.replace('/', '') + if found_platform in restricted_platforms: + continue + except Exception as e: + pass # create the folder os.makedirs(new_dir, exist_ok=True) @@ -184,16 +207,23 @@ def _execute_template_json(json_data: dict, # construct the input file name in_file = template_path / 'Template' / copy_file['file'] - # the file can be marked as optional, if it is and it does not exist skip - if copy_file['isOptional'] and copy_file['isOptional'] == 'true': - if not os.path.isfile(in_file): - continue - # construct the output file name out_file = destination_path / copy_file['file'] # transform the output file name out_file = _transform(out_file.as_posix(), replacements, keep_license_text) + out_file = pathlib.Path(out_file) + + if not keep_restricted_in_instance and 'Platform' in out_file.parts: + try: + # the name of the Platform should follow the '/Platform/' + pattern = r'/Platform/(?P[^/:*?\"<>|\r\n]+/?)' + found_platform = re.search(pattern, out_file.as_posix()).group('Platform') + found_platform = found_platform.replace('/', '') + if found_platform in restricted_platforms: + continue + except Exception as e: + pass # if for some reason the output folder for this file was not created above do it now os.makedirs(os.path.dirname(out_file), exist_ok=True) @@ -205,18 +235,20 @@ def _execute_template_json(json_data: dict, shutil.copy(in_file, out_file) -def _execute_restricted_template_json(json_data: dict, +def _execute_restricted_template_json(template_json_data: dict, + json_data: dict, restricted_platform: str, destination_name, - template_name, destination_path: pathlib.Path, destination_restricted_path: pathlib.Path, + template_path: pathlib.Path, template_restricted_path: pathlib.Path, destination_restricted_platform_relative_path: pathlib.Path, template_restricted_platform_relative_path: pathlib.Path, replacements: list, keep_restricted_in_instance: bool = False, keep_license_text: bool = False) -> None: + # if we are not keeping restricted in instance make restricted.json if not present if not keep_restricted_in_instance: restricted_json = destination_restricted_path / 'restricted.json' @@ -227,50 +259,96 @@ def _execute_restricted_template_json(json_data: dict, restricted_json_data.update({"restricted_name": destination_name}) s.write(json.dumps(restricted_json_data, indent=4) + '\n') + ################################################################################### + # for each createDirectories in the template copy any entries in the json_data that are for this platform + for create_directory in template_json_data['createDirectories']: + new_dir = pathlib.Path(create_directory['dir']) + if not keep_restricted_in_instance and 'Platform' in new_dir.parts: + try: + # the name of the Platform should follow the '/Platform/' + pattern = r'/Platform/(?P[^/:*?\"<>|\r\n]+/?)' + found_platform = re.search(pattern, new_dir.as_posix()).group('Platform') + except Exception as e: + pass + else: + found_platform = found_platform.replace('/', '') + if found_platform == restricted_platform: + create_dirs = [] + if 'createDirectories' in json_data.keys(): + create_dirs = json_data['createDirectories'] + create_dirs.append(create_directory) + json_data.update({'createDirectories': create_dirs}) + + # for each copyFiles in the template copy any entries in the json_data that are for this platform + for copy_file in template_json_data['copyFiles']: + new_file = pathlib.Path(copy_file['file']) + if not keep_restricted_in_instance and 'Platform' in new_file.parts: + try: + # the name of the Platform should follow the '/Platform/' + pattern = r'/Platform/(?P[^/:*?\"<>|\r\n]+/?)' + found_platform = re.search(pattern, new_file.as_posix()).group('Platform') + except Exception as e: + pass + else: + found_platform = found_platform.replace('/', '') + if found_platform == restricted_platform: + copy_files = [] + if 'copyFiles' in json_data.keys(): + copy_files = json_data['copyFiles'] + copy_files.append(copy_file) + json_data.update({'copyFiles': copy_files}) + + ################################################################################### + + # every entry is saved in its combined location, so if not keep_restricted_in_instance + # then we need to palify into the restricted folder + # create dirs first # for each createDirectory entry, transform the folder name - for create_directory in json_data['createDirectories']: - # construct the new folder name - new_dir = destination_restricted_path / restricted_platform / destination_restricted_platform_relative_path\ - / destination_name / create_directory['dir'] - if keep_restricted_in_instance: - new_dir = destination_path / create_directory['origin'] + if 'createDirectories' in json_data: + for create_directory in json_data['createDirectories']: + # construct the new folder name + if keep_restricted_in_instance: + new_dir = destination_path / create_directory['dir'] + else: + pal_dir = create_directory['dir'].replace(f'Platform/{restricted_platform}','') + new_dir = destination_restricted_path / restricted_platform / destination_restricted_platform_relative_path / pal_dir - # transform the folder name - new_dir = _transform(new_dir.as_posix(), replacements, keep_license_text) + # transform the folder name + new_dir = _transform(new_dir.as_posix(), replacements, keep_license_text) - # create the folder - os.makedirs(new_dir, exist_ok=True) + # create the folder + os.makedirs(new_dir, exist_ok=True) # for each copyFiles entry, _transformCopy the templated source file into a concrete instance file or # regular copy if not templated - for copy_file in json_data['copyFiles']: - # construct the input file name - in_file = template_restricted_path / restricted_platform / template_restricted_platform_relative_path\ - / template_name / 'Template' / copy_file['file'] + if 'copyFiles' in json_data: + for copy_file in json_data['copyFiles']: + # construct the input file name + if template_restricted_path: + pal_file = copy_file['file'].replace(f'Platform/{restricted_platform}/', '') + in_file = template_restricted_path / restricted_platform / template_restricted_platform_relative_path / 'Template' / pal_file + else: + in_file = template_path / 'Template' / copy_file['file'] - # the file can be marked as optional, if it is and it does not exist skip - if copy_file['isOptional'] and copy_file['isOptional'] == 'true': - if not os.path.isfile(in_file): - continue + # construct the output file name + if keep_restricted_in_instance: + out_file = destination_path / copy_file['file'] + else: + pal_file = copy_file['file'].replace(f'Platform/{restricted_platform}/', '') + out_file = destination_restricted_path / restricted_platform / destination_restricted_platform_relative_path / pal_file - # construct the output file name - out_file = destination_restricted_path / restricted_platform / destination_restricted_platform_relative_path\ - / destination_name / copy_file['file'] - if keep_restricted_in_instance: - out_file = destination_path / copy_file['origin'] + # transform the output file name + out_file = _transform(out_file.as_posix(), replacements, keep_license_text) - # transform the output file name - out_file = _transform(out_file.as_posix(), replacements, keep_license_text) + # if for some reason the output folder for this file was not created above do it now + os.makedirs(os.path.dirname(out_file), exist_ok=True) - # if for some reason the output folder for this file was not created above do it now - os.makedirs(os.path.dirname(out_file), exist_ok=True) - - # if templated _transformCopy the file, if not just copy it - if copy_file['isTemplated']: - _transform_copy(in_file, out_file, replacements, keep_license_text) - else: - shutil.copy(in_file, out_file) + # if templated _transformCopy the file, if not just copy it + if copy_file['isTemplated']: + _transform_copy(in_file, out_file, replacements, keep_license_text) + else: + shutil.copy(in_file, out_file) def _instantiate_template(template_json_data: dict, @@ -309,46 +387,51 @@ def _instantiate_template(template_json_data: dict, :return: 0 for success or non 0 failure code """ # execute the template json + # this will filter out any restricted platforms in the template _execute_template_json(template_json_data, destination_path, template_path, replacements, - keep_license_text) + keep_license_text, + keep_restricted_in_instance) - # execute restricted platform jsons if any - if template_restricted_path: - for restricted_platform in os.listdir(template_restricted_path): - if os.path.isfile(restricted_platform): - continue + # we execute the jason data again if there are any restricted platforms in the main template and + # execute any restricted platform jsons if separate + + for restricted_platform in restricted_platforms: + restricted_json_data = {} + if template_restricted_path: template_restricted_platform = template_restricted_path / restricted_platform - template_restricted_platform_path_rel = template_restricted_platform / template_restricted_platform_relative_path / template_name - platform_json = template_restricted_platform_path_rel / template_file_name + template_restricted_platform_path_rel = template_restricted_platform / template_restricted_platform_relative_path + platform_json = template_restricted_platform_path_rel / 'template.json' if os.path.isfile(platform_json): if not validation.valid_o3de_template_json(platform_json): logger.error(f'Template json {platform_json} is invalid.') return 1 - # load the template json and execute it + # load the template json with open(platform_json, 'r') as s: try: - json_data = json.load(s) + restricted_json_data = json.load(s) except json.JSONDecodeError as e: logger.error(f'Failed to load {platform_json}: ' + str(e)) return 1 - else: - _execute_restricted_template_json(json_data, - restricted_platform, - destination_name, - template_name, - destination_path, - destination_restricted_path, - template_restricted_path, - destination_restricted_platform_relative_path, - template_restricted_platform_relative_path, - replacements, - keep_restricted_in_instance, - keep_license_text) + + # execute for this restricted platform + _execute_restricted_template_json(template_json_data, + restricted_json_data, + restricted_platform, + destination_name, + destination_path, + destination_restricted_path, + template_path, + template_restricted_path, + destination_restricted_platform_relative_path, + template_restricted_platform_relative_path, + replacements, + keep_restricted_in_instance, + keep_license_text) return 0 @@ -365,7 +448,8 @@ def create_template(source_path: pathlib.Path, keep_restricted_in_template: bool = False, keep_license_text: bool = False, replace: list = None, - force: bool = False) -> int: + force: bool = False, + no_register: bool = False) -> int: """ Create a template from a source directory using replacement @@ -391,6 +475,7 @@ def create_template(source_path: pathlib.Path, this controls if you want to keep the license text from the template in the new instance. It is false by default because most people will not want license text in their instances. :param force Overrides existing files even if they exist + :param no_register: whether or not after completion that the new object is registered :return: 0 for success or non 0 failure code """ @@ -401,15 +486,19 @@ def create_template(source_path: pathlib.Path, if not source_path.is_dir(): logger.error(f'Src path {source_path} is not a folder.') return 1 - source_path = source_path.resolve() - # source_name is now the last component of the source_path + + # if not specified, source_name defaults to the last component of the source_path if not source_name: source_name = os.path.basename(source_path) sanitized_source_name = utils.sanitize_identifier_for_cpp(source_name) # if no template path, use default_templates_folder path if not template_path: + logger.info(f'Template path empty. Using source name {source_name}') + template_path = source_name + # if the template_path is not an absolute path, then it default to relative from the default template folder + if not template_path.is_absolute(): default_templates_folder = manifest.get_registered(default_folder='templates') template_path = default_templates_folder / source_name logger.info(f'Template path empty. Using default templates folder {template_path}') @@ -423,7 +512,8 @@ def create_template(source_path: pathlib.Path, except ValueError: pass else: - logger.error(f'Template output path {template_path} cannot be a subdirectory of the source_path {source_path}\n') + logger.error( + f'Template output path {template_path} cannot be a subdirectory of the source_path {source_path}\n') return 1 # template name is now the last component of the template_path @@ -434,69 +524,61 @@ def create_template(source_path: pathlib.Path, logger.error(f'Template path cannot be a restricted name. {template_name}') return 1 + # if the source restricted name was given and no source restricted path, look up the restricted name to fill + # in the path if source_restricted_name and not source_restricted_path: source_restricted_path = manifest.get_registered(restricted_name=source_restricted_name) - # source_restricted_path + # if we have a source restricted path, make sure its a real restricted object if source_restricted_path: - if not os.path.isabs(source_restricted_path): - engine_json = manifest.get_this_engine_path() / 'engine.json' - if not validation.valid_o3de_engine_json(engine_json): - logger.error(f"Engine json {engine_json} is not valid.") - return 1 - with open(engine_json) as s: - try: - engine_json_data = json.load(s) - except json.JSONDecodeError as e: - logger.error(f"Failed to read engine json {engine_json}: {str(e)}") - return 1 - try: - engine_restricted = engine_json_data['restricted_name'] - except KeyError as e: - logger.error(f"Engine json {engine_json} restricted not found.") - return 1 - engine_restricted_folder = manifest.get_registered(restricted_name=engine_restricted) - new_source_restricted_path = engine_restricted_folder / source_restricted_path - logger.info(f'Source restricted path {source_restricted_path} not a full path. We must assume this engines' - f' restricted folder {new_source_restricted_path}') - if not os.path.isdir(source_restricted_path): + if not source_restricted_path.is_dir(): logger.error(f'Source restricted path {source_restricted_path} is not a folder.') return 1 + restricted_json = source_restricted_path / 'restricted.json' + if not validation.valid_o3de_restricted_json(restricted_json): + logger.error(f"Restricted json {restricted_json} is not valid.") + return 1 + with open(restricted_json, 'r') as s: + try: + restricted_json_data = json.load(s) + except json.JSONDecodeError as e: + logger.error(f'Failed to load {restricted_json}: ' + str(e)) + return 1 + try: + source_restricted_name = restricted_json_data['restricted_name'] + except KeyError as e: + logger.error(f'Failed to read restricted_name from {restricted_json}') + return 1 + # if the template restricted name was given and no template restricted path, look up the restricted name to fill + # in the path if template_restricted_name and not template_restricted_path: template_restricted_path = manifest.get_registered(restricted_name=template_restricted_name) + # if we dont have a template restricted name then set it to the templates name if not template_restricted_name: template_restricted_name = template_name - # template_restricted_path + # if we have a template restricted path, it must either not exist yet or must be a restricted object already if template_restricted_path: - if not os.path.isabs(template_restricted_path): - default_templates_restricted_folder = manifest.get_registered(restricted_name='templates') - new_template_restricted_path = default_templates_restricted_folder / template_restricted_path - logger.info(f'Template restricted path {template_restricted_path} not a full path. We must assume the' - f' default templates restricted folder {new_template_restricted_path}') - template_restricted_path = new_template_restricted_path - - if os.path.isdir(template_restricted_path): + if template_restricted_path.is_dir(): # see if this is already a restricted path, if it is get the "restricted_name" from the restricted json # so we can set "restricted_name" to it for this template restricted_json = template_restricted_path / 'restricted.json' - if os.path.isfile(restricted_json): - if not validation.valid_o3de_restricted_json(restricted_json): - logger.error(f'{restricted_json} is not valid.') + if not validation.valid_o3de_restricted_json(restricted_json): + logger.error(f'{restricted_json} is not valid.') + return 1 + with open(restricted_json, 'r') as s: + try: + restricted_json_data = json.load(s) + except json.JSONDecodeError as e: + logger.error(f'Failed to load {restricted_json}: ' + str(e)) + return 1 + try: + template_restricted_name = restricted_json_data['restricted_name'] + except KeyError as e: + logger.error(f'Failed to read restricted_name from {restricted_json}') return 1 - with open(restricted_json, 'r') as s: - try: - restricted_json_data = json.load(s) - except json.JSONDecodeError as e: - logger.error(f'Failed to load {restricted_json}: ' + str(e)) - return 1 - try: - template_restricted_name = restricted_json_data['restricted_name'] - except KeyError as e: - logger.error(f'Failed to read restricted_name from {restricted_json}') - return 1 else: os.makedirs(template_restricted_path, exist_ok=True) @@ -610,36 +692,7 @@ def create_template(source_path: pathlib.Path, else: return False, t_data - def _transform_into_template_restricted_filename(s_data: object, - platform: str) -> (bool, object): - """ - Internal function to transform a restricted platform file name into restricted template file name - :param s_data: the input data, this could be file data or file name data - :return: bool: whether or not the returned data MAY need to be transformed to instantiate it - t_data: potentially transformed data 0 for success or non 0 failure code - """ - # copy the src data to the transformed data, then operate only on transformed data - t_data = s_data - - # run all the replacements - for replacement in replacements: - t_data = t_data.replace(replacement[0], replacement[1]) - - # the name of the Platform should follow the '/Platform/{platform}' - t_data = t_data.replace(f"Platform/{platform}", '') - - # we want to send back the transformed data and whether or not this file - # may require transformation when instantiated. So if the input data is not the - # same as the output, then we transformed it which means there may be a transformation - # needed to instance it. - if s_data != t_data: - return True, t_data - else: - return False, t_data - - def _transform_restricted_into_copyfiles_and_createdirs(source_path: pathlib.Path, - restricted_platform: str, - root_abs: pathlib.Path, + def _transform_restricted_into_copyfiles_and_createdirs(root_abs: pathlib.Path, path_abs: pathlib.Path = None) -> None: """ Internal function recursively called to transform any paths files into copyfiles and create dirs relative to @@ -657,70 +710,49 @@ def create_template(source_path: pathlib.Path, # create the absolute entry by joining the path_abs and the entry entry_abs = path_abs / entry + # report what file we are processing so we have a good idea if it breaks on what file it broke on + logger.info(f'Processing file: {entry_abs}') + # create the relative entry by removing the root_abs try: entry_rel = entry_abs.relative_to(root_abs) except ValueError as err: - logger.warning(f'Unable to create relative path: {str(err)}') + logger.fatal(f'Unable to create relative path: {str(err)}') - # report what file we are processing so we have a good idea if it breaks on what file it broke on - logger.info(f'Processing file: {entry_abs}') - - # this is a restricted file, so we need to transform it, unpalify it - # restricted///some/folders/ -> - # /some/folders/Platform// - # - # C:/repo/Lumberyard/restricted/Jasper/TestDP/CMakeLists.txt -> - # C:/repo/Lumberyard/TestDP/Platform/Jasper/CMakeLists.txt - # - _, origin_entry_rel = _transform_into_template(entry_rel.as_posix()) - components = list(origin_entry_rel.parts) - num_components = len(components) - - # see how far along the source path the restricted folder matches - # then hopefully there is a Platform folder, warn if there isn't - before = [] - after = [] - relative = '' - - if os.path.isdir(entry_abs): - for x in range(0, num_components): - relative += f'{components[x]}/' - if os.path.isdir(f'{source_path}/{relative}'): - before.append(components[x]) - else: - after.append(components[x]) - else: - for x in range(0, num_components - 1): - relative += f'{components[x]}/' - if os.path.isdir(f'{source_path}/{relative}'): - before.append(components[x]) - else: - after.append(components[x]) - - after.append(components[num_components - 1]) - - before.append("Platform") - warn_if_not_platform = source_path / pathlib.Path(*before) - before.append(restricted_platform) - before.extend(after) - - origin_entry_rel = pathlib.Path(*before) - - if not os.path.isdir(warn_if_not_platform): - logger.warning( - f'{entry_abs} -> {origin_entry_rel}: Other Platforms not found in {warn_if_not_platform}') - - destination_entry_rel = origin_entry_rel - destination_entry_abs = template_path / 'Template' / origin_entry_rel + # templatize the entry relative into the destination entry relative + _, destination_entry_rel = _transform_into_template(entry_rel.as_posix()) + destination_entry_rel = pathlib.Path(destination_entry_rel) # clean up any relative leading slashes - if origin_entry_rel.as_posix().startswith('/'): - origin_entry_rel = pathlib.Path(origin_entry_rel.as_posix().lstrip('/')) if destination_entry_rel.as_posix().startswith('/'): destination_entry_rel = pathlib.Path(destination_entry_rel.as_posix().lstrip('/')) + if isinstance(destination_entry_rel, pathlib.Path): + destination_entry_rel = destination_entry_rel.as_posix() - # make sure the dst folder may or may not exist yet, make sure it does exist before we transform + if template_restricted_path: + destination_entry_abs = template_restricted_path / restricted_platform / template_restricted_platform_relative_path / 'Template' / destination_entry_rel + destination_entry_rel = pathlib.Path(destination_entry_rel) + first = True + for component in destination_entry_rel.parts: + if first: + first = False + result = pathlib.Path(component) / 'Platform' / restricted_platform + else: + result = result / component + destination_entry_rel = result.as_posix() + else: + destination_entry_rel = pathlib.Path(destination_entry_rel) + first = True + for component in destination_entry_rel.parts: + if first: + first = False + result = pathlib.Path(component) / 'Platform' / restricted_platform + else: + result = result / component + destination_entry_rel = result.as_posix() + destination_entry_abs = template_path / 'Template' / destination_entry_rel + + # the destination folder may or may not exist yet, make sure it does exist before we transform # data into it os.makedirs(os.path.dirname(destination_entry_abs), exist_ok=True) @@ -730,8 +762,8 @@ def create_template(source_path: pathlib.Path, if os.path.isfile(entry_abs): # if this file is a known binary file, there is no transformation needed and just copy it - # if not a known binary file open it and try to transform the data. if it is an unknown binary - # type it will throw and we catch copy + # if not a known binary file open it and try to transform the data. + # if it is an unknown binary type it will throw and we catch copy # if we had no known binary type it would still work, but much slower name, ext = os.path.splitext(entry) if ext in binary_file_ext: @@ -743,7 +775,7 @@ def create_template(source_path: pathlib.Path, source_data = s.read() templated, source_data = _transform_into_template(source_data, _is_cpp_file(entry_abs)) - # if the file type is a file that we expect to fins license header and we don't find any + # if the file type is a file that we expect to find a license header and we don't find any # warn that the we didn't find the license info, this makes it easy to make sure we didn't # miss any files we want to have license info in. if keep_license_text and ext in expect_license_info_ext: @@ -761,19 +793,26 @@ def create_template(source_path: pathlib.Path, shutil.copy(entry_abs, destination_entry_abs) pass - copy_files.append({ - "file": destination_entry_rel, - "origin": origin_entry_rel, - "isTemplated": templated, - "isOptional": False - }) + if keep_restricted_in_template: + copy_files.append({ + "file": destination_entry_rel, + "isTemplated": templated + }) + else: + restricted_platform_entries[restricted_platform]['copyFiles'].append({ + "file": destination_entry_rel, + "isTemplated": templated + }) else: - create_dirs.append({ - "dir": destination_entry_rel, - "origin": origin_entry_rel - }) - _transform_restricted_into_copyfiles_and_createdirs(source_path, restricted_platform, root_abs, - entry_abs) + if keep_restricted_in_template: + create_dirs.append({ + "dir": destination_entry_rel + }) + else: + restricted_platform_entries[restricted_platform]['createDirs'].append({ + "dir": destination_entry_rel + }) + _transform_restricted_into_copyfiles_and_createdirs(root_abs, entry_abs) def _transform_dir_into_copyfiles_and_createdirs(root_abs: pathlib.Path, path_abs: pathlib.Path = None) -> None: @@ -793,18 +832,21 @@ def create_template(source_path: pathlib.Path, # create the absolute entry by joining the path_abs and the entry entry_abs = path_abs / entry - # create the relative entry by removing the root_abs - entry_rel = entry_abs - try: - entry_rel = entry_abs.relative_to(root_abs) - except ValueError as err: - logger.warning(f'Unable to create relative path: {str(err)}') - # report what file we are processing so we have a good idea if it breaks on what file it broke on logger.info(f'Processing file: {entry_abs}') - # see if the entry is a platform file, if it is then we save its copyfile data in a platform specific list - # then at the end we can save the restricted ones separately + # create the relative entry by removing the root_abs + try: + entry_rel = entry_abs.relative_to(root_abs).as_posix() + except ValueError as err: + logger.fatal(f'Unable to create relative path: {str(err)}') + + # templatize the entry relative into the origin entry relative + _, destination_entry_rel = _transform_into_template(entry_rel) + destination_entry_rel = pathlib.Path(destination_entry_rel) + + # see if the entry is a restricted platform file, if it is then we save its copyfile data in a + # platform specific list then at the end we can save the restricted ones separately found_platform = '' platform = False if not keep_restricted_in_template and 'Platform' in entry_abs.parts: @@ -812,7 +854,7 @@ def create_template(source_path: pathlib.Path, try: # the name of the Platform should follow the '/Platform/' pattern = r'/Platform/(?P[^/:*?\"<>|\r\n]+/?)' - found_platform = re.search(pattern, entry_abs).group('Platform') + found_platform = re.search(pattern, entry_abs.as_posix()).group('Platform') found_platform = found_platform.replace('/', '') except Exception as e: pass @@ -831,30 +873,35 @@ def create_template(source_path: pathlib.Path, # Now if we found a platform and still have a found_platform which is a restricted platform # then transform the entry relative name into a dst relative entry name and dst abs entry. # if not then create a normal relative and abs dst entry name - _, origin_entry_rel = _transform_into_template(entry_rel.as_posix()) if platform and found_platform in restricted_platforms: # if we don't have a template restricted path and we found restricted files... warn and skip # the file/dir if not template_restricted_path: - logger.warning("Restricted platform files found!!! {entry_rel}, {found_platform}") + logger.warning("Restricted platform file found!!! {destination_entry_rel}, {found_platform}") continue - _, destination_entry_rel = _transform_into_template_restricted_filename(entry_rel, found_platform) - destination_entry_abs = template_restricted_path / found_platform\ - / template_restricted_platform_relative_path / template_name / 'Template'\ - / destination_entry_rel + + # run all the replacements + for replacement in replacements: + destination_entry_rel = destination_entry_rel.replace(replacement[0], replacement[1]) + + # the name of the Platform should follow the '/Platform/{found_platform}' + destination_entry_rel = destination_entry_rel.replace(f"Platform/{found_platform}", '') + destination_entry_rel = destination_entry_rel.lstrip('/') + + # construct the absolute entry from the relative + if template_restricted_platform_relative_path: + destination_entry_abs = template_restricted_path / found_platform / template_restricted_platform_relative_path / template_name / 'Template' / destination_entry_rel + else: + destination_entry_abs = template_restricted_path / found_platform / 'Template' / destination_entry_rel else: - destination_entry_rel = origin_entry_rel + # construct the absolute entry from the relative destination_entry_abs = template_path / 'Template' / destination_entry_rel # clean up any relative leading slashes - if isinstance(origin_entry_rel, pathlib.Path): - origin_entry_rel = origin_entry_rel.as_posix() - if origin_entry_rel.startswith('/'): - origin_entry_rel = pathlib.Path(origin_entry_rel.lstrip('/')) if isinstance(destination_entry_rel, pathlib.Path): destination_entry_rel = destination_entry_rel.as_posix() if destination_entry_rel.startswith('/'): - destination_entry_rel = pathlib.Path(destination_entry_rel.lstrip('/')) + destination_entry_rel = destination_entry_rel.lstrip('/') # make sure the dst folder may or may not exist yet, make sure it does exist before we transform # data into it @@ -902,29 +949,23 @@ def create_template(source_path: pathlib.Path, if platform and found_platform in restricted_platforms: restricted_platform_entries[found_platform]['copyFiles'].append({ "file": destination_entry_rel, - "origin": origin_entry_rel, - "isTemplated": templated, - "isOptional": False + "isTemplated": templated }) else: copy_files.append({ "file": destination_entry_rel, - "origin": origin_entry_rel, - "isTemplated": templated, - "isOptional": False + "isTemplated": templated }) else: # if the folder was for a restricted platform add the entry to the restricted platform, otherwise add it # to the non restricted if platform and found_platform in restricted_platforms: restricted_platform_entries[found_platform]['createDirs'].append({ - "dir": destination_entry_rel, - "origin": origin_entry_rel + "dir": destination_entry_rel }) else: create_dirs.append({ - "dir": destination_entry_rel, - "origin": origin_entry_rel + "dir": destination_entry_rel }) # recurse using the same root and this folder @@ -937,11 +978,11 @@ def create_template(source_path: pathlib.Path, # when we run the transformation any restricted platforms entries we find will go in here restricted_platform_entries = {} - # Every project will have a unrestricted folder which is src_path_abs which MAY have restricted files in it, and - # each project MAY have a restricted folder which will only have restricted files in them. The process is the + # Every template will have a unrestricted folder which is src_path_abs which MAY have restricted files in it, and + # each template MAY have a restricted folder which will only have restricted files in them. The process is the # same for all of them and the result will be a separation of all restricted files from unrestricted files. We do - # this by running the transformation first over the src path abs and then on each restricted folder for this project - # we find. This will effectively combine all sources then separates all the restricted. + # this by running the transformation first over the src path abs and then on each restricted folder for this + # template we find. This will effectively combine all sources then separates all the restricted. # run the transformation on the src, which may or may not have restricted files _transform_dir_into_copyfiles_and_createdirs(source_path) @@ -950,11 +991,12 @@ def create_template(source_path: pathlib.Path, # run the transformation on each src restricted folder if source_restricted_path: for restricted_platform in os.listdir(source_restricted_path): - restricted_platform_src_path_abs = source_restricted_path / restricted_platform\ - / source_restricted_platform_relative_path / source_name + restricted_platform_src_path_abs = source_restricted_path / restricted_platform \ + / source_restricted_platform_relative_path if os.path.isdir(restricted_platform_src_path_abs): - _transform_restricted_into_copyfiles_and_createdirs(source_path, restricted_platform, - restricted_platform_src_path_abs) + if restricted_platform not in restricted_platform_entries: + restricted_platform_entries.update({restricted_platform: {'copyFiles': [], 'createDirs': []}}) + _transform_restricted_into_copyfiles_and_createdirs(restricted_platform_src_path_abs) # sort copy_files.sort(key=lambda x: x['file']) @@ -972,39 +1014,47 @@ def create_template(source_path: pathlib.Path, json_data.update({'canonical_tags': []}) json_data.update({'user_tags': [f"{template_name}"]}) json_data.update({'icon_path': "preview.png"}) - if template_restricted_path: + if not keep_restricted_in_template and template_restricted_path: json_data.update({'restricted_name': template_restricted_name}) if template_restricted_platform_relative_path != '': - json_data.update({'template_restricted_platform_relative_path': template_restricted_platform_relative_path}) + json_data.update({'template_restricted_platform_relative_path': template_restricted_platform_relative_path.as_posix()}) json_data.update({'copyFiles': copy_files}) json_data.update({'createDirectories': create_dirs}) - json_name = template_path / template_file_name + json_name = template_path / source_restricted_platform_relative_path / 'template.json' with json_name.open('w') as s: s.write(json.dumps(json_data, indent=4) + '\n') # copy the default preview.png preview_png_src = this_script_parent / 'resources' / 'preview.png' - preview_png_dst = template_path / 'Template' / 'preview.png' + preview_png_dst = template_path / 'preview.png' if not os.path.isfile(preview_png_dst): shutil.copy(preview_png_src, preview_png_dst) # if no restricted template path was given and restricted platform files were found - if not template_restricted_path and len(restricted_platform_entries): + if not keep_restricted_in_template and not template_restricted_path and len(restricted_platform_entries): logger.info(f'Restricted platform files found!!! and no template restricted path was found...') - if template_restricted_path: + if not keep_restricted_in_template and template_restricted_path: + json_name = template_restricted_path / 'restricted.json' + if not json_name.is_file(): + json_data = {} + json_data.update({'restricted_name': template_restricted_name}) + os.makedirs(os.path.dirname(json_name), exist_ok=True) + + with json_name.open('w') as s: + s.write(json.dumps(json_data, indent=4) + '\n') + # now write out each restricted platform template json separately for restricted_platform in restricted_platform_entries: - restricted_template_path = template_restricted_path / restricted_platform\ - / template_restricted_platform_relative_path / template_name - + restricted_template_path = template_restricted_path / restricted_platform / template_restricted_platform_relative_path # sort restricted_platform_entries[restricted_platform]['copyFiles'].sort(key=lambda x: x['file']) restricted_platform_entries[restricted_platform]['createDirs'].sort(key=lambda x: x['dir']) json_data = {} + json_data.update({'restricted_name': template_name}) json_data.update({'template_name': template_name}) json_data.update( {'origin': f'The primary repo for {template_name} goes here: i.e. http://www.mydomain.com'}) @@ -1012,23 +1062,25 @@ def create_template(source_path: pathlib.Path, {'license': f'What license {template_name} uses goes here: i.e. https://opensource.org/licenses/MIT'}) json_data.update({'display_name': template_name}) json_data.update({'summary': f"A short description of {template_name}."}) - json_data.update({'canonical_tags': []}) + json_data.update({'canonical_tags': [f'{restricted_platform}']}) json_data.update({'user_tags': [f'{template_name}']}) - json_data.update({'icon_path': "preview.png"}) json_data.update({'copyFiles': restricted_platform_entries[restricted_platform]['copyFiles']}) json_data.update({'createDirectories': restricted_platform_entries[restricted_platform]['createDirs']}) - json_name = restricted_template_path / template_file_name + json_name = restricted_template_path / 'template.json' os.makedirs(os.path.dirname(json_name), exist_ok=True) with json_name.open('w') as s: s.write(json.dumps(json_data, indent=4) + '\n') - preview_png_dst = restricted_template_path / 'Template' /' preview.png' - if not os.path.isfile(preview_png_dst): - shutil.copy(preview_png_src, preview_png_dst) + # Register the restricted + if not no_register: + if register.register(restricted_path=template_restricted_path): + logger.error(f'Failed to register the restricted {template_restricted_path}.') + return 1 - return 0 + # Register the template + return register.register(template_path=template_path) if not no_register else 0 def create_from_template(destination_path: pathlib.Path, @@ -1044,7 +1096,8 @@ def create_from_template(destination_path: pathlib.Path, keep_restricted_in_instance: bool = False, keep_license_text: bool = False, replace: list = None, - force: bool = False) -> int: + force: bool = False, + no_register: bool = False) -> int: """ Generic template instantiation for non o3de object templates. This function makes NO assumptions! Assumptions are made only for specializations like create_project or create_gem etc... So this function @@ -1251,17 +1304,18 @@ def create_from_template(destination_path: pathlib.Path, # destination restricted path elif destination_restricted_path: - if os.path.isabs(destination_restricted_path): + if not os.path.isabs(destination_restricted_path): restricted_default_path = manifest.get_registered(default_folder='restricted') - new_destination_restricted_path = restricted_default_path / destination_restricted_path + new_destination_restricted_path = restricted_default_path / "Templates" / destination_restricted_path logger.info(f'{destination_restricted_path} is not a full path, making it relative' f' to default restricted path = {new_destination_restricted_path}') destination_restricted_path = new_destination_restricted_path - elif template_restricted_path: - restricted_default_path = manifest.get_registered(restricted_name='restricted') - logger.info(f'--destination-restricted-path is not specified, using default restricted path / destination name' - f' = {restricted_default_path}') - destination_restricted_path = restricted_default_path + else: + restricted_default_path = manifest.get_registered(default_folder='restricted') + new_destination_restricted_path = restricted_default_path / "Templates" / destination_name + logger.info(f'--destination-restricted-path is not specified, using default restricted path' + f' / Templates / destination name = {new_destination_restricted_path}') + destination_restricted_path = new_destination_restricted_path # destination restricted relative if not destination_restricted_platform_relative_path: @@ -1306,7 +1360,7 @@ def create_from_template(destination_path: pathlib.Path, if destination_restricted_path: os.makedirs(destination_restricted_path, exist_ok=True) - # read the restricted_name from the destination restricted.json + # write the restricted_name to the destination restricted.json restricted_json = destination_restricted_path / 'restricted.json' if not os.path.isfile(restricted_json): with open(restricted_json, 'w') as s: @@ -1314,6 +1368,12 @@ def create_from_template(destination_path: pathlib.Path, restricted_json_data.update({'restricted_name': destination_name}) s.write(json.dumps(restricted_json_data, indent=4) + '\n') + # Register the restricted + if not no_register: + if register.register(restricted_path=destination_restricted_path): + logger.error(f'Failed to register the restricted {destination_restricted_path}.') + return 1 + logger.warning(f'Instantiation successful. NOTE: This is a generic instantiation of the template. If this' f' was a template of an o3de object like a project, gem, template, etc. then the create-project' f' or create-gem command can be used to register the object type via its project.json or gem.json, etc.' @@ -1364,6 +1424,7 @@ def create_project(project_path: pathlib.Path, Ex. ${Name},TestGem,${Player},TestGemPlayer This will cause all references to ${Name} be replaced by TestGem, and all ${Player} replaced by 'TestGemPlayer' :param force Overrides existing files even if they exist + :param no_register: whether or not after completion that the new object is registered :param system_component_class_id: optionally specify a uuid for the system component class, default is random uuid :param editor_system_component_class_id: optionally specify a uuid for the editor system component class, default is random uuid @@ -1422,12 +1483,10 @@ def create_project(project_path: pathlib.Path, # see if the template itself specifies a restricted name if not template_restricted_name and not template_restricted_path: try: - template_json_restricted_name = template_json_data['restricted_name'] + template_restricted_name = template_json_data['restricted_name'] except KeyError as e: # the template json doesn't have a 'restricted_name' element warn and use it logger.info(f'The template does not specify a "restricted_name".') - else: - template_restricted_name = template_json_restricted_name # if no restricted name or path we continue on as if there is no template restricted files. if template_restricted_name or template_restricted_path: @@ -1523,8 +1582,13 @@ def create_project(project_path: pathlib.Path, if not project_path: logger.error('Project path cannot be empty.') return 1 - project_path = project_path.resolve() + if not os.path.isabs(project_path): + default_projects_folder = manifest.get_registered(default_folder='projects') + new_project_path = default_projects_folder / project_path + logger.info(f'Project Path {project_path} is not a full path, we must assume its relative' + f' to default projects path = {new_project_path}') + project_path = new_project_path if not force and project_path.is_dir() and len(list(project_path.iterdir())): logger.error(f'Project path {project_path} already exists and is not empty.') return 1 @@ -1536,7 +1600,8 @@ def create_project(project_path: pathlib.Path, project_name = os.path.basename(project_path) if not utils.validate_identifier(project_name): - logger.error(f'Project name must be fewer than 64 characters, contain only alphanumeric, "_" or "-" characters, and start with a letter. {project_name}') + logger.error( + f'Project name must be fewer than 64 characters, contain only alphanumeric, "_" or "-" characters, and start with a letter. {project_name}') return 1 # project name cannot be the same as a restricted platform name @@ -1546,21 +1611,19 @@ def create_project(project_path: pathlib.Path, # project restricted name if project_restricted_name and not project_restricted_path: - project_restricted_path = manifest.get_registered(restricted_name=project_restricted_name) + gem_restricted_path = manifest.get_registered(restricted_name=project_restricted_name) + if not gem_restricted_path: + logger.error(f'Project Restricted Name {project_restricted_name} cannot be found.') + return 1 # project restricted path - elif project_restricted_path: + if project_restricted_path: if not os.path.isabs(project_restricted_path): - default_projects_restricted_folder = manifest.get_registered(restricted_name='projects') - new_project_restricted_path = default_projects_restricted_folder/ project_restricted_path - logger.info(f'Project restricted path {project_restricted_path} is not a full path, we must assume its' - f' relative to default projects restricted path = {new_project_restricted_path}') - project_restricted_path = new_project_restricted_path - elif template_restricted_path: - project_restricted_default_path = manifest.get_registered(restricted_name='projects') - logger.info(f'--project-restricted-path is not specified, using default project restricted path / project name' - f' = {project_restricted_default_path}') - project_restricted_path = project_restricted_default_path + logger.error(f'Project Restricted Path {project_restricted_path} is not an absolute path.') + return 1 + # neither put it in the default restricted projects + else: + project_restricted_path = manifest.get_o3de_restricted_folder() / 'Projects' / project_name # project restricted relative path if not project_restricted_platform_relative_path: @@ -1639,7 +1702,7 @@ def create_project(project_path: pathlib.Path, os.makedirs(project_restricted_path, exist_ok=True) # read the restricted_name from the projects restricted.json - restricted_json = project_restricted_path / 'restricted.json' + restricted_json = project_restricted_path / 'restricted.json' if os.path.isfile(restricted_json): if not validation.valid_o3de_restricted_json(restricted_json): logger.error(f'Restricted json {restricted_json} is not valid.') @@ -1663,7 +1726,8 @@ def create_project(project_path: pathlib.Path, logger.error(f'Failed to read "restricted_name" from restricted json {restricted_json}.') return 1 - # set the "restricted_name": "restricted_name" element of the project.json + # set the "restricted": element of the project.json + project_json = project_path / 'project.json' if not validation.valid_o3de_project_json(project_json): logger.error(f'Project json {project_json} is not valid.') return 1 @@ -1675,7 +1739,7 @@ def create_project(project_path: pathlib.Path, logger.error(f'Failed to load project json {project_json}.') return 1 - project_json_data.update({"restricted_name": restricted_name}) + project_json_data.update({"restricted": restricted_name}) os.unlink(project_json) with open(project_json, 'w') as s: try: @@ -1684,20 +1748,11 @@ def create_project(project_path: pathlib.Path, logger.error(f'Failed to write project json {project_json}.') return 1 - for restricted_platform in restricted_platforms: - restricted_project = project_restricted_path / restricted_platform / project_name - os.makedirs(restricted_project, exist_ok=True) - cmakelists_file_name = restricted_project/ 'CMakeLists.txt' - if not os.path.isfile(cmakelists_file_name): - with open(cmakelists_file_name, 'w') as d: - if keep_license_text: - d.write('# {BEGIN_LICENSE}\n') - d.write('# Copyright (c) Contributors to the Open 3D Engine Project.\n') - d.write('# For complete copyright and license terms please see the LICENSE at the root of this distribution.\n') - d.write('#\n') - d.write('# SPDX-License-Identifier: Apache-2.0 OR MIT\n') - d.write('# {END_LICENSE}\n') - + # Register the restricted + if not no_register: + if register.register(restricted_path=project_restricted_path): + logger.error(f'Failed to register the restricted {project_restricted_path}.') + return 1 # Register the project with the either o3de_manifest.json or engine.json # and set the project.json "engine" field to match the @@ -1906,10 +1961,15 @@ def create_gem(gem_path: pathlib.Path, if not gem_path: logger.error('Gem path cannot be empty.') return 1 - gem_path = gem_path.resolve() + if not os.path.isabs(gem_path): + default_gems_folder = manifest.get_registered(default_folder='gems') + new_gem_path = default_gems_folder / gem_path + logger.info(f'Gem Path {gem_path} is not a full path, we must assume its relative' + f' to default gems path = {new_gem_path}') + gem_path = new_gem_path if not force and gem_path.is_dir() and len(list(gem_path.iterdir())): - logger.error(f'Gem path {gem_path} already exists and is not empty.') + logger.error(f'Gem path {gem_path} already exists.') return 1 else: os.makedirs(gem_path, exist_ok=force) @@ -1930,22 +1990,18 @@ def create_gem(gem_path: pathlib.Path, # gem restricted name if gem_restricted_name and not gem_restricted_path: gem_restricted_path = manifest.get_registered(restricted_name=gem_restricted_name) + if not gem_restricted_path: + logger.error(f'Gem Restricted Name {gem_restricted_name} cannot be found.') + return 1 # gem restricted path - elif gem_restricted_path: + if gem_restricted_path: if not os.path.isabs(gem_restricted_path): - gem_restricted_default_path = manifest.get_registered(restricted_name='gems') - if gem_restricted_default_path: - new_gem_restricted_path = gem_restricted_default_path / gem_restricted_path - logger.info(f'Gem restricted path {gem_restricted_path} is not a full path, we must assume its' - f' relative to default gems restricted path = {new_gem_restricted_path}') - gem_restricted_path = new_gem_restricted_path + logger.error(f'Gem Restricted Path {gem_restricted_path} is not an absolute path.') + return 1 + # neither put it in the default restricted gems else: - gem_restricted_default_path = manifest.get_registered(restricted_name='gems') - if gem_restricted_default_path: - logger.info(f'--gem-restricted-path is not specified, using default / ' - f' = {gem_restricted_default_path}') - gem_restricted_path = gem_restricted_default_path / gem_name + gem_restricted_path = manifest.get_o3de_restricted_folder() / "Gems" / gem_name # gem restricted relative if not gem_restricted_platform_relative_path: @@ -2035,47 +2091,49 @@ def create_gem(gem_path: pathlib.Path, logger.error(f'Failed to load restricted json {restricted_json}.') return 1 + try: + restricted_name = restricted_json_data["restricted_name"] + except KeyError as e: + logger.error(f'Failed to read "restricted_name" from restricted json {restricted_json}.') + return 1 + + # set the "restricted_name": element of the gem.json + gem_json = gem_path / 'gem.json' + if not validation.valid_o3de_gem_json(gem_json): + logger.error(f'Gem json {gem_json} is not valid.') + return 1 + + with open(gem_json, 'r') as s: try: - restricted_name = restricted_json_data["restricted_name"] - except KeyError as e: - logger.error(f'Failed to read "restricted_name" from restricted json {restricted_json}.') + gem_json_data = json.load(s) + except json.JSONDecodeError as e: + logger.error(f'Failed to load gem json {gem_json}.') return 1 - # set the "restricted_name": "restricted_name" element of the gem.json - gem_json = gem_path / 'gem.json' - if not validation.valid_o3de_gem_json(gem_json): - logger.error(f'Gem json {gem_json} is not valid.') + gem_json_data.update({"restricted": restricted_name}) + os.unlink(gem_json) + with open(gem_json, 'w') as s: + try: + s.write(json.dumps(gem_json_data, indent=4) + '\n') + except OSError as e: + logger.error(f'Failed to write project json {gem_json}.') + return 1 + ''' + for restricted_platform in restricted_platforms: + restricted_gem = gem_restricted_path / restricted_platform / gem_name + os.makedirs(restricted_gem, exist_ok=True) + cmakelists_file_name = restricted_gem / 'CMakeLists.txt' + if not os.path.isfile(cmakelists_file_name): + with open(cmakelists_file_name, 'w') as d: + if keep_license_text: + d.write(O3DE_LICENSE_TEXT) + ''' + # Register the restricted + if not no_register: + if register.register(restricted_path=gem_restricted_path): + logger.error(f'Failed to register the restricted {gem_restricted_path}.') return 1 - with open(gem_json, 'r') as s: - try: - gem_json_data = json.load(s) - except json.JSONDecodeError as e: - logger.error(f'Failed to load gem json {gem_json}.') - return 1 - - gem_json_data.update({"restricted_name": restricted_name}) - os.unlink(gem_json) - with open(gem_json, 'w') as s: - try: - s.write(json.dumps(gem_json_data, indent=4) + '\n') - except OSError as e: - logger.error(f'Failed to write project json {gem_json}.') - return 1 - - for restricted_platform in restricted_platforms: - restricted_gem = gem_restricted_path / restricted_platform/ gem_name - os.makedirs(restricted_gem, exist_ok=True) - cmakelists_file_name = restricted_gem / 'CMakeLists.txt' - if not os.path.isfile(cmakelists_file_name): - with open(cmakelists_file_name, 'w') as d: - if keep_license_text: - d.write('# {BEGIN_LICENSE}\n') - d.write('# Copyright (c) Contributors to the Open 3D Engine Project.\n') - d.write('# For complete copyright and license terms please see the LICENSE at the root of this distribution.\n') - d.write('#\n') - d.write('# SPDX-License-Identifier: Apache-2.0 OR MIT\n') - d.write('# {END_LICENSE}\n') # Register the gem with the either o3de_manifest.json, engine.json or project.json based on the gem path return register.register(gem_path=gem_path) if not no_register else 0 @@ -2093,7 +2151,8 @@ def _run_create_template(args: argparse) -> int: args.keep_restricted_in_template, args.keep_license_text, args.replace, - args.force) + args.force, + args.no_register) def _run_create_from_template(args: argparse) -> int: @@ -2110,7 +2169,8 @@ def _run_create_from_template(args: argparse) -> int: args.keep_restricted_in_instance, args.keep_license_text, args.replace, - args.force) + args.force, + args.no_register) def _run_create_project(args: argparse) -> int: @@ -2166,7 +2226,6 @@ def add_args(subparsers) -> None: call add_args and execute: python o3de.py create-gem --gem-path TestGem :param subparsers: the caller instantiates subparsers and passes it in here """ - # turn a directory into a template create_template_subparser = subparsers.add_parser('create-template') @@ -2242,7 +2301,10 @@ def add_args(subparsers) -> None: ' Note: is automatically ${NameLower}' ' Note: is automatically ${NameUpper}') create_template_subparser.add_argument('-f', '--force', action='store_true', default=False, - help='Copies to new template directory even if it exist.') + help='Copies to new template directory even if it exist.') + create_template_subparser.add_argument('--no-register', action='store_true', default=False, + help='If the template is created successfully, it will not register the' + ' template with the global or engine manifest file.') create_template_subparser.set_defaults(func=_run_create_template) # create from template @@ -2268,11 +2330,11 @@ def add_args(subparsers) -> None: ' resolve the --template-path.') create_from_template_subparser.add_argument('-dn', '--destination-name', type=str, - help='The name to use when substituting the ${Name} placeholder in instantiated template,' - ' must be alphanumeric, ' - ' and can contain _ and - characters.' - ' If no name is provided, will use last component of destination path.' - ' Ex. New_Gem') + help='The name to use when substituting the ${Name} placeholder in instantiated template,' + ' must be alphanumeric, ' + ' and can contain _ and - characters.' + ' If no name is provided, will use last component of destination path.' + ' Ex. New_Gem') group = create_from_template_subparser.add_mutually_exclusive_group(required=False) group.add_argument('-drp', '--destination-restricted-path', type=pathlib.Path, required=False, @@ -2293,7 +2355,8 @@ def add_args(subparsers) -> None: help='The name of the registered restricted path to read from if any. If supplied this will' ' resolve the --template-restricted-path.') - create_from_template_subparser.add_argument('-drprp', '--destination-restricted-platform-relative-path', type=pathlib.Path, + create_from_template_subparser.add_argument('-drprp', '--destination-restricted-platform-relative-path', + type=pathlib.Path, required=False, default=None, help='Any path to append to the --destination-restricted-path/' @@ -2301,7 +2364,8 @@ def add_args(subparsers) -> None: ' --destination-restricted-path C:/instance' ' --destination-restricted-platform-relative-path some/folder' ' => C:/instance//some/folder/') - create_from_template_subparser.add_argument('-trprp', '--template-restricted-platform-relative-path', type=pathlib.Path, + create_from_template_subparser.add_argument('-trprp', '--template-restricted-platform-relative-path', + type=pathlib.Path, required=False, default=None, help='Any path to append to the --template-restricted-path/' @@ -2329,7 +2393,10 @@ def add_args(subparsers) -> None: ' Note: ${NameLower} is automatically ' ' Note: ${NameUpper} is automatically ') create_from_template_subparser.add_argument('-f', '--force', action='store_true', default=False, - help='Copies over instantiated template directory even if it exist.') + help='Copies over instantiated template directory even if it exist.') + create_from_template_subparser.add_argument('--no-register', action='store_true', default=False, + help='If the project template is instantiated successfully, it will not register the' + ' project with the global or engine manifest file.') create_from_template_subparser.set_defaults(func=_run_create_from_template) # creation of a project from a template (like create from template but makes project assumptions) @@ -2430,10 +2497,10 @@ def add_args(subparsers) -> None: help='The str id you want to associate with the project, default is a random uuid' ' Ex. {b60c92eb-3139-454b-a917-a9d3c5819594}') create_project_subparser.add_argument('-f', '--force', action='store_true', default=False, - help='Copies over instantiated template directory even if it exist.') + help='Copies over instantiated template directory even if it exist.') create_project_subparser.add_argument('--no-register', action='store_true', default=False, - help='If the project template is instantiated successfully, it will not register the' - ' project with the global or engine manifest file.') + help='If the project template is instantiated successfully, it will not register the' + ' project with the global or engine manifest file.') create_project_subparser.set_defaults(func=_run_create_project) # creation of a gem from a template (like create from template but makes gem assumptions) @@ -2445,11 +2512,11 @@ def add_args(subparsers) -> None: create_gem_subparser.add_argument('-gp', '--gem-path', type=pathlib.Path, required=True, help='The gem path, can be absolute or relative to the current working directory') create_gem_subparser.add_argument('-gn', '--gem-name', type=str, - help='The name to use when substituting the ${Name} placeholder for the gem,' - ' must be alphanumeric, ' - ' and can contain _ and - characters.' - ' If no name is provided, will use last component of gem path.' - ' Ex. New_Gem') + help='The name to use when substituting the ${Name} placeholder for the gem,' + ' must be alphanumeric, ' + ' and can contain _ and - characters.' + ' If no name is provided, will use last component of gem path.' + ' Ex. New_Gem') group = create_gem_subparser.add_mutually_exclusive_group(required=False) group.add_argument('-tp', '--template-path', type=pathlib.Path, required=False, @@ -2529,7 +2596,7 @@ def add_args(subparsers) -> None: help='The uuid you want to associate with the gem module,' ' default is a random uuid Ex. {b60c92eb-3139-454b-a917-a9d3c5819594}') create_gem_subparser.add_argument('-f', '--force', action='store_true', default=False, - help='Copies over instantiated template directory even if it exist.') + help='Copies over instantiated template directory even if it exist.') create_gem_subparser.add_argument('--no-register', action='store_true', default=False, help='If the gem template is instantiated successfully, it will not register the' ' gem with the global, project or engine manifest file.') diff --git a/scripts/o3de/o3de/get_registration.py b/scripts/o3de/o3de/get_registration.py index d64056e8b2..1271d56804 100644 --- a/scripts/o3de/o3de/get_registration.py +++ b/scripts/o3de/o3de/get_registration.py @@ -14,9 +14,6 @@ from o3de import manifest def _run_get_registered(args: argparse) -> int: - if args.override_home_folder: - manifest.override_home_folder = args.override_home_folder - registered_path = manifest.get_registered(args.engine_name, args.project_name, args.gem_name, @@ -55,9 +52,6 @@ def add_parser_args(parser): group.add_argument('-rsn', '--restricted-name', type=str, required=False, help='Restricted name.') - parser.add_argument('-ohf', '--override-home-folder', type=str, required=False, - help='By default the home folder is the user folder, override it to this folder.') - parser.set_defaults(func=_run_get_registered) diff --git a/scripts/o3de/o3de/manifest.py b/scripts/o3de/o3de/manifest.py index a334109e6a..88e6ae8229 100644 --- a/scripts/o3de/o3de/manifest.py +++ b/scripts/o3de/o3de/manifest.py @@ -22,18 +22,13 @@ logger = logging.getLogger('o3de.manifest') logging.basicConfig(format=utils.LOG_FORMAT) # Directory methods -override_home_folder = None - def get_this_engine_path() -> pathlib.Path: return pathlib.Path(os.path.realpath(__file__)).parents[3].resolve() def get_home_folder() -> pathlib.Path: - if override_home_folder: - return pathlib.Path(override_home_folder).resolve() - else: - return pathlib.Path(os.path.expanduser("~")).resolve() + return pathlib.Path(os.path.expanduser("~")).resolve() def get_o3de_folder() -> pathlib.Path: @@ -42,12 +37,6 @@ def get_o3de_folder() -> pathlib.Path: return o3de_folder -def get_o3de_user_folder() -> pathlib.Path: - o3de_user_folder = get_home_folder() / 'O3DE' - o3de_user_folder.mkdir(parents=True, exist_ok=True) - return o3de_user_folder - - def get_o3de_registry_folder() -> pathlib.Path: registry_folder = get_o3de_folder() / 'Registry' registry_folder.mkdir(parents=True, exist_ok=True) @@ -73,19 +62,19 @@ def get_o3de_engines_folder() -> pathlib.Path: def get_o3de_projects_folder() -> pathlib.Path: - projects_folder = get_o3de_user_folder() / 'Projects' + projects_folder = get_o3de_folder() / 'Projects' projects_folder.mkdir(parents=True, exist_ok=True) return projects_folder def get_o3de_gems_folder() -> pathlib.Path: - gems_folder = get_o3de_user_folder() / 'Gems' + gems_folder = get_o3de_folder() / 'Gems' gems_folder.mkdir(parents=True, exist_ok=True) return gems_folder def get_o3de_templates_folder() -> pathlib.Path: - templates_folder = get_o3de_user_folder() / 'Templates' + templates_folder = get_o3de_folder() / 'Templates' templates_folder.mkdir(parents=True, exist_ok=True) return templates_folder @@ -117,6 +106,10 @@ def get_default_o3de_manifest_json_data() -> dict: username = os.path.split(get_home_folder())[-1] o3de_folder = get_o3de_folder() + default_registry_folder = get_o3de_registry_folder() + default_cache_folder = get_o3de_cache_folder() + default_downloads_folder = get_o3de_download_folder() + default_logs_folder = get_o3de_logs_folder() default_engines_folder = get_o3de_engines_folder() default_projects_folder = get_o3de_projects_folder() default_gems_folder = get_o3de_gems_folder() @@ -124,12 +117,20 @@ def get_default_o3de_manifest_json_data() -> dict: default_restricted_folder = get_o3de_restricted_folder() default_third_party_folder = get_o3de_third_party_folder() - default_projects_restricted_folder = default_projects_folder / 'Restricted' - default_projects_restricted_folder.mkdir(parents=True, exist_ok=True) - default_gems_restricted_folder = default_gems_folder / 'Restricted' - default_gems_restricted_folder.mkdir(parents=True, exist_ok=True) - default_templates_restricted_folder = default_templates_folder / 'Restricted' - default_templates_restricted_folder.mkdir(parents=True, exist_ok=True) + default_restricted_projects_folder = default_restricted_folder / 'Projects' + default_restricted_projects_folder.mkdir(parents=True, exist_ok=True) + default_restricted_gems_folder = default_restricted_folder / 'Gems' + default_restricted_gems_folder.mkdir(parents=True, exist_ok=True) + default_restricted_engine_folder = default_restricted_folder / 'Engines' / 'o3de' + default_restricted_engine_folder.mkdir(parents=True, exist_ok=True) + default_restricted_templates_folder = default_restricted_folder / 'Templates' + default_restricted_templates_folder.mkdir(parents=True, exist_ok=True) + default_restricted_engine_folder_json = default_restricted_engine_folder / 'restricted.json' + if not default_restricted_engine_folder_json.is_file(): + with default_restricted_engine_folder_json.open('w') as s: + restricted_json_data = {} + restricted_json_data.update({'restricted_name': 'o3de'}) + s.write(json.dumps(restricted_json_data, indent=4) + '\n') json_data = {} json_data.update({'o3de_manifest_name': f'{username}'}) @@ -140,45 +141,14 @@ def get_default_o3de_manifest_json_data() -> dict: json_data.update({'default_templates_folder': default_templates_folder.as_posix()}) json_data.update({'default_restricted_folder': default_restricted_folder.as_posix()}) json_data.update({'default_third_party_folder': default_third_party_folder.as_posix()}) - - json_data.update({'engines': []}) json_data.update({'projects': []}) json_data.update({'external_subdirectories': []}) json_data.update({'templates': []}) - json_data.update({'restricted': []}) + json_data.update({'restricted': [default_restricted_engine_folder.as_posix()]}) json_data.update({'repos': []}) - - default_restricted_folder_json = default_restricted_folder / 'restricted.json' - if not default_restricted_folder_json.is_file(): - with default_restricted_folder_json.open('w') as s: - restricted_json_data = {} - restricted_json_data.update({'restricted_name': 'o3de'}) - s.write(json.dumps(restricted_json_data, indent=4) + '\n') - - default_projects_restricted_folder_json = default_projects_restricted_folder / 'restricted.json' - if not default_projects_restricted_folder_json.is_file(): - with default_projects_restricted_folder_json.open('w') as s: - restricted_json_data = {} - restricted_json_data.update({'restricted_name': 'projects'}) - s.write(json.dumps(restricted_json_data, indent=4) + '\n') - - default_gems_restricted_folder_json = default_gems_restricted_folder / 'restricted.json' - if not default_gems_restricted_folder_json.is_file(): - with default_gems_restricted_folder_json.open('w') as s: - restricted_json_data = {} - restricted_json_data.update({'restricted_name': 'gems'}) - s.write(json.dumps(restricted_json_data, indent=4) + '\n') - - default_templates_restricted_folder_json = default_templates_restricted_folder / 'restricted.json' - if not default_templates_restricted_folder_json.is_file(): - with default_templates_restricted_folder_json.open('w') as s: - restricted_json_data = {} - restricted_json_data.update({'restricted_name': 'templates'}) - s.write(json.dumps(restricted_json_data, indent=4) + '\n') - + json_data.update({'engines': []}) return json_data - def get_o3de_manifest() -> pathlib.Path: manifest_path = get_o3de_folder() / 'o3de_manifest.json' if not manifest_path.is_file(): @@ -229,12 +199,12 @@ def save_o3de_manifest(json_data: dict, manifest_path: pathlib.Path = None) -> b return False -def get_gems_from_subdirectories(external_subdirs: list) -> list: - """ +def get_gems_from_external_subdirectories(external_subdirs: list) -> list: + ''' Helper Method for scanning a set of external subdirectories for gem.json files - """ + ''' def is_gem_subdirectory(subdir_files): - for name in subdir_files: + for name in files: if name == 'gem.json': return True return False @@ -250,7 +220,8 @@ def get_gems_from_subdirectories(external_subdirs: list) -> list: return gem_directories -def get_engines() -> list: +# Data query methods +def get_manifest_engines() -> list: json_data = load_o3de_manifest() engine_list = json_data['engines'] if 'engines' in json_data else [] # Convert each engine dict entry into a string entry @@ -259,31 +230,31 @@ def get_engines() -> list: engine_list)) -def get_projects() -> list: +def get_manifest_projects() -> list: json_data = load_o3de_manifest() return json_data['projects'] if 'projects' in json_data else [] -def get_gems() -> list: - return get_gems_from_subdirectories(get_external_subdirectories()) +def get_manifest_gems() -> list: + return get_gems_from_external_subdirectories(get_manifest_external_subdirectories()) -def get_external_subdirectories() -> list: +def get_manifest_external_subdirectories() -> list: json_data = load_o3de_manifest() return json_data['external_subdirectories'] if 'external_subdirectories' in json_data else [] -def get_templates() -> list: +def get_manifest_templates() -> list: json_data = load_o3de_manifest() return json_data['templates'] if 'templates' in json_data else [] -def get_restricted() -> list: +def get_manifest_restricted() -> list: json_data = load_o3de_manifest() return json_data['restricted'] if 'restricted' in json_data else [] -def get_repos() -> list: +def get_manifest_repos() -> list: json_data = load_o3de_manifest() return json_data['repos'] if 'repos' in json_data else [] @@ -299,7 +270,7 @@ def get_engine_projects() -> list: def get_engine_gems() -> list: - return get_gems_from_subdirectories(get_engine_external_subdirectories()) + return get_gems_from_external_subdirectories(get_engine_external_subdirectories()) def get_engine_external_subdirectories() -> list: @@ -320,23 +291,9 @@ def get_engine_templates() -> list: return [] -def get_engine_restricted() -> list: - engine_path = get_this_engine_path() - engine_object = get_engine_json_data(engine_path=engine_path) - if engine_object: - return list(map(lambda rel_path: (pathlib.Path(engine_path) / rel_path).as_posix(), - engine_object['restricted'])) if 'restricted' in engine_object else [] - return [] - - # project.json queries -def get_project_engine_name(project_path: pathlib.Path) -> str or None: - project_object = get_project_json_data(project_path=project_path) - return project_object.get('engine', None) if project_object else None - - def get_project_gems(project_path: pathlib.Path) -> list: - return get_gems_from_subdirectories(get_project_external_subdirectories(project_path)) + return get_gems_from_external_subdirectories(get_project_external_subdirectories(project_path)) def get_project_external_subdirectories(project_path: pathlib.Path) -> list: @@ -355,74 +312,95 @@ def get_project_templates(project_path: pathlib.Path) -> list: return [] -def get_project_restricted(project_path: pathlib.Path) -> list: - project_object = get_project_json_data(project_path=project_path) - if project_object: - return list(map(lambda rel_path: (pathlib.Path(project_path) / rel_path).as_posix(), - project_object['restricted'])) if 'restricted' in project_object else [] +# gem.json queries +def get_gem_gems(gem_path: pathlib.Path) -> list: + return get_gems_from_external_subdirectories(get_gem_external_subdirectories(gem_path)) + + +def get_gem_external_subdirectories(gem_path: pathlib.Path) -> list: + gem_object = get_gem_json_data(gem_path=gem_path) + if gem_object: + return list(map(lambda rel_path: (pathlib.Path(gem_path) / rel_path).as_posix(), + gem_object[ + 'external_subdirectories'])) if 'external_subdirectories' in gem_object else [] + return [] + + +def get_gem_templates(gem_path: pathlib.Path) -> list: + gem_object = get_gem_json_data(gem_path=gem_path) + if gem_object: + return list(map(lambda rel_path: (pathlib.Path(gem_path) / rel_path).as_posix(), + gem_object['templates'])) if 'templates' in gem_object else [] return [] # Combined manifest queries def get_all_projects() -> list: - projects_data = get_projects() + projects_data = get_manifest_projects() projects_data.extend(get_engine_projects()) # Remove duplicates from the list return list(dict.fromkeys(projects_data)) def get_all_gems(project_path: pathlib.Path = None) -> list: - gems_data = get_gems() - gems_data.extend(get_engine_gems()) - if project_path: - gems_data.extend(get_project_gems(project_path)) - return list(dict.fromkeys(gems_data)) + return get_gems_from_external_subdirectories(get_all_external_subdirectories(project_path)) def get_all_external_subdirectories(project_path: pathlib.Path = None) -> list: - external_subdirectories_data = get_external_subdirectories() + external_subdirectories_data = get_manifest_external_subdirectories() external_subdirectories_data.extend(get_engine_external_subdirectories()) if project_path: external_subdirectories_data.extend(get_project_external_subdirectories(project_path)) + + def descend_gems(gem_path: pathlib.Path): + new_external_subdirectories_data = get_gem_external_subdirectories(gem_path) + external_subdirectories_data.extend(new_external_subdirectories_data) + new_gems_data = get_gems_from_external_subdirectories(new_external_subdirectories_data) + for new_gem in new_gems_data: + descend_gems(new_gem) + + gems_data = get_gems_from_external_subdirectories(external_subdirectories_data) + for gem in gems_data: + descend_gems(gem) + + # Remove duplicates from the list return list(dict.fromkeys(external_subdirectories_data)) def get_all_templates(project_path: pathlib.Path = None) -> list: - templates_data = get_templates() + templates_data = get_manifest_templates() templates_data.extend(get_engine_templates()) if project_path: templates_data.extend(get_project_templates(project_path)) + + gems_data = get_all_gems(project_path) + for gem_path in gems_data: + templates_data.extend(get_gem_templates(gem_path)) + + # Remove duplicates from the list return list(dict.fromkeys(templates_data)) -def get_all_restricted(project_path: pathlib.Path = None) -> list: - restricted_data = get_restricted() - restricted_data.extend(get_engine_restricted()) - if project_path: - restricted_data.extend(get_project_restricted(project_path)) - return list(dict.fromkeys(restricted_data)) - - # Template functions -def get_templates_for_project_creation(): +def get_templates_for_project_creation(project_path: pathlib.Path = None) -> list: project_templates = [] - for template_path in get_all_templates(): + for template_path in get_all_templates(project_path): template_path = pathlib.Path(template_path) - template_json_path = pathlib.Path(template_path) / 'template.json' + template_json_path = template_path / 'template.json' if not validation.valid_o3de_template_json(template_json_path): continue - project_json_path = template_path / 'Template' / 'project.json' if validation.valid_o3de_project_json(project_json_path): project_templates.append(template_path) + return project_templates -def get_templates_for_gem_creation(): +def get_templates_for_gem_creation(project_path: pathlib.Path = None) -> list: gem_templates = [] - for template_path in get_all_templates(): + for template_path in get_all_templates(project_path): template_path = pathlib.Path(template_path) - template_json_path = pathlib.Path(template_path) / 'template.json' + template_json_path = template_path / 'template.json' if not validation.valid_o3de_template_json(template_json_path): continue @@ -432,58 +410,20 @@ def get_templates_for_gem_creation(): return gem_templates -def get_templates_for_generic_creation(): # temporary until we have a better way to do this... maybe template_type element - def filter_project_and_gem_templates_out(template_path, - templates_for_project_creation = get_templates_for_project_creation(), - templates_for_gem_creation = get_templates_for_gem_creation()): +def get_templates_for_generic_creation(project_path: pathlib.Path = None) -> list: + generic_templates = [] + for template_path in get_all_templates(project_path): template_path = pathlib.Path(template_path) - return template_path not in templates_for_project_creation and template_path not in templates_for_gem_creation + template_json_path = template_path / 'template.json' + if not validation.valid_o3de_template_json(template_json_path): + continue + gem_json_path = template_path / 'Template' / 'gem.json' + project_json_path = template_path / 'Template' / 'project.json' + if not validation.valid_o3de_gem_json(gem_json_path) and\ + not validation.valid_o3de_project_json(project_json_path): + generic_templates.append(template_path) - return list(filter(filter_project_and_gem_templates_out, get_all_templates())) - - -def get_json_file_path(object_typename: str, - object_path: str or pathlib.Path) -> pathlib.Path: - if not object_typename or not object_path: - logger.error('Must specify an object typename and object path.') - return None - - object_path = pathlib.Path(object_path).resolve() - return object_path / f'{object_typename}.json' - - -def get_json_data_file(object_json: pathlib.Path, - object_typename: str, - object_validator: callable) -> dict or None: - if not object_typename: - logger.error('Missing object typename.') - return None - - if not object_json or not object_json.is_file(): - logger.error(f'Invalid {object_typename} json {object_json} supplied or file missing.') - return None - - if not object_validator or not object_validator(object_json): - logger.error(f'{object_typename} json {object_json} is not valid or could not be validated.') - return None - - with object_json.open('r') as f: - try: - object_json_data = json.load(f) - except json.JSONDecodeError as e: - logger.warning(f'{object_json} failed to load: {e}') - else: - return object_json_data - - return None - - -def get_json_data(object_typename: str, - object_path: str or pathlib.Path, - object_validator: callable) -> dict or None: - object_json = get_json_file_path(object_typename, object_path) - - return get_json_data_file(object_json, object_typename, object_validator) + return generic_templates def get_engine_json_data(engine_name: str = None, @@ -495,7 +435,28 @@ def get_engine_json_data(engine_name: str = None, if engine_name and not engine_path: engine_path = get_registered(engine_name=engine_name) - return get_json_data('engine', engine_path, validation.valid_o3de_engine_json) + if not engine_path: + logger.error(f'Engine Path {engine_path} has not been registered.') + return None + + engine_path = pathlib.Path(engine_path).resolve() + engine_json = engine_path / 'engine.json' + if not engine_json.is_file(): + logger.error(f'Engine json {engine_json} is not present.') + return None + if not validation.valid_o3de_engine_json(engine_json): + logger.error(f'Engine json {engine_json} is not valid.') + return None + + with engine_json.open('r') as f: + try: + engine_json_data = json.load(f) + except json.JSONDecodeError as e: + logger.warning(f'{engine_json} failed to load: {str(e)}') + else: + return engine_json_data + + return None def get_project_json_data(project_name: str = None, @@ -507,7 +468,28 @@ def get_project_json_data(project_name: str = None, if project_name and not project_path: project_path = get_registered(project_name=project_name) - return get_json_data('project', project_path, validation.valid_o3de_project_json) + if not project_path: + logger.error(f'Project Path {project_path} has not been registered.') + return None + + project_path = pathlib.Path(project_path).resolve() + project_json = project_path / 'project.json' + if not project_json.is_file(): + logger.error(f'Project json {project_json} is not present.') + return None + if not validation.valid_o3de_project_json(project_json): + logger.error(f'Project json {project_json} is not valid.') + return None + + with project_json.open('r') as f: + try: + project_json_data = json.load(f) + except json.JSONDecodeError as e: + logger.warning(f'{project_json} failed to load: {str(e)}') + else: + return project_json_data + + return None def get_gem_json_data(gem_name: str = None, gem_path: str or pathlib.Path = None, @@ -519,10 +501,28 @@ def get_gem_json_data(gem_name: str = None, gem_path: str or pathlib.Path = None if gem_name and not gem_path: gem_path = get_registered(gem_name=gem_name, project_path=project_path) - if pathlib.Path(gem_path).is_file(): - return get_json_data_file(gem_path, 'gem', validation.valid_o3de_gem_json) - else: - return get_json_data('gem', gem_path, validation.valid_o3de_gem_json) + if not gem_path: + logger.error(f'Gem Path {gem_path} has not been registered.') + return None + + gem_path = pathlib.Path(gem_path).resolve() + gem_json = gem_path / 'gem.json' + if not gem_json.is_file(): + logger.error(f'Gem json {gem_json} is not present.') + return None + if not validation.valid_o3de_gem_json(gem_json): + logger.error(f'Gem json {gem_json} is not valid.') + return None + + with gem_json.open('r') as f: + try: + gem_json_data = json.load(f) + except json.JSONDecodeError as e: + logger.warning(f'{gem_json} failed to load: {str(e)}') + else: + return gem_json_data + + return None def get_template_json_data(template_name: str = None, template_path: str or pathlib.Path = None, @@ -534,7 +534,28 @@ def get_template_json_data(template_name: str = None, template_path: str or path if template_name and not template_path: template_path = get_registered(template_name=template_name, project_path=project_path) - return get_json_data('template', template_path, validation.valid_o3de_template_json) + if not template_path: + logger.error(f'Template Path {template_path} has not been registered.') + return None + + template_path = pathlib.Path(template_path).resolve() + template_json = template_path / 'template.json' + if not template_json.is_file(): + logger.error(f'Template json {template_json} is not present.') + return None + if not validation.valid_o3de_template_json(template_json): + logger.error(f'Template json {template_json} is not valid.') + return None + + with template_json.open('r') as f: + try: + template_json_data = json.load(f) + except json.JSONDecodeError as e: + logger.warning(f'{template_json} failed to load: {str(e)}') + else: + return template_json_data + + return None def get_restricted_json_data(restricted_name: str = None, restricted_path: str or pathlib.Path = None, @@ -546,26 +567,28 @@ def get_restricted_json_data(restricted_name: str = None, restricted_path: str o if restricted_name and not restricted_path: restricted_path = get_registered(restricted_name=restricted_name, project_path=project_path) - return get_json_data('restricted', restricted_path, validation.valid_o3de_restricted_json) - - -def get_repo_json_data(repo_uri: str) -> dict or None: - if not repo_uri: - logger.error('Must specify a Repo Uri.') + if not restricted_path: + logger.error(f'Restricted Path {restricted_path} has not been registered.') return None - repo_json = get_repo_path(repo_uri=repo_uri) + restricted_path = pathlib.Path(restricted_path).resolve() + restricted_json = restricted_path / 'restricted.json' + if not restricted_json.is_file(): + logger.error(f'Restricted json {restricted_json} is not present.') + return None + if not validation.valid_o3de_restricted_json(restricted_json): + logger.error(f'Restricted json {restricted_json} is not valid.') + return None - return get_json_data_file(repo_json, "Repo", validation.valid_o3de_repo_json) + with restricted_json.open('r') as f: + try: + restricted_json_data = json.load(f) + except json.JSONDecodeError as e: + logger.warning(f'{restricted_json} failed to load: {str(e)}') + else: + return restricted_json_data - -def get_repo_path(repo_uri: str, cache_folder: str or pathlib.Path = None) -> pathlib.Path: - if not cache_folder: - cache_folder = get_o3de_cache_folder() - - repo_manifest = f'{repo_uri}/repo.json' - repo_sha256 = hashlib.sha256(repo_manifest.encode()) - return cache_folder / str(repo_sha256.hexdigest() + '.json') + return None def get_registered(engine_name: str = None, @@ -604,7 +627,7 @@ def get_registered(engine_name: str = None, # check global first then this engine if isinstance(engine_name, str): - engines = get_engines() + engines = get_manifest_engines() for engine in engines: if isinstance(engine, dict): engine_path = pathlib.Path(engine['path']).resolve() @@ -633,72 +656,60 @@ def get_registered(engine_name: str = None, for project_path in projects: project_path = pathlib.Path(project_path).resolve() project_json = project_path / 'project.json' - if not pathlib.Path(project_json).is_file(): - logger.warning(f'{project_json} does not exist') - else: - with project_json.open('r') as f: - try: - project_json_data = json.load(f) - except json.JSONDecodeError as e: - logger.warning(f'{project_json} failed to load: {str(e)}') - else: - this_projects_name = project_json_data['project_name'] - if this_projects_name == project_name: - return project_path + with project_json.open('r') as f: + try: + project_json_data = json.load(f) + except json.JSONDecodeError as e: + logger.warning(f'{project_json} failed to load: {str(e)}') + else: + this_projects_name = project_json_data['project_name'] + if this_projects_name == project_name: + return project_path elif isinstance(gem_name, str): gems = get_all_gems(project_path) for gem_path in gems: gem_path = pathlib.Path(gem_path).resolve() gem_json = gem_path / 'gem.json' - if not pathlib.Path(gem_json).is_file(): - logger.warning(f'{gem_json} does not exist') - else: - with gem_json.open('r') as f: - try: - gem_json_data = json.load(f) - except json.JSONDecodeError as e: - logger.warning(f'{gem_json} failed to load: {str(e)}') - else: - this_gems_name = gem_json_data['gem_name'] - if this_gems_name == gem_name: - return gem_path + with gem_json.open('r') as f: + try: + gem_json_data = json.load(f) + except json.JSONDecodeError as e: + logger.warning(f'{gem_json} failed to load: {str(e)}') + else: + this_gems_name = gem_json_data['gem_name'] + if this_gems_name == gem_name: + return gem_path elif isinstance(template_name, str): templates = get_all_templates(project_path) for template_path in templates: template_path = pathlib.Path(template_path).resolve() template_json = template_path / 'template.json' - if not pathlib.Path(template_json).is_file(): - logger.warning(f'{template_json} does not exist') - else: - with template_json.open('r') as f: - try: - template_json_data = json.load(f) - except json.JSONDecodeError as e: - logger.warning(f'{template_path} failed to load: {str(e)}') - else: - this_templates_name = template_json_data['template_name'] - if this_templates_name == template_name: - return template_path + with template_json.open('r') as f: + try: + template_json_data = json.load(f) + except json.JSONDecodeError as e: + logger.warning(f'{template_path} failed to load: {str(e)}') + else: + this_templates_name = template_json_data['template_name'] + if this_templates_name == template_name: + return template_path elif isinstance(restricted_name, str): - restricted = get_all_restricted(project_path) + restricted = get_manifest_restricted() for restricted_path in restricted: restricted_path = pathlib.Path(restricted_path).resolve() restricted_json = restricted_path / 'restricted.json' - if not pathlib.Path(restricted_json).is_file(): - logger.warning(f'{restricted_json} does not exist') - else: - with restricted_json.open('r') as f: - try: - restricted_json_data = json.load(f) - except json.JSONDecodeError as e: - logger.warning(f'{restricted_json} failed to load: {str(e)}') - else: - this_restricted_name = restricted_json_data['restricted_name'] - if this_restricted_name == restricted_name: - return restricted_path + with restricted_json.open('r') as f: + try: + restricted_json_data = json.load(f) + except json.JSONDecodeError as e: + logger.warning(f'{restricted_json} failed to load: {str(e)}') + else: + this_restricted_name = restricted_json_data['restricted_name'] + if this_restricted_name == restricted_name: + return restricted_path elif isinstance(default_folder, str): if default_folder == 'engines': @@ -720,7 +731,9 @@ def get_registered(engine_name: str = None, elif isinstance(repo_name, str): cache_folder = get_o3de_cache_folder() for repo_uri in json_data['repos']: - cache_file = get_repo_path(repo_uri=repo_uri, cache_folder=cache_folder) + repo_uri = pathlib.Path(repo_uri).resolve() + repo_sha256 = hashlib.sha256(repo_uri.encode()) + cache_file = cache_folder / str(repo_sha256.hexdigest() + '.json') if cache_file.is_file(): repo = pathlib.Path(cache_file).resolve() with repo.open('r') as f: diff --git a/scripts/o3de/o3de/print_registration.py b/scripts/o3de/o3de/print_registration.py index 77e098d0ba..2bd3202ca0 100644 --- a/scripts/o3de/o3de/print_registration.py +++ b/scripts/o3de/o3de/print_registration.py @@ -39,69 +39,68 @@ def get_project_path(project_path: pathlib.Path, project_name: str) -> pathlib.P return project_path -def print_this_engine(verbose: int) -> int: +def print_this_engine(verbose: int = 0) -> int: this_engine_path = manifest.get_this_engine_path() print(f'This Engine:\n{json.dumps(str(this_engine_path), indent=4)}') if verbose > 0: return print_manifest_json_data([this_engine_path], 'This Engine', - manifest.get_engine_json_data, 'engine_path') + manifest.get_engine_json_data, 'engine_path') return 0 -def print_engines(verbose: int) -> None: - engines_data = manifest.get_engines() +def print_engines(verbose: int = 0) -> int: + engines_data = manifest.get_manifest_engines() print(f'Engine Paths:\n{json.dumps(engines_data, indent=4)}') if verbose > 0: return print_manifest_json_data(engines_data, 'Engine Jsons', - manifest.get_engine_json_data, 'engine_path') + manifest.get_engine_json_data, 'engine_path') return 0 -def print_projects(verbose: int) -> int: - projects_data = manifest.get_projects() +def print_projects(verbose: int = 0) -> int: + projects_data = manifest.get_all_projects() print(f'Project Paths:\n{json.dumps(projects_data, indent=4)}') if verbose > 0: return print_manifest_json_data(projects_data, 'Project Jsons', - manifest.get_project_json_data, 'project_path') + manifest.get_project_json_data, 'project_path') return 0 -def print_gems(verbose: int) -> int: - gems_data = manifest.get_gems() +def print_gems(verbose: int = 0) -> int: + gems_data = manifest.get_all_gems() print(f'Gem Paths:\n{json.dumps(gems_data, indent=4)}') if verbose > 0: return print_manifest_json_data(gems_data, 'Gem Jsons', - manifest.get_gem_json_data, 'gem_path') + manifest.get_gem_json_data, 'gem_path') return 0 -def print_external_subdirectories(verbose: int) -> int: - external_subdirs_data = manifest.get_external_subdirectories() +def print_external_subdirectories(verbose: int = 0) -> int: + external_subdirs_data = manifest.get_all_external_subdirectories() print(f'External Subdirectories:\n{json.dumps(external_subdirs_data, indent=4)}') return 0 - def print_templates(verbose: int) -> int: - templates_data = manifest.get_templates() + templates_data = manifest.get_all_templates() print(f'Template Paths:\n{json.dumps(templates_data, indent=4)}') if verbose > 0: return print_manifest_json_data(templates_data, 'Template Jsons', - manifest.get_template_json_data, 'template_path') + manifest.get_template_json_data, 'template_path') return 0 def print_restricted(verbose: int) -> int: - restricted_data = manifest.get_restricted() + restricted_data = manifest.get_manifest_restricted() print(f'Restricted Paths:\n{json.dumps(restricted_data, indent=4)}') if verbose > 0: return print_manifest_json_data(restricted_data, 'Restricted Jsons', - manifest.get_restricted_json_data, 'restricted_path') + manifest.get_restricted_json_data, 'restricted_path') return 0 @@ -112,7 +111,7 @@ def print_engine_projects(verbose: int) -> int: if verbose > 0: return print_manifest_json_data(engine_projects_data, 'Project Jsons', - manifest.get_project_json_data, 'project_path') + manifest.get_project_json_data, 'project_path') return 0 @@ -122,7 +121,7 @@ def print_engine_gems(verbose: int) -> int: if verbose > 0: return print_manifest_json_data(engine_gems_data, 'Gem Jsons', - manifest.get_gem_json_data, 'gem_path') + manifest.get_gem_json_data, 'gem_path') return 0 @@ -132,17 +131,7 @@ def print_engine_templates(verbose: int) -> int: if verbose > 0: return print_manifest_json_data(engine_templates_data, 'Template Jsons', - manifest.get_template_json_data, 'template_path') - return 0 - - -def print_engine_restricted(verbose: int) -> int: - engine_restricted_data = manifest.get_engine_restricted() - print(f'Restricted Paths:\n{json.dumps(engine_restricted_data, indent=4)}') - - if verbose > 0: - return print_manifest_json_data(engine_restricted_data, 'Restricted Jsons', - manifest.get_restricted_json_data, 'restricted_path') + manifest.get_template_json_data, 'template_path') return 0 @@ -153,21 +142,6 @@ def print_engine_external_subdirectories(verbose: int) -> int: # Project output methods -def print_project_engine_name(verbose: int, project_path: pathlib.Path, project_name: str) -> int: - project_path = get_project_path(project_path, project_name) - if not project_path: - return 1 - - engine_name = manifest.get_project_engine_name(project_path) - if engine_name: - print(f'Project\'s engine name:\n{engine_name}') - return 0 - - if verbose > 0: - logger.info(f'project.json at path "{project_path}" contains no registered "engine" field') - return 1 - - def print_project_gems(verbose: int, project_path: pathlib.Path, project_name: str) -> int: project_path = get_project_path(project_path, project_name) if not project_path: @@ -178,7 +152,7 @@ def print_project_gems(verbose: int, project_path: pathlib.Path, project_name: s if verbose > 0: return print_manifest_json_data(project_gems_data, 'Gems Jsons', - manifest.get_gem_json_data, 'gem_path') + manifest.get_gem_json_data, 'gem_path') return 0 @@ -201,20 +175,7 @@ def print_project_templates(verbose: int, project_path: pathlib.Path, project_na print(f'Template Paths:\n{json.dumps(project_templates_data, indent=4)}') if verbose > 0: return print_manifest_json_data(project_templates_data, 'Template Jsons', - manifest.get_template_json_data, 'template_path') - return 0 - - -def print_project_restricted(verbose: int, project_path: pathlib.Path, project_name: str) -> int: - project_path = get_project_path(project_path, project_name) - if not project_path: - return 1 - - project_restricted_data = manifest.get_project_restricted(project_path) - print(f'Restricted Paths:\n{json.dumps(project_restricted_data, indent=4)}') - if verbose > 0: - return print_manifest_json_data(project_restricted_data, 'Restricted Jsons', - manifest.get_restricted_json_data, 'restricted_path') + manifest.get_template_json_data, 'template_path') return 0 @@ -224,12 +185,12 @@ def print_all_projects(verbose: int) -> int: if verbose > 0: return print_manifest_json_data(all_projects_data, 'Project Jsons', - manifest.get_project_json_data, 'project_path') + manifest.get_project_json_data, 'project_path') return 0 def print_all_gems(verbose: int, project_path: pathlib.Path = None, project_name: str = None) -> int: - all_gems = manifest.get_gems() + all_gems = manifest.get_manifest_gems() all_gems.extend(manifest.get_engine_gems()) # If a project path or project name is supplied query the gems from that project, otherwise query the gems from @@ -245,12 +206,12 @@ def print_all_gems(verbose: int, project_path: pathlib.Path = None, project_name if verbose > 0: return print_manifest_json_data(all_gems, 'Gem Jsons', - manifest.get_gem_json_data, 'gem_path') + manifest.get_gem_json_data, 'gem_path') return 0 def print_all_external_subdirectories(verbose: int, project_path: pathlib.Path = None, project_name: str = None) -> int: - all_external_subdirectories = manifest.get_external_subdirectories() + all_external_subdirectories = manifest.get_manifest_external_subdirectories() all_external_subdirectories.extend(manifest.get_engine_external_subdirectories()) # If a project path or project name is supplied query the external subdirectories from that project, @@ -267,7 +228,7 @@ def print_all_external_subdirectories(verbose: int, project_path: pathlib.Path = def print_all_templates(verbose: int, project_path: pathlib.Path = None, project_name: str = None) -> int: - all_templates = manifest.get_templates() + all_templates = manifest.get_manifest_templates() all_templates.extend(manifest.get_engine_templates()) # If a project path or project name is supplied query the templates from that project, @@ -283,31 +244,9 @@ def print_all_templates(verbose: int, project_path: pathlib.Path = None, project if verbose > 0: return print_manifest_json_data(all_templates, 'Template Jsons', - manifest.get_template_json_data, 'template_path') + manifest.get_template_json_data, 'template_path') return 0 - -def print_all_restricted(verbose: int, project_path: pathlib.Path = None, project_name: str = None) -> int: - all_restricted = manifest.get_restricted() - all_restricted.extend(manifest.get_engine_restricted()) - - # If a project path or project name is supplied query the restricted from that project, - # otherwise query the restricted from all projects - project_path = get_project_path(project_path, project_name) if project_path or project_name else None - projects = [project_path] if project_path else manifest.get_all_projects() - for project in projects: - all_restricted.extend(manifest.get_project_restricted(project)) - - # Filter out duplicates - all_restricted = list(dict.fromkeys(all_restricted)) - print(f'Restricted Paths:\n{json.dumps(all_restricted, indent=4)}') - - if verbose > 0: - return print_manifest_json_data(all_restricted, 'Restricted Jsons', - manifest.get_restricted_json_data, 'restricted_path') - return 0 - - def print_manifest_json_data(uri_json_data: list, print_prefix: str, get_json_func: callable, get_json_data_kw: str) -> int: print('\n') @@ -351,7 +290,7 @@ def print_repos_data(repos_data: dict) -> int: def print_repos(verbose: int) -> int: - repos_data = manifest.get_repos() + repos_data = manifest.get_manifest_repos() print(json.dumps(repos_data, indent=4)) if verbose > 0: @@ -370,16 +309,13 @@ def register_show(verbose: int, project_path: pathlib.Path = None, project_name: result = print_all_projects(verbose) or result result = print_all_gems(verbose, project_path, project_name) or result result = print_all_templates(verbose, project_path, project_name) or result - result = print_all_restricted(verbose, project_path, project_name) or result + result = print_restricted(verbose) or result result = print_repos(verbose) or result return result def _run_register_show(args: argparse) -> int: - if args.override_home_folder: - manifest.override_home_folder = args.override_home_folder - if args.this_engine: return print_this_engine(args.verbose) elif args.engines: @@ -393,7 +329,7 @@ def _run_register_show(args: argparse) -> int: elif args.templates: return print_templates(args.verbose) elif args.repos: - return register_show_repos(args.verbose) + return print_repos(args.verbose) elif args.restricted: return print_restricted(args.verbose) @@ -405,8 +341,6 @@ def _run_register_show(args: argparse) -> int: return print_engine_external_subdirectories(args.verbose) elif args.engine_templates: return print_engine_templates(args.verbose) - elif args.engine_restricted: - return print_engine_restricted(args.verbose) elif args.project_gems: return print_project_gems(args.verbose, args.project_path, args.project_name) @@ -414,8 +348,6 @@ def _run_register_show(args: argparse) -> int: return print_project_external_subdirectories(args.verbose, args.project_path, args.project_name) elif args.project_templates: return print_project_templates(args.verbose, args.project_path, args.project_name) - elif args.project_restricted: - return print_project_restricted(args.verbose, args.project_path, args.project_name) elif args.project_engine_name: return print_project_engine_name(args.verbose, args.project_path, args.project_name) @@ -427,8 +359,6 @@ def _run_register_show(args: argparse) -> int: return print_all_external_subdirectories(args.verbose, args.project_path, args.project_name) elif args.all_templates: return print_all_templates(args.verbose, args.project_path, args.project_name) - elif args.all_restricted: - return print_all_restricted(args.verbose, args.project_path, args.project_name) else: return register_show(args.verbose, args.project_path, args.project_name) @@ -538,9 +468,6 @@ def add_parser_args(parser): project_group.add_argument('-pn', '--project-name', type=str, help='The name of a project.') - parser.add_argument('-ohf', '--override-home-folder', type=str, required=False, - help='By default the home folder is the user folder, override it to this folder.') - parser.set_defaults(func=_run_register_show) diff --git a/scripts/o3de/o3de/register.py b/scripts/o3de/o3de/register.py index a175104997..926c413521 100644 --- a/scripts/o3de/o3de/register.py +++ b/scripts/o3de/o3de/register.py @@ -490,7 +490,7 @@ def register_repo(json_data: dict, repo_sha256 = hashlib.sha256(url.encode()) cache_file = manifest.get_o3de_cache_folder() / str(repo_sha256.hexdigest() + '.json') - result = utils.download_file(parsed_uri, cache_file, True) + result = utils.download_file(url, cache_file, True) if result == 0: json_data.setdefault('repos', []).insert(0, repo_uri) @@ -793,9 +793,6 @@ def register(engine_path: pathlib.Path = None, def _run_register(args: argparse) -> int: - if args.override_home_folder: - manifest.override_home_folder = args.override_home_folder - if args.update: remove_invalid_o3de_objects() return repo.refresh_repos() @@ -891,8 +888,6 @@ def add_parser_args(parser): default=False, help='Refresh the repo cache.') - parser.add_argument('-ohf', '--override-home-folder', type=pathlib.Path, required=False, - help='By default the home folder is the user folder, override it to this folder.') parser.add_argument('-r', '--remove', action='store_true', required=False, default=False, help='Remove entry.') diff --git a/scripts/o3de/tests/unit_test_enable_gem.py b/scripts/o3de/tests/unit_test_enable_gem.py index c765f74731..8067fc329d 100644 --- a/scripts/o3de/tests/unit_test_enable_gem.py +++ b/scripts/o3de/tests/unit_test_enable_gem.py @@ -42,8 +42,10 @@ TEST_GEM_JSON_PAYLOAD = ''' { "gem_name": "TestGem", "display_name": "TestGem", - "license": "What license TestGem uses goes here: i.e. https://opensource.org/licenses/MIT", - "origin": "The primary repo for TestGem goes here: i.e. http://www.mydomain.com", + "license": "Apache-2.0 Or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", + "origin": "Open 3D Engine - o3de.org", + "origin_url": "https://github.com/o3de/o3de", "type": "Code", "summary": "A short description of TestGem.", "canonical_tags": [ @@ -53,7 +55,10 @@ TEST_GEM_JSON_PAYLOAD = ''' "TestGem" ], "icon_path": "preview.png", - "requirements": "" + "requirements": "Any requirement goes here.", + "documentation_url": "The link to the documentation goes here.", + "dependencies": [ + ] } ''' diff --git a/scripts/o3de/tests/unit_test_engine_template.py b/scripts/o3de/tests/unit_test_engine_template.py index ed1c8258d3..da23ee11f1 100755 --- a/scripts/o3de/tests/unit_test_engine_template.py +++ b/scripts/o3de/tests/unit_test_engine_template.py @@ -93,37 +93,28 @@ TEST_TEMPLATE_JSON_CONTENTS = """\ "copyFiles": [ { "file": "Code/Include/${Name}/${Name}Bus.h", - "origin": "Code/Include/${Name}/${Name}Bus.h", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { - "file": "Code/Include/Platform/Salem/${Name}Bus.h", - "origin": "Code/Include/Platform/Salem/${Name}Bus.h", - "isTemplated": true, - "isOptional": false + "file": "Code/Include/Platform/Windows/${Name}Bus.h", + "isTemplated": true } ], "createDirectories": [ { - "dir": "Code", - "origin": "Code" + "dir": "Code" }, { - "dir": "Code/Include", - "origin": "Code/Include" + "dir": "Code/Include" }, { - "dir": "Code/Include/${Name}", - "origin": "Code/Include/${Name}" + "dir": "Code/Include/${Name}" }, { - "dir": "Code/Include/Platform", - "origin": "Code/Include/Platform" + "dir": "Code/Include/Platform" }, { - "dir": "Code/Include/Platform/Salem", - "origin": "Code/Include/Platform/Salem" + "dir": "Code/Include/Platform/Windows" } ] } @@ -174,10 +165,10 @@ def test_create_template(tmpdir, with gem_bus_file.open('w') as s: s.write(concrete_contents) - engine_gem_code_include_platform_salem = template_source_path / 'Code/Include/Platform/Salem' - engine_gem_code_include_platform_salem.mkdir(parents=True, exist_ok=True) + engine_gem_code_include_platform_windows = template_source_path / 'Code/Include/Platform/Windows' + engine_gem_code_include_platform_windows.mkdir(parents=True, exist_ok=True) - restricted_gem_bus_file = engine_gem_code_include_platform_salem / 'TestTemplateBus.h' + restricted_gem_bus_file = engine_gem_code_include_platform_windows / 'TestTemplateBus.h' with restricted_gem_bus_file.open('w') as s: s.write(concrete_contents) @@ -209,9 +200,9 @@ def test_create_template(tmpdir, else: assert s_data == templated_contents_without_license - platform_template_folder = engine_root / 'Salem/Templates' + platform_template_folder = engine_root / 'Windows/Templates' - new_platform_default_name_bus_file = template_content_folder / 'Code/Include/Platform/Salem/${Name}Bus.h' + new_platform_default_name_bus_file = template_content_folder / 'Code/Include/Platform/Windows/${Name}Bus.h' assert new_platform_default_name_bus_file.is_file() with new_platform_default_name_bus_file.open('r') as s: s_data = s.read() @@ -255,7 +246,7 @@ class TestCreateTemplate: s.write(templated_contents) template_content_folder = template_default_folder / 'Template' - platform_default_name_bus_dir = template_content_folder / 'Code/Include/Platform/Salem' + platform_default_name_bus_dir = template_content_folder / 'Code/Include/Platform/Windows' platform_default_name_bus_dir.mkdir(parents=True, exist_ok=True) platform_default_name_bus_file = platform_default_name_bus_dir / '${Name}Bus.h' @@ -263,10 +254,13 @@ class TestCreateTemplate: s.write(templated_contents) template_dest_path = engine_root / instantiated_name - # Skip registeration in test + # Skip registration in test with patch('uuid.uuid4', return_value=uuid.uuid5(uuid.NAMESPACE_DNS, instantiated_name)) as uuid4_mock: - result = create_from_template_func(template_dest_path, template_path=template_default_folder, force=True, - keep_license_text=keep_license_text, **create_from_template_kwargs) + result = create_from_template_func(template_dest_path, + template_path=template_default_folder, + keep_license_text=keep_license_text, + force=True, + **create_from_template_kwargs) if expect_failure: assert result != 0 else: @@ -281,7 +275,7 @@ class TestCreateTemplate: s_data = s.read() assert s_data == concrete_contents - platform_test_bus_folder = test_folder / 'Code/Include/Platform/Salem' + platform_test_bus_folder = test_folder / 'Code/Include/Platform/Windows' assert platform_test_bus_folder.is_dir() platform_default_name_bus_file = platform_test_bus_folder / f'{instantiated_name}Bus.h' @@ -338,9 +332,7 @@ class TestCreateTemplate: template_json_dict.setdefault('copyFiles', []).append( { "file": "project.json", - "origin": "project.json", - "isTemplated": True, - "isOptional": False + "isTemplated": True }) # Convert the python dictionary back into a json string template_json_contents = json.dumps(template_json_dict, indent=4) @@ -376,9 +368,7 @@ class TestCreateTemplate: template_json_dict.setdefault('copyFiles', []).append( { "file": "gem.json", - "origin": "gem.json", - "isTemplated": True, - "isOptional": False + "isTemplated": True }) #Convert dict back to string template_json_contents = json.dumps(template_json_dict, indent=4) diff --git a/scripts/o3de/tests/unit_test_gem_properties.py b/scripts/o3de/tests/unit_test_gem_properties.py index dee5811b65..6358917852 100644 --- a/scripts/o3de/tests/unit_test_gem_properties.py +++ b/scripts/o3de/tests/unit_test_gem_properties.py @@ -18,10 +18,9 @@ TEST_GEM_JSON_PAYLOAD = ''' { "gem_name": "TestGem", "display_name": "TestGem", - "license": "MIT", - "license_url": "https://opensource.org/licenses/MIT", + "license": "Apache-2.0 or MIT", + "license_url": "https://github.com/o3de/o3de/blob/development/LICENSE.txt", "origin": "The primary repo for TestGem goes here: i.e. http://www.mydomain.com", - "type": "Code", "summary": "A short description of TestGem.", "canonical_tags": [ "Gem" @@ -31,7 +30,9 @@ TEST_GEM_JSON_PAYLOAD = ''' ], "icon_path": "preview.png", "requirements": "", - "documentation_url": "https://o3de.org/docs/" + "documentation_url": "https://o3de.org/docs/", + "dependencies": [ + ] } ''' diff --git a/scripts/o3de/tests/unit_test_manifest.py b/scripts/o3de/tests/unit_test_manifest.py index ad4809dc1d..c7d7a7573b 100644 --- a/scripts/o3de/tests/unit_test_manifest.py +++ b/scripts/o3de/tests/unit_test_manifest.py @@ -22,7 +22,7 @@ from o3de import manifest ]) class TestGetTemplatesForCreation: @staticmethod - def get_templates() -> list: + def get_manifest_templates() -> list: return [] @staticmethod @@ -40,20 +40,24 @@ class TestGetTemplatesForCreation: ) def test_get_templates_for_generic_creation(self, valid_project_json_paths, valid_gem_json_paths, expected_template_paths): - def validate_project_json(template_path) -> bool: - return pathlib.Path(template_path) in valid_project_json_paths + def validate_project_json(project_json_path) -> bool: + return pathlib.Path(project_json_path) in valid_project_json_paths - def validate_gem_json(template_path) -> bool: - return pathlib.Path(template_path) in valid_gem_json_paths + def validate_gem_json(gem_json_path) -> bool: + return pathlib.Path(gem_json_path) in valid_gem_json_paths - with patch('o3de.manifest.get_templates', side_effect=self.get_templates) as get_templates_patch, \ + with patch('o3de.manifest.get_manifest_templates', side_effect=self.get_manifest_templates)\ + as get_manifest_templates_patch, \ patch('o3de.manifest.get_project_templates', side_effect=self.get_project_templates)\ as get_project_templates_patch, \ patch('o3de.manifest.get_engine_templates', side_effect=self.get_engine_templates)\ as get_engine_templates_patch, \ - patch('o3de.validation.valid_o3de_template_json', return_value=True) as validate_template_json,\ - patch('o3de.validation.valid_o3de_project_json', side_effect=validate_project_json) as validate_project_json,\ - patch('o3de.validation.valid_o3de_gem_json', side_effect=validate_gem_json) as validate_gem_json: + patch('o3de.validation.valid_o3de_template_json', return_value=True) \ + as validate_template_json,\ + patch('o3de.validation.valid_o3de_project_json', side_effect=validate_project_json) \ + as validate_project_json,\ + patch('o3de.validation.valid_o3de_gem_json', side_effect=validate_gem_json) \ + as validate_gem_json: templates = manifest.get_templates_for_generic_creation() assert templates == expected_template_paths @@ -64,21 +68,24 @@ class TestGetTemplatesForCreation: ) def test_get_templates_for_gem_creation(self, valid_project_json_paths, valid_gem_json_paths, expected_template_paths): - def validate_project_json(template_path) -> bool: - return pathlib.Path(template_path) in valid_project_json_paths + def validate_project_json(project_json_path) -> bool: + return pathlib.Path(project_json_path) in valid_project_json_paths - def validate_gem_json(template_path) -> bool: - return pathlib.Path(template_path) in valid_gem_json_paths + def validate_gem_json(gem_json_path) -> bool: + return pathlib.Path(gem_json_path) in valid_gem_json_paths - with patch('o3de.manifest.get_templates', side_effect=self.get_templates) as get_templates_patch, \ + with patch('o3de.manifest.get_manifest_templates', side_effect=self.get_manifest_templates)\ + as get_manifest_templates_patch, \ patch('o3de.manifest.get_project_templates', side_effect=self.get_project_templates) \ as get_project_templates_patch, \ patch('o3de.manifest.get_engine_templates', side_effect=self.get_engine_templates) \ as get_engine_templates_patch, \ - patch('o3de.validation.valid_o3de_template_json', return_value=True) as validate_template_json, \ - patch('o3de.validation.valid_o3de_project_json', - side_effect=validate_project_json) as validate_project_json, \ - patch('o3de.validation.valid_o3de_gem_json', side_effect=validate_gem_json) as validate_gem_json: + patch('o3de.validation.valid_o3de_template_json', return_value=True) \ + as validate_template_json, \ + patch('o3de.validation.valid_o3de_project_json', side_effect=validate_project_json) \ + as validate_project_json, \ + patch('o3de.validation.valid_o3de_gem_json', side_effect=validate_gem_json) \ + as validate_gem_json: templates = manifest.get_templates_for_project_creation() assert templates == expected_template_paths @@ -89,20 +96,23 @@ class TestGetTemplatesForCreation: ) def test_get_templates_for_project_creation(self, valid_project_json_paths, valid_gem_json_paths, expected_template_paths): - def validate_project_json(template_path) -> bool: - return pathlib.Path(template_path) in valid_project_json_paths + def validate_project_json(project_json_path) -> bool: + return pathlib.Path(project_json_path) in valid_project_json_paths - def validate_gem_json(template_path) -> bool: - return pathlib.Path(template_path) in valid_gem_json_paths + def validate_gem_json(gem_json_path) -> bool: + return pathlib.Path(gem_json_path) in valid_gem_json_paths - with patch('o3de.manifest.get_templates', side_effect=self.get_templates) as get_templates_patch, \ + with patch('o3de.manifest.get_manifest_templates', side_effect=self.get_manifest_templates) \ + as get_manifest_templates_patch, \ patch('o3de.manifest.get_project_templates', side_effect=self.get_project_templates) \ as get_project_templates_patch, \ patch('o3de.manifest.get_engine_templates', side_effect=self.get_engine_templates) \ as get_engine_templates_patch, \ - patch('o3de.validation.valid_o3de_template_json', return_value=True) as validate_template_json, \ - patch('o3de.validation.valid_o3de_project_json', - side_effect=validate_project_json) as validate_project_json, \ - patch('o3de.validation.valid_o3de_gem_json', side_effect=validate_gem_json) as validate_gem_json: + patch('o3de.validation.valid_o3de_template_json', return_value=True) \ + as validate_template_json, \ + patch('o3de.validation.valid_o3de_project_json', side_effect=validate_project_json) \ + as validate_project_json, \ + patch('o3de.validation.valid_o3de_gem_json', side_effect=validate_gem_json) \ + as validate_gem_json: templates = manifest.get_templates_for_gem_creation() assert templates == expected_template_paths \ No newline at end of file diff --git a/scripts/o3de/tests/unit_test_print_registration.py b/scripts/o3de/tests/unit_test_print_registration.py index 7e3e75edcd..d01434c99f 100644 --- a/scripts/o3de/tests/unit_test_print_registration.py +++ b/scripts/o3de/tests/unit_test_print_registration.py @@ -90,27 +90,20 @@ TEST_TEMPLATE_JSON_PAYLOAD = ''' "copyFiles": [ { "file": "CMakeLists.txt", - "origin": "CMakeLists.txt", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "gem.json", - "origin": "gem.json", - "isTemplated": true, - "isOptional": false + "isTemplated": true }, { "file": "preview.png", - "origin": "preview.png", - "isTemplated": false, - "isOptional": false + "isTemplated": false } ], "createDirectories": [ { - "dir": "Assets", - "origin": "Assets" + "dir": "Assets" } ] } @@ -277,13 +270,9 @@ class TestPrintRegistration: # Patch the manifest.py function to locate gem.json files in external subdirectories # to just return a fake path to a single test gem - def get_gems_from_subdirectories(external_subdirs: list) -> list: - return ["D:/TestGem"] - with patch('o3de.manifest.load_o3de_manifest', side_effect=self.load_manifest_json) as load_manifest_patch, \ patch('o3de.manifest.get_gem_json_data', side_effect=self.get_gem_json_data) as get_json_patch, \ patch('o3de.manifest.get_project_json_data', side_effect=self.get_project_json_data) as get_project_json_patch, \ - patch('o3de.manifest.get_gems_from_subdirectories', side_effect=get_gems_from_subdirectories) as get_gems_from_subdirs_patch, \ patch('o3de.print_registration.get_project_path', return_value=project_path) as get_project_path_patch: result = print_registration._run_register_show(test_args) assert result == 0