Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Add `dub install` command #839
As per issue #811 it would be nice to have a
Since there were concerns about users blindly dub-installing files into their filesystem, I propose to make setting a
But this report is about
referenced this issue
May 28, 2017
Where to install the files? Having them (at least the source) somewhat isolated seems worthwhile.
Library path depends on distribution, e.g.
What about integration with .rpm and .deb building instead of directly installing files?
This was referenced
Sep 13, 2017
Indeed dub should offer an installation mechanism similar to
Maybe we could simply start this as experiment, installing to
@s-ludwig is still a bit wary about complicating dub with the logic of figuring out where to install system binaries as this heavily depends on the distro.
Anyhow, installing binaries to
It's not that complicated. Actually I think it's the easiest issue to resolve. All distros follow the FHS1 for the most basic directories. Here is a full implementation in Python that Meson uses: https://github.com/mesonbuild/meson/blob/master/mesonbuild/mesonlib.py#L490-L538 It's important though that these default paths can be overridden by the Linux distributor individually.
That depends... I can't promise anything, I would actually need to test that, since my last attempt was years ago.
Those paths are completely non-standard though, although commonly used. Users can't use them without some manual adjustments (which IMHO is a good thing, so users don't accidentally call binaries from their home directories).
What about a simple configuration field in one of dubs settings.json? E.g. "installPath".
When it is not set and a user runs
This would at least allow users to set up their environments so dub does the "right" (user-defined) thing. It could be further split up into