浏览代码

Merge pull request #41 from guillaume-haerinck/script_only

Update project to use the script_only project template
Nicholas Lawson 1 月之前
父节点
当前提交
a4bc94f6ec
共有 95 个文件被更改,包括 625 次插入551 次删除
  1. 14 15
      Gems/ArchVis/CMakeLists.txt
  2. 0 14
      Gems/ArchVis/Registry/AssetProcessorPlatformConfig.setreg
  3. 18 0
      Gems/ArchVis/Registry/assetprocessor_settings.setreg
  4. 1 0
      Gems/ArchVis/gem.json
  5. 4 0
      Project/.command_settings
  6. 6 0
      Project/.gitignore
  7. 15 0
      Project/AssetBundling/SeedLists/Example.seed
  8. 29 2
      Project/CMakeLists.txt
  9. 11 0
      Project/CMakePresets.json
  10. 0 62
      Project/Code/CMakeLists.txt
  11. 0 21
      Project/Code/Include/Samples/SamplesBus.h
  12. 0 2
      Project/Code/Platform/Android/PAL_android.cmake
  13. 0 4
      Project/Code/Platform/Android/loftsample_android_files.cmake
  14. 0 3
      Project/Code/Platform/Android/loftsample_shared_android_files.cmake
  15. 0 2
      Project/Code/Platform/Linux/PAL_linux.cmake
  16. 0 4
      Project/Code/Platform/Linux/loftsample_linux_files.cmake
  17. 0 3
      Project/Code/Platform/Linux/loftsample_shared_linux_files.cmake
  18. 0 2
      Project/Code/Platform/Mac/PAL_mac.cmake
  19. 0 5
      Project/Code/Platform/Mac/loftsample_mac_files.cmake
  20. 0 4
      Project/Code/Platform/Mac/loftsample_shared_mac_files.cmake
  21. 0 2
      Project/Code/Platform/Windows/PAL_windows.cmake
  22. 0 3
      Project/Code/Platform/Windows/loftsample_shared_windows_files.cmake
  23. 0 4
      Project/Code/Platform/Windows/loftsample_windows_files.cmake
  24. 0 2
      Project/Code/Platform/iOS/PAL_ios.cmake
  25. 0 5
      Project/Code/Platform/iOS/loftsample_ios_files.cmake
  26. 0 3
      Project/Code/Platform/iOS/loftsample_shared_ios_files.cmake
  27. 0 37
      Project/Code/Source/SamplesModule.cpp
  28. 0 62
      Project/Code/Source/SamplesSystemComponent.cpp
  29. 0 37
      Project/Code/Source/SamplesSystemComponent.h
  30. 0 50
      Project/Code/enabled_gems.cmake
  31. 0 14
      Project/Code/gem.json
  32. 0 7
      Project/Code/loftsample_files.cmake
  33. 0 4
      Project/Code/loftsample_shared_files.cmake
  34. 0 68
      Project/EngineFinder.cmake
  35. 7 0
      Project/Platform/Android/android_project.cmake
  36. 1 1
      Project/Platform/Android/android_project.json
  37. 7 0
      Project/Platform/Linux/linux_project.cmake
  38. 7 0
      Project/Platform/Mac/mac_project.cmake
  39. 7 0
      Project/Platform/Windows/windows_project.cmake
  40. 7 0
      Project/Platform/iOS/ios_project.cmake
  41. 0 0
      Project/PythonTests/Automated/__init__.py
  42. 0 0
      Project/PythonTests/Automated/benchmark_runner_periodic_suite_common.py
  43. 0 0
      Project/PythonTests/Automated/benchmark_runner_periodic_suite_dx12.py
  44. 0 0
      Project/PythonTests/Automated/benchmark_runner_periodic_suite_vulkan.py
  45. 0 0
      Project/PythonTests/CMakeLists.txt
  46. 0 0
      Project/PythonTests/Platform/Linux/PAL_linux.cmake
  47. 0 0
      Project/PythonTests/Platform/Mac/PAL_mac.cmake
  48. 0 0
      Project/PythonTests/Platform/Windows/PAL_windows.cmake
  49. 0 0
      Project/PythonTests/conftest.py
  50. 20 20
      Project/Registry/assetprocessor_settings.setreg
  51. 9 0
      Project/Registry/assimp_settings.setreg
  52. 二进制
      Project/Resources/GameSDK.ico
  53. 68 0
      Project/Resources/Platform/Mac/Images.xcassets/AppIcon.appiconset/Contents.json
  54. 二进制
      Project/Resources/Platform/Mac/Images.xcassets/AppIcon.appiconset/icon_128.png
  55. 二进制
      Project/Resources/Platform/Mac/Images.xcassets/AppIcon.appiconset/icon_128_2x.png
  56. 二进制
      Project/Resources/Platform/Mac/Images.xcassets/AppIcon.appiconset/icon_16.png
  57. 二进制
      Project/Resources/Platform/Mac/Images.xcassets/AppIcon.appiconset/icon_16_2x.png
  58. 二进制
      Project/Resources/Platform/Mac/Images.xcassets/AppIcon.appiconset/icon_256.png
  59. 二进制
      Project/Resources/Platform/Mac/Images.xcassets/AppIcon.appiconset/icon_256_2x.png
  60. 二进制
      Project/Resources/Platform/Mac/Images.xcassets/AppIcon.appiconset/icon_32.png
  61. 二进制
      Project/Resources/Platform/Mac/Images.xcassets/AppIcon.appiconset/icon_32_2x.png
  62. 二进制
      Project/Resources/Platform/Mac/Images.xcassets/AppIcon.appiconset/icon_512.png
  63. 二进制
      Project/Resources/Platform/Mac/Images.xcassets/AppIcon.appiconset/icon_512_2x.png
  64. 3 3
      Project/Resources/Platform/Mac/Info.plist
  65. 116 0
      Project/Resources/Platform/iOS/Images.xcassets/AppIcon.appiconset/Contents.json
  66. 二进制
      Project/Resources/Platform/iOS/Images.xcassets/AppIcon.appiconset/iPadAppIcon152x152.png
  67. 二进制
      Project/Resources/Platform/iOS/Images.xcassets/AppIcon.appiconset/iPadAppIcon76x76.png
  68. 二进制
      Project/Resources/Platform/iOS/Images.xcassets/AppIcon.appiconset/iPadProAppIcon167x167.png
  69. 二进制
      Project/Resources/Platform/iOS/Images.xcassets/AppIcon.appiconset/iPadSettingsIcon29x29.png
  70. 二进制
      Project/Resources/Platform/iOS/Images.xcassets/AppIcon.appiconset/iPadSettingsIcon58x58.png
  71. 二进制
      Project/Resources/Platform/iOS/Images.xcassets/AppIcon.appiconset/iPadSpotlightIcon40x40.png
  72. 二进制
      Project/Resources/Platform/iOS/Images.xcassets/AppIcon.appiconset/iPadSpotlightIcon80x80.png
  73. 二进制
      Project/Resources/Platform/iOS/Images.xcassets/AppIcon.appiconset/iPhoneAppIcon120x120.png
  74. 二进制
      Project/Resources/Platform/iOS/Images.xcassets/AppIcon.appiconset/iPhoneAppIcon180x180.png
  75. 二进制
      Project/Resources/Platform/iOS/Images.xcassets/AppIcon.appiconset/iPhoneSettingsIcon58x58.png
  76. 二进制
      Project/Resources/Platform/iOS/Images.xcassets/AppIcon.appiconset/iPhoneSettingsIcon87x87.png
  77. 二进制
      Project/Resources/Platform/iOS/Images.xcassets/AppIcon.appiconset/iPhoneSpotlightIcon120x120.png
  78. 二进制
      Project/Resources/Platform/iOS/Images.xcassets/AppIcon.appiconset/iPhoneSpotlightIcon80x80.png
  79. 二进制
      Project/Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage/iPadLaunchImage1024x768.png
  80. 二进制
      Project/Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage/iPadLaunchImage1536x2048.png
  81. 二进制
      Project/Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage/iPadLaunchImage2048x1536.png
  82. 二进制
      Project/Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage/iPadLaunchImage768x1024.png
  83. 二进制
      Project/Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage/iPhoneLaunchImage640x1136.png
  84. 二进制
      Project/Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage/iPhoneLaunchImage640x960.png
  85. 4 4
      Project/Resources/Platform/iOS/Info.plist
  86. 二进制
      Project/Resources/Splash.bmp
  87. 11 5
      Project/ShaderLib/scenesrg.srgi
  88. 11 5
      Project/ShaderLib/viewsrg.srgi
  89. 14 0
      Project/autoexec.cfg
  90. 134 44
      Project/cmake/EngineFinder.cmake
  91. 27 0
      Project/package.bat
  92. 40 0
      Project/package.sh
  93. 32 5
      Project/project.json
  94. 0 20
      Project/project.json.bak0
  95. 2 3
      README.md

+ 14 - 15
Gems/ArchVis/CMakeLists.txt

@@ -1,17 +1,16 @@
-#
-# 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.
-#
-# Other additions:
-# SPDX-License-Identifier: Apache-2.0 OR MIT
-# ^ any code, text, data or non-image files in this repository.
-#
-# SPDX-License-Identifier: CC-BY-4.0
-# ^ any additional content/assets, images, 3D geometry, etc.
-#
-#
 
-# This will export its "SourcePaths" to the generated "cmake_dependencies.<project>.assetbuilder.setreg"
+o3de_gem_setup("ArchVis")
+
+# This indicates to the Builders applications(AssetProcessor, AssetBuilder, AssetBundler)
+# that the gem should be added to the "cmake_dependencies.<project>.assetbuilder.setreg"
+# which is generated when cmake configure occurs.
+# Also tooling applications such as the Editor needs the CMake alias
+# to see the gem as active
 if(PAL_TRAIT_BUILD_HOST_TOOLS)
-    ly_create_alias(NAME ArchVis.Builders NAMESPACE Gem)
-endif()
+    ly_create_alias(NAME ${gem_name}.Builders NAMESPACE Gem)
+    ly_create_alias(NAME ${gem_name}.Tools NAMESPACE Gem)
+
+    # Add in CMake dependencies for each gem dependency listed in this gem's gem.json file
+    # for the Tools and Builders gem variants
+    o3de_add_variant_dependencies_for_gem_dependencies(GEM_NAME ${gem_name} VARIANTS Tools Builders)
+endif()

+ 0 - 14
Gems/ArchVis/Registry/AssetProcessorPlatformConfig.setreg

@@ -1,14 +0,0 @@
-{
-    "Amazon": {
-        "AssetProcessor": {
-            "Settings": {
-                // ------------------------------------------------------------------------------
-                // Sample Gems, Block source folders
-                // ------------------------------------------------------------------------------
-                "Exclude Work In Progress Folders": {
-                    "pattern": ".*\\\\/.[Ss]rc\\\\/.*"
-                }
-            }
-        }
-    }
-}

+ 18 - 0
Gems/ArchVis/Registry/assetprocessor_settings.setreg

@@ -0,0 +1,18 @@
+{
+    "Amazon": {
+        "AssetProcessor": {
+            "Settings": {
+                "ScanFolder ArchVis/Assets": {
+                    "watch": "@GEMROOT:ArchVis@/Assets",
+                    "recursive": 1,
+                    "order": 101
+                },
+                "ScanFolder ArchVis/Registry": {
+                    "watch": "@GEMROOT:ArchVis@/Registry",
+                    "recursive": 1,
+                    "order": 102
+                }
+            }
+        }
+    }
+}

+ 1 - 0
Gems/ArchVis/gem.json

@@ -1,5 +1,6 @@
 {
     "gem_name": "ArchVis",
+    "version": "1.0.0",
     "display_name": "Samples: ArchVis Assets",
     "origin": "https://github.com/aws-lumberyard/loft-arch-vis-sample",
     "license": "CC-BY-NC-4.0",

+ 4 - 0
Project/.command_settings

@@ -0,0 +1,4 @@
+[export_project]
+option.build.assets = True
+seedlist.paths = AssetBundling/SeedLists/*.seed
+archive.output.format = zip

+ 6 - 0
Project/.gitignore

@@ -0,0 +1,6 @@
+[Bb]uild/
+[Cc]ache/
+[Uu]ser/
+[Uu]ser_test*/
+_savebackup/
+CMakeUserPresets.json

+ 15 - 0
Project/AssetBundling/SeedLists/Example.seed

@@ -0,0 +1,15 @@
+{
+    "Type": "JsonSerialization",
+    "Version": 1,
+    "ClassName": "AZStd::vector<SeedInfo, allocator>",
+    "ClassData": [
+        {
+            "assetId": {
+                "guid": "{B3C48432-037D-5AA5-BB1B-6D7AE19E89DF}",
+                "subId": 204440690
+            },
+            "platformFlags": 2,
+            "pathHint": "levels/start/start.spawnable"
+        }
+    ]
+}

+ 29 - 2
Project/CMakeLists.txt

@@ -1,6 +1,33 @@
+
 if(NOT PROJECT_NAME)
-    cmake_minimum_required(VERSION 3.20)
-    include(cmake/EngineFinder.cmake OPTIONAL)
+    cmake_minimum_required(VERSION 3.22)
+
+    # Utility function to look for an optional 'engine_finder_cmake_path'setting 
+    function(get_engine_finder_cmake_path project_json_file_path path_value)
+        if(NOT ${path_value} AND EXISTS "${project_json_file_path}")
+            file(READ "${project_json_file_path}" project_json_data)
+            string(JSON engine_finder_cmake_value ERROR_VARIABLE json_error GET ${project_json_data} "engine_finder_cmake_path")
+            cmake_path(APPEND CMAKE_CURRENT_SOURCE_DIR "${engine_finder_cmake_value}" engine_finder_cmake_value)
+            if(NOT json_error AND EXISTS "${engine_finder_cmake_value}")
+                set(${path_value} "${engine_finder_cmake_value}" PARENT_SCOPE)
+            elseif(json_error AND ${engine_finder_cmake_value} STREQUAL "NOTFOUND")
+                # When the error value is just NOTFOUND that means there is a JSON
+                # parsing error, and not simply a missing key 
+                message(WARNING "Unable to read 'engine_finder_cmake_path'.\nError: ${json_error} ${engine_finder_cmake_value}")
+            endif()
+        endif()
+    endfunction()
+    
+    # Check for optional 'engine_finder_cmake_path' in order of preference
+    # We support per-project customization to make it easier to upgrade 
+    # or revert to a custom EngineFinder.cmake 
+    get_engine_finder_cmake_path("${CMAKE_CURRENT_SOURCE_DIR}/user/project.json" engine_finder_cmake_path)
+    get_engine_finder_cmake_path("${CMAKE_CURRENT_SOURCE_DIR}/project.json" engine_finder_cmake_path)
+    if(NOT engine_finder_cmake_path)
+        set(engine_finder_cmake_path cmake/EngineFinder.cmake)
+    endif()
+
+    include(${engine_finder_cmake_path} OPTIONAL)
     find_package(o3de REQUIRED)
     project(LoftSample
         LANGUAGES C CXX

+ 11 - 0
Project/CMakePresets.json

@@ -0,0 +1,11 @@
+{
+    "version": 4,
+    "cmakeMinimumRequired": {
+        "major": 3,
+        "minor": 23,
+        "patch": 0
+    },
+    "include": [
+        "user/cmake/engine/CMakePresets.json"
+    ]
+}

+ 0 - 62
Project/Code/CMakeLists.txt

@@ -1,62 +0,0 @@
-
-
-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)
-
-o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} "${gem_restricted_path}" "${gem_path}" "${gem_parent_relative_path}")
-
-
-# We are on a supported platform, so add the LoftSample target
-# Note: We include the common files and the platform specific files which are set in loftsample_files.cmake and
-# in ${pal_dir}/loftsample_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake
-ly_add_target(
-    NAME LoftSample.Static STATIC
-    NAMESPACE Gem
-    FILES_CMAKE
-        loftsample_files.cmake
-        ${pal_dir}/loftsample_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake
-    INCLUDE_DIRECTORIES
-        PUBLIC
-            Include
-    BUILD_DEPENDENCIES
-        PRIVATE
-            AZ::AzGameFramework
-            Gem::Atom_AtomBridge.Static
-)
-
-ly_add_target(
-    NAME LoftSample ${PAL_TRAIT_MONOLITHIC_DRIVEN_MODULE_TYPE}
-    NAMESPACE Gem
-    FILES_CMAKE
-        loftsample_shared_files.cmake
-        ${pal_dir}/loftsample_shared_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake
-    INCLUDE_DIRECTORIES
-        PUBLIC
-            Include
-    BUILD_DEPENDENCIES
-        PRIVATE
-            Gem::LoftSample.Static
-            AZ::AzCore
-)
-
-add_subdirectory(PythonTests)
-
-# if enabled, LoftSample is used by all kinds of applications
-ly_create_alias(NAME LoftSample.Builders NAMESPACE Gem TARGETS Gem::LoftSample)
-ly_create_alias(NAME LoftSample.Tools    NAMESPACE Gem TARGETS Gem::LoftSample)
-ly_create_alias(NAME LoftSample.Clients  NAMESPACE Gem TARGETS Gem::LoftSample)
-ly_create_alias(NAME LoftSample.Servers  NAMESPACE Gem TARGETS Gem::LoftSample)
-
-################################################################################
-# Gem dependencies
-################################################################################
-
-# Enable the enabled_gems for the Project:
-ly_enable_gems(PROJECT_NAME LoftSample GEM_FILE enabled_gems.cmake)
-
-# Add project to the list server projects to create the LoftSample.ServerLauncher
-if(PAL_TRAIT_BUILD_SERVER_SUPPORTED)
-    set_property(GLOBAL APPEND PROPERTY LY_LAUNCHER_SERVER_PROJECTS LoftSample)
-endif()
-

+ 0 - 21
Project/Code/Include/Samples/SamplesBus.h

@@ -1,21 +0,0 @@
-
-#pragma once
-
-#include <AzCore/EBus/EBus.h>
-
-namespace Samples
-{
-    class SamplesRequests
-        : public AZ::EBusTraits
-    {
-    public:
-        //////////////////////////////////////////////////////////////////////////
-        // EBusTraits overrides
-        static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single;
-        static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::Single;
-        //////////////////////////////////////////////////////////////////////////
-
-        // Put your public methods here
-    };
-    using SamplesRequestBus = AZ::EBus<SamplesRequests>;
-} // namespace Samples

+ 0 - 2
Project/Code/Platform/Android/PAL_android.cmake

@@ -1,2 +0,0 @@
-
-set(PAL_TRAIT_SAMPLES_SUPPORTED TRUE)

+ 0 - 4
Project/Code/Platform/Android/loftsample_android_files.cmake

@@ -1,4 +0,0 @@
-
-set(FILES
-    PAL_android.cmake
-)

+ 0 - 3
Project/Code/Platform/Android/loftsample_shared_android_files.cmake

@@ -1,3 +0,0 @@
-
-set(FILES
-)

+ 0 - 2
Project/Code/Platform/Linux/PAL_linux.cmake

@@ -1,2 +0,0 @@
-
-set(PAL_TRAIT_SAMPLES_SUPPORTED TRUE)

+ 0 - 4
Project/Code/Platform/Linux/loftsample_linux_files.cmake

@@ -1,4 +0,0 @@
-
-set(FILES
-    PAL_linux.cmake
-)

+ 0 - 3
Project/Code/Platform/Linux/loftsample_shared_linux_files.cmake

@@ -1,3 +0,0 @@
-
-set(FILES
-)

+ 0 - 2
Project/Code/Platform/Mac/PAL_mac.cmake

@@ -1,2 +0,0 @@
-
-set(PAL_TRAIT_SAMPLES_SUPPORTED TRUE)

+ 0 - 5
Project/Code/Platform/Mac/loftsample_mac_files.cmake

@@ -1,5 +0,0 @@
-
-set(FILES
-    ../../../Resources/Platform/Mac/Info.plist
-    PAL_mac.cmake
-)

+ 0 - 4
Project/Code/Platform/Mac/loftsample_shared_mac_files.cmake

@@ -1,4 +0,0 @@
-
-set(FILES
-    ../../../Resources/Platform/Mac/Info.plist
-)

+ 0 - 2
Project/Code/Platform/Windows/PAL_windows.cmake

@@ -1,2 +0,0 @@
-
-set(PAL_TRAIT_SAMPLES_SUPPORTED TRUE)

+ 0 - 3
Project/Code/Platform/Windows/loftsample_shared_windows_files.cmake

@@ -1,3 +0,0 @@
-
-set(FILES
-)

+ 0 - 4
Project/Code/Platform/Windows/loftsample_windows_files.cmake

@@ -1,4 +0,0 @@
-
-set(FILES
-    PAL_windows.cmake
-)

+ 0 - 2
Project/Code/Platform/iOS/PAL_ios.cmake

@@ -1,2 +0,0 @@
-
-set(PAL_TRAIT_SAMPLES_SUPPORTED TRUE)

+ 0 - 5
Project/Code/Platform/iOS/loftsample_ios_files.cmake

@@ -1,5 +0,0 @@
-
-set(FILES
-    ../Resources/Platform/iOS/Info.plist
-    PAL_ios.cmake
-)

+ 0 - 3
Project/Code/Platform/iOS/loftsample_shared_ios_files.cmake

@@ -1,3 +0,0 @@
-
-set(FILES
-)

+ 0 - 37
Project/Code/Source/SamplesModule.cpp

@@ -1,37 +0,0 @@
-
-#include <AzCore/Memory/SystemAllocator.h>
-#include <AzCore/Module/Module.h>
-
-#include "SamplesSystemComponent.h"
-
-namespace Samples
-{
-    class SamplesModule
-        : public AZ::Module
-    {
-    public:
-        AZ_RTTI(SamplesModule, "{590484da-b784-4b2a-9442-4f333ef9ad6c}", AZ::Module);
-        AZ_CLASS_ALLOCATOR(SamplesModule, AZ::SystemAllocator, 0);
-
-        SamplesModule()
-            : AZ::Module()
-        {
-            // Push results of [MyComponent]::CreateDescriptor() into m_descriptors here.
-            m_descriptors.insert(m_descriptors.end(), {
-                SamplesSystemComponent::CreateDescriptor(),
-            });
-        }
-
-        /**
-         * Add required SystemComponents to the SystemEntity.
-         */
-        AZ::ComponentTypeList GetRequiredSystemComponents() const override
-        {
-            return AZ::ComponentTypeList{
-                azrtti_typeid<SamplesSystemComponent>(),
-            };
-        }
-    };
-}// namespace Samples
-
-AZ_DECLARE_MODULE_CLASS(Gem_Samples, Samples::SamplesModule)

+ 0 - 62
Project/Code/Source/SamplesSystemComponent.cpp

@@ -1,62 +0,0 @@
-
-#include <AzCore/Serialization/SerializeContext.h>
-#include <AzCore/Serialization/EditContext.h>
-#include <AzCore/Serialization/EditContextConstants.inl>
-
-#include "SamplesSystemComponent.h"
-
-namespace Samples
-{
-    void SamplesSystemComponent::Reflect(AZ::ReflectContext* context)
-    {
-        if (AZ::SerializeContext* serialize = azrtti_cast<AZ::SerializeContext*>(context))
-        {
-            serialize->Class<SamplesSystemComponent, AZ::Component>()
-                ->Version(0)
-                ;
-
-            if (AZ::EditContext* ec = serialize->GetEditContext())
-            {
-                ec->Class<SamplesSystemComponent>("Samples", "[Description of functionality provided by this System Component]")
-                    ->ClassElement(AZ::Edit::ClassElements::EditorData, "")
-                        ->Attribute(AZ::Edit::Attributes::AppearsInAddComponentMenu, AZ_CRC("System"))
-                        ->Attribute(AZ::Edit::Attributes::AutoExpand, true)
-                    ;
-            }
-        }
-    }
-
-    void SamplesSystemComponent::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided)
-    {
-        provided.push_back(AZ_CRC("SamplesService"));
-    }
-
-    void SamplesSystemComponent::GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible)
-    {
-        incompatible.push_back(AZ_CRC("SamplesService"));
-    }
-
-    void SamplesSystemComponent::GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required)
-    {
-        AZ_UNUSED(required);
-    }
-
-    void SamplesSystemComponent::GetDependentServices(AZ::ComponentDescriptor::DependencyArrayType& dependent)
-    {
-        AZ_UNUSED(dependent);
-    }
-
-    void SamplesSystemComponent::Init()
-    {
-    }
-
-    void SamplesSystemComponent::Activate()
-    {
-        SamplesRequestBus::Handler::BusConnect();
-    }
-
-    void SamplesSystemComponent::Deactivate()
-    {
-        SamplesRequestBus::Handler::BusDisconnect();
-    }
-}

+ 0 - 37
Project/Code/Source/SamplesSystemComponent.h

@@ -1,37 +0,0 @@
-
-#pragma once
-
-#include <AzCore/Component/Component.h>
-
-#include <Samples/SamplesBus.h>
-
-namespace Samples
-{
-    class SamplesSystemComponent
-        : public AZ::Component
-        , protected SamplesRequestBus::Handler
-    {
-    public:
-        AZ_COMPONENT(SamplesSystemComponent, "{7eb762c3-ddd6-472d-a5bf-a8bab6208122}");
-
-        static void Reflect(AZ::ReflectContext* context);
-
-        static void GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided);
-        static void GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible);
-        static void GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required);
-        static void GetDependentServices(AZ::ComponentDescriptor::DependencyArrayType& dependent);
-
-    protected:
-        ////////////////////////////////////////////////////////////////////////
-        // SamplesRequestBus interface implementation
-
-        ////////////////////////////////////////////////////////////////////////
-
-        ////////////////////////////////////////////////////////////////////////
-        // AZ::Component interface implementation
-        void Init() override;
-        void Activate() override;
-        void Deactivate() override;
-        ////////////////////////////////////////////////////////////////////////
-    };
-}

+ 0 - 50
Project/Code/enabled_gems.cmake

@@ -1,50 +0,0 @@
-
-set(ENABLED_GEMS
-    Atom_AtomBridge
-    Camera
-    CameraFramework
-    EMotionFX
-    FastNoise
-    SurfaceData
-    GradientSignal
-    Vegetation
-    GraphModel
-    LandscapeCanvas
-    ImGui
-    LmbrCentral
-    LyShine
-    Maestro
-    NvCloth
-    SceneProcessing
-    TextureAtlas
-    WhiteBox
-    DebugDraw
-    EditorPythonBindings
-    QtForPython
-    DccScriptingInterface
-    PythonAssetBuilder
-    StartingPointMovement
-    StartingPointCamera
-    PhysX
-    PhysXDebug
-    Terrain
-    PrimitiveAssets
-    ScriptCanvas
-    ScriptCanvasPhysics
-    ScriptCanvasTesting
-    ScriptedEntityTweener
-    StartingPointInput
-    GameState
-    ScriptEvents
-    ScriptCanvasDeveloper
-    HttpRequestor
-    CrashReporting
-    ArchVis
-    UiBasics
-    ReferenceMaterials
-    Sponza
-    DevTextures
-    MaterialEditor
-    ScriptAutomation
-    DiffuseProbeGrid
-)

+ 0 - 14
Project/Code/gem.json

@@ -1,14 +0,0 @@
-{
-    "gem_name": "Samples",
-    "origin": "The primary repo for Samples goes here: i.e. http://www.mydomain.com",
-    "license": "What license Samples uses goes here: i.e. https://opensource.org/licenses/MIT",
-    "display_name": "Samples",
-    "summary": "A short description of Samples.",
-    "canonical_tags": [
-        "Gem"
-    ],
-    "user_tags": [
-        "Samples"
-    ],
-    "icon_path": "preview.png"
-}

+ 0 - 7
Project/Code/loftsample_files.cmake

@@ -1,7 +0,0 @@
-
-set(FILES
-    Include/Samples/SamplesBus.h
-    Source/SamplesSystemComponent.cpp
-    Source/SamplesSystemComponent.h
-    enabled_gems.cmake
-)

+ 0 - 4
Project/Code/loftsample_shared_files.cmake

@@ -1,4 +0,0 @@
-
-set(FILES
-    Source/SamplesModule.cpp
-)

+ 0 - 68
Project/EngineFinder.cmake

@@ -1,68 +0,0 @@
-#
-# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
-# its licensors.
-#
-# For complete copyright and license terms please see the LICENSE at the root of this
-# distribution (the "License"). All use of this software is governed by the License,
-# or, if provided, by the license below or the license accompanying this file. Do not
-# remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#
-# This file is copied during engine registration. Edits to this file will be lost next
-# time a registration happens.
-
-include_guard()
-
-# Read the engine name from the project_json file
-file(READ ${CMAKE_CURRENT_LIST_DIR}/project.json project_json)
-string(JSON LY_ENGINE_NAME_TO_USE ERROR_VARIABLE json_error GET ${project_json} engine)
-if(json_error)
-    message(FATAL_ERROR "Unable to read key 'engine' from 'project.json', error: ${json_error}")
-endif()
-
-if(DEFINED ENV{USERPROFILE} AND EXISTS $ENV{USERPROFILE})
-    set(manifest_path $ENV{USERPROFILE}/.o3de/o3de_manifest.json) # Windows
-else()
-    set(manifest_path $ENV{HOME}/.o3de/o3de_manifest.json) # Unix
-endif()
-
-# Read the ~/.o3de/o3de_manifest.json file and look through the 'engines_path' object.
-# Find a key that matches LY_ENGINE_NAME_TO_USE and use that as the engine path.
-if(EXISTS ${manifest_path})
-    file(READ ${manifest_path} manifest_json)
-
-    string(JSON engines_path_count ERROR_VARIABLE json_error LENGTH ${manifest_json} engines_path)
-    if(json_error)
-        message(FATAL_ERROR "Unable to read key 'engines_path' from '${manifest_path}', error: ${json_error}")
-    endif()
-
-    string(JSON engines_path_type ERROR_VARIABLE json_error TYPE ${manifest_json} engines_path)
-    if(json_error OR NOT ${engines_path_type} STREQUAL "OBJECT")
-        message(FATAL_ERROR "Type of 'engines_path' in '${manifest_path}' is not a JSON Object, error: ${json_error}")
-    endif()
-
-    math(EXPR engines_path_count "${engines_path_count}-1")
-    foreach(engine_path_index RANGE ${engines_path_count})
-        string(JSON engine_name ERROR_VARIABLE json_error MEMBER ${manifest_json} engines_path ${engine_path_index})
-        if(json_error)
-            message(FATAL_ERROR "Unable to read 'engines_path/${engine_path_index}' from '${manifest_path}', error: ${json_error}")
-        endif()
-
-        if(LY_ENGINE_NAME_TO_USE STREQUAL engine_name)
-            string(JSON engine_path ERROR_VARIABLE json_error GET ${manifest_json} engines_path ${engine_name})
-            if(json_error)
-                message(FATAL_ERROR "Unable to read value from 'engines_path/${engine_name}', error: ${json_error}")
-            endif()
-
-            if(engine_path)
-                list(APPEND CMAKE_MODULE_PATH "${engine_path}/cmake")
-                break()
-            endif()
-        endif()
-    endforeach()
-else()
-    # If the user is passing CMAKE_MODULE_PATH we assume thats where we will find the engine
-    if(NOT CMAKE_MODULE_PATH)
-        message(FATAL_ERROR "Engine registration is required before configuring a project.  Please register an engine by running 'scripts/o3de register --this-engine'")
-    endif()
-endif()

+ 7 - 0
Project/Platform/Android/android_project.cmake

@@ -1 +1,8 @@
+# {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}
 

+ 1 - 1
Project/Platform/Android/android_project.json

@@ -1,7 +1,7 @@
 {
     "Tags": ["Android"],
     "android_settings" : {
-        "package_name" : "com.lumberyard.Samples",
+        "package_name" : "org.o3de.LoftSample",
         "version_number" : 1,
         "version_name" : "1.0.0.0",
         "orientation" : "landscape"

+ 7 - 0
Project/Platform/Linux/linux_project.cmake

@@ -1 +1,8 @@
+# {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}
 

+ 7 - 0
Project/Platform/Mac/mac_project.cmake

@@ -1 +1,8 @@
+# {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}
 

+ 7 - 0
Project/Platform/Windows/windows_project.cmake

@@ -1 +1,8 @@
+# {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}
 

+ 7 - 0
Project/Platform/iOS/ios_project.cmake

@@ -1 +1,8 @@
+# {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}
 

+ 0 - 0
Project/Code/PythonTests/Automated/__init__.py → Project/PythonTests/Automated/__init__.py


+ 0 - 0
Project/Code/PythonTests/Automated/benchmark_runner_periodic_suite_common.py → Project/PythonTests/Automated/benchmark_runner_periodic_suite_common.py


+ 0 - 0
Project/Code/PythonTests/Automated/benchmark_runner_periodic_suite_dx12.py → Project/PythonTests/Automated/benchmark_runner_periodic_suite_dx12.py


+ 0 - 0
Project/Code/PythonTests/Automated/benchmark_runner_periodic_suite_vulkan.py → Project/PythonTests/Automated/benchmark_runner_periodic_suite_vulkan.py


+ 0 - 0
Project/Code/PythonTests/CMakeLists.txt → Project/PythonTests/CMakeLists.txt


+ 0 - 0
Project/Code/PythonTests/Platform/Linux/PAL_linux.cmake → Project/PythonTests/Platform/Linux/PAL_linux.cmake


+ 0 - 0
Project/Code/PythonTests/Platform/Mac/PAL_mac.cmake → Project/PythonTests/Platform/Mac/PAL_mac.cmake


+ 0 - 0
Project/Code/PythonTests/Platform/Windows/PAL_windows.cmake → Project/PythonTests/Platform/Windows/PAL_windows.cmake


+ 0 - 0
Project/Code/PythonTests/conftest.py → Project/PythonTests/conftest.py


+ 20 - 20
Project/Registry/assetprocessor_settings.setreg

@@ -1,26 +1,26 @@
 {
     "Amazon": {
         "AssetProcessor": {
-            "ScanFolder Project/ShaderLib": {
-                "watch": "@PROJECTROOT@/ShaderLib",
-                "recursive": 1,
-                "order": 1
-            },
-            "ScanFolder Project/Shaders": {
-                "watch": "@PROJECTROOT@/Shaders",
-                "recurisve": 1,
-                "order": 2
-            },
-            "ScanFolder Project/Registry": {
-                "watch": "@PROJECTROOT@/Registry",
-                "recursive": 1,
-                "order": 3
-            },
-            // ------------------------------------------------------------------------------
-            // Sample Gems, Block source folders
-            // ------------------------------------------------------------------------------
-            "Exclude Art Source Folders": {
-                "pattern": ".*\\\\/.[Ss]rc\\\\/.*"
+            "Settings": {
+                "ScanFolder Project/ShaderLib": {
+                    "watch": "@PROJECTROOT@/ShaderLib",
+                    "recursive": 1,
+                    "order": 1
+                },
+                "ScanFolder Project/Shaders": {
+                    "watch": "@PROJECTROOT@/Shaders",
+                    "recursive": 1,
+                    "order": 2
+                },
+                "ScanFolder Project/Registry": {
+                    "watch": "@PROJECTROOT@/Registry",
+                    "recursive": 1,
+                    "order": 3
+                },
+                "Exclude export scripts": {
+                    "pattern": ".*\\\\/ExportScripts\\\\/.*"
+                },
+                "ProjectRelativeGemsScanFolderPriority":"higher"
             }
         }
     }

+ 9 - 0
Project/Registry/assimp_settings.setreg

@@ -0,0 +1,9 @@
+{
+    "O3DE": {
+        "Preferences": {
+            "SceneAPI": {
+                "AssImpReadRootTransform": true
+            }
+        }
+    }
+}

二进制
Project/Resources/GameSDK.ico


+ 68 - 0
Project/Resources/Platform/Mac/Images.xcassets/AppIcon.appiconset/Contents.json

@@ -0,0 +1,68 @@
+{
+  "images" : [
+    {
+      "size" : "16x16",
+      "idiom" : "mac",
+      "filename" : "icon_16.png",
+      "scale" : "1x"
+    },
+    {
+      "size" : "16x16",
+      "idiom" : "mac",
+      "filename" : "icon_16_2x.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "32x32",
+      "idiom" : "mac",
+      "filename" : "icon_32.png",
+      "scale" : "1x"
+    },
+    {
+      "size" : "32x32",
+      "idiom" : "mac",
+      "filename" : "icon_32_2x.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "128x128",
+      "idiom" : "mac",
+      "filename" : "icon_128.png",
+      "scale" : "1x"
+    },
+    {
+      "size" : "128x128",
+      "idiom" : "mac",
+      "filename" : "icon_128_2x.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "256x256",
+      "idiom" : "mac",
+      "filename" : "icon_256.png",
+      "scale" : "1x"
+    },
+    {
+      "size" : "256x256",
+      "idiom" : "mac",
+      "filename" : "icon_256_2x.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "512x512",
+      "idiom" : "mac",
+      "filename" : "icon_512.png",
+      "scale" : "1x"
+    },
+    {
+      "size" : "512x512",
+      "idiom" : "mac",
+      "filename" : "icon_512_2x.png",
+      "scale" : "2x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

二进制
Project/Resources/Platform/Mac/Images.xcassets/AppIcon.appiconset/icon_128.png


二进制
Project/Resources/Platform/Mac/Images.xcassets/AppIcon.appiconset/icon_128_2x.png


二进制
Project/Resources/Platform/Mac/Images.xcassets/AppIcon.appiconset/icon_16.png


二进制
Project/Resources/Platform/Mac/Images.xcassets/AppIcon.appiconset/icon_16_2x.png


二进制
Project/Resources/Platform/Mac/Images.xcassets/AppIcon.appiconset/icon_256.png


二进制
Project/Resources/Platform/Mac/Images.xcassets/AppIcon.appiconset/icon_256_2x.png


二进制
Project/Resources/Platform/Mac/Images.xcassets/AppIcon.appiconset/icon_32.png


二进制
Project/Resources/Platform/Mac/Images.xcassets/AppIcon.appiconset/icon_32_2x.png


二进制
Project/Resources/Platform/Mac/Images.xcassets/AppIcon.appiconset/icon_512.png


二进制
Project/Resources/Platform/Mac/Images.xcassets/AppIcon.appiconset/icon_512_2x.png


+ 3 - 3
Project/Resources/Platform/Mac/Info.plist

@@ -5,11 +5,11 @@
 	<key>CFBundleInfoDictionaryVersion</key>
 	<false/>
 	<key>CFBundleDisplayName</key>
-	<string>Samples</string>
+	<string>LoftSample</string>
 	<key>CFBundleExecutable</key>
-	<string>Samples.GameLauncher</string>
+	<string>LoftSample.GameLauncher</string>
 	<key>CFBundleIdentifier</key>
-	<string>com.amazon.Samples</string>
+	<string>com.amazon.LoftSample</string>
 	<key>CFBundlePackageType</key>
 	<string>APPL</string>
 	<key>CFBundleShortVersionString</key>

+ 116 - 0
Project/Resources/Platform/iOS/Images.xcassets/AppIcon.appiconset/Contents.json

@@ -0,0 +1,116 @@
+{
+  "images" : [
+    {
+      "size" : "20x20",
+      "idiom" : "iphone",
+      "filename" : "iPhoneNotificationIcon40x40.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "20x20",
+      "idiom" : "iphone",
+      "filename" : "iPhoneNotificationIcon60x60.png",
+      "scale" : "3x"
+    },
+    {
+      "size" : "29x29",
+      "idiom" : "iphone",
+      "filename" : "iPhoneSettingsIcon58x58.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "29x29",
+      "idiom" : "iphone",
+      "filename" : "iPhoneSettingsIcon87x87.png",
+      "scale" : "3x"
+    },
+    {
+      "size" : "40x40",
+      "idiom" : "iphone",
+      "filename" : "iPhoneSpotlightIcon80x80.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "40x40",
+      "idiom" : "iphone",
+      "filename" : "iPhoneSpotlightIcon120x120.png",
+      "scale" : "3x"
+    },
+    {
+      "size" : "60x60",
+      "idiom" : "iphone",
+      "filename" : "iPhoneAppIcon120x120.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "60x60",
+      "idiom" : "iphone",
+      "filename" : "iPhoneAppIcon180x180.png",
+      "scale" : "3x"
+    },
+    {
+      "size" : "20x20",
+      "idiom" : "ipad",
+      "filename" : "iPadNotificationIcon20x20.png",
+      "scale" : "1x"
+    },
+    {
+      "size" : "20x20",
+      "idiom" : "ipad",
+      "filename" : "iPadNotificationIcon40x40.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "29x29",
+      "idiom" : "ipad",
+      "filename" : "iPadSettingsIcon29x29.png",
+      "scale" : "1x"
+    },
+    {
+      "size" : "29x29",
+      "idiom" : "ipad",
+      "filename" : "iPadSettingsIcon58x58.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "40x40",
+      "idiom" : "ipad",
+      "filename" : "iPadSpotlightIcon40x40.png",
+      "scale" : "1x"
+    },
+    {
+      "size" : "40x40",
+      "idiom" : "ipad",
+      "filename" : "iPadSpotlightIcon80x80.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "76x76",
+      "idiom" : "ipad",
+      "filename" : "iPadAppIcon76x76.png",
+      "scale" : "1x"
+    },
+    {
+      "size" : "76x76",
+      "idiom" : "ipad",
+      "filename" : "iPadAppIcon152x152.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "83.5x83.5",
+      "idiom" : "ipad",
+      "filename" : "iPadProAppIcon167x167.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "1024x1024",
+      "idiom" : "ios-marketing",
+      "filename" : "iOSAppStoreIcon1024x1024.png",
+      "scale" : "1x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

二进制
Project/Resources/Platform/iOS/Images.xcassets/AppIcon.appiconset/iPadAppIcon152x152.png


二进制
Project/Resources/Platform/iOS/Images.xcassets/AppIcon.appiconset/iPadAppIcon76x76.png


二进制
Project/Resources/Platform/iOS/Images.xcassets/AppIcon.appiconset/iPadProAppIcon167x167.png


二进制
Project/Resources/Platform/iOS/Images.xcassets/AppIcon.appiconset/iPadSettingsIcon29x29.png


二进制
Project/Resources/Platform/iOS/Images.xcassets/AppIcon.appiconset/iPadSettingsIcon58x58.png


二进制
Project/Resources/Platform/iOS/Images.xcassets/AppIcon.appiconset/iPadSpotlightIcon40x40.png


二进制
Project/Resources/Platform/iOS/Images.xcassets/AppIcon.appiconset/iPadSpotlightIcon80x80.png


二进制
Project/Resources/Platform/iOS/Images.xcassets/AppIcon.appiconset/iPhoneAppIcon120x120.png


二进制
Project/Resources/Platform/iOS/Images.xcassets/AppIcon.appiconset/iPhoneAppIcon180x180.png


二进制
Project/Resources/Platform/iOS/Images.xcassets/AppIcon.appiconset/iPhoneSettingsIcon58x58.png


二进制
Project/Resources/Platform/iOS/Images.xcassets/AppIcon.appiconset/iPhoneSettingsIcon87x87.png


二进制
Project/Resources/Platform/iOS/Images.xcassets/AppIcon.appiconset/iPhoneSpotlightIcon120x120.png


二进制
Project/Resources/Platform/iOS/Images.xcassets/AppIcon.appiconset/iPhoneSpotlightIcon80x80.png


二进制
Project/Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage/iPadLaunchImage1024x768.png


二进制
Project/Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage/iPadLaunchImage1536x2048.png


二进制
Project/Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage/iPadLaunchImage2048x1536.png


二进制
Project/Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage/iPadLaunchImage768x1024.png


二进制
Project/Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage/iPhoneLaunchImage640x1136.png


二进制
Project/Resources/Platform/iOS/Images.xcassets/LaunchImage.launchimage/iPhoneLaunchImage640x960.png


+ 4 - 4
Project/Resources/Platform/iOS/Info.plist

@@ -5,15 +5,15 @@
 	<key>CFBundleDevelopmentRegion</key>
 	<string>en</string>
 	<key>CFBundleDisplayName</key>
-	<string>Samples</string>
+	<string>LoftSample</string>
 	<key>CFBundleExecutable</key>
-	<string>Samples.GameLauncher</string>
+	<string>LoftSample.GameLauncher</string>
 	<key>CFBundleIdentifier</key>
-	<string>com.amazon.lumberyard.Samples</string>
+	<string>com.amazon.lumberyard.LoftSample</string>
 	<key>CFBundleInfoDictionaryVersion</key>
 	<string>6.0</string>
 	<key>CFBundleName</key>
-	<string>Samples</string>
+	<string>LoftSample</string>
 	<key>CFBundlePackageType</key>
 	<string>APPL</string>
 	<key>CFBundleShortVersionString</key>

二进制
Project/Resources/Splash.bmp


+ 11 - 5
Project/ShaderLib/scenesrg.srgi

@@ -1,6 +1,16 @@
+// {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}
 
 #pragma once
 
+// this file is included by 'scenesrg_all.srgi', which is included by each shader using the scene-srg.
 // Please read README.md for an explanation on why scenesrg.srgi and viewsrg.srgi are
 // located in this folder (And how you can optionally customize your own scenesrg.srgi
 // and viewsrg.srgi in your game project).
@@ -9,9 +19,5 @@
 
 partial ShaderResourceGroup SceneSrg : SRG_PerScene
 {
-/* Intentionally Empty. Helps define the SrgSemantic for SceneSrg once.*/
+    /* Intentionally Empty. Add fields here based on the project's needs */
 };
-
-#define AZ_COLLECTING_PARTIAL_SRGS
-#include <Atom/Feature/Common/Assets/ShaderResourceGroups/SceneSrgAll.azsli>
-#undef AZ_COLLECTING_PARTIAL_SRGS

+ 11 - 5
Project/ShaderLib/viewsrg.srgi

@@ -1,6 +1,16 @@
+// {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}
 
 #pragma once
 
+// this file is included by 'viewsrg_all.srgi', which is included by each shader using the view-srg.
 // Please read README.md for an explanation on why scenesrg.srgi and viewsrg.srgi are
 // located in this folder (And how you can optionally customize your own scenesrg.srgi
 // and viewsrg.srgi in your game project).
@@ -9,9 +19,5 @@
 
 partial ShaderResourceGroup ViewSrg : SRG_PerView
 {
-/* Intentionally Empty. Helps define the SrgSemantic for ViewSrg once.*/
+    /* Intentionally Empty. Add fields here based on the project's needs */
 };
-
-#define AZ_COLLECTING_PARTIAL_SRGS
-#include <Atom/Feature/Common/Assets/ShaderResourceGroups/ViewSrgAll.azsli>
-#undef AZ_COLLECTING_PARTIAL_SRGS

+ 14 - 0
Project/autoexec.cfg

@@ -0,0 +1,14 @@
+; edit this file to make it load whatever level you want on startup automatically
+; You can also add additional commands in here that you want it to exec on startup.
+loadlevel start
+
+; uncomment the following line in any game packages that have all the
+; assets precompiled, so that it doesn't try to launch the Asset Processor in
+; actual shipping builds.
+
+; bg_ConnectToAssetProcessor 0
+
+; uncomment the following line to hide any debug display info from the top
+; right corner of the screen.
+
+; r_DisplayInfo 0

+ 134 - 44
Project/cmake/EngineFinder.cmake

@@ -1,32 +1,68 @@
-# This file is copied during engine registration. Edits to this file will be lost next
-# time a registration happens.
+# Edits to this file may be lost in upgrades. Instead of changing this file, use 
+# the 'engine_finder_cmake_path' key in your project.json or user/project.json to specify 
+# an alternate .cmake file to use instead of this one.
 
 include_guard()
 
-# Read the engine name from the project_json file
-file(READ ${CMAKE_CURRENT_SOURCE_DIR}/project.json project_json)
 set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/project.json)
 
-string(JSON LY_ENGINE_NAME_TO_USE ERROR_VARIABLE json_error GET ${project_json} engine)
-if(json_error)
-    message(FATAL_ERROR "Unable to read key 'engine' from 'project.json'\nError: ${json_error}")
-endif()
-
+# Option 1: Use engine manually set in CMAKE_MODULE_PATH
+# CMAKE_MODULE_PATH must contain a path to an engine's cmake folder 
 if(CMAKE_MODULE_PATH)
     foreach(module_path ${CMAKE_MODULE_PATH})
-        if(EXISTS ${module_path}/Findo3de.cmake)
-            file(READ ${module_path}/../engine.json engine_json)
-            string(JSON engine_name ERROR_VARIABLE json_error GET ${engine_json} engine_name)
-            if(json_error)
-                message(FATAL_ERROR "Unable to read key 'engine_name' from 'engine.json'\nError: ${json_error}")
-            endif()
-            if(LY_ENGINE_NAME_TO_USE STREQUAL engine_name)
-                return() # Engine being forced through CMAKE_MODULE_PATH
+        cmake_path(SET module_engine_version_cmake_path "${module_path}/o3deConfigVersion.cmake")
+        if(EXISTS "${module_engine_version_cmake_path}")
+            include("${module_engine_version_cmake_path}")
+            if(PACKAGE_VERSION_COMPATIBLE)
+                message(STATUS "Selecting engine from CMAKE_MODULE_PATH '${module_path}'")
+                return()
+            else()
+                message(WARNING "Not using engine from CMAKE_MODULE_PATH '${module_path}' because it is not compatible with this project.")
             endif()
         endif()
     endforeach()
+    message(VERBOSE "No compatible engine found from CMAKE_MODULE_PATH '${CMAKE_MODULE_PATH}'.")
 endif()
 
+# before proceeding, check and set a global variable if its a "script only" project
+file(READ ${CMAKE_CURRENT_SOURCE_DIR}/project.json o3de_project_json)
+string(JSON project_is_script_only ERROR_VARIABLE json_error GET ${o3de_project_json} "script_only")
+if(project_is_script_only AND NOT json_error)
+    # we only set it if there's no error and it is a script only project
+    message(STATUS "This is a script-only project, no C++ compiler will be used")
+    set_property(GLOBAL PROPERTY "O3DE_SCRIPT_ONLY" TRUE)
+endif()
+
+# Option 2: Use the engine from the 'engine_path' field in <project>/user/project.json
+cmake_path(SET O3DE_USER_PROJECT_JSON_PATH ${CMAKE_CURRENT_SOURCE_DIR}/user/project.json)
+if(EXISTS "${O3DE_USER_PROJECT_JSON_PATH}")
+    file(READ "${O3DE_USER_PROJECT_JSON_PATH}" user_project_json)
+    if(user_project_json)
+        string(JSON user_project_engine_path ERROR_VARIABLE json_error GET ${user_project_json} engine_path)
+        if(user_project_engine_path AND NOT json_error)
+            cmake_path(SET user_engine_version_cmake_path "${user_project_engine_path}/cmake/o3deConfigVersion.cmake")
+            if(EXISTS "${user_engine_version_cmake_path}")
+                include("${user_engine_version_cmake_path}")
+                if(PACKAGE_VERSION_COMPATIBLE)
+                    message(STATUS "Selecting engine '${user_project_engine_path}' from 'engine_path' in '<project>/user/project.json'.")
+                    list(APPEND CMAKE_MODULE_PATH "${user_project_engine_path}/cmake")
+                    return()
+                else()
+                    message(FATAL_ERROR "The engine at '${user_project_engine_path}' from 'engine_path' in '${O3DE_USER_PROJECT_JSON_PATH}' is not compatible with this project. Please register this project with a compatible engine, or remove the local override by running:\nscripts\\o3de edit-project-properties -pp ${CMAKE_CURRENT_SOURCE_DIR} --user --engine-path \"\"")
+                endif()
+            else()
+                message(FATAL_ERROR "This project cannot use the engine at '${user_project_engine_path}' because the version cmake file '${user_engine_version_cmake_path}' needed to check compatibility is missing.  \nPlease register this project with a compatible engine, or remove the local override by running:\nscripts\\o3de edit-project-properties -pp ${CMAKE_CURRENT_SOURCE_DIR} --user --engine-path \"\"\nIf you want this project to use an older engine(not recommended), provide a custom EngineFinder.cmake using the o3de CLI's --engine-finder-cmake-path option. ")
+            endif()
+        elseif(json_error AND ${user_project_engine_path} STREQUAL "NOTFOUND")
+            # When the value is just NOTFOUND that means there is a JSON
+            # parsing error, and not simply a missing key 
+            message(FATAL_ERROR "Unable to read 'engine_path' from '${user_project_engine_path}'\nError: ${json-error}")
+        endif()
+    endif()
+endif()
+
+
+# Option 3: Find a compatible engine registered in ~/.o3de/o3de_manifest.json 
 if(DEFINED ENV{USERPROFILE} AND EXISTS $ENV{USERPROFILE})
     set(manifest_path $ENV{USERPROFILE}/.o3de/o3de_manifest.json) # Windows
 else()
@@ -34,50 +70,104 @@ else()
 endif()
 
 set(registration_error [=[
+To enable more verbose logging, run the cmake command again with '--log-level VERBOSE'
 Engine registration is required before configuring a project.
 Run 'scripts/o3de register --this-engine' from the engine root.
 ]=])
 
-# Read the ~/.o3de/o3de_manifest.json file and look through the 'engines_path' object.
-# Find a key that matches LY_ENGINE_NAME_TO_USE and use that as the engine path.
+# Create a list of all engines
 if(EXISTS ${manifest_path})
     file(READ ${manifest_path} manifest_json)
     set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${manifest_path})
 
-    string(JSON engines_path_count ERROR_VARIABLE json_error LENGTH ${manifest_json} engines_path)
+    string(JSON engines_count ERROR_VARIABLE json_error LENGTH ${manifest_json} engines)
     if(json_error)
-        message(FATAL_ERROR "Unable to read key 'engines_path' from '${manifest_path}'\nError: ${json_error}\n${registration_error}")
+        message(FATAL_ERROR "Unable to read key 'engines' from '${manifest_path}'\nError: ${json_error}\n${registration_error}")
     endif()
 
-    string(JSON engines_path_type ERROR_VARIABLE json_error TYPE ${manifest_json} engines_path)
-    if(json_error OR NOT ${engines_path_type} STREQUAL "OBJECT")
-        message(FATAL_ERROR "Type of 'engines_path' in '${manifest_path}' is not a JSON Object\nError: ${json_error}")
+    string(JSON engines_type ERROR_VARIABLE json_error TYPE ${manifest_json} engines)
+    if(json_error OR NOT ${engines_type} STREQUAL "ARRAY")
+        message(FATAL_ERROR "Type of 'engines' in '${manifest_path}' is not a JSON ARRAY\nError: ${json_error}\n${registration_error}")
     endif()
 
-    math(EXPR engines_path_count "${engines_path_count}-1")
-    foreach(engine_path_index RANGE ${engines_path_count})
-        string(JSON engine_name ERROR_VARIABLE json_error MEMBER ${manifest_json} engines_path ${engine_path_index})
+    math(EXPR engines_count "${engines_count}-1")
+    foreach(array_index RANGE ${engines_count})
+        string(JSON manifest_engine_path ERROR_VARIABLE json_error GET ${manifest_json} engines "${array_index}")
         if(json_error)
-            message(FATAL_ERROR "Unable to read 'engines_path/${engine_path_index}' from '${manifest_path}'\nError: ${json_error}")
+            message(FATAL_ERROR "Unable to read 'engines/${array_index}' from '${manifest_path}'\nError: ${json_error}\n${registration_error}")
         endif()
+        list(APPEND O3DE_ENGINE_PATHS ${manifest_engine_path})
+    endforeach()
+elseif(NOT CMAKE_MODULE_PATH)
+    message(FATAL_ERROR "O3DE Manifest file not found at '${manifest_path}'.\n${registration_error}")
+endif()
 
-        if(LY_ENGINE_NAME_TO_USE STREQUAL engine_name)
-            string(JSON engine_path ERROR_VARIABLE json_error GET ${manifest_json} engines_path ${engine_name})
-            if(json_error)
-                message(FATAL_ERROR "Unable to read value from 'engines_path/${engine_name}'\nError: ${json_error}")
-            endif()
+# We cannot just run find_package() on the list of engine paths because
+# CMAKE_FIND_PACKAGE_SORT_ORDER sorts based on file name and chooses
+# the first package that returns PACKAGE_VERSION_COMPATIBLE 
+set(O3DE_MOST_COMPATIBLE_ENGINE_PATH "")
+set(O3DE_MOST_COMPATIBLE_ENGINE_VERSION "")
+foreach(manifest_engine_path IN LISTS O3DE_ENGINE_PATHS) 
+    # Does this engine have a config version cmake file?
+    cmake_path(SET version_cmake_path "${manifest_engine_path}/cmake/o3deConfigVersion.cmake")
+    if(NOT EXISTS "${version_cmake_path}") 
+        message(VERBOSE "Ignoring '${manifest_engine_path}' because no config version cmake file was found at '${version_cmake_path}'")
+        continue()
+    endif()
 
-            if(engine_path)
-                list(APPEND CMAKE_MODULE_PATH "${engine_path}/cmake")
-                return()
-            endif()
+    unset(PACKAGE_VERSION)
+    unset(PACKAGE_VERSION_COMPATIBLE)
+    include("${version_cmake_path}")
+
+    # Follow the version checking convention from find_package(CONFIG)
+    if(PACKAGE_VERSION_COMPATIBLE)
+        if(NOT O3DE_MOST_COMPATIBLE_ENGINE_PATH) 
+            set(O3DE_MOST_COMPATIBLE_ENGINE_PATH "${manifest_engine_path}") 
+            set(O3DE_MOST_COMPATIBLE_ENGINE_VERSION ${PACKAGE_VERSION}) 
+            message(VERBOSE "Found compatible engine '${manifest_engine_path}' with version '${PACKAGE_VERSION}'")
+        elseif(${PACKAGE_VERSION} VERSION_GREATER ${O3DE_MOST_COMPATIBLE_ENGINE_VERSION})
+            set(O3DE_MOST_COMPATIBLE_ENGINE_PATH "${manifest_engine_path}")
+            set(O3DE_MOST_COMPATIBLE_ENGINE_VERSION ${PACKAGE_VERSION})
+            message(VERBOSE "Found more compatible engine '${manifest_engine_path}' with version '${PACKAGE_VERSION}' because it has a greater version number.")
+        else()
+            message(VERBOSE "Not using engine '${manifest_engine_path}' with version '${PACKAGE_VERSION}' because it doesn't have a greater version number or has a different engine name.")
         endif()
-    endforeach()
-    
-    message(FATAL_ERROR "The project.json uses engine name '${LY_ENGINE_NAME_TO_USE}' but no engine with that name has been registered.\n${registration_error}")
-else()
-    # If the user is passing CMAKE_MODULE_PATH we assume thats where we will find the engine
-    if(NOT CMAKE_MODULE_PATH)
-        message(FATAL_ERROR "O3DE Manifest file not found.\n${registration_error}")
+    else()
+        message(VERBOSE "Ignoring '${manifest_engine_path}' because it is not a compatible engine.")
     endif()
+endforeach()
+
+if(O3DE_MOST_COMPATIBLE_ENGINE_PATH)
+    message(STATUS "Selecting engine '${O3DE_MOST_COMPATIBLE_ENGINE_PATH}'")
+    # Make sure PACKAGE_VERSION_COMPATIBLE is set so Findo3de.cmake knows
+    # compatibility was checked
+    set(PACKAGE_VERSION_COMPATIBLE True)
+    set(PACKAGE_VERSION O3DE_MOST_COMPATIBLE_ENGINE_VERSION)
+    list(APPEND CMAKE_MODULE_PATH "${O3DE_MOST_COMPATIBLE_ENGINE_PATH}/cmake")
+    return()
+endif()
+
+# No compatible engine was found.
+# Read the 'engine' field in project.json or user/project.json for more helpful messages 
+if(user_project_json)
+    string(JSON user_project_engine ERROR_VARIABLE json_error GET ${user_project_json} engine)
+endif()
+
+if(NOT user_project_engine)
+    string(JSON project_engine ERROR_VARIABLE json_error GET ${o3de_project_json} engine)
+    if(json_error AND ${project_engine} STREQUAL "NOTFOUND")
+        message(FATAL_ERROR "Unable to read key 'engine' from 'project.json'\nError: ${json_error}")
+    endif()
+endif()
+
+if(user_project_engine)
+    message(FATAL_ERROR "The local '${O3DE_USER_PROJECT_JSON_PATH}' engine is '${user_project_engine}' but no compatible engine with that name and version was found.  Please register the compatible engine, or remove the local engine override.\n${registration_error}")
+elseif(project_engine)
+    message(FATAL_ERROR "The project.json engine is '${project_engine}' but no engine with that name and version was found.\n${registration_error}")
+else()
+    set(project_registration_error [=[
+    Project registration is required before configuring a project.
+    Run 'scripts/o3de register -pp PROJECT_PATH --engine-path ENGINE_PATH' from the engine root.
+    ]=])
+    message(FATAL_ERROR "${project_registration_error}")
 endif()

+ 27 - 0
Project/package.bat

@@ -0,0 +1,27 @@
+REM --------------------------------------------------------------------------------------------------
+REM 
+REM Copyright (c) Contributors to the Open 3D Engine Project.
+REM For complete copyright and license terms please see the LICENSE at the root of this distribution.
+REM 
+REM SPDX-License-Identifier: Apache-2.0 OR MIT
+REM 
+REM --------------------------------------------------------------------------------------------------
+
+
+REM This script is meant to export the project into a standalone shippable project that others can run.
+REM However, the project developer is expected to modify it to add steps or change it to their needs.
+REM
+REM To get more information about the possible tweakable parameters, run 
+REM (engine folder)\scripts\o3de.bat export-project -es ExportScripts/export_source_built_project.py --script-help
+
+set O3DE_PATH=F:/o3de
+set O3DE_PROJECT_PATH=D:/temp
+set O3DE_PROJECT_SEEDLIST=%O3DE_PROJECT_PATH%\AssetBundling\SeedLists\Example.seed
+set OUTPUT_PATH=%O3DE_PROJECT_PATH%\ProjectPackages
+
+REM change this to release or debug if you want it to make a release or debug package
+REM (Only works if the installer you have actually includes release and debug binaries)
+set OUTPUT_CONFIGURATION=profile
+
+%O3DE_PATH%\scripts\o3de.bat export-project -es ExportScripts\export_source_built_project.py --project-path %O3DE_PROJECT_PATH% --no-monolithic-build --log-level INFO -assets --config %OUTPUT_CONFIGURATION% --archive-output zip --seedlist %O3DE_PROJECT_SEEDLIST% -out %OUTPUT_PATH%
+

+ 40 - 0
Project/package.sh

@@ -0,0 +1,40 @@
+#
+# 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
+#
+#
+
+# This script is meant to export the project into a standalone shippable project that others can run.
+# However, the project developer is expected to modify it to add steps or change it to their needs.
+
+# To get more information about the possible tweakable parameters, run 
+# (engine folder)/scripts/o3de.sh export-project -es ExportScripts/export_source_built_project.py --script-help
+
+# The output of this script will be placed in the "ProjectPackages" folder and will include
+# * A standalone version of the project game client, shippable, with all the assets and binaries
+# * A standalone version of the project server (if the project has one), shippable, with all the assets and binaries
+# * A standalone version of the project's "Unified" (Client + 'listen' Server), with assets and binaries
+# * zip files of each of the above (based on the --archive-output zip) option below - xz, bz2, gzip and 'none' 
+#   are also available.
+
+O3DE_PATH=F:/o3de
+O3DE_PROJECT_PATH=D:/temp
+
+# The seedlist is a list of assets that will be included in the package (it automatically computes dependencies
+# based on these assets and will include dependencies recusively on anything in the seed list.  Modify it
+# to include your own 'root' assets that you want to include in the package using the AssetBundler tool
+O3DE_PROJECT_SEEDLIST=${O3DE_PROJECT_PATH}/AssetBundling/SeedLists/Example.seed
+OUTPUT_PATH=${O3DE_PROJECT_PATH}/ProjectPackages
+
+# change this to release, profile, or debug 
+# (Only works if the installer you have actually includes release, profile or debug binaries)
+
+# note that script-only-projects cannot support monolithic configurations and the default installer
+# only includes monolithic release configuration (along with non-monolithic debug and profile).
+# you can build your own installer that has non-monolithic release, and then use release, in that case,
+# but otherwise, stick to either profile or debug.
+OUTPUT_CONFIGURATION=profile
+
+${O3DE_PATH}/scripts/o3de.sh export-project -es ExportScripts/export_source_built_project.py --project-path ${O3DE_PROJECT_PATH} -nomono  --log-level INFO -assets --config ${OUTPUT_CONFIGURATION} --archive-output zip --seedlist ${O3DE_PROJECT_SEEDLIST} -out ${OUTPUT_PATH}

+ 32 - 5
Project/project.json

@@ -1,10 +1,12 @@
 {
     "project_name": "LoftSample",
-    "project_id": "{6B644ACC-D83D-40AD-9EB1-793A01633A86}",
+    "version": "1.0.0",
+    "project_id": "{48CBCFDA-89B1-4A7F-B381-46E22E2C0C7A}",
     "origin": "https://github.com/aws-lumberyard/loft-arch-vis-sample",
     "license": "https://opensource.org/licenses/MIT",
-    "display_name": "O3DE Loft Sample",
+    "display_name": "LoftSample",
     "summary": "This project contains the O3DE Loft sample scene.",
+    "script_only": true,
     "canonical_tags": [
         "Project"
     ],
@@ -13,9 +15,34 @@
     ],
     "icon_path": "preview.png",
     "engine": "o3de",
+    "restricted": "LoftSample",
+    "gem_names": [
+        "Atom",
+        "AudioSystem",
+        "ArchVis",
+        "CameraFramework",
+        "Compression",
+        "DebugDraw",
+        "DiffuseProbeGrid",
+        "EditorPythonBindings",
+        "EMotionFX",
+        "GameState",
+        "ImGui",
+        "LandscapeCanvas",
+        "LyShine",
+        "PhysX",
+        "PrimitiveAssets",
+        "PrefabBuilder",
+        "SaveData",
+        "ScriptCanvasPhysics",
+        "ScriptEvents",
+        "StartingPointInput",
+        "TextureAtlas",
+        "WhiteBox",
+        "RemoteTools"
+    ],
     "external_subdirectories": [
-        "../Gems/ArchVis",
-        "Code"
+        "../Gems/ArchVis"
     ],
-    "engine_version": "2.2.2"
+    "engine_version": "4.2.0"
 }

+ 0 - 20
Project/project.json.bak0

@@ -1,20 +0,0 @@
-{
-    "project_name": "LoftSample",
-    "project_id": "{6B644ACC-D83D-40AD-9EB1-793A01633A86}",
-    "origin": "https://github.com/aws-lumberyard/loft-arch-vis-sample",
-    "license": "https://opensource.org/licenses/MIT",
-    "display_name": "O3DE Loft Sample",
-    "summary": "This project contains the O3DE Loft sample scene.",
-    "canonical_tags": [
-        "Project"
-    ],
-    "user_tags": [
-        "LoftSample"
-    ],
-    "icon_path": "preview.png",
-    "engine": "o3de",
-    "external_subdirectories": [
-        "../Gems/ArchVis",
-        "Code"
-    ]
-}

+ 2 - 3
README.md

@@ -20,9 +20,8 @@ You need to [install git with lfs support](https://git-scm.com/downloads), and [
 
 ![project](doc/cover.png?raw=true)
 
-4. Click on the **Build Project** button, located on the **O3DE Loft Sample** image.
-5. Once the project has been built successfully, use the **Open Editor** button.
-6. The asset pre-processor will run for a bit. Once it is over you will be welcomed with the **Open a Level** window, simply pick the first one.
+4. Click on the **Open Editor** button, located on the **O3DE Loft Sample** image.
+5. The asset pre-processor will run for a bit. Once it is over you will be welcomed with the **Open a Level** window, simply pick the first one.
 
 ## Project Highlights