From 2a1ddee1590ee1934db13e4906ea1c6bdb296af4 Mon Sep 17 00:00:00 2001 From: methylDragon Date: Wed, 13 Jul 2022 16:09:15 -0700 Subject: [PATCH 1/3] Finale: CMake var followups, docs, and paths Signed-off-by: methylDragon --- .github/ci/packages.apt | 6 ++-- .github/workflows/ci.yml | 4 +-- .github/workflows/pr-collection-labeler.yml | 2 +- MigrationFromCommon.md | 32 +++++++++---------- README.md | 2 +- api.md.in | 4 +-- appveyor.yml | 2 +- core/CMakeLists.txt | 2 +- .../gz/plugin/detail/SpecializedPlugin.hh | 8 ++--- examples/CMakeLists.txt | 2 +- examples/integrators.cc | 2 +- examples/plugins/RungeKutta4.cc | 2 +- examples/robot.cc | 2 +- loader/CMakeLists.txt | 2 +- loader/conf/CMakeLists.txt | 18 +++++------ loader/src/cmd/CMakeLists.txt | 14 ++++---- loader/src/cmd/cmdplugin.rb.in | 2 +- loader/src/cmd/gz.hh | 4 +-- register/CMakeLists.txt | 2 +- register/include/gz/plugin/detail/Register.hh | 18 +++++------ test/integration/plugin.cc | 4 +-- test/integration/templated_plugins.cc | 4 +-- test/performance/CMakeLists.txt | 2 +- tutorials.md.in | 4 +-- tutorials/02_installation.md | 16 +++++----- 25 files changed, 80 insertions(+), 80 deletions(-) diff --git a/.github/ci/packages.apt b/.github/ci/packages.apt index 68e02eca..47929314 100644 --- a/.github/ci/packages.apt +++ b/.github/ci/packages.apt @@ -1,3 +1,3 @@ -libignition-cmake3-dev -libignition-tools2-dev -libignition-utils2-cli-dev +libgz-cmake3-dev +libgz-tools2-dev +libgz-utils2-cli-dev diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b4b8a356..54d4e3ab 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: uses: actions/checkout@v2 - name: Compile and test id: ci - uses: ignition-tooling/action-ignition-ci@focal + uses: gazebo-tooling/action-gz-ci@focal with: codecov-enabled: true cppcheck-enabled: true @@ -25,4 +25,4 @@ jobs: uses: actions/checkout@v2 - name: Compile and test id: ci - uses: ignition-tooling/action-ignition-ci@jammy + uses: gazebo-tooling/action-gz-ci@jammy diff --git a/.github/workflows/pr-collection-labeler.yml b/.github/workflows/pr-collection-labeler.yml index 7d7b4e17..38c4fc13 100644 --- a/.github/workflows/pr-collection-labeler.yml +++ b/.github/workflows/pr-collection-labeler.yml @@ -8,6 +8,6 @@ jobs: steps: - name: Add collection labels if: github.event.action == 'opened' - uses: ignition-tooling/pr-collection-labeler@v1 + uses: gazebo-tooling/pr-collection-labeler@v1 with: github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/MigrationFromCommon.md b/MigrationFromCommon.md index 3aa521af..1cd1fac3 100644 --- a/MigrationFromCommon.md +++ b/MigrationFromCommon.md @@ -1,17 +1,17 @@ # Migration Instructions (from common::Plugin) -This file provides migration instructions for `ignition` library developers to +This file provides migration instructions for `gz` library developers to replace the `gz-common` plugin framework with the `gz-plugin` framework. Some of the instructions here may also be useful to new adopters of `gz-plugin`. -# Linking to ignition-plugin +# Linking to gz-plugin `gz-plugin` has three components: `core`, `loader`, and `register`. Code that just wants to use `PluginPtr` objects can link to `core`, e.g.: ``` -target_link_libraries(my_target PUBLIC ignition-plugin2::core) +target_link_libraries(my_target PUBLIC gz-plugin2::core) ``` However, if your code wants to be able to load plugins, it should link to the @@ -19,7 +19,7 @@ However, if your code wants to be able to load plugins, it should link to the need the `gz::plugin::Loader` class to be part of your library's API: ``` -target_link_libraries(my_target PRIVATE ignition-plugin2::loader) +target_link_libraries(my_target PRIVATE gz-plugin2::loader) ``` If `gz::plugin::PluginPtr` objects are part of your library's API, then @@ -28,9 +28,9 @@ you may want `loader` to be private while `core` is public: ``` target_link_libraries(my_target PUBLIC - ignition-plugin2::core + gz-plugin2::core PRIVATE - ignition-plugin2::loader + gz-plugin2::loader ) ``` @@ -39,23 +39,23 @@ then you should link against the `register` component. This should almost always be a private link, since plugin registration is purely internal for a library: ``` -target_link_libraries(my_plugin PRIVATE ignition-plugin2::register) +target_link_libraries(my_plugin PRIVATE gz-plugin2::register) ``` # Registering a plugin The name of the header for registering plugins has changed: -* `` should be replaced by `` +* `` should be replaced by `` The old `gz-common` plugin registration method had numerous macros for registering plugins. Those have all been replaced with `GZ_ADD_PLUGIN`. Specifically: -* `IGN_COMMON_REGISTER_SINGLE_MACRO` can be directly replaced with `GZ_ADD_PLUGIN`. -* `IGN_COMMON_ADD_PLUGIN` can be directly replaced with `GZ_ADD_PLUGIN`. -* All uses of `IGN_COMMON_BEGIN_ADDING_PLUGINS` can simply be removed. -* All uses of `IGN_COMMON_FINISH_ADDING_PLUGINS` can simply be removed. -* All uses of `IGN_COMMON_SPECIALIZE_INTERFACE` can simply be removed. Interfaces no longer need to be "specialized" in order to have specialized plugins. +* `IGNITION_COMMON_REGISTER_SINGLE_MACRO` can be directly replaced with `GZ_ADD_PLUGIN`. +* `IGNITION_COMMON_ADD_PLUGIN` can be directly replaced with `GZ_ADD_PLUGIN`. +* All uses of `IGNITION_COMMON_BEGIN_ADDING_PLUGINS` can simply be removed. +* All uses of `IGNITION_COMMON_FINISH_ADDING_PLUGINS` can simply be removed. +* All uses of `IGNITION_COMMON_SPECIALIZE_INTERFACE` can simply be removed. Interfaces no longer need to be "specialized" in order to have specialized plugins. You can also register multiple interfaces with a single call to `GZ_ADD_PLUGIN`, e.g.: @@ -68,9 +68,9 @@ simply need to make sure that the compiler can resolve the names of the classes that you pass to it (and there will be a compilation error if it cannot). It is now possible to register plugins across **multiple translation units** -within a single library. To do this, use `#include ` +within a single library. To do this, use `#include ` in **exactly one** of your library's translation units, and then use -`#include ` in all other translation units. It +`#include ` in all other translation units. It does not matter which translation unit you choose to be the "first", as long as you choose exactly one. @@ -84,7 +84,7 @@ then you should continue to use it. It does not have a replacement in `gz-plugin Here is a list of things that you *should* replace: -* `#include ` should be replaced with `#include ` +* `#include ` should be replaced with `#include ` * `gz::common::PluginLoader` should be replaced with `gz::plugin::Loader` * When calling `Loader::Instantiate("....")` do **NOT** prefix the class name with `::`. E.g. `"::some_namespace::MyClass"` should now be `"some_namespace::MyClass"`. diff --git a/README.md b/README.md index 7e021238..760851e2 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Windows 7 | [![Build Status](https://build.osrfoundation.org/job/ignition_pl ** Library for registering plugin libraries and dynamically loading them at runtime.** -Gazebo Plugin is a component in the ignition framework, a set +Gazebo Plugin is a component in the Gazebo framework, a set of libraries designed to rapidly develop robot applications. [http://gazebosim.org](http://gazebosim.org) diff --git a/api.md.in b/api.md.in index 9bf3d8a2..e9222f8b 100644 --- a/api.md.in +++ b/api.md.in @@ -1,6 +1,6 @@ -## Gazebo @IGN_DESIGNATION_CAP@ +## Gazebo @GZ_DESIGNATION_CAP@ -Gazebo @IGN_DESIGNATION_CAP@ is a component in Gazebo, a set of libraries +Gazebo @GZ_DESIGNATION_CAP@ is a component in Gazebo, a set of libraries designed to rapidly develop robot and simulation applications. ## License diff --git a/appveyor.yml b/appveyor.yml index 23fd4023..58797551 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -10,7 +10,7 @@ environment: install: - vcpkg install dlfcn-win32 - # ign-cmake + # gz-cmake - git clone https://github.com/gazebosim/gz-cmake -b gz11 - cd gz-cmake - md build diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index ecbb5486..591ee0d0 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -17,4 +17,4 @@ gz_build_tests( add_subdirectory(include/gz/plugin) -install(DIRECTORY include/ignition DESTINATION ${IGN_INCLUDE_INSTALL_DIR_FULL}) +install(DIRECTORY include/gz DESTINATION ${GZ_INCLUDE_INSTALL_DIR_FULL}) diff --git a/core/include/gz/plugin/detail/SpecializedPlugin.hh b/core/include/gz/plugin/detail/SpecializedPlugin.hh index d2d59747..b182297f 100644 --- a/core/include/gz/plugin/detail/SpecializedPlugin.hh +++ b/core/include/gz/plugin/detail/SpecializedPlugin.hh @@ -25,7 +25,7 @@ // This preprocessor token should only be used by the unittest that is // responsible for checking that the specialized routines are being used to // access specialized plugin interfaces. -#ifdef IGNITION_UNITTEST_SPECIALIZED_PLUGIN_ACCESS +#ifdef GZ_UNITTEST_SPECIALIZED_PLUGIN_ACCESS bool usedSpecializedInterfaceAccess; #endif @@ -105,7 +105,7 @@ namespace gz SpecInterface *SpecializedPlugin::PrivateQueryInterface( type) { - #ifdef IGNITION_UNITTEST_SPECIALIZED_PLUGIN_ACCESS + #ifdef GZ_UNITTEST_SPECIALIZED_PLUGIN_ACCESS usedSpecializedInterfaceAccess = true; #endif return static_cast( @@ -126,7 +126,7 @@ namespace gz const SpecInterface *SpecializedPlugin:: PrivateQueryInterface(type) const { - #ifdef IGNITION_UNITTEST_SPECIALIZED_PLUGIN_ACCESS + #ifdef GZ_UNITTEST_SPECIALIZED_PLUGIN_ACCESS usedSpecializedInterfaceAccess = true; #endif return static_cast( @@ -147,7 +147,7 @@ namespace gz bool SpecializedPlugin::PrivateHasInterface( type) const { - #ifdef IGNITION_UNITTEST_SPECIALIZED_PLUGIN_ACCESS + #ifdef GZ_UNITTEST_SPECIALIZED_PLUGIN_ACCESS usedSpecializedInterfaceAccess = true; #endif return (nullptr != this->privateSpecializedInterfaceIterator->second); diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index d3eede41..13c14a56 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -39,7 +39,7 @@ foreach(example_file ${example_files}) # to set it for all the examples. target_compile_definitions(${example} PRIVATE - "IGN_PLUGIN_EXAMPLES_LIBDIR=\"${PLUGIN_LIBDIR}\"") + "GZ_PLUGIN_EXAMPLES_LIBDIR=\"${PLUGIN_LIBDIR}\"") if(Boost_PROGRAM_OPTIONS_FOUND) target_link_libraries(${example} PRIVATE ${Boost_PROGRAM_OPTIONS_LIBRARIES}) diff --git a/examples/integrators.cc b/examples/integrators.cc index f014714e..eba502ce 100644 --- a/examples/integrators.cc +++ b/examples/integrators.cc @@ -38,7 +38,7 @@ using ODESystemFactory = gz::plugin::examples::ODESystemFactory; // The macro that this uses is provided as a compile definition in the // examples/CMakeLists.txt file. -const std::string PluginLibDir = IGN_PLUGIN_EXAMPLES_LIBDIR; +const std::string PluginLibDir = GZ_PLUGIN_EXAMPLES_LIBDIR; /// \brief Return structure for numerical integration test results. If the name /// is blank, that means the test was not run. diff --git a/examples/plugins/RungeKutta4.cc b/examples/plugins/RungeKutta4.cc index 92753bc4..511b3bf0 100644 --- a/examples/plugins/RungeKutta4.cc +++ b/examples/plugins/RungeKutta4.cc @@ -86,7 +86,7 @@ class Integrator : public gz::plugin::examples::NumericalIntegrator const State &yn = _state; // TODO: If we ever start to leverage Eigen or another linear algebra - // library besides ign-math, then clean up these expressions. + // library besides gz-math, then clean up these expressions. const Derivative &k1 = function(tn, yn); const Derivative &k2 = function(tn + h/2.0, add(yn, times(h/2.0, k1))); const Derivative &k3 = function(tn + h/2.0, add(yn, times(h/2.0, k2))); diff --git a/examples/robot.cc b/examples/robot.cc index bc7c75e7..74e4acc0 100644 --- a/examples/robot.cc +++ b/examples/robot.cc @@ -34,7 +34,7 @@ namespace bpo = boost::program_options; ///////////////////////////////////////////////// // The macro that this uses is provided as a compile definition in the // examples/CMakeLists.txt file. -const std::string PluginLibDir = IGN_PLUGIN_EXAMPLES_LIBDIR; +const std::string PluginLibDir = GZ_PLUGIN_EXAMPLES_LIBDIR; ///////////////////////////////////////////////// using namespace gz::plugin::examples; diff --git a/loader/CMakeLists.txt b/loader/CMakeLists.txt index b4cd4751..a9432938 100644 --- a/loader/CMakeLists.txt +++ b/loader/CMakeLists.txt @@ -50,7 +50,7 @@ endif() install( DIRECTORY include/ - DESTINATION ${IGN_INCLUDE_INSTALL_DIR_FULL}) + DESTINATION ${GZ_INCLUDE_INSTALL_DIR_FULL}) #============================================================================ # gz command line support diff --git a/loader/conf/CMakeLists.txt b/loader/conf/CMakeLists.txt index 289faab3..c35c7e7a 100644 --- a/loader/conf/CMakeLists.txt +++ b/loader/conf/CMakeLists.txt @@ -1,27 +1,27 @@ # Used only for internal testing. -set(gz_library_path "${CMAKE_BINARY_DIR}/test/lib/$/ruby/gz/cmd${IGN_DESIGNATION}${PROJECT_VERSION_MAJOR}") +set(gz_library_path "${CMAKE_BINARY_DIR}/test/lib/$/ruby/gz/cmd${GZ_DESIGNATION}${PROJECT_VERSION_MAJOR}") # Generate a configuration file for internal testing. # Note that the major version of the library is included in the name. # Ex: plugin2.yaml configure_file( - "${IGN_DESIGNATION}.yaml.in" - "${CMAKE_CURRENT_BINARY_DIR}/${IGN_DESIGNATION}${PROJECT_VERSION_MAJOR}.yaml.configured" @ONLY) + "${GZ_DESIGNATION}.yaml.in" + "${CMAKE_CURRENT_BINARY_DIR}/${GZ_DESIGNATION}${PROJECT_VERSION_MAJOR}.yaml.configured" @ONLY) file(GENERATE - OUTPUT "${CMAKE_BINARY_DIR}/test/conf/$/${IGN_DESIGNATION}${PROJECT_VERSION_MAJOR}.yaml" - INPUT "${CMAKE_CURRENT_BINARY_DIR}/${IGN_DESIGNATION}${PROJECT_VERSION_MAJOR}.yaml.configured") + OUTPUT "${CMAKE_BINARY_DIR}/test/conf/$/${GZ_DESIGNATION}${PROJECT_VERSION_MAJOR}.yaml" + INPUT "${CMAKE_CURRENT_BINARY_DIR}/${GZ_DESIGNATION}${PROJECT_VERSION_MAJOR}.yaml.configured") # Used for the installed version. -set(gz_library_path "${CMAKE_INSTALL_PREFIX}/lib/ruby/gz/cmd${IGN_DESIGNATION}${PROJECT_VERSION_MAJOR}") +set(gz_library_path "${CMAKE_INSTALL_PREFIX}/lib/ruby/gz/cmd${GZ_DESIGNATION}${PROJECT_VERSION_MAJOR}") # Generate the configuration file that is installed. # Note that the major version of the library is included in the name. # Ex: plugin2.yaml configure_file( - "${IGN_DESIGNATION}.yaml.in" - "${CMAKE_CURRENT_BINARY_DIR}/${IGN_DESIGNATION}${PROJECT_VERSION_MAJOR}.yaml" @ONLY) + "${GZ_DESIGNATION}.yaml.in" + "${CMAKE_CURRENT_BINARY_DIR}/${GZ_DESIGNATION}${PROJECT_VERSION_MAJOR}.yaml" @ONLY) # Install the yaml configuration files in an unversioned location. -install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${IGN_DESIGNATION}${PROJECT_VERSION_MAJOR}.yaml +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${GZ_DESIGNATION}${PROJECT_VERSION_MAJOR}.yaml DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/gz/) diff --git a/loader/src/cmd/CMakeLists.txt b/loader/src/cmd/CMakeLists.txt index 74b2dffd..5dd10665 100644 --- a/loader/src/cmd/CMakeLists.txt +++ b/loader/src/cmd/CMakeLists.txt @@ -12,7 +12,7 @@ target_link_libraries(${plugin_executable} ${loader} ) -set(EXE_INSTALL_DIR "${CMAKE_INSTALL_LIBEXECDIR}/gz/${IGN_DESIGNATION}${PROJECT_VERSION_MAJOR}") +set(EXE_INSTALL_DIR "${CMAKE_INSTALL_LIBEXECDIR}/gz/${GZ_DESIGNATION}${PROJECT_VERSION_MAJOR}") install( TARGETS @@ -25,15 +25,15 @@ install( # Generate the ruby script for internal testing. # Note that the major version of the library is included in the name. # Ex: cmdplugin2.rb -set(cmd_script_generated_test "${CMAKE_BINARY_DIR}/test/lib/$/ruby/gz/cmd${IGN_DESIGNATION}${PROJECT_VERSION_MAJOR}.rb") -set(cmd_script_configured_test "${CMAKE_CURRENT_BINARY_DIR}/test_cmd${IGN_DESIGNATION}${PROJECT_VERSION_MAJOR}.rb.configured") +set(cmd_script_generated_test "${CMAKE_BINARY_DIR}/test/lib/$/ruby/gz/cmd${GZ_DESIGNATION}${PROJECT_VERSION_MAJOR}.rb") +set(cmd_script_configured_test "${CMAKE_CURRENT_BINARY_DIR}/test_cmd${GZ_DESIGNATION}${PROJECT_VERSION_MAJOR}.rb.configured") # Set the library_location variable to the full path of the library file within # the build directory. set(plugin_exe_location "$") configure_file( - "cmd${IGN_DESIGNATION}.rb.in" + "cmd${GZ_DESIGNATION}.rb.in" "${cmd_script_configured_test}" @ONLY) @@ -47,15 +47,15 @@ file(GENERATE # Generate the ruby script that gets installed. # Note that the major version of the library is included in the name. # Ex: cmdplugin2.rb -set(cmd_script_generated "${CMAKE_CURRENT_BINARY_DIR}/$/cmd${IGN_DESIGNATION}${PROJECT_VERSION_MAJOR}.rb") -set(cmd_script_configured "${CMAKE_CURRENT_BINARY_DIR}/cmd${IGN_DESIGNATION}${PROJECT_VERSION_MAJOR}.rb.configured") +set(cmd_script_generated "${CMAKE_CURRENT_BINARY_DIR}/$/cmd${GZ_DESIGNATION}${PROJECT_VERSION_MAJOR}.rb") +set(cmd_script_configured "${CMAKE_CURRENT_BINARY_DIR}/cmd${GZ_DESIGNATION}${PROJECT_VERSION_MAJOR}.rb.configured") # Set the library_location variable to the relative path to the library file # within the install directory structure. set(plugin_exe_location "../../../${EXE_INSTALL_DIR}/$") configure_file( - "cmd${IGN_DESIGNATION}.rb.in" + "cmd${GZ_DESIGNATION}.rb.in" "${cmd_script_configured}" @ONLY) diff --git a/loader/src/cmd/cmdplugin.rb.in b/loader/src/cmd/cmdplugin.rb.in index d5f30501..936791e7 100644 --- a/loader/src/cmd/cmdplugin.rb.in +++ b/loader/src/cmd/cmdplugin.rb.in @@ -23,7 +23,7 @@ COMMANDS = { } # -# Class for the Ignition @IGN_DESIGNATION@ command line tools. +# Class for the Gazebo @GZ_DESIGNATION@ command line tools. # class Cmd def execute(args) diff --git a/loader/src/cmd/gz.hh b/loader/src/cmd/gz.hh index 2db58ad2..12741fc8 100644 --- a/loader/src/cmd/gz.hh +++ b/loader/src/cmd/gz.hh @@ -15,8 +15,8 @@ * */ -#ifndef GZ_PLUGIN_IGN_HH_ -#define GZ_PLUGIN_IGN_HH_ +#ifndef GZ_PLUGIN_GZ_HH_ +#define GZ_PLUGIN_GZ_HH_ #include "gz/plugin/Export.hh" diff --git a/register/CMakeLists.txt b/register/CMakeLists.txt index fc0034f3..a0a69f91 100644 --- a/register/CMakeLists.txt +++ b/register/CMakeLists.txt @@ -2,4 +2,4 @@ gz_add_component(register INTERFACE) install( DIRECTORY include/ - DESTINATION ${IGN_INCLUDE_INSTALL_DIR_FULL}) + DESTINATION ${GZ_INCLUDE_INSTALL_DIR_FULL}) diff --git a/register/include/gz/plugin/detail/Register.hh b/register/include/gz/plugin/detail/Register.hh index 9410e882..a592a0aa 100644 --- a/register/include/gz/plugin/detail/Register.hh +++ b/register/include/gz/plugin/detail/Register.hh @@ -32,21 +32,21 @@ #include -#ifdef DETAIL_GZ_PLUGIN_VISIBLE - #undef DETAIL_GZ_PLUGIN_VISIBLE +#ifdef DETAIL_IGNITION_PLUGIN_VISIBLE + #undef DETAIL_IGNITION_PLUGIN_VISIBLE #endif #if defined _WIN32 || defined __CYGWIN__ #ifdef __GNUC__ - #define DETAIL_GZ_PLUGIN_VISIBLE __attribute__ ((dllexport)) + #define DETAIL_IGNITION_PLUGIN_VISIBLE __attribute__ ((dllexport)) #else - #define DETAIL_GZ_PLUGIN_VISIBLE __declspec(dllexport) + #define DETAIL_IGNITION_PLUGIN_VISIBLE __declspec(dllexport) #endif #else #if __GNUC__ >= 4 - #define DETAIL_GZ_PLUGIN_VISIBLE __attribute__ ((visibility ("default"))) + #define DETAIL_IGNITION_PLUGIN_VISIBLE __attribute__ ((visibility ("default"))) #else - #define DETAIL_GZ_PLUGIN_VISIBLE + #define DETAIL_IGNITION_PLUGIN_VISIBLE #endif #endif @@ -59,7 +59,7 @@ extern "C" /// retrieve Info from a shared library that provides plugins. /// /// The symbol is explicitly exported (visibility is turned on) using - /// DETAIL_GZ_PLUGIN_VISIBLE to ensure that dlsym(~) is able to find it. + /// DETAIL_IGNITION_PLUGIN_VISIBLE to ensure that dlsym(~) is able to find it. /// /// DO NOT CALL THIS FUNCTION DIRECTLY OR CREATE YOUR OWN IMPLEMENTATION OF IT /// This function is used by the Registrar and Loader classes. Nothing else @@ -73,7 +73,7 @@ extern "C" /// \param[out] _outputAllInfo /// Loader will pass in a pointer to a pointer of an InfoMap pertaining to /// the highest API version that it knows of. If this GzPluginHook was - /// built against a version of ign-plugin that provides an equal or greater + /// built against a version of gz-plugin that provides an equal or greater /// API version, then GzPluginHook will modify *_outputAllInfo to /// point at its internal &InfoMap that corresponds to the requested API /// version, which is identified by _inputAndOutputAPIVersion. @@ -104,7 +104,7 @@ extern "C" /// Similar to _inputAndOutputInfoSize, this is used for sanity checking. It /// inspects and returns the alignof(Info) value instead of the sizeof(Info) /// value. - DETAIL_GZ_PLUGIN_VISIBLE void GzPluginHook( + DETAIL_IGNITION_PLUGIN_VISIBLE void GzPluginHook( const void *_inputSingleInfo, const void ** const _outputAllInfo, int *_inputAndOutputAPIVersion, diff --git a/test/integration/plugin.cc b/test/integration/plugin.cc index 2f40a0aa..f3933523 100644 --- a/test/integration/plugin.cc +++ b/test/integration/plugin.cc @@ -15,10 +15,10 @@ * */ -// Defining this macro before including ignition/plugin/SpecializedPluginPtr.hh +// Defining this macro before including gz/plugin/SpecializedPluginPtr.hh // allows us to test that the high-speed routines are being used to access the // specialized plugin interfaces. -#define IGNITION_UNITTEST_SPECIALIZED_PLUGIN_ACCESS +#define GZ_UNITTEST_SPECIALIZED_PLUGIN_ACCESS #include #include diff --git a/test/integration/templated_plugins.cc b/test/integration/templated_plugins.cc index 63264485..182110a1 100644 --- a/test/integration/templated_plugins.cc +++ b/test/integration/templated_plugins.cc @@ -15,10 +15,10 @@ * */ -// Defining this macro before including ignition/plugin/SpecializedPluginPtr.hh +// Defining this macro before including gz/plugin/SpecializedPluginPtr.hh // allows us to test that the high-speed routines are being used to access the // specialized plugin interfaces. -#define IGNITION_UNITTEST_SPECIALIZED_PLUGIN_ACCESS +#define GZ_UNITTEST_SPECIALIZED_PLUGIN_ACCESS #include diff --git a/test/performance/CMakeLists.txt b/test/performance/CMakeLists.txt index 001a533c..c2e75883 100644 --- a/test/performance/CMakeLists.txt +++ b/test/performance/CMakeLists.txt @@ -1,7 +1,7 @@ gz_get_sources(tests) # plugin_specialization test causes lcov to hang -# see ign-cmake issue 25 +# see gz-cmake issue 25 if("${CMAKE_BUILD_TYPE_UPPERCASE}" STREQUAL "COVERAGE") list(REMOVE_ITEM tests plugin_specialization.cc) diff --git a/tutorials.md.in b/tutorials.md.in index 6e28279c..e42f1f31 100644 --- a/tutorials.md.in +++ b/tutorials.md.in @@ -1,8 +1,8 @@ \page tutorials Tutorials -Welcome to the Gazebo @IGN_DESIGNATION_CAP@ tutorials. These tutorials +Welcome to the Gazebo @GZ_DESIGNATION_CAP@ tutorials. These tutorials will guide you through the process of understanding the capabilities of the -Gazebo @IGN_DESIGNATION_CAP@ library and how to use the library effectively. +Gazebo @GZ_DESIGNATION_CAP@ library and how to use the library effectively. **Contents** diff --git a/tutorials/02_installation.md b/tutorials/02_installation.md index bb8a0d77..333c5bc2 100644 --- a/tutorials/02_installation.md +++ b/tutorials/02_installation.md @@ -35,19 +35,19 @@ wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add - On Ubuntu systems, `apt-get` can be used to install `gz-plugin`: ```bash sudo apt-get update -sudo apt install libignition-plugin2-dev +sudo apt install libgz-plugin2-dev ``` ## Source Installation 1. Install Gazebo dependencies ``` - sudo apt-get install libignition-cmake3-dev libignition-tools2-dev libignition-utils2-cli-dev + sudo apt-get install libgz-cmake3-dev libgz-tools2-dev libgz-utils2-cli-dev ``` 1. Install Gazebo Tools if you want to use the `gz plugin` command line tool: ```bash - sudo apt-get install ignition-tools2 + sudo apt-get install gz-tools2 2. Clone the repository ```bash @@ -88,7 +88,7 @@ Sierra (10.12) or later. 2. Run the following commands ```bash brew tap osrf/simulation - brew install ignition-plugin2 + brew install gz-plugin2 ``` ## Source Installation @@ -96,7 +96,7 @@ Sierra (10.12) or later. 1. Install dependencies ```bash brew tap osrf/simulation - brew install ignition-plugin2 --only-dependencies + brew install gz-plugin2 --only-dependencies ``` 2. Clone the repository @@ -135,7 +135,7 @@ conda activate gz-ws ## Binary Installation ```bash -conda install libignition-plugin<#> --channel conda-forge +conda install libgz-plugin<#> --channel conda-forge ``` Be sure to replace `<#>` with a number value, such as 2 or 3, depending on @@ -149,12 +149,12 @@ This assumes you have created and activated a Conda environment while installing You can view available versions and their dependencies: ```bash - conda search libignition-plugin* --channel conda-forge --info + conda search libgz-plugin* --channel conda-forge --info ``` Install dependencies, replacing `<#>` with the desired version: ```bash - conda install libignition-cmake<#> --channel conda-forge + conda install libgz-cmake<#> --channel conda-forge ``` 2. Navigate to where you would like to build the library, and clone the repository. From b91ad987de8b61f0ec154d25bf9881c9e66d4052 Mon Sep 17 00:00:00 2001 From: methylDragon Date: Wed, 13 Jul 2022 17:53:28 -0700 Subject: [PATCH 2/3] Finale: Tick-tock IgnitionFormatter Signed-off-by: methylDragon --- MigrationFromCommon.md | 10 +++++----- loader/src/cmd/plugin_main.cc | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/MigrationFromCommon.md b/MigrationFromCommon.md index 1cd1fac3..47a37d51 100644 --- a/MigrationFromCommon.md +++ b/MigrationFromCommon.md @@ -51,11 +51,11 @@ The name of the header for registering plugins has changed: The old `gz-common` plugin registration method had numerous macros for registering plugins. Those have all been replaced with `GZ_ADD_PLUGIN`. Specifically: -* `IGNITION_COMMON_REGISTER_SINGLE_MACRO` can be directly replaced with `GZ_ADD_PLUGIN`. -* `IGNITION_COMMON_ADD_PLUGIN` can be directly replaced with `GZ_ADD_PLUGIN`. -* All uses of `IGNITION_COMMON_BEGIN_ADDING_PLUGINS` can simply be removed. -* All uses of `IGNITION_COMMON_FINISH_ADDING_PLUGINS` can simply be removed. -* All uses of `IGNITION_COMMON_SPECIALIZE_INTERFACE` can simply be removed. Interfaces no longer need to be "specialized" in order to have specialized plugins. +* `IGN_COMMON_REGISTER_SINGLE_MACRO` can be directly replaced with `GZ_ADD_PLUGIN`. +* `IGN_COMMON_ADD_PLUGIN` can be directly replaced with `GZ_ADD_PLUGIN`. +* All uses of `IGN_COMMON_BEGIN_ADDING_PLUGINS` can simply be removed. +* All uses of `IGN_COMMON_FINISH_ADDING_PLUGINS` can simply be removed. +* All uses of `IGN_COMMON_SPECIALIZE_INTERFACE` can simply be removed. Interfaces no longer need to be "specialized" in order to have specialized plugins. You can also register multiple interfaces with a single call to `GZ_ADD_PLUGIN`, e.g.: diff --git a/loader/src/cmd/plugin_main.cc b/loader/src/cmd/plugin_main.cc index f831c9d5..3da8e95e 100644 --- a/loader/src/cmd/plugin_main.cc +++ b/loader/src/cmd/plugin_main.cc @@ -89,6 +89,6 @@ int main(int argc, char** argv) addPluginFlags(app); - app.formatter(std::make_shared(&app)); + app.formatter(std::make_shared(&app)); CLI11_PARSE(app, argc, argv); } From ba71a7a7cd811b63f654afcf69a0c198a761877d Mon Sep 17 00:00:00 2001 From: methylDragon Date: Thu, 14 Jul 2022 18:17:03 -0700 Subject: [PATCH 3/3] Finale: Hard-tock DETAIL_IGNITION_PLUGIN_VISIBLE Signed-off-by: methylDragon --- register/include/gz/plugin/detail/Register.hh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/register/include/gz/plugin/detail/Register.hh b/register/include/gz/plugin/detail/Register.hh index a592a0aa..9693a84c 100644 --- a/register/include/gz/plugin/detail/Register.hh +++ b/register/include/gz/plugin/detail/Register.hh @@ -32,21 +32,21 @@ #include -#ifdef DETAIL_IGNITION_PLUGIN_VISIBLE - #undef DETAIL_IGNITION_PLUGIN_VISIBLE +#ifdef DETAIL_GZ_PLUGIN_VISIBLE + #undef DETAIL_GZ_PLUGIN_VISIBLE #endif #if defined _WIN32 || defined __CYGWIN__ #ifdef __GNUC__ - #define DETAIL_IGNITION_PLUGIN_VISIBLE __attribute__ ((dllexport)) + #define DETAIL_GZ_PLUGIN_VISIBLE __attribute__ ((dllexport)) #else - #define DETAIL_IGNITION_PLUGIN_VISIBLE __declspec(dllexport) + #define DETAIL_GZ_PLUGIN_VISIBLE __declspec(dllexport) #endif #else #if __GNUC__ >= 4 - #define DETAIL_IGNITION_PLUGIN_VISIBLE __attribute__ ((visibility ("default"))) + #define DETAIL_GZ_PLUGIN_VISIBLE __attribute__ ((visibility ("default"))) #else - #define DETAIL_IGNITION_PLUGIN_VISIBLE + #define DETAIL_GZ_PLUGIN_VISIBLE #endif #endif @@ -59,7 +59,7 @@ extern "C" /// retrieve Info from a shared library that provides plugins. /// /// The symbol is explicitly exported (visibility is turned on) using - /// DETAIL_IGNITION_PLUGIN_VISIBLE to ensure that dlsym(~) is able to find it. + /// DETAIL_GZ_PLUGIN_VISIBLE to ensure that dlsym(~) is able to find it. /// /// DO NOT CALL THIS FUNCTION DIRECTLY OR CREATE YOUR OWN IMPLEMENTATION OF IT /// This function is used by the Registrar and Loader classes. Nothing else @@ -104,7 +104,7 @@ extern "C" /// Similar to _inputAndOutputInfoSize, this is used for sanity checking. It /// inspects and returns the alignof(Info) value instead of the sizeof(Info) /// value. - DETAIL_IGNITION_PLUGIN_VISIBLE void GzPluginHook( + DETAIL_GZ_PLUGIN_VISIBLE void GzPluginHook( const void *_inputSingleInfo, const void ** const _outputAllInfo, int *_inputAndOutputAPIVersion,