From 0ba2900fdd2c6021f4f580f026b7fcff459a728a Mon Sep 17 00:00:00 2001 From: phistere Date: Wed, 19 May 2021 12:27:02 -0500 Subject: [PATCH 1/3] Fixes and issue with o3de scripts assuming the wrong directory as the engine directory --- scripts/o3de/o3de/registration.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/o3de/o3de/registration.py b/scripts/o3de/o3de/registration.py index a4afecd740..6a165cbea5 100755 --- a/scripts/o3de/o3de/registration.py +++ b/scripts/o3de/o3de/registration.py @@ -55,7 +55,7 @@ def backup_folder(folder: str or pathlib.Path) -> None: def get_this_engine_path() -> pathlib.Path: - return pathlib.Path(os.path.realpath(__file__)).parents[2].resolve() + return pathlib.Path(os.path.realpath(__file__)).parents[3].resolve() override_home_folder = None @@ -123,9 +123,9 @@ def get_o3de_restricted_folder() -> pathlib.Path: def get_o3de_logs_folder() -> pathlib.Path: - restricted_folder = get_o3de_folder() / 'Logs' - restricted_folder.mkdir(parents=True, exist_ok=True) - return restricted_folder + logs_folder = get_o3de_folder() / 'Logs' + logs_folder.mkdir(parents=True, exist_ok=True) + return logs_folder def register_shipped_engine_o3de_objects(force: bool = False) -> int: From cef7eacd241ce7a654d7b752094c5386e4f38d5d Mon Sep 17 00:00:00 2001 From: phistere Date: Wed, 19 May 2021 13:25:51 -0500 Subject: [PATCH 2/3] Fixes install of scripts to include o3de folder --- cmake/Platform/Common/Install_common.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/cmake/Platform/Common/Install_common.cmake b/cmake/Platform/Common/Install_common.cmake index b501e3db03..ebe31a4cfa 100644 --- a/cmake/Platform/Common/Install_common.cmake +++ b/cmake/Platform/Common/Install_common.cmake @@ -385,6 +385,7 @@ function(ly_setup_others) install(DIRECTORY ${LY_ROOT_FOLDER}/scripts/bundler ${LY_ROOT_FOLDER}/scripts/project_manager + ${LY_ROOT_FOLDER}/scripts/o3de DESTINATION ./scripts COMPONENT ${LY_DEFAULT_INSTALL_COMPONENT} PATTERN "__pycache__" EXCLUDE From 4ca30afa9ee19615b2680e9c74b7e62c8f8750b5 Mon Sep 17 00:00:00 2001 From: phistere Date: Wed, 19 May 2021 14:24:31 -0500 Subject: [PATCH 3/3] Updates pip install flags for consistency and installs the o3de module --- cmake/LYPython.cmake | 2 +- python/get_python.bat | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/cmake/LYPython.cmake b/cmake/LYPython.cmake index a7c18e4dbe..238889d829 100644 --- a/cmake/LYPython.cmake +++ b/cmake/LYPython.cmake @@ -81,7 +81,7 @@ function(update_pip_requirements requirements_file_path unique_name) set(ENV{PYTHONNOUSERSITE} 1) execute_process(COMMAND - ${LY_PYTHON_CMD} -m pip install --no-deps -r "${requirements_file_path}" --disable-pip-version-check --no-warn-script-location + ${LY_PYTHON_CMD} -m pip install -r "${requirements_file_path}" --disable-pip-version-check --no-warn-script-location WORKING_DIRECTORY ${Python_BINFOLDER} RESULT_VARIABLE PIP_RESULT OUTPUT_VARIABLE PIP_OUT diff --git a/python/get_python.bat b/python/get_python.bat index e9f18441b5..e11c4ab92f 100644 --- a/python/get_python.bat +++ b/python/get_python.bat @@ -25,7 +25,8 @@ call python.cmd --version > NUL IF !ERRORLEVEL!==0 ( echo get_python.bat: Python is already installed: call python.cmd --version - call "%CMD_DIR%\pip.cmd" install -r "%CMD_DIR%/requirements.txt" --quiet --disable-pip-version-check + call "%CMD_DIR%\pip.cmd" install -r "%CMD_DIR%/requirements.txt" --quiet --disable-pip-version-check --no-warn-script-location + call "%CMD_DIR%\pip.cmd" install -e "%CMD_DIR%/../scripts/o3de" --quiet --disable-pip-version-check --no-warn-script-location --no-deps exit /B 0 ) @@ -65,6 +66,7 @@ if ERRORLEVEL 1 ( ) echo calling PIP to install requirements... -call "%CMD_DIR%\pip.cmd" install -r "%CMD_DIR%/requirements.txt" --disable-pip-version-check +call "%CMD_DIR%\pip.cmd" install -r "%CMD_DIR%/requirements.txt" --disable-pip-version-check --no-warn-script-location +call "%CMD_DIR%\pip.cmd" install -e "%CMD_DIR%/../scripts/o3de" --disable-pip-version-check --no-warn-script-location --no-deps exit /B %ERRORLEVEL%