3 ms·
> Then to launch the software you need a shell script that overrides the loader search path and move on with your life. > The ultimate solution is the .app/.bu
by wahern 6y ago
> Then to launch the software you need a shell script that overrides the loader search path and move on with your life.
> The ultimate solution is the .app/.bundle paradigm of MacOS. Everything should copy that.
All ELF systems support the $ORIGIN RPATH macro. It lets you build and package an application exactly like, if not better than, you would a macOS bundle. Specifically, it let's you specify at compile time a library load path relative to the invoked binary. You'd specify it as $ORIGIN/../lib for the canonical bin/, lib/, etc layout.
- qppo 6y agoAwesome tip, thanks! I didn't know this existed.