From 299f42e8c53ecd1e8deb4edf3dd5215bb6a44807 Mon Sep 17 00:00:00 2001 From: Matthijs van der Burgh Date: Fri, 26 Apr 2024 14:54:26 +0200 Subject: [PATCH] [qtcreator] update env vars --- qtcreator/README.md | 2 +- qtcreator/setup | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/qtcreator/README.md b/qtcreator/README.md index bb8f69017..9fe0560da 100644 --- a/qtcreator/README.md +++ b/qtcreator/README.md @@ -5,7 +5,7 @@ After installation the following still needs to be done to configure QtCreator w 1. Open QtCreator 2. Open Tools -> Options 3. Select the 'Build & Run' page on the left. - - In the 'General' tab change projects directory to `%{Env:TUE_SYSTEM_DIR}/src` + - In the 'General' tab change projects directory to `%{Env:TUE_ENV_WS_DIR}/src` - In 'Default Build Properties' tab change 'Default build directory' to `%{Env:CURRENT_CMAKE_BUILD_DIR}/%{Project:Name}` This matches the instructions from the [ROS Wiki](http://wiki.ros.org/IDEs#QtCreator) diff --git a/qtcreator/setup b/qtcreator/setup index 32bb7b267..487c1c75c 100644 --- a/qtcreator/setup +++ b/qtcreator/setup @@ -5,12 +5,13 @@ function qtcreator /opt/Qt/Tools/QtCreator/bin/qtcreator.sh } -if [[ "${TUE_ROS_VERSION}" -eq 1 ]] +[[ -v TUE_ENV_ROS_VERSION || -v TUE_ROS_VERSION ]] || { TUE_ENV_ROS_VERSION=${TUE_ROS_VERSION}; >&2 echo "Change the config of your environment to use 'TUE_ENV_ROS_VERSION' instead of 'TUE_ROS_VERSION'"; } +if [[ "${TUE_ENV_ROS_VERSION}" -eq 1 ]] then # Make sure packages can be build by QT - CURRENT_CMAKE_BUILD_DIR=$(catkin locate --workspace "${TUE_SYSTEM_DIR}" --build 2>/dev/null) + CURRENT_CMAKE_BUILD_DIR=$(catkin locate --workspace "${TUE_ENV_WS_DIR}" --build 2>/dev/null) else - CURRENT_CMAKE_BUILD_DIR="${TUE_SYSTEM_DIR}"/build + CURRENT_CMAKE_BUILD_DIR="${TUE_ENV_WS_DIR}"/build fi export CURRENT_CMAKE_BUILD_DIR