Merge branch 'ly-as-sdk/LYN-2948-phistere' of https://github.com/aws-lumberyard-dev/o3de into ly-as-sdk/Engine-Gem-Tracking
This commit is contained in:
@@ -18,19 +18,9 @@ set(GEM_DEPENDENCIES
|
||||
Gem::LyShine
|
||||
Gem::Camera
|
||||
Gem::CameraFramework
|
||||
Gem::Atom_RHI.Private
|
||||
Gem::EMotionFX
|
||||
Gem::Atom_RPI.Private
|
||||
Gem::Atom_Feature_Common
|
||||
Gem::ImGui
|
||||
Gem::Atom_Bootstrap
|
||||
Gem::Atom_Component_DebugCamera
|
||||
Gem::AtomImGuiTools
|
||||
Gem::AtomLyIntegration_CommonFeatures
|
||||
Gem::EMotionFX_Atom
|
||||
Gem::ImguiAtom
|
||||
Gem::Atom_AtomBridge
|
||||
Gem::GradientSignal
|
||||
Gem::AtomFont
|
||||
Gem::WhiteBox
|
||||
)
|
||||
|
||||
@@ -20,24 +20,9 @@ set(GEM_DEPENDENCIES
|
||||
Gem::EditorPythonBindings.Editor
|
||||
Gem::Camera.Editor
|
||||
Gem::CameraFramework
|
||||
Gem::Atom_RHI.Private
|
||||
Gem::EMotionFX.Editor
|
||||
Gem::Atom_RPI.Builders
|
||||
Gem::Atom_RPI.Editor
|
||||
Gem::Atom_Feature_Common.Builders
|
||||
Gem::Atom_Feature_Common.Editor
|
||||
Gem::ImGui.Editor
|
||||
Gem::Atom_Bootstrap
|
||||
Gem::Atom_Asset_Shader.Builders
|
||||
Gem::Atom_Component_DebugCamera
|
||||
Gem::AtomImGuiTools
|
||||
Gem::AtomLyIntegration_CommonFeatures.Editor
|
||||
Gem::EMotionFX_Atom.Editor
|
||||
Gem::ImageProcessingAtom.Editor
|
||||
Gem::Atom_AtomBridge.Editor
|
||||
Gem::ImguiAtom
|
||||
Gem::AtomFont
|
||||
Gem::AtomToolsFramework.Editor
|
||||
Gem::GradientSignal.Editor
|
||||
Gem::WhiteBox.Editor
|
||||
)
|
||||
|
||||
@@ -20,13 +20,14 @@ if(json_error)
|
||||
message(FATAL_ERROR "Unable to read key 'engine' from 'project.json', error: ${json_error}")
|
||||
endif()
|
||||
|
||||
# Read the list of paths from ~.o3de/o3de_manifest.json
|
||||
if($ENV{USERPROFILE} AND EXISTS $ENV{USERPROFILE})
|
||||
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)
|
||||
|
||||
|
||||
@@ -124,12 +124,13 @@ function(ly_delayed_generate_settings_registry)
|
||||
message(FATAL_ERROR "Dependency ${gem_target} from ${target} does not exist")
|
||||
endif()
|
||||
get_property(gem_relative_source_dir TARGET ${gem_target} PROPERTY SOURCE_DIR)
|
||||
|
||||
if(gem_relative_source_dir)
|
||||
# Most gems SOURCE dir is nested in the path, we need to find the path to the gem.json or project.json file
|
||||
while(NOT EXISTS ${gem_relative_source_dir}/gem.json AND NOT EXISTS ${gem_relative_source_dir}/project.json)
|
||||
# Most gems SOURCE dir is nested in the path, we need to find the path where an 'Assets' or 'Code' folder resides
|
||||
while(NOT EXISTS ${gem_relative_source_dir}/Assets AND NOT EXISTS ${gem_relative_source_dir}/Code)
|
||||
get_filename_component(parent_dir ${gem_relative_source_dir} DIRECTORY)
|
||||
if (${parent_dir} STREQUAL ${gem_relative_source_dir})
|
||||
message(FATAL_ERROR "Did not find gem.json or project.json while processing target ${gem_target}!")
|
||||
message(FATAL_ERROR "Did not find a Gem source dir while processing target ${gem_target}!")
|
||||
endif()
|
||||
set(gem_relative_source_dir ${parent_dir})
|
||||
endwhile()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"engine_name": "@LY_VERSION_ENGINE_NAME@",
|
||||
"restricted": "@LY_VERSION_ENGINE_NAME@",
|
||||
"restricted": "o3de",
|
||||
"FileVersion": 1,
|
||||
"O3DEVersion": "@LY_VERSION_STRING@",
|
||||
"O3DECopyrightYear": @LY_VERSION_COPYRIGHT_YEAR@,
|
||||
|
||||
@@ -1652,10 +1652,22 @@ def create_project(project_path: str,
|
||||
d.write('# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n')
|
||||
d.write('# {END_LICENSE}\n')
|
||||
|
||||
# copy the o3de_manifest.cmake into the project root
|
||||
engine_path = manifest.get_this_engine_path()
|
||||
o3de_manifest_cmake = f'{engine_path}/cmake/o3de_manifest.cmake'
|
||||
shutil.copy(o3de_manifest_cmake, project_path)
|
||||
# set the "engine" element of the project.json
|
||||
engine_json_data = manifest.get_engine_json_data(engine_path=manifest.get_this_engine_path())
|
||||
try:
|
||||
engine_name = engine_json_data['engine_name']
|
||||
except Exception as e:
|
||||
logger.error(f"engine_name for this engine not found in engine.json.")
|
||||
return 1
|
||||
|
||||
project_json_data = manifest.get_project_json_data(project_path=project_path)
|
||||
project_json_data.update({"engine": engine_name})
|
||||
with open(project_json, 'w') as s:
|
||||
try:
|
||||
s.write(json.dumps(project_json_data, indent=4))
|
||||
except Exception as e:
|
||||
logger.error(f'Failed to write project json at {project_path}.')
|
||||
return 1
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user