Commit Graph

72 Commits (0ad2fe2294e9468e59af2457058807d0d0e8dca1)

Author SHA1 Message Date
lumberyard-employee-dm 0ad2fe2294
Set enable gem variants feature (#3631)
* 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>
4 years ago
Esteban Papp e8fa1dca58
Improves runtime dependencies input dependency (#3665)
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>
4 years ago
Esteban Papp a1b59e5e5e install reorg/cleanup
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
SJ 44b053df58
[Mac] Building and running game projects from an SDK (#2943)
* 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>
4 years ago
Esteban Papp d03c2c9977
Copy jinja/py files to the install folder (#2643)
* 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>
4 years ago
Esteban Papp f0cafd0e9d
Create RUN target as helpers for the project-centric workflow (#2520)
* 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>
4 years ago
Axel Nana c333c453c6
Add missing `*.hxx` pattern
Signed-off-by: Axel Nana <axel.nana@aliens-group.com>
4 years ago
Terry Michaels d9ec159f0e
Merge pull request #2235 from aws-lumberyard-dev/daimini/gitflow_210716_o3de
Gitflow 7/16/21 - O3DE
4 years ago
Steve Pham 38261d0800
Shorten copyright headers by splitting into 2 lines (#2213)
* Updated all copyright headers to split the longer original copyright line into 2 shorter lines

Signed-off-by: Steve Pham <spham@amazon.com>
4 years ago
Danilo Aimini e9270e491a Merge branch 'stabilization/2106' into daimini/gitflow_210716_o3de
Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>

# Conflicts:
#	scripts/build/bootstrap/incremental_build_util.py
4 years ago
lumberyard-employee-dm 67c37762a3
Fixed iteration of the gem_assets_paths variable in the (#2222)
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>
4 years ago
SJ 7eeaf7dad5
Generate install layout for Mac (#2144)
* 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>
4 years ago
lumberyard-employee-dm fcef9333a7
Fixed creation of paths in the install layout for external source paths (#2152)
* 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>
4 years ago
lumberyard-employee-dm 2478c60793
Fixed several o3de python package and install layout issues (#1714)
* 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>
5 years ago
Steve Pham b4a2edec6a
Final update copyright headers to reference license files at the repo root (#1693)
* 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>
5 years ago
Esteban Papp 7d891edb9a
LYN-4780 CMake generation fails on a prebuilt (SDK) engine (#1541)
* 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>
5 years ago
Steve Pham 70042fcdcd
O3DE Copyright Updates for Linux Foundation (#1504) 5 years ago
Esteban Papp 2fa6883455
SPEC-6663 add file(READ files to tracking (#1416)
* adding property to track files read by file(READ

* code review comments

* adding newline
5 years ago
Esteban Papp 98767862af
LYN-4071 Mac compile times are excessive 5 years ago
Eric Phister 35568d97e5
Fixes an issue configuring with external project (#1408)
With engine-centric builds where LY_PROJECTS has paths that sit outside
the engine, there was an erroneous fatal message that would occur.
5 years ago
lumberyard-employee-dm 7dabe8b6e9
Updated Several Engine Gem's CMakeLists.txt to add themselves as required Gems (#1262)
* 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
5 years ago
Eric Phister c0d9db6739
Fixes for SDK include directory structure (#1319)
* 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>
5 years ago
pappeste 47c3c3a5d0 Solution that wraps qt deploy with cmake 5 years ago
amzn-sj 39d207095a Remove call to ly_get_absolute_pal_filename that's not needed 5 years ago
Esteban Papp 4b3d0d1054
LYN-4327 [SDK] External Gem's aren't added to the project solution when using SDK (#1191)
* 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
5 years ago
lumberyard-employee-dm d9b57bce67
Fixed configuring of cmake when a project resides on a different drive than the engine (#1153) 5 years ago
scottr 0d1b217b24 Merge branch 'main' into cpack_installer 5 years ago
lumberyard-employee-dm dce87534c7
Removing the Pyside implementation of the project manager python scripts (#1112)
* 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.
5 years ago
scottr 328ced0059 [cpack_installer] replaced missing get_target_property hack and fixed a typo 5 years ago
scottr b09f73378f [cpack_installer] replaced LY_DEFAULT_INSTALL_COMPONENT with built-in CMAKE_INSTALL_DEFAULT_COMPONENT_NAME. updated stale references to ly_install_target_COMPONENT with a get_prop call 5 years ago
Esteban Papp f1dbeb584a
LYN-4206 CMake bakes install prefix during configure (#1100) 5 years ago
lumberyard-employee-dm c67cd2dc4e Renaming the TargetCMakeLists.txt.in to InstalledTarget.in to get avoid it being picked up by the CopyrightValidator 5 years ago
lumberyard-employee-dm f6568f5c63 Re-added back an ly_setup_target function which configures the CMakeLists.txt template for a single target 5 years ago
lumberyard-employee-dm 18e479589d Updating the Install_common.cmake ly_setup_o3de_install() function to be
able forward all the ly_add_targets calls within a single source Engine
CMakeLists.txt to a single installed Engine CMakeLists.txt
5 years ago
lumberyard-employee-dm 5b8e759c2d Implemented changes in the ly_setup_target() command to forward the ly_create_alias() command calls to the configured CMakeLists.txt per installed target 5 years ago
lumberyard-employee-dm 84cf3bffde Updating the Install_common.cmake script to copy over the source engine.json templates array to the generated installed engine.json 5 years ago
lumberyard-employee-dm d536a9438d Revert "Fixes an issue with RUNTIME_DEPENDENCIES including too many targets during install"
This reverts commit f972edee01.
5 years ago
lumberyard-employee-dm b99bcea24a Updating the engine.json.in template for the cmake INSTALL target to add the list of external subdirectories to allow the installed layout to access the subdirectories via it's engine.json file 5 years ago
phistere cef7eacd24 Fixes install of scripts to include o3de folder 5 years ago
phistere f972edee01 Fixes an issue with RUNTIME_DEPENDENCIES including too many targets during install 5 years ago
pappeste 671f26bed4 fixing debug configuration and how we declare IMPORTED targets (instead of UNKNOW we use the actual type) 5 years ago
pappeste b3ae71a5d8 misc fixes 5 years ago
pappeste 65e0bd270e Fixing runtime dependencies (including qt deploy). Running AP/Editor again 5 years ago
pappeste 12cea5d029 Fixing headers and interface build dependencies 5 years ago
pappeste 33e4098741 Merge branch 'ly-as-sdk/LYN-2948' of https://github.com/aws-lumberyard-dev/o3de into ly-as-sdk/LYN-2948
# Conflicts:
#	cmake/Platform/Common/Install_common.cmake
5 years ago
pappeste ac7024cc06 Making install to be completely a post-processing step. We need this so all dependencies are declared and ready when we generate the target files 5 years ago
phistere bedecebdcc Configures and installs an engine.json generated from a template. Fixes HEADERONLY targets for install. Fixes locating .ico resource file. Fix infinite loop in CMake configure on new projects. 5 years ago
pappeste bddbe43240 adding all the config folder for ImageProcessingAtom 5 years ago
pappeste 68f19644e7 typo 5 years ago
pappeste f6187f510a config file going to the wrong place 5 years ago