Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ign -> gz Migrate config and log directories : gz-gui #454

Merged
merged 2 commits into from
Apr 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions src/Application.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -461,9 +461,14 @@ bool Application::LoadPlugin(const std::string &_filename,
// Add default folder and install folder
std::string home;
common::env(GZ_HOMEDIR, home);
systemPaths.AddPluginPaths(home + "/.gz/gui/plugins:" +
nkoenig marked this conversation as resolved.
Show resolved Hide resolved
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())
{
Expand Down Expand Up @@ -762,9 +767,12 @@ std::vector<std::pair<std::string, std::vector<std::string>>>
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 + "/.gz/gui/plugins");
nkoenig marked this conversation as resolved.
Show resolved Hide resolved

// TODO(CH3): Deprecated. Remove on tock.
paths.push_back(home + "/.ignition/gui/plugins");

// 4. Install path
Expand Down
2 changes: 1 addition & 1 deletion tutorials/02_commandline.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/<timestamp>`.
`$HOME/.gz/gui/log/<timestamp>`.
4 changes: 2 additions & 2 deletions tutorials/03_plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
2 changes: 1 addition & 1 deletion tutorials/05_style.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions tutorials/06_example.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
4 changes: 2 additions & 2 deletions tutorials/08_screenshot.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand Down