* Implemented the RFC to allow projects to need to specify the Gems
Projects no longer need to specify CMake Targets to associate a Gem
variant with.
In order to associate a CMake Target with a gem variant a new
`ly_set_gem_variant_to_load` function has been added that maps CMake
Targets -> Gem Variants.
This allows CMake Targets to self describe which gem variants they
desire to build and load
This implementation is backwards compatible:
The `ly_enable_gems` function still accepts the TARGETS and VARIANTS
arguments which it will forward to the new `ly_set_gem_variant_to_load`
function to allow the input Targets to be associated with input Gem
Variants
This changes fixes the issue with gems that are required by an
Application regardless of the Project in use, not replicating it's
"requiredness" to the SDK layout
Fixes#3430
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Added an LY_PROJECT_NAME property to the Launcher targets
The `ly_enable_gems_delayed` now command queries the LY_PROJECT_NAME property
associated with each target to determine if the gems being enabled are
match the project the target is associated with.
In this case the target only adds dependencies if the gems is being enabled
without a specific project or if the gems is being enabled for the
matching project.
If the LY_PROJECT_NAME property is not set for target, it indicates the
gems for each project can be added as dependencies to the target.
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* The INSTALL step now forwards the LY_PROJECT_NAME property for a target
The Install_common.cmake has been updated to support configuring
TARGET_PROPERTIES into the generated CMakeLists.txt for install targets.
Furthermore the indentation of the generated CMakeLists.txt has been
normalized to help with readability
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Updating the Atom_Bootstrap CMakeLists.txt to enable the Atom_Bootstrap Gem
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Added a deprecation message to ly_enable_gems when supplying TARGETS and
VARIANTS
Added a define_property call for the LY_PROJECT_NAME target property
Removed the .Builders alias for the PrefabBuilder and renamed the
GEM_MODULE target o PrefabBuilder.Builders.
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Removed superflous space from AutomatedTesting Gem CMakeLists.txt
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
Changes how runtime dependencies are hooked as dependencies to create depenedencies to the inputs
This makes it that if an input to the runtime dependencies changes, it gets re-copied (e.g. a 3rdParty changes or a file added through ly_add_target_files)
Closes Issue #3391
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* 1. Initial support for loading dylibs outside the bundle.
2. Child processes inherit parent's environment if no environment is explicitly specified(should change to append the parent's environment even if environment variables are explicitly specified).
3. Update some time functions to use system uptime instead of wall clock time when computing elapsed time. This fixes false timeouts when the OS goes to sleep.
4. Increase wait times for AssetBuilders and some Atom tools to connect to the AssetProcessor. This is needed because GateKeeper slows down first time bootup which results in asset processing failures.
With this change we'll be able to run Editor and AssetProcessor from an install on Mac and we will also be able to build and run projects using the installed engine as an SDK.
Signed-off-by: amzn-sj <srikkant@amazon.com>
* 1. Remove debug messages.
2. Fix license
3. Pass parent's environment variables to child processes by default(on Mac).
Signed-off-by: amzn-sj <srikkant@amazon.com>
* 1. Add more detailed comments.2. Use a custom ly_copy for Mac and leave the default as is.
Signed-off-by: amzn-sj <srikkant@amazon.com>
* Address some feedback from review
Signed-off-by: amzn-sj <srikkant@amazon.com>
* Copy jinja/py files to the install folder
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* code review comment
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* moving AzAutoGen to cmake folder and removing the header-only project
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* Create RUN target as helpers for the project-centric workflow
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* typo fix
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* rename target as "<target>.Imported" and create "<target>" as the metatarget that is used for debugging and building in o3de
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
Install_common.cmake to make sure the the Gem assets are copied to the
install layout
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* 1. Move call to install(TARGETS...) to its own function to create a platform specific implementation for Mac.
2. Add linker-signed flag to work around cmake install issue.
Signed-off-by: amzn-sj <srikkant@amazon.com>
* Add newline
Signed-off-by: amzn-sj <srikkant@amazon.com>
* 1. Rename function to ly_install_target_override and only call it if it has been implemented.
2. Pass in runtime, archive, and library directory paths as params to clean it up a bit.
Signed-off-by: amzn-sj <srikkant@amazon.com>
* Fixed creation of paths in the install layout for external source paths
Any source path that is not within the engine root is now copied to an
External directory within the engine root
Updated the gem copy regex to include the preview.png file and Editor/Scripts directory
Added an ly_add_install_paths function for installing a list of paths to
the install layout
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Moved the ly_get_last_path_segment_concat_sha256 and
ly_get_engine_relative_source_dir functions to cmake/FileUtil.cmake
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Updated the CrashLog directory path to save to the project user
directory instead of the engine-root directory
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Removing the custom OUTPUT_NAME for the Multiplayer Gem Builder target
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Changed the default value for the LY_3RDPARTY_PATH cache variable to be
~/.o3de/3rdParty
This simplifies the first time user experience when running cmake
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Fixed Windows only issue where using creating a VS Solution for an O3DE project on a different drive resulted in an unloaded "<drive letter>:" entry appearing in the solution explorer
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Refactored install layout logic for External Subdirectories
Instead of performing a regular expression over the Gems/* directory, now the each external subdirectory including the project (external) directory is recursied over and scanned for any folders that aren't excluded.
By default those folders are the [Cc]ache, [Bb]uild and [Uu]ser directories
Afterwards the list files to copy over are then split into a directory list and a file list that is filtered by an include regex
Next the directory list is iterated over and the directories are copied to the install layout
Finally the file list is iterated and the list of files are also copied to the install layout
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Fixed the o3de.bat script changing the working directory before running the o3de.py script
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Fixed exception in engine-template.py script when the create-gem command
is invoked with the --template-name parameter that does not correspond
to a registered Template
Updated the create-project command to register the project with the
o3de_manifest.json and the engine with the project as the final step
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Fixed register.py over-registration of non-engine directories when then
--this-engine parameter is supplied.
All the projects, gems and templates inside of the default o3de_manifest
folder locations were being registered with the engine that was being
registered
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Fixed register.py register_project_path() method to return 0 when the
project path is successfully registered.
This issue was that the save_o3de_manifest method "return" value was
being checked and that method doesn't actually return a value
Added question mark to the engine_template.py to correct text around
notifying the user if the project was registered
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Added doc comment on the new cmke ly_get_vs_folder_directory function()
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Added clarifying comment to the ly_setup_others() command logic to copy over directories and files from any external subdirectories(Gems) that are registered with the engine at the time of install
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Fixed infinite recursion when trying to create a template with the
source directory used to seed the template
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Final update copyright headers to reference license files at the repo root
Signed-off-by: spham <spham@amazon.com>
* Fix copyright validator unit tests to support the stale O3DE header scenario
Signed-off-by: spham <spham@amazon.com>
* fix for some install generation issues around ly_enable_gems
* setting the right SettingsRegistry path for imported targets
* missing "include" in the exported target
* Fixed issue with the GEM_FILE argument being specified in replicated ly_enable_gems call
If the original call to `ly_enable_gems` supplied an argument for GEM_FILE, then in the replicated `ly_enable_gems` call in the install layout CMakeLists.txt, supplied both the GEMS and GEM_FILE argument which are mutually exclusive, due to the `ly_enable_gems` function populating the `ly_enable_gems_GEMS` variable from the content of the `ly_enable_gems_GEM_FILE` file.
Furthermore the install layout does not copy over the file that was parsed by the GEM_FILE argument, so it would point to a non-existent file the install layout.
* Fixed comment
Co-authored-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Fixed organization of the AssetProcessor SourceAssetBrowser
Assets within the Engine Root were grouped under a '/' entry.
That has been fixed to use the relative path within the engine root for
those assets
Assets outside of the Engine Root, but on the same drive were using
absolute paths before. Now there are child entries that navigate up the
directory hierarchy to those asset locations
* Added ly_enable_gems call to Atom gems targets that are required
The DefaultLevel.prefab contains several Atom components, that require
the Atom RHI, RPI, Common_Feature, ShaderBuilder and AtomLyIntegration CommonFeatures
gems to be enabled in order to successfully process in the
AssetProcessor.
* Added ly_enable_gems call to make the Camera gem required in Tools,
Builders and Clients.
This is needed as the DefaultLevel.prefab contains an Editor Camera
Component
* Adding the ly_enable_gem call to make the Maestro gem required
CrySystem currently requires Maestro to be enabled in order to
initialize
* Added ly_enable_gems call to the SceneProcessing gem to make it required
The SceneCore and SceneData libraries that are part of the core engine
Code folder requires the SceneProcessing gem to be enabled in order to
invoke the InitializeDynamicModule hooks in DllMain.cpp in order to
initialize those libraries.
* Fixed bad argument in comment for Prefab CMakeLists.txt
* Fixed Assert in Asset Builders due to the Atom RPI Builder
The Atom RPI Builder was enabling the Asset Catalog for the ScriptAsset a second time
The Atom Feature Common EditorSystemCommonComponent.cpp which also loads
in the AssetBuilder is enabling the Asset Catalog for the ScriptAsset
Added BehaviorContext reflection to the OutputDeviceTransformType enum
to fix the BehaviorContext errors about reflecting a method that returns
such an enum
* Added TypeId output to the JsonDeserializer report message about missing
ClassData
Previously the report callback would indicate that the target type was
missing Serialization class data, but didn't indicate the TypeId of the
target type
* Added support to the ly_enable_gems function to be able to support
0 gems being enabled.
Updated the Install step for CMake to propagate any ly_enable_gems
within a CMakeLists.txt for a target into the generated CMakeLists.txt
that is made for each installed IMPORTED target
* Adding newline to the end of the Camera Gem CMakeLists.txt
* Fixing target TYPE parameter for actual Gem Modules to use the GEM_MODULE tag instead of MODULE
* Reverting change to the DESTINATION directory for the installed CMakeLists.txt to use the relative path to the installed directory
* Adding the Atom_Bootstrap gem as a required gem
The Client and GameLaunchers required the Atom_Bootstrap gem in order to create the NativeWindow
Added Atom_Feature_Common client module as a runtime dependency of the AtomLyIntegration CommonsFeature client module
* Fixed register.py --all-projects-path and --all-gems-path arguments to
NOT register projects or gems that are within a template folder
Fixed reading of old pre-1.0 o3de_manifest.json files where the
"engines" key was a json array
* Changed how the relative target source directory is calculated when that source directroy resides outside of the engine root.
The final dirname component is used with a unique SHA256 has to form a <dirname>-<8 char SHA256> folder for installing files into
* Adding newline to the end of Atom_Bootstrap CMakeLists.txt
* Moving ly_enable_gems variants for Tools and Builders inside of PAL_TRAIT_BUILD_HOST_TOOLS block
* Adding a comment to AWSCore.ResourceMappingTool target to indicate that it is not a GEM_MODULE.
Furthermore it cannot be loaded with the Gem system because the library is in a different directory the executable
* Updates the install of SDK includes
Needs some fixes so that public include paths that were going up
directories or had multiple path components would resolve to correct
destination paths during install.
* Updates the logic to fix AutoGen includes
AutoGen headers were a special case because matching relative paths
failed due to the headers existing under the build path.
* Removes trailling slashes from inc dirs
This addresses a quirk in CMake where installing a directory with a
trailing slash has different behavior than one without. The include
paths being processed had a wide mix of slash or not.
* Update cmake/Platform/Common/Install_common.cmake
Co-authored-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Fixes fatal errors in the last change
The call to cmake_path IS_PREFIX was ill-formed. Also the trailing
directory separator was being removed from the DESTINATION but really
needed to be removed from the DIRECTORY.
Co-authored-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* should pickup the external directories registered by the project
* Add support for AzTest and AzTestRunner in the SDK
* missing IMPORT_LIB
* Moved where .Assets targets get generated so they are visible in the SDK
* generate the Directory.Build.props in the right path
* excluding target on platforms that dont support it
* Removing the Pyside implementation of the project manager python scripts
* Removing reference to the scripts/project_manager directory
The Install_common.cmake script reference to the project_manager directory has been removed.