* [Mac] Initial support for building with hardened runtime enabled and code signing the binaries and bundles generated by the CMake install process.
Signed-off-by: amzn-sj <srikkant@amazon.com>
* 1. Move call to ly_post_install_step
2. Entitlements should only be added for executables
3. Change use of CMake exec_program to newer execute_process
4. Remove broken symlinks from embedded Python frameworks
5. Run post install code signing only if hardened runtime is enabled
Signed-off-by: amzn-sj <srikkant@amazon.com>
* Remove unnecessary flag
Signed-off-by: amzn-sj <srikkant@amazon.com>
* Remove unnecessary additional call to condesign python inside a bundle
Signed-off-by: amzn-sj <srikkant@amazon.com>
* 1. Move commonly used install functions for codesigning, copying files, and fixing frameworks to a utility script
2. Remove unnecessary wait in the Editor/AP launchers I added earlier.
3. Codesign 3rd party libraries for distribution.
Signed-off-by: amzn-sj <srikkant@amazon.com>
* 1. Codesigning on 3rd party libs should only happen when hardened runtime is enabled.
2. Change the order of the if blocks in Editor's main_dummy.cpp. This was causing strange notarization issues because it wass too similar to AP's main executable.
Signed-off-by: amzn-sj <srikkant@amazon.com>
* Add new line to end of file
Signed-off-by: amzn-sj <srikkant@amazon.com>
* 1. Move architecture specification to PAL_mac cmake file. 2. Codesign failure should be fatal.
Signed-off-by: amzn-sj <srikkant@amazon.com>
* Address some PR feedback
Signed-off-by: amzn-sj <srikkant@amazon.com>
* Remove unnecessary comment. Change if to use IN_LIST.
Signed-off-by: amzn-sj <srikkant@amazon.com>
* HOME may not always be defined. Adding alternate POSIX way of determining HOME.
Signed-off-by: amzn-sj <srikkant@amazon.com>
* Checking in partial work to get O3DE SDK built as an app bundle. Has a bunch of debug code that needs to be cleaned up.
Signed-off-by: amzn-sj <srikkant@amazon.com>
* Remove this and add it back later with fixed casing.
Signed-off-by: amzn-sj <srikkant@amazon.com>
* Adding file back with fixed case
Signed-off-by: amzn-sj <srikkant@amazon.com>
* 1. Add entitlements sparingly(only when necessary)
2. Convert entitlements to plist files which we can directly pass to codesign
3. Install python site-packages in the o3de_sdk launcher and then launch the project manger.
Signed-off-by: amzn-sj <srikkant@amazon.com>
* 1. Move hardened runtime check to codesigning functions only. This way, non-hardened runtime install is identical to the former except for codesign. Makes it easy for QA to test internally.
2. Move cmake min version for install to the pre-install steps.
Signed-off-by: amzn-sj <srikkant@amazon.com>
* 1. Remove the dummy launchers for AssetProcessor and Editor
2. Add loader_path to the rpaths of binaries outside an app bundle so that the dynamic loader can load their dependencies if any.
Signed-off-by: amzn-sj <srikkant@amazon.com>
* Remove file named main_dummy.cpp
Signed-off-by: amzn-sj <srikkant@amazon.com>
* Add O3DE SDK launcher
Signed-off-by: amzn-sj <srikkant@amazon.com>
* Add missing runtime dependencies to gems
Signed-off-by: amzn-sj <srikkant@amazon.com>
* 1. Update the path to binaries when codesigning to the correct one.
2. Remove some debug messages.
3. Move installed binary path setreg generation to the target install function. This way, we get the correct path to the bundle accounting for different configs and subdirectories.
Signed-off-by: amzn-sj <srikkant@amazon.com>
* Add explanatory comments.
Signed-off-by: amzn-sj <srikkant@amazon.com>
* 1. ly_install_add_install_path_setreg cannot be called during install target because the runtime dependencies are already processed by then.
2. The SDK launcher now uses the ProjectManager's bundle setreg to find the path to the installed binaries
Signed-off-by: amzn-sj <srikkant@amazon.com>
* Update path to install relative binaries after merge from dev
Signed-off-by: amzn-sj <srikkant@amazon.com>
* Only one config of the SDK launcher needs to be installed. Preinstall steps should not be run per config, but only once.
Signed-off-by: amzn-sj <srikkant@amazon.com>
* 1. Install python dependencies using the get_python.sh script.
2. Replace any reference to hard-coded package name/version numbers with variables.
3. Add one more missing runtime dependency.
4. Misc. PR feedback.
Signed-off-by: amzn-sj <srikkant@amazon.com>
* 1. Remove the need for setreg files in all tool bundle. Project binary path can be used instead.
2. Move O3DE_SDK_Launcher to Code/Tools/BundleLauncher
3. Add ly_install_run_script() function for install(SCRIPT) functionality.
4. Address some other PR feedback.
Signed-off-by: amzn-sj <srikkant@amazon.com>
* Add source permission when installing O3DE_SDK executable.
Signed-off-by: amzn-sj <srikkant@amazon.com>
* Rename setreg file to add specialization tag.
Signed-off-by: amzn-sj <srikkant@amazon.com>
* Remove LY_BUILD_PERMUTATION that's not needed
Signed-off-by: amzn-sj <srikkant@amazon.com>
* 1. Add BinariesInstallPath.setreg to all our bundles like before. This is now only added during the install process though.
2. Fix path in Install_common.cmake
Signed-off-by: amzn-sj <srikkant@amazon.com>
* Fix comment
Signed-off-by: amzn-sj <srikkant@amazon.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>
* 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>
* Update the minimum CMake version to 3.20
Sets the cmake_minimum_required calls to version 3.20 and updates the
README.md to point at the general CMake download page instead of a stale
link.
* Remove unnecessary cmake minimum version
It was using an old 3.0 version and can be removed.
* Additional updates to CMake 3.20, build scripts
Updates the version and remove logic to find a CMake in 3rdParty.
* Removing backup path to ninja path in the build_ninja_windows.cmd
The backup path for finding ninja was coming from the Perforce depot which isn't available for o3de builds.
* Removing reference to 3rdParty Android SDK 29 from the build and run unit test script
The Android SDK is not part of the new 3rdParty system and users are expected to install the Android SDK on their own in order to build the engine for Android.
* Update the get_python scripts and README
No longer try to append a CMake path to LY_3RDPARTY_PATH, but do still
support LY_CMAKE_PATH because there are still uses of it. Remove
mention of an LY_3RDPARTY_PATH-relative CMake path from the README.md.
* Removing LY_NINJA_PATH from the build_ninja_windows.cmd
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
* Fixed generation of Monolithic builds StaticModules.inl
A project's gem module RUNTIME_DEPENDENCIES were not visited to
determine any dependent gem modules that needed to load.
Therefore the CreateStaticModules function were missing
CreateModuleClass_* function calls required initialize the gem's AZ::Module
derived class in monolithic builds
* Removed the logic to strip the Gem:: and Project:: prefix from the Server Launcher gem dependencies
When associating gem dependencies with the server target there was CMake logic left over in it to strip the beginning of the target name if it began with "Gem::" or "Project::"
project.json when building a project.
This allows the project to build additional gems via adding the external
subdirectory in the project.json file manually
or using the `o3de.py register --external-subdirectory-path=<path>
--external_subdirectory-project-path-<project-path>` command
Removed the EngineFinder.cmake file from the Engine cmake directory as it is only needed in a Project
Added an EngineJson.cmake which reads the "external_subdirectories" list from the engine.json file and calls add_subdirectory on it
Re-ordered the population of the generated gem dependency list to prepend the dependencies before the dependent targets
* fix project centric set current
* Adding newline to project.json template
* Adding newline to engine.json
* Changed register -this-engine to be data driven
* adding build server support
* fix log dir
* fix add remove
* fix template creation for restricted
* fix typos and descriptions
* Add newline to the end of template.json
* Adding newline to the end of assets_scan_folders.seteg
* current_project in global project that creates/edits the .o3de/Registry/bootstrap.setreg
* fix the build server flags
* fix the o3de manifest server portion
* disable project manager tests for now. Its changed too much and lytestools is not working at the moment. I will get back to this later.
* fix the Mac build config
* disable project_test, this is the project manager. It has changed too much for these tests to work at the moment. I'll get back to them
Co-authored-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* LYN-2578: Updates cmake install for 'scripts' directory. Updates destination of certain binaries.
* LYN-2578: Updates to cmake install based on feedback.
* renaming and organizing files
* removed unused files
* Removing unnecessary file
* moved file
* reverting movement of 3rdparty associations from gems to global
* removing unnecessary calls to ly_add_external_target_path
* fixing install prefix of ci_build
* Fixes to get 3rdparties declared in gems to be installed
* Allowing to install just one configuration
* Adding empty line at the end
* removing commented code
* setting IMPORETD_LOCATION_<CONFIG> and defaulting IMPORTED_LOCATION to the profile config in case other configs are not installed
* putting dlls/exe in the right place, with the right output subdirectory
* setting runtime dependencies for the dlls that we link against
* singular target location
* code review comments/fixes
* Fixing identation
* removing unused function and moving ctest_scripts to scripts/ctest
* Re-adding ebp-test
* Fixing typo that is making this test run in parallel with other tests
* Fixing hang when parameters are passed
* passing absolute path as a project
* small tweak to not print out during Python execution
* Moving the timeout to be in the build step
* Disable ebo_sanity_smoke_no_gpu
Co-authored-by: jackalbe <23512001+jackalbe@users.noreply.github.com>
* renaming and organizing files
* removed unused files
* Removing unnecessary file
* moved file
* reverting movement of 3rdparty associations from gems to global
* removing unnecessary calls to ly_add_external_target_path
* fixing install prefix of ci_build
* Fixes to get 3rdparties declared in gems to be installed
* Allowing to install just one configuration
* Adding empty line at the end
* removing commented code
* setting IMPORETD_LOCATION_<CONFIG> and defaulting IMPORTED_LOCATION to the profile config in case other configs are not installed