From c061515f527e25effdc955c59ace9fd677e7c74d Mon Sep 17 00:00:00 2001 From: methylDragon Date: Thu, 4 Aug 2022 15:34:25 -0700 Subject: [PATCH 1/2] Migrate config and log directories Signed-off-by: methylDragon --- src/Application.cc | 8 ++++---- tutorials/02_commandline.md | 2 +- tutorials/03_plugins.md | 4 ++-- tutorials/05_style.md | 2 +- tutorials/06_example.md | 6 +++--- tutorials/08_screenshot.md | 4 ++-- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/Application.cc b/src/Application.cc index 13264ddbe..cd3376972 100644 --- a/src/Application.cc +++ b/src/Application.cc @@ -143,7 +143,7 @@ Application::Application(int &_argc, char **_argv, const WindowType _type) std::string home; common::env(GZ_HOMEDIR, home); this->dataPtr->defaultConfigPath = common::joinPaths( - home, ".ignition", "gui", "default.config"); + home, ".gz", "gui", "default.config"); // If it's a main window, initialize it if (_type == WindowType::kMainWindow) @@ -461,7 +461,7 @@ bool Application::LoadPlugin(const std::string &_filename, // Add default folder and install folder std::string home; common::env(GZ_HOMEDIR, home); - systemPaths.AddPluginPaths(home + "/.ignition/gui/plugins:" + + systemPaths.AddPluginPaths(home + "/.gz/gui/plugins:" + GZ_GUI_PLUGIN_INSTALL_DIR); auto pathToLib = systemPaths.FindSharedLibrary(_filename); @@ -762,10 +762,10 @@ std::vector>> for (auto const &path : this->dataPtr->pluginPaths) paths.push_back(path); - // 3. ~/.ignition/gui/plugins + // 3. ~/.gz/gui/plugins std::string home; common::env(GZ_HOMEDIR, home); - paths.push_back(home + "/.ignition/gui/plugins"); + paths.push_back(home + "/.gz/gui/plugins"); // 4. Install path paths.push_back(GZ_GUI_PLUGIN_INSTALL_DIR); diff --git a/tutorials/02_commandline.md b/tutorials/02_commandline.md index 31b90b8c8..ce65bd714 100644 --- a/tutorials/02_commandline.md +++ b/tutorials/02_commandline.md @@ -34,4 +34,4 @@ If you have Gazebo Tools installed, you can use the `gz gui` command line tool: --versions Show the available versions. When using the command line tool, all console messages are logged to -`$HOME/.ignition/gui/log/`. +`$HOME/.gz/gui/log/`. diff --git a/tutorials/03_plugins.md b/tutorials/03_plugins.md index 415216fda..47abe9514 100644 --- a/tutorials/03_plugins.md +++ b/tutorials/03_plugins.md @@ -19,7 +19,7 @@ Gazebo GUI will look for plugins on the following paths, in this order: 1. All paths set on the `GZ_GUI_PLUGIN_PATH` environment variable 2. All paths added by calling `gz::gui::addPluginPath` -3. `~/.ignition/gui/plugins` +3. `~/.gz/gui/plugins` 4. [Plugins which are installed with Gazebo GUI](https://gazebosim.org/api/gui/6.0/namespace gz_1_1gui_1_1plugins.html) ## Configuring plugins @@ -119,5 +119,5 @@ Gazebo GUI will look for display plugins on the following paths, in this order: 1. All paths set on the `GZ_GUI_DISPLAY_PLUGIN_PATH` environment variable -2. `~/.ignition/gui/display_plugins` +2. `~/.gz/gui/display_plugins` 3. [Display plugins that are installed with Gazebo GUI](https://gazebosim.org/api/gui/0.1/namespace gz_1_1gui_1_1display_plugins.html) diff --git a/tutorials/05_style.md b/tutorials/05_style.md index aa571876f..f80891d03 100644 --- a/tutorials/05_style.md +++ b/tutorials/05_style.md @@ -81,7 +81,7 @@ You can try running the following command for example: QT_QUICK_CONTROLS_MATERIAL_THEME=Dark QT_QUICK_CONTROLS_MATERIAL_PRIMARY=Blue gz gui -v 4 -\note Any previously saved default configuration (usually stored in ~/.ignition/gui/default.config) will override +\note Any previously saved default configuration (usually stored in ~/.gz/gui/default.config) will override these environment variable preferences. \note Toolbar colors can't be changed through environment variables yet. diff --git a/tutorials/06_example.md b/tutorials/06_example.md index d70823709..e4d47f0e4 100644 --- a/tutorials/06_example.md +++ b/tutorials/06_example.md @@ -44,11 +44,11 @@ For example, we can build the `hello_plugin` example plugin: Then create the plugins directory and copy the generated library to it so that Gazebo GUI can find the plugin: - mkdir -p ~/.ignition/gui/plugins + mkdir -p ~/.gz/gui/plugins # Linux - cp libHelloPlugin.so ~/.ignition/gui/plugins/ + cp libHelloPlugin.so ~/.gz/gui/plugins/ # MacOS - cp libHelloPlugin.dylib ~/.ignition/gui/plugins/ + cp libHelloPlugin.dylib ~/.gz/gui/plugins/ Now you can use the command line to open it: diff --git a/tutorials/08_screenshot.md b/tutorials/08_screenshot.md index a03f8be08..17d7e089f 100644 --- a/tutorials/08_screenshot.md +++ b/tutorials/08_screenshot.md @@ -5,7 +5,7 @@ Previous Tutorial: \ref examples ## Overview Screenshots of the current 3D scene can be taken using the screenshot plugin. -The default directory for saved screenshots is in `~/.ignition/gui/pictures` and +The default directory for saved screenshots is in `~/.gz/gui/pictures` and the filename will be the timestamp of when the screenshot was taken. It is possible to change the default directory to a different location, which will be shown in the example below. @@ -26,7 +26,7 @@ To take a screenshot of the 3D scene, click on the camera icon: @image html images/screenshot_button.png -The default location of saved screenshots is `~/.ignition/gui/pictures`, to change +The default location of saved screenshots is `~/.gz/gui/pictures`, to change this click on the folder icon: @image html images/screenshot_change_directory.png From bc78bf50efd63d52bc7f13143570456b41e9772f Mon Sep 17 00:00:00 2001 From: methylDragon Date: Mon, 8 Aug 2022 14:26:15 -0700 Subject: [PATCH 2/2] Tick-tock plugin directory Signed-off-by: methylDragon --- src/Application.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Application.cc b/src/Application.cc index cd3376972..5cd89681b 100644 --- a/src/Application.cc +++ b/src/Application.cc @@ -464,6 +464,11 @@ bool Application::LoadPlugin(const std::string &_filename, systemPaths.AddPluginPaths(home + "/.gz/gui/plugins:" + GZ_GUI_PLUGIN_INSTALL_DIR); + // TODO(CH3): Deprecated. Remove on tock. + systemPaths.AddPluginPaths(home + "/.ignition/gui/plugins:" + + GZ_GUI_PLUGIN_INSTALL_DIR); + + auto pathToLib = systemPaths.FindSharedLibrary(_filename); if (pathToLib.empty()) { @@ -767,6 +772,9 @@ std::vector>> common::env(GZ_HOMEDIR, home); paths.push_back(home + "/.gz/gui/plugins"); + // TODO(CH3): Deprecated. Remove on tock. + paths.push_back(home + "/.ignition/gui/plugins"); + // 4. Install path paths.push_back(GZ_GUI_PLUGIN_INSTALL_DIR);