diff --git a/Migration.md b/Migration.md index 4b73c7363b6..93eac4b5072 100644 --- a/Migration.md +++ b/Migration.md @@ -31,7 +31,8 @@ release will remove the deprecated code. * `IGN_GAZEBO_PLUGIN_INSTALL_DIR` * `IGN_GAZEBO_GUI_PLUGIN_INSTALL_DIR` * `IGN_GAZEBO_WORLD_INSTALL_DIR` - +* `ignitionGazeboVersion()` is deprecated and will be removed in future versions. + Please use `gzSimVersion()` instead. ## Gazebo Sim 6.1 to 6.2 diff --git a/src/cmd/cmdgazebo.rb.in b/src/cmd/cmdgazebo.rb.in index 2adbfb1b08a..6e275247797 100755 --- a/src/cmd/cmdgazebo.rb.in +++ b/src/cmd/cmdgazebo.rb.in @@ -353,11 +353,11 @@ has properly set the DYLD_LIBRARY_PATH environment variables." end # Read the library version. - Importer.extern 'char *ignitionGazeboVersion()' + Importer.extern 'char *gzSimVersion()' begin - plugin_version = Importer.ignitionGazeboVersion.to_s + plugin_version = Importer.gzSimVersion.to_s rescue DLError - puts "Library error: Problem running 'ignitionGazeboVersion()' from #{plugin}." + puts "Library error: Problem running 'gzSimVersion()' from #{plugin}." exit(-1) end diff --git a/src/ign.cc b/src/ign.cc index 2c03c1a8135..208f3c249d7 100644 --- a/src/ign.cc +++ b/src/ign.cc @@ -35,11 +35,16 @@ #include "gz/sim/gui/Gui.hh" ////////////////////////////////////////////////// -extern "C" char *ignitionGazeboVersion() +extern "C" char *gzSimVersion() { return strdup(GZ_SIM_VERSION_FULL); } +extern "C" char *ignitionGazeboVersion() +{ + return gzSimVersion(); +} + ////////////////////////////////////////////////// extern "C" char *gazeboVersionHeader() { diff --git a/src/ign.hh b/src/ign.hh index 5def2883285..d7a2b8c52e1 100644 --- a/src/ign.hh +++ b/src/ign.hh @@ -21,7 +21,8 @@ /// \brief External hook to read the library version. /// \return C-string representing the version. Ex.: 0.1.2 -extern "C" char *ignitionGazeboVersion(); +extern "C" char *gzSimVersion(); +extern "C" char GZ_DEPRECATED(7) *ignitionGazeboVersion(); /// \brief Get the Gazebo version header. /// \return C-string containing the Gazebo version information.