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

OpenStudio 2.0.0 path installation on mac #2428

Closed
jmarrec opened this issue Jan 9, 2017 · 18 comments · Fixed by #3021
Closed

OpenStudio 2.0.0 path installation on mac #2428

jmarrec opened this issue Jan 9, 2017 · 18 comments · Fixed by #3021

Comments

@jmarrec
Copy link
Collaborator

jmarrec commented Jan 9, 2017

System info:

  • Sketchup 2016
  • macOS Sierra 10.12.2
  • OpenStudio 2.0.0 (47ba3cb)

I’m installing OpenStudio 2.0.0 on mac

I noticed that it’s trying to install to /usr/local/openstudio-2.0.0. Before it went to to /Applications/openstudio-x-x.

There’s a cli so I guess it makes sense that one goes to /usr/local… but not sure if putting all of it to/usr/loca/lmakes that much sense. Might be offputing to users who aren’t familiar with Unix systems too.

Another problem is that the OpenStudioApp.app and ParametricAnalysisTool.apparen't at all simlinked to /Applications so I can’t easily find the apps (I have to launch them via a terminal or the Finder > Go To Folder).

I would suggest installing everything to /Applications and add the cli to the path or to simlink it to /usr/local instead

@kbenne
Copy link
Contributor

kbenne commented Jan 9, 2017

Yep I agree and pretty much all of this. My plan is to leave the base of the installer in /usr/local, but run a post flight script to move the .app programs into /Applications, link the openstudio cli into the PATH, and put the ruby bindings in the RUBY_PATH.

@asparke2 asparke2 added this to the Version 2.0.0 (official, March) milestone Jan 18, 2017
@macumber
Copy link
Contributor

macumber commented Mar 7, 2017

@kbenne should this be closed?

@jmarrec
Copy link
Collaborator Author

jmarrec commented Mar 28, 2017

It now installs to /Applications/OpenStudio-2.0.5 and the cli is put in /usr/local/bin/openstudio. I cannot see any variable $RUBY_PATH though.

@kbenne
Copy link
Contributor

kbenne commented Mar 28, 2017

The cli in /usr/local/bin/openstudio is actually a symbolic link. I'm glad to know you have confirmed it is working.

The install path in /Applications/OpenStudio-2.0.5. is also according to plan. I would rather have spaces instead of "-", but parts of PAT do not play well with spaces.

The installer is not currently trying to put the ruby bindings in the ruby path. This is 90% by design and maybe 10% lazy. The problem with putting the ruby bindings in the ruby path is that the OS X system ruby is not compatible with the bindings (wrong version). Trying to steer people to the cli anyway.

FYI if we did put openstudio in the ruby path we would do it with a symbolic link into /Library/Ruby/... or whatever the standard ruby lib path is. This is how we did it in the 1.x series. No $RUBY_PATH vars.

@kbenne
Copy link
Contributor

kbenne commented Mar 28, 2017

I want to close this is @jmarrec gives it a thumbs up.

@jmarrec
Copy link
Collaborator Author

jmarrec commented Mar 28, 2017

Yeah I don't think it's necessary to add it to the Ruby path, I use my system ruby for interactive sessions anyways.

I figured it was a symlink. I'm wondering if the owner shouldn't be the user rather than root. (Just saying this because 99% of items in my /usr/local/bin are owned by julien and not root)

(py36)julien@~$ ls -l /usr/local/bin/open*
lrwxr-xr-x  1 root  staff  45 Mar 16 01:05 /usr/local/bin/openstudio -> /Applications/OpenStudio-2.0.5/bin/openstudio

Other than that, I'd say you can close.

@kbenne
Copy link
Contributor

kbenne commented Mar 28, 2017

root owner is what we want. read / execute everyone. write only if you are God.

@kbenne kbenne closed this as completed Mar 28, 2017
@jmarrec
Copy link
Collaborator Author

jmarrec commented Apr 4, 2017

@kbenne I installed the os 2.1.0, it didn't update the /usr/local/bin/openstudio symlink

@kbenne
Copy link
Contributor

kbenne commented Apr 4, 2017

didn't "update"

Does that mean you had a link, perhaps to a previous install, but it didn't get updated to point to the new install?

@jmarrec
Copy link
Collaborator Author

jmarrec commented Apr 4, 2017

That is correct, it was pointing to openstudio-2.0.5 which I had trashed (didn't use the maintenance tool, I trashed the entire folder)

@kbenne
Copy link
Contributor

kbenne commented Apr 4, 2017

ok. I can fix this.

The maintenance tool will by the way remove the link.

@kbenne kbenne reopened this Apr 4, 2017
@jmarrec
Copy link
Collaborator Author

jmarrec commented May 12, 2017

I installed 2.1.1 and I don't have a symlink to /usr/local/bin/openstudio anymore

@rHorsey
Copy link
Contributor

rHorsey commented May 12, 2017

Seconded. I had an old 2.0.5, rmrf'ed it, installed 2.1.1, and the old 2.0.5 symlink-to-nowhere persisted. I just assumed rmrf-ing was not supported behavior, but if the installer could overwrite the symlink than that would be very cool.

@jmarrec
Copy link
Collaborator Author

jmarrec commented Aug 3, 2017

Don't have a symlink in 2.2.0.

Had to run ln -s /Applications/OpenStudio-2.2.0/bin/openstudio /usr/local/bin/openstudio

@jmarrec
Copy link
Collaborator Author

jmarrec commented Oct 2, 2017

Still true in 2.3.0

@macumber macumber removed this from the Version 2.1.0 (official, March) milestone Jan 13, 2018
@macumber
Copy link
Contributor

Is this the root cause of this other bug? NREL/OpenStudio-PAT#52 (comment)

@macumber
Copy link
Contributor

Raising to major as this seems to be causing other issues

@macumber
Copy link
Contributor

#2561

kbenne added a commit that referenced this issue Mar 6, 2018
On Mac, if the /usr/bin/openstudio link already exists,
perhaps from a previous version, then the attempt to
make a new link will fail.

Remove the old stale link before making the new link.

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

Successfully merging a pull request may close this issue.

5 participants