geany / geany-osx

Things needed to bundle Geany for OSX
Other
24 stars 14 forks source link

command not found: geany #15

Closed arman-sydikov closed 4 years ago

arman-sydikov commented 4 years ago

I have downloaded Geany from here - https://download.geany.org/geany-1.36_osx-2.dmg After successful installation I can open it from Applications folder in Finder, but can't open it from terminal: image How can I add Geany to the Path to make it possible to open it with terminal?

Geany version: 1.36 macOS version: Catalina 10.15.4

codebrainz commented 4 years ago

Untested, but something like this will probably work:

$ echo '/Applications/Geany.app/Contents/MacOS' >> /etc/paths

You probably need to be root (ie. use sudo).

arman-sydikov commented 4 years ago

@codebrainz , thank you, I put it into the config file instead, now it works :)

echo "path+=('/Applications/Geany.app/Contents/MacOS')" >> ~/.zshrc
techee commented 4 years ago

I've noticed though that

sudo ln -s /Applications/Geany.app/Contents/MacOS/geany  /usr/local/bin/geany

doesn't work and Geany won't load the shared library. I'll have a look at the problem for the next release so I'll keep this report open for now.

arman-sydikov commented 4 years ago

@techee That would be awesome, after that you could add it to the Geany official documentation, just like it is in Sublime Text documentation - https://www.sublimetext.com/docs/3/osx_command_line.html

techee commented 4 years ago

I've noticed though that

sudo ln -s /Applications/Geany.app/Contents/MacOS/geany  /usr/local/bin/geany

doesn't work and Geany won't load the shared library. I'll have a look at the problem for the next release so I'll keep this report open for now.

Hmm, I didn't find any easy fix - when the main binary is symlinked, NSBundle returns the location of the symlink itself as the bundle path and Geany depends on this path in

https://github.com/geany/geany/blob/915cf6e8d0b63482e23564c68b2f478cc3ff9cb2/src/utils.c#L2320

where gtkosx_application_get_resource_path() uses the path obtained by NSBundle.

Since there is a way to put Geany into PATH, I'll close this issue.