diff --git a/gazebo/gazebo_shared.cc b/gazebo/gazebo_shared.cc index 810ca0a9ca..d7dfdfce86 100644 --- a/gazebo/gazebo_shared.cc +++ b/gazebo/gazebo_shared.cc @@ -14,6 +14,8 @@ * limitations under the License. * */ +#include + #include #include "gazebo/transport/TransportIface.hh" @@ -27,6 +29,12 @@ void gazebo_shared::printVersion() { fprintf(stderr, "%s", GAZEBO_VERSION_HEADER); + + const char *ignoreEol = + gazebo::common::getEnv("GAZEBO_SUPPRESS_EOL_WARNING"); + if (ignoreEol != nullptr && strncmp(ignoreEol, "1", 1) == 0) + return; + const char* msg = R"( # # ####### ####### ### ##### ####### ## # # # # # # # # diff --git a/gazebo/gui/MainWindow.cc b/gazebo/gui/MainWindow.cc index f7c2e81a1a..57b155ea15 100644 --- a/gazebo/gui/MainWindow.cc +++ b/gazebo/gui/MainWindow.cc @@ -1678,15 +1678,18 @@ void MainWindow::ShowMenuBar(QMenuBar *_bar) this->dataPtr->menuLayout->addWidget(this->dataPtr->menuBar); 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); + const char *ignoreEol = common::getEnv("GAZEBO_SUPPRESS_EOL_WARNING"); + if (ignoreEol == nullptr || strncmp(ignoreEol, "1", 1) != 0) { + // 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); + } }