New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add dub install command
#839
Comments
|
Maybe take a look at |
|
IMO. |
|
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? |
|
Why not install them in a hidden folder of $HOME directory? So many others do like this. |
|
Indeed dub should offer an installation mechanism similar to Maybe we could simply start this as experiment, installing to |
|
@ximion: @s-ludwig and I briefly discussed this during the DConf hackathon. The summary: @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 |
|
Maybe it is not needed to install the binary to any folder on the file system but just create batch/bash scripts which executes For Linux the scripts can be created here Using this approach you can easily update the dub packages and the scripts points to the recent package version. User has the task to add the path Also please have a look at this dub package. |
As per issue #811 it would be nice to have a
dub installcommand to install the built binary/shared|static library and accompanying data files into a standard directory hierarchy used in Linux systems. Ideally, the install command would - for shared/static libraries - also install the needed sources or.difiles into a directory hierarchy which can be used as a local repository, as outlined in #838.This would be of great help for packaging dub-using D code in Linux distributions.
Since there were concerns about users blindly dub-installing files into their filesystem, I propose to make setting a
--target=parameter mandatory. Distributors could rundub install --target=debian/tmpwithout issues, and to protect users dub could ask for a second confirmation when someone passes/as target directory (something along the line of "This will install this software permanently on your system, and might be incompatible with distribution packageing. Do you want to proceed?"). That being said, theoretically adub uninstallcommand would also be possible to remove installed stuff from the file system again ^^But this report is about
dub install --target=DIR- would be awesome if we could have this feature.The text was updated successfully, but these errors were encountered: