Beep6581 / RawTherapee

A powerful cross-platform raw photo processing program
https://rawtherapee.com
GNU General Public License v3.0
2.67k stars 306 forks source link

Should not assume /Applications path on macOS #6045

Open sneak opened 3 years ago

sneak commented 3 years ago

Applications can be run from anywhere on the filesystem in the macOS; I keep user-installed applications in my home directory, not in /Applications, reserving that for system apps only.

RawTherapee 5.8.0 on macOS seems to assume that it's in /Applications, causing it to fail to launch:

nostromo:~/Applications.keep/RawTherapee.app/Contents/MacOS$ ./rawtherapee
./rawtherapee: line 33: /Applications/RawTherapee.app/Contents/MacOS/bin/rawtherapee-bin: No such file or directory
./rawtherapee: line 33: exec: /Applications/RawTherapee.app/Contents/MacOS/bin/rawtherapee-bin: cannot execute: No such file or directory
Benitoite commented 3 years ago

macOS version? Note that you are reporting intended behavior. The software runs in a secured hardened-runtime including hardcoding to /Applications. If there is a way around, a PR would need to be provided.

Benitoite commented 3 years ago

And what is your security settings/gatekeeper set to?

twenster commented 3 years ago

On MacOs (X to XI), applications can be install in any directory where the user has permission to. The .app folder is the refered path. When testing, I usually drag and drop the application in ~/Applications, so stay in my home folder. I do this exactly as I'm installing a software or command in my ~/bin instead of /usr/bin.

It seems that the starting script uses a hard coded full path /Applications/RAWTherapee.app/ to get to the embed library and resources. It would be better to use a relative path to the main folder instead.

Benitoite commented 3 years ago

@twenster Using hardened runtime, relative paths are disallowed.

You are reporting intended behavior. The software runs in a secured hardened-runtime including hardcoding to /Applications. If there is a way around, a PR would need to be provided.

twenster commented 3 years ago

If the hardened runtime is mandatory, then releasing the app as an app bundle is not the best way to go. I would suggest to use the installer instead (like you install lightZone) That way you can install in path you like /opt/, /usr/, etc...

May be we should look at how Darktable does, because I can run it from ~/Applications without a problem.

Benitoite commented 11 months ago

Because this issue is still open:

I find either of the LZ & DT solutions completely unacceptable:

IMG_1992 IMG_1991

LZ even purports to be "professional-level". I'm sorry... https://github.com/ktgw0316/LightZone/blob/1c91f9a8b0ca390876a3fed078587521a41fc683/README.md?plain=1#L5

DT also would require lowering system security: https://github.com/darktable-org/darktable/blob/04fce12a72aa07aa7b35ce577473abfb96710477/packaging/macosx/BUILD_hb.txt#L49C83-L50C135