Adding o3de.py subcommands for engine.json and gem.json modification (#2411)

The new commands are edit-engine-properties and edit-gem-properties
They can modify specific fields within these manifest files, that should
affect build system.

More importantly, this commands can be used to modify the "engine_name"
field in the engine.json and the "gem_name" field in the gem.json

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
This commit is contained in:
lumberyard-employee-dm
2021-07-27 22:04:37 -05:00
committed by GitHub
parent 7b7adb8573
commit 6868a48bb0
8 changed files with 444 additions and 7 deletions
+9 -3
View File
@@ -28,7 +28,7 @@ def add_args(parser, subparsers) -> None:
o3de_package_dir = (script_dir / 'o3de').resolve()
# add the scripts/o3de directory to the front of the sys.path
sys.path.insert(0, str(o3de_package_dir))
from o3de import engine_template, global_project, register, print_registration, get_registration, \
from o3de import engine_properties, engine_template, gem_properties, global_project, register, print_registration, get_registration, \
enable_gem, disable_gem, project_properties, sha256
# Remove the temporarily added path
sys.path = sys.path[1:]
@@ -52,9 +52,15 @@ def add_args(parser, subparsers) -> None:
# remove a gem from a project
disable_gem.add_args(subparsers)
# modify project properties
# modify engine properties
engine_properties.add_args(subparsers)
# modify project properties
project_properties.add_args(subparsers)
# modify gem properties
gem_properties.add_args(subparsers)
# sha256
sha256.add_args(subparsers)