* [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> |
4 years ago | |
|---|---|---|
| .github/ISSUE_TEMPLATE | 4 years ago | |
| Assets | 4 years ago | |
| AutomatedTesting | 4 years ago | |
| Code | 4 years ago | |
| Gems | 4 years ago | |
| Registry | 4 years ago | |
| Templates | 4 years ago | |
| Tools | 4 years ago | |
| cmake | 4 years ago | |
| python | 4 years ago | |
| scripts | 4 years ago | |
| .clang-format | 5 years ago | |
| .editorconfig | 5 years ago | |
| .gitattributes | 5 years ago | |
| .gitignore | 4 years ago | |
| .lfsconfig | 5 years ago | |
| CMakeLists.txt | 4 years ago | |
| CODE_OF_CONDUCT.md | 5 years ago | |
| CONTRIBUTING.md | 5 years ago | |
| Doxyfile_ScriptBinds | 5 years ago | |
| LICENSE.txt | 5 years ago | |
| LICENSE_APACHE2.TXT | 5 years ago | |
| LICENSE_MIT.TXT | 5 years ago | |
| README.md | 4 years ago | |
| SerializeContextAnalysis.bat | 5 years ago | |
| SliceBuilderSettings.json | 5 years ago | |
| aztest_bootstrap.json | 5 years ago | |
| ctest_pytest.ini | 4 years ago | |
| editor.cfg | 5 years ago | |
| engine.json | 4 years ago | |
| system_android_android.cfg | 5 years ago | |
| system_ios_ios.cfg | 5 years ago | |
| system_linux_pc.cfg | 5 years ago | |
| system_mac_mac.cfg | 5 years ago | |
| system_windows_pc.cfg | 5 years ago | |
README.md
O3DE (Open 3D Engine)
O3DE (Open 3D Engine) is an open-source, real-time, multi-platform 3D engine that enables developers and content creators to build AAA games, cinema-quality 3D worlds, and high-fidelity simulations without any fees or commercial obligations.
Contribute
For information about contributing to Open 3D Engine, visit https://o3de.org/docs/contributing/.
Download and Install
This repository uses Git LFS for storing large binary files.
Verify you have Git LFS installed by running the following command to print the version number.
git lfs --version
If Git LFS is not installed, download and run the installer from: https://git-lfs.github.com/.
Install Git LFS hooks
git lfs install
Clone the repository
git clone https://github.com/o3de/o3de.git
Building the Engine
Build requirements and redistributables
For the latest details and system requirements, refer to System Requirements in the documentation.
Windows
- Visual Studio 2019 16.9.2 minimum (All editions supported, including Community): https://visualstudio.microsoft.com/downloads/
- Check System Requirements for other supported versions.
- Install the following workloads:
- Game Development with C++
- MSVC v142 - VS 2019 C++ x64/x86
- C++ 2019 redistributable update
- CMake 3.20.5 minimum: https://cmake.org/download/
Optional
- Wwise audio SDK
- For the latest version requirements and setup instructions, refer to the Wwise Audio Engine Gem reference in the documentation.
Quick start engine setup
To set up a project-centric source engine, complete the following steps. For other build options, refer to Setting up O3DE from GitHub in the documentation.
-
Create a writable folder to cache downloadable third-party packages. You can also use this to store other redistributable SDKs.
-
Install the following redistributables:
- Visual Studio and VC++ redistributable can be installed to any location.
- CMake can be installed to any location, as long as it's available in the system path.
-
Configure the engine source into a solution using this command line, replacing
<your build path>,<your source path>, and<3rdParty package path>with the paths you've created:cmake -B <your build path> -S <your source path> -G "Visual Studio 16" -DLY_3RDPARTY_PATH=<3rdParty package path>Example:
cmake -B C:\o3de\build\windows_vs2019 -S C:\o3de -G "Visual Studio 16" -DLY_3RDPARTY_PATH=C:\o3de-packagesNote: Do not use trailing slashes for the <3rdParty package path>.
-
Alternatively, you can do this through the CMake GUI:
- Start
cmake-gui.exe. - Select the local path of the repo under "Where is the source code".
- Select a path where to build binaries under "Where to build the binaries".
- Click Add Entry and add a cache entry for the <3rdParty package path> folder you created, using the following values:
- Name: LY_3RDPARTY_PATH
- Type: STRING
- Value:
<3rdParty package path>
- Click Configure.
- Wait for the key values to populate. Update or add any additional fields that are needed for your project.
- Click Generate.
- Start
-
Register the engine with this command:
scripts\o3de.bat register --this-engine -
The configuration of the solution is complete. You are now ready to create a project and build the engine.
For more details on the steps above, refer to Setting up O3DE from GitHub in the documentation.
Setting up new projects and building the engine
-
From the O3DE repo folder, set up a new project using the
o3de create-projectcommand.scripts\o3de.bat create-project --project-path <your new project path> -
Configure a solution for your project.
cmake -B <your project build path> -S <your new project source path> -G "Visual Studio 16" -DLY_3RDPARTY_PATH=<3rdParty cache path>Example:
cmake -B C:\my-project\build\windows_vs2019 -S C:\my-project -G "Visual Studio 16" -DLY_3RDPARTY_PATH=C:\o3de-packagesNote: Do not use trailing slashes for the <3rdParty cache path>.
-
Build the project, Asset Processor, and Editor to binaries by running this command inside your project:
cmake --build <your project build path> --target <New Project Name>.GameLauncher Editor --config profile -- /mNote: Your project name used in the build target is the same as the directory name of your project.
This will compile after some time and binaries will be available in the project build path you've specified, under bin/profile.
For a complete tutorial on project configuration, see Creating Projects Using the Command Line Interface in the documentation.
License
For terms please see the LICENSE*.TXT files at the root of this distribution.