dub
dub copied to clipboard
Subcommand for installing binaries
Hi, I was thinking of implementing a subcommand such as dub install which would install binaries to a location commonly found in PATH on Unix platforms. This sort of thing would be very useful when packaging D programs using dub, or just as a general nicety. Would something like this be welcome?
By default binaries might be installed to /usr/local/bin but this location should be overridable with a --prefix command line option or DUB_PREFIX environment variable. A common location I often use for per-user binaries is ~/.local/bin.
Any thoughts on this?
Yes, dub supporting installation has been considered plenty.
Basically, dub shouldn't handle installation, it's an OS specific thing, that would require a lot of integration (RPATH for instance on Posix).
These sorts of issues should really be handled by a separate program with its own configuration that uses dub as a library. No such program has been created to date.
Yes, dub supporting installation has been considered plenty.
Basically, dub shouldn't handle installation, it's an OS specific thing, that would require a lot of integration (RPATH for instance on Posix).
I'm talking about a subcommand just for POSIX systems, since Windows software usually comes in the form of an installer or zip archive. And why would rpath be an issue? It's just setting the executable bit and moving the executable to a directory.