From a2ba942aae4549abe22c20134f59af4232f94036 Mon Sep 17 00:00:00 2001 From: methylDragon Date: Thu, 19 May 2022 23:39:51 -0700 Subject: [PATCH] Migrate IGN(ITION)_GUI_XXX macros and variables Signed-off-by: methylDragon --- .github/ci/after_make.sh | 2 +- CMakeLists.txt | 2 +- README.md | 6 +++--- src/Application.cc | 4 ++-- src/ign.cc | 2 +- src/plugins/CMakeLists.txt | 2 +- src/plugins/grid_config/CMakeLists.txt | 2 +- tutorials/03_plugins.md | 2 +- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/ci/after_make.sh b/.github/ci/after_make.sh index e2801d7a5..917f84557 100644 --- a/.github/ci/after_make.sh +++ b/.github/ci/after_make.sh @@ -6,7 +6,7 @@ set -x make install # For ign-tools -export IGN_CONFIG_PATH=/usr/local/share/ignition +export GZ_CONFIG_PATH=/usr/local/share/ignition export LD_LIBRARY_PATH=/usr/local/lib/:$LD_LIBRARY_PATH # For rendering / window tests diff --git a/CMakeLists.txt b/CMakeLists.txt index aa5637b1a..6dbaea5fa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -90,7 +90,7 @@ ign_find_package (Qt5 PKGCONFIG "Qt5Core Qt5Quick Qt5QuickControls2 Qt5Widgets" ) -set(IGNITION_GUI_PLUGIN_INSTALL_DIR +set(GZ_GUI_PLUGIN_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/${IGN_LIB_INSTALL_DIR}/ign-${IGN_DESIGNATION}-${PROJECT_VERSION_MAJOR}/plugins ) diff --git a/README.md b/README.md index ea1bf1bf4..a5667f443 100644 --- a/README.md +++ b/README.md @@ -64,15 +64,15 @@ In the event that the installation is a mix of Debian and from source, command line tools from `ign-tools` may not work correctly. A workaround for a single package is to define the environment variable -`IGN_CONFIG_PATH` to point to the location of the Ignition library installation, +`GZ_CONFIG_PATH` to point to the location of the Ignition library installation, where the YAML file for the package is found, such as ``` -export IGN_CONFIG_PATH=/usr/local/share/ignition +export GZ_CONFIG_PATH=/usr/local/share/ignition ``` Multiple paths can be specified using the `:` delimiter. For example, ``` -export IGN_CONFIG_PATH=/user/local/share/ignition/:/path/to/some/other/location +export GZ_CONFIG_PATH=/user/local/share/ignition/:/path/to/some/other/location ``` # Folder Structure diff --git a/src/Application.cc b/src/Application.cc index 08a7266db..baf0a62fa 100644 --- a/src/Application.cc +++ b/src/Application.cc @@ -434,7 +434,7 @@ bool Application::LoadPlugin(const std::string &_filename, std::string home; common::env(IGN_HOMEDIR, home); systemPaths.AddPluginPaths(home + "/.ignition/gui/plugins:" + - IGN_GUI_PLUGIN_INSTALL_DIR); + GZ_GUI_PLUGIN_INSTALL_DIR); auto pathToLib = systemPaths.FindSharedLibrary(_filename); if (pathToLib.empty()) @@ -734,7 +734,7 @@ std::vector>> paths.push_back(home + "/.ignition/gui/plugins"); // 4. Install path - paths.push_back(IGN_GUI_PLUGIN_INSTALL_DIR); + paths.push_back(GZ_GUI_PLUGIN_INSTALL_DIR); // Populate map std::vector>> plugins; diff --git a/src/ign.cc b/src/ign.cc index d6f98222e..d00fb7def 100644 --- a/src/ign.cc +++ b/src/ign.cc @@ -48,7 +48,7 @@ void startConsoleLog() ////////////////////////////////////////////////// extern "C" GZ_GUI_VISIBLE char *ignitionVersion() { - return strdup(IGNITION_GUI_VERSION_FULL); + return strdup(GZ_GUI_VERSION_FULL); } ////////////////////////////////////////////////// diff --git a/src/plugins/CMakeLists.txt b/src/plugins/CMakeLists.txt index 4882f2237..486abef17 100644 --- a/src/plugins/CMakeLists.txt +++ b/src/plugins/CMakeLists.txt @@ -108,7 +108,7 @@ function(gz_gui_add_plugin plugin_name) COMPILE_FLAGS "/wd4251") endif() - install (TARGETS ${plugin_name} DESTINATION ${IGNITION_GUI_PLUGIN_INSTALL_DIR}) + install (TARGETS ${plugin_name} DESTINATION ${GZ_GUI_PLUGIN_INSTALL_DIR}) endfunction() # Plugins diff --git a/src/plugins/grid_config/CMakeLists.txt b/src/plugins/grid_config/CMakeLists.txt index 99f52d057..96859e985 100644 --- a/src/plugins/grid_config/CMakeLists.txt +++ b/src/plugins/grid_config/CMakeLists.txt @@ -11,4 +11,4 @@ gz_gui_add_plugin(GridConfig install ( FILES $ RENAME ${CMAKE_SHARED_LIBRARY_PREFIX}Grid3D${CMAKE_SHARED_LIBRARY_SUFFIX} - DESTINATION ${IGNITION_GUI_PLUGIN_INSTALL_DIR}) + DESTINATION ${GZ_GUI_PLUGIN_INSTALL_DIR}) diff --git a/tutorials/03_plugins.md b/tutorials/03_plugins.md index 3ad856c6f..3652f173d 100644 --- a/tutorials/03_plugins.md +++ b/tutorials/03_plugins.md @@ -118,6 +118,6 @@ Ignition GUI by default. Ignition GUI will look for display plugins on the following paths, in this order: -1. All paths set on the `IGN_GUI_DISPLAY_PLUGIN_PATH` environment variable +1. All paths set on the `GZ_GUI_DISPLAY_PLUGIN_PATH` environment variable 2. `~/.ignition/gui/display_plugins` 3. [Display plugins that are installed with Ignition GUI](https://ignitionrobotics.org/api/gui/0.1/namespace gz_1_1gui_1_1display_plugins.html)