Skip to content

Commit

Permalink
Add Gazebo classic end-of-life notice (#3405)
Browse files Browse the repository at this point in the history
Gazebo Classic is reaching EOL in 2025. This adds a notice to our users letting them know that and encouraging them to migrate to the new Gazebo

---------

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
  • Loading branch information
azeey authored Nov 15, 2024
1 parent 52ba9d7 commit 7d47c50
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 2 deletions.
20 changes: 20 additions & 0 deletions gazebo/gazebo_shared.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

/////////////////////////////////////////////////
Expand Down
29 changes: 27 additions & 2 deletions gazebo/gui/MainWindow.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

#include <ignition/math/Pose3.hh>
#include <ignition/transport/Node.hh>
#include <qlabel.h>
#include <sdf/sdf.hh>
#include <boost/algorithm/string.hpp>

Expand Down Expand Up @@ -626,7 +627,17 @@ void MainWindow::About()
"<td>";
helpTxt += GAZEBO_VERSION_HEADER;
helpTxt += "</td></tr></table>";

helpTxt += R"(
<table><tr>
<td style='background-color: #ffcc00;padding: 20px; font-weight: bold'>
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 <a style='color: #f58113'
href='https://gazebosim.org/docs/latest/gazebo_classic_migration/'>
migration guides
</a>
</td></tr></table>
)";
helpTxt += "<div style='margin-left: 10px'>"
"<div>"
"<table>"
Expand Down Expand Up @@ -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"(<font color='#ff9966'>
This version of Gazebo reaches end-of-life in January 2025.
Consider <a style='color: #ffcc00'
href='https://gazebosim.org/docs/latest/gazebo_classic_migration/
'>migrating to the new Gazebo</a></font>)");
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
Expand Down
3 changes: 3 additions & 0 deletions gazebo/gui/MainWindowPrivate.hh
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
}
}
Expand Down

1 comment on commit 7d47c50

@okalachev
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dislike. I'm sorry, but the new version completely sucks on macOS. It's unusable and also lacks features.

Please sign in to comment.