From 8685be877b3b9cfb50e6295a161435678e39c576 Mon Sep 17 00:00:00 2001 From: Chris Galvan Date: Thu, 17 Feb 2022 14:32:41 -0600 Subject: [PATCH 1/2] Replaced deprecated ly_get_list_relative_pal_filename usage with o3de_pal_dir Signed-off-by: Chris Galvan --- Templates/CppToolGem/Template/CMakeLists.txt | 9 ++++----- Templates/CppToolGem/Template/Code/CMakeLists.txt | 4 ++-- Templates/PythonToolGem/Template/Code/CMakeLists.txt | 4 ++-- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/Templates/CppToolGem/Template/CMakeLists.txt b/Templates/CppToolGem/Template/CMakeLists.txt index b19ea2edce..4d1bb2308c 100644 --- a/Templates/CppToolGem/Template/CMakeLists.txt +++ b/Templates/CppToolGem/Template/CMakeLists.txt @@ -6,12 +6,11 @@ # # {END_LICENSE} -set(o3de_gem_path ${CMAKE_CURRENT_LIST_DIR}) -set(o3de_gem_json ${o3de_gem_path}/gem.json) -o3de_read_json_key(o3de_gem_name ${o3de_gem_json} "gem_name") -o3de_restricted_path(${o3de_gem_json} o3de_gem_restricted_path) +set(gem_path ${CMAKE_CURRENT_LIST_DIR}) +set(gem_json ${gem_path}/gem.json) +o3de_restricted_path(${gem_json} gem_restricted_path gem_parent_relative_path) -ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} "${o3de_gem_restricted_path}" ${o3de_gem_path} ${o3de_gem_name}) +o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} "${gem_restricted_path}" "${gem_path}" "${gem_parent_relative_path}") # Now that we have the platform abstraction layer (PAL) folder for this folder, thats where we will find the # project cmake for this platform. diff --git a/Templates/CppToolGem/Template/Code/CMakeLists.txt b/Templates/CppToolGem/Template/Code/CMakeLists.txt index f5cda477fc..ab587a1dac 100644 --- a/Templates/CppToolGem/Template/Code/CMakeLists.txt +++ b/Templates/CppToolGem/Template/Code/CMakeLists.txt @@ -8,11 +8,11 @@ # Currently we are in the Code folder: ${CMAKE_CURRENT_LIST_DIR} # Get the platform specific folder ${pal_dir} for the current folder: ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} -# Note: ly_get_list_relative_pal_filename will take care of the details for us, as this may be a restricted platform +# Note: o3de_pal_dir will take care of the details for us, as this may be a restricted platform # in which case it will see if that platform is present here or in the restricted folder. # i.e. It could here in our gem : Gems/${Name}/Code/Platform/ or # //Gems/${Name}/Code -ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} ${o3de_gem_restricted_path} ${o3de_gem_path} ${o3de_gem_name}) +o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} "${gem_restricted_path}" "${gem_path}" "${gem_name}") # Now that we have the platform abstraction layer (PAL) folder for this folder, thats where we will find the # traits for this platform. Traits for a platform are defines for things like whether or not something in this gem diff --git a/Templates/PythonToolGem/Template/Code/CMakeLists.txt b/Templates/PythonToolGem/Template/Code/CMakeLists.txt index b90f2d7703..60773947fb 100644 --- a/Templates/PythonToolGem/Template/Code/CMakeLists.txt +++ b/Templates/PythonToolGem/Template/Code/CMakeLists.txt @@ -8,11 +8,11 @@ # Currently we are in the Code folder: ${CMAKE_CURRENT_LIST_DIR} # Get the platform specific folder ${pal_dir} for the current folder: ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} -# Note: ly_get_list_relative_pal_filename will take care of the details for us, as this may be a restricted platform +# Note: o3de_pal_dir will take care of the details for us, as this may be a restricted platform # in which case it will see if that platform is present here or in the restricted folder. # i.e. It could here in our gem : Gems/${Name}/Code/Platform/ or # //Gems/${Name}/Code -ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} ${o3de_gem_restricted_path} ${o3de_gem_path} ${o3de_gem_name}) +o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} "${gem_restricted_path}" "${gem_path}" "${gem_name}") # Now that we have the platform abstraction layer (PAL) folder for this folder, thats where we will find the # traits for this platform. Traits for a platform are defines for things like whether or not something in this gem From 26190a47eb51a5c5ff8694dd5bdaf81bd6152abc Mon Sep 17 00:00:00 2001 From: Chris Galvan Date: Thu, 17 Feb 2022 15:34:24 -0600 Subject: [PATCH 2/2] Fixed the broken links in the template widgets to the UI tools documentation Signed-off-by: Chris Galvan --- Templates/CppToolGem/Template/Code/Source/${Name}Widget.cpp | 2 +- .../Template/Editor/Scripts/${NameLower}_dialog.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Templates/CppToolGem/Template/Code/Source/${Name}Widget.cpp b/Templates/CppToolGem/Template/Code/Source/${Name}Widget.cpp index a5128fb192..278fa7f4cc 100644 --- a/Templates/CppToolGem/Template/Code/Source/${Name}Widget.cpp +++ b/Templates/CppToolGem/Template/Code/Source/${Name}Widget.cpp @@ -26,7 +26,7 @@ namespace ${SanitizedCppName} mainLayout->addWidget(introLabel, 0, Qt::AlignCenter); QString helpText = QString( - "For help getting started, visit the UI Development documentation
or come ask a question in the sig-ui-ux channel on Discord"); + "For help getting started, visit the UI Development documentation
or come ask a question in the sig-ui-ux channel on Discord"); QLabel* helpLabel = new QLabel(this); helpLabel->setTextFormat(Qt::RichText); diff --git a/Templates/PythonToolGem/Template/Editor/Scripts/${NameLower}_dialog.py b/Templates/PythonToolGem/Template/Editor/Scripts/${NameLower}_dialog.py index 3a0e6c9a7b..9195dc046e 100644 --- a/Templates/PythonToolGem/Template/Editor/Scripts/${NameLower}_dialog.py +++ b/Templates/PythonToolGem/Template/Editor/Scripts/${NameLower}_dialog.py @@ -22,7 +22,7 @@ class ${SanitizedCppName}Dialog(QDialog): self.mainLayout.addWidget(self.introLabel, 0, Qt.AlignCenter) self.helpText = str("For help getting started," - "visit the UI Development documentation
" + "visit the UI Development documentation
" "or come ask a question in the sig-ui-ux channel on Discord") self.helpLabel = QLabel()