You are not logged in.

#1 2014-12-12 19:47:48

SeeLook
Member
Registered: 2012-07-01
Posts: 19

[SOLVED]Where install executables of a package but out of $PATH

Hi!

I'm developing some app and code and executable increased to quite big sizes.
I divided it for libraries (three ones) and a few executable files - as a parts of the program out of main functionality (settings, some creators).
Main application launches it on demand as a separate process.
I found this very usable during developing (less compile/linking time even with llvm)
but I'm preparing the app for release.
As long as good place for libraries is /usr/lib and those three new ones will not make more mess there,
I would prefer to keep the binaries (obviously except the main one) out of the PATH,
so where is a good place for them. /usr/share/myapp/bin i.e.?
I saw some Qt executable in /usr/lib/qt/bin as well.
Are there any rules?

Last edited by SeeLook (2014-12-23 17:24:37)

Offline

#2 2014-12-19 19:43:19

kwatrecht
Member
Registered: 2014-07-30
Posts: 7

Re: [SOLVED]Where install executables of a package but out of $PATH

You can place them enywhere. e.g.  /home/arch/software/
Then you have to add this folder to $PATH. To do this open the hidden *profile*-file of your shell (in my case it's ~/.zprofile):
e.g. before adding:

 PATH="$PATH"

e.g. after

PATH="${HOME}/software:$PATH"

Offline

#3 2014-12-19 19:49:34

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [SOLVED]Where install executables of a package but out of $PATH

SeeLook wrote:

but I'm preparing the app for release.

kwatrech wrote:

You can place them enywhere. e.g.  /home/arch/software/

That's a terrible idea.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#4 2014-12-19 21:09:25

SeeLook
Member
Registered: 2012-07-01
Posts: 19

Re: [SOLVED]Where install executables of a package but out of $PATH

:-)
Thanks for answer(s)

I found the solution for my purpose but it is a bit out of topic.
As long as those "additional" applications are not intended to be run by user directly, they may be just a plugin libraries loaded on demand by already launched main app and lay with other libraries.
This way the main binary still remained smaller and faster to build and it requires just cosmetic changes in code.

However I dig a bit to answer for topic question and
/usr/lib/myapp/exec
should be acceptable.

Offline

#5 2014-12-23 16:35:33

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,094

Re: [SOLVED]Where install executables of a package but out of $PATH

SeeLook wrote:

:-)
Thanks for answer(s)

I found the solution for my purpose but it is a bit out of topic.
As long as those "additional" applications are not intended to be run by user directly, they may be just a plugin libraries loaded on demand by already launched main app and lay with other libraries.
This way the main binary still remained smaller and faster to build and it requires just cosmetic changes in code.

However I dig a bit to answer for topic question and
/usr/lib/myapp/exec
should be acceptable.


See what git does, problem solved next!


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

Board footer

Powered by FluxBB