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

[Mac] Help users create symlink to OpenSim's bin dir #356

Closed
chrisdembia opened this issue Aug 4, 2017 · 18 comments
Closed

[Mac] Help users create symlink to OpenSim's bin dir #356

chrisdembia opened this issue Aug 4, 2017 · 18 comments
Labels
Installation Layout, size and installer making macOS

Comments

@chrisdembia
Copy link
Member

Some users might like to have OpenSim (the GUI) or opensim-cmd on their path. We can help them do this with one of the following methods:

  1. Add a step to the installer that creates a symlink in /usr/local/bin.
  2. Add a menu option in the GUI (maybe under Edit or Help) for "Install command line tools." CMake does this, as do other developer-oriented apps.

I'm not sure (1) is actually possible.

@aymanhab
Copy link
Member

This seems nice to have but not necessary for 4.0. What do you think @chrisdembia ?

@chrisdembia
Copy link
Member Author

Agreed; not necessary for 4.0.

@aymanhab aymanhab added this to the Future Release milestone Aug 19, 2017
@aymanhab aymanhab added the Installation Layout, size and installer making label Mar 7, 2018
@chrisdembia
Copy link
Member Author

I prefer option (2) above.

@aymanhab
Copy link
Member

I prefer option 2 but have some concerns:

  • Will this be available on Mac/osx only?
  • What permissions does the user running OpenSim have? This may open a can of worms if they can't create the links and the uninstall becomes more involved.

@jimmyDunne
Copy link
Member

Why can't Mac users add the bin folder to their bash/zshrc file? I have this setup for my local build

# Export opensim path in .zshrc
path=('/Users/jimmy/repository/opensim-source/install-opensim/bin' $path)

@chrisdembia
Copy link
Member Author

That is another option, though then the command-line tools are only available on the PATH when using the shell that's configured. Also, users may use different shells.

Mostly, I am just trying to follow the example of other software. CMake and the Jetbrains IDEs use symlinks.

The issue about permissions is valid; we can use sudo if the command fails without sudo, and the system will simply prompt the user to enter their password.

@chrisdembia
Copy link
Member Author

Perhaps we should just add instructions to Confluence and not automate anything.

@aymanhab
Copy link
Member

Prefer improving documentation for the few users needing command line access over making broad changes to application used by a lot more users.

@jenhicks
Copy link
Member

Here's the page where we should improve documentation:
https://simtk-confluence.stanford.edu/display/OpenSim/Command+Line+Utilities

@aymanhab You might take a look at this if you have time. There is some material on this page that could be helpful:
https://simtk-confluence.stanford.edu/display/OpenSim/OpenSense+-+Kinematics+with+IMU+Data#OpenSense-KinematicswithIMUData-InstallingOpenSense

@aymanhab
Copy link
Member

@jenhicks Updated here
https://simtk-confluence.stanford.edu/display/OpenSim/Command+Line+Utilities
Let me know what you think. Thanks

@chrisdembia
Copy link
Member Author

I made some changes.

Note that macOS Catalina changes the default shell to zsh, not bash. I wonder if the instructions must be different for zsh. @jimmyDunne

@jenhicks
Copy link
Member

Can you guys provide me with detailed instructions on how exactly I should test the new version? Thanks!

@jenhicks
Copy link
Member

(In particular what I should delete from any previous set-ups and how I should run the script).

@aymanhab
Copy link
Member

You should

  1. remove all references/links to opensim-cmd or opensense from /usr/local/bin, make sure opensim-install-dir/bin is not on your Path
  2. Run the shell script from /bin
  3. Check that links are created in /usr/local/bin for opensense and opensim-cmd
  4. Run opensense from any arbitrary directory on your machine

@jenhicks
Copy link
Member

make sure opensim-install-dir/bin is not on your Path

Can you remind me how to do this one?

@chrisdembia
Copy link
Member Author

In a terminal, you could type echo $PATH, which lists the directories on your PATH.

@jenhicks
Copy link
Member

Thanks. I can confirm that the new shell script worked for me. We need to add the directions back to the confluence page. I updated the instructions on confluence and would appreciate if someone gave them a quick review:
https://simtk-confluence.stanford.edu/display/OpenSim/Command+Line+Utilities

@chrisdembia
Copy link
Member Author

Looks good to me! I made one minor change (fixed the file extension).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Installation Layout, size and installer making macOS
Projects
None yet
Development

No branches or pull requests

4 participants