From 8dd38c6017d6c4342b1cdff0ede3f804091d1024 Mon Sep 17 00:00:00 2001 From: "Addisu Z. Taddese" Date: Thu, 14 Nov 2024 10:24:11 -0600 Subject: [PATCH 1/2] Add Gazebo classic end-of-life notice Signed-off-by: Addisu Z. Taddese --- gazebo/gazebo_shared.cc | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/gazebo/gazebo_shared.cc b/gazebo/gazebo_shared.cc index f477ddab0a..810ca0a9ca 100644 --- a/gazebo/gazebo_shared.cc +++ b/gazebo/gazebo_shared.cc @@ -27,6 +27,26 @@ void gazebo_shared::printVersion() { fprintf(stderr, "%s", GAZEBO_VERSION_HEADER); + const char* msg = R"( +# # ####### ####### ### ##### ####### +## # # # # # # # # +# # # # # # # # # +# # # # # # # # ##### +# # # # # # # # # +# ## # # # # # # # +# # ####### # ### ##### ####### + +This version of Gazebo, now called Gazebo classic, reaches end-of-life +in January 2025. Users are highly encouraged to migrate to the new Gazebo +using our migration guides (https://gazebosim.org/docs/latest/gazebo_classic_migration/) + + +)"; +#ifndef _WIN32 + fprintf(stderr, "\033[1;33m%s\033[0m", msg); +#else + fprintf(stderr, "%s",msg); +#endif } ///////////////////////////////////////////////// From c30e525b45ef5c60e9f44d89b5d9422facf92175 Mon Sep 17 00:00:00 2001 From: "Addisu Z. Taddese" Date: Thu, 14 Nov 2024 12:08:22 -0600 Subject: [PATCH 2/2] Add EOL notice to GUI Signed-off-by: Addisu Z. Taddese --- gazebo/gui/MainWindow.cc | 29 +++++++++++++++++++++++++++-- gazebo/gui/MainWindowPrivate.hh | 3 +++ 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/gazebo/gui/MainWindow.cc b/gazebo/gui/MainWindow.cc index 3fe883f77a..f7c2e81a1a 100644 --- a/gazebo/gui/MainWindow.cc +++ b/gazebo/gui/MainWindow.cc @@ -19,6 +19,7 @@ #include #include +#include #include #include @@ -626,7 +627,17 @@ void MainWindow::About() ""; helpTxt += GAZEBO_VERSION_HEADER; helpTxt += ""; - + helpTxt += R"( + +
+ This version of Gazebo, now called Gazebo classic, reaches end-of-life + in January 2025. Users are highly encouraged to migrate to the new Gazebo + using our + migration guides + +
+)"; helpTxt += "
" "
" "" @@ -1666,9 +1677,23 @@ void MainWindow::ShowMenuBar(QMenuBar *_bar) this->dataPtr->menuLayout->addWidget(this->dataPtr->menuBar); - this->dataPtr->menuLayout->addStretch(5); + if (!this->dataPtr->eolNotice) { + // Add Gazebo classic EOL notice label + this->dataPtr->eolNotice = new QLabel(this->dataPtr->menuBar); + this->dataPtr->eolNotice->setText(R"( + This version of Gazebo reaches end-of-life in January 2025. + Consider migrating to the new Gazebo)"); + this->dataPtr->menuLayout->addStretch(1); + this->dataPtr->menuLayout->addWidget(this->dataPtr->eolNotice); + } + + + this->dataPtr->menuLayout->addStretch(4); this->dataPtr->menuLayout->setContentsMargins(0, 0, 0, 0); + // OSX: // There is a problem on osx with the qt5 menubar being out of focus when // the application is launched from a terminal, so prevent using a native diff --git a/gazebo/gui/MainWindowPrivate.hh b/gazebo/gui/MainWindowPrivate.hh index acac1cb06a..0406755199 100644 --- a/gazebo/gui/MainWindowPrivate.hh +++ b/gazebo/gui/MainWindowPrivate.hh @@ -160,6 +160,9 @@ namespace gazebo // whether the file is atleast saved once or not. public: bool isSavedOnce = false; + + /// \brief Label for displaying the Gazebo classic EOL notice. + public: QLabel *eolNotice = nullptr; }; } }