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

source for zsh support #392

Open
SdKay opened this issue Oct 8, 2019 · 1 comment
Open

source for zsh support #392

SdKay opened this issue Oct 8, 2019 · 1 comment

Comments

@SdKay
Copy link

SdKay commented Oct 8, 2019

Hi,
I have seen that there was a commit for supporting zsh, but I use the recent version build project and get the messages below:

[ROS Warning] Unable to locate build directory for package: demo_pub.
[ROS Warning] Unable to locate package rviz_tele_ctrl build file: /home/sdk/workspace/ros/demo_ws/build/rviz_tele_ctrl/rviz_tele_ctrl.cbp.
[ROS Debug] Sourced workspace: /home/sdk/workspace/ros/demo_ws/devel/setup.bash.

I see the source code, in ros_qtc_plugin-4.9/src/project_manager/ros_utils.cpp, it seems that default shell is still bash

bool ROSUtils::sourceROS(QProcess *process, const Utils::FileName &rosDistribution)
{
  bool results = sourceWorkspaceHelper(process, Utils::FileName(rosDistribution).appendPath(QLatin1String("setup.bash")).toString());
  if (!results)
    Core::MessageManager::write(QObject::tr("[ROS Warning] Faild to source ROS Distribution: %1.").arg(rosDistribution.toString()));

  return results;
}

bool ROSUtils::sourceWorkspace(QProcess *process, const WorkspaceInfo &workspaceInfo)
{
    if (!initializeWorkspace(process, workspaceInfo))
        return false;

    Utils::FileName bash(workspaceInfo.develPath);
    if (workspaceInfo.install)
      bash = Utils::FileName(workspaceInfo.installPath);

    bash.appendPath(QLatin1String("setup.bash"));
    if (bash.exists())
    {
        Core::MessageManager::write(QObject::tr("[ROS Debug] Sourced workspace: %1.").arg(bash.toString()));
        if (sourceWorkspaceHelper(process, bash.toString()))
            return true;
    }
    else
    {
        Core::MessageManager::write(QObject::tr("[ROS Warning] Failed to source workspace because this file does not exist: %1.").arg(bash.toString()));
        return true;
    }

    Core::MessageManager::write(QObject::tr("[ROS Warning] Failed to source workspace: %1.").arg(workspaceInfo.path.toString()));
    return false;
}

Is there any problem in plugin or my configuration.
Thanks a lot!

@Levi-Armstrong
Copy link
Member

When building it uses bash but for the integrated terminal when running ros nodes or launch files it reads the environment to source the correct file. See ros_generic_run_step.cpp.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants