ScoopInstaller / Scoop

A command-line installer for Windows.
https://scoop.sh
Other
21.36k stars 1.41k forks source link

Install options for an app? #3736

Open pfmoore opened 5 years ago

pfmoore commented 5 years ago

Is there any way to allow an app to have different install options? Specifically, I want to install busybox (from the main archive) but I only want the busybox executable, not all of the individual commands (as I already have better versions of some of them). The only way I can see of doing this is to copy and edit the busybox manifest to exclude all the entries in "bin" apart from busybox.exe, and put the resulting manifest in my own bucket.

It would be really useful to be able to say something like scoop install busybox --combined-binary-only.

rikuben commented 5 years ago

3493 is kinda related I guess?

Homebrew support this too. And I think it will help installing apps that can integrate with windows shell like powertoys or vscode context menu. So, I can just use scoop install vscode --with-context-menu. And it also will helps combining multiple versions too. I can use scoop install ffmpeg --nightly to install the nightly versions, and apps that depends on ffmpeg will be able to work with ffmpeg-nightly too. And I won't need to use scoop update -i anymore now...

NotWearingPants commented 4 years ago

Examples of existing apps which would benefit from this feature:


I propose adding "options" and "features" to scoop manifests, which might look like this:

{
    ...
    "options": [
        "install-with-plugin-support"
    ],
    "features": {
        "add-to-context-menu": {
            "installer": [
                "reg import \"$dir\\install-context.reg\""
            ],
            "uninstaller": [
                "reg import \"$dir\\uninstall-context.reg\""
            ],
        }
    }
}

The options are relevant to the installer script, which would maybe access them with $optionInstallWithPluginSupport, and the features are like options except they can also be installed or uninstalled later.

Maybe you could install with: scoop install sublime-text#install-with-plugin-support#add-to-context-menu (listing options/features separated by hashtags after the package name)

It can't be an option to scoop install itself because you can install multiple apps with it (scoop install git vim), and then it wouldn't be possible to specify options for a specific app.

NotWearingPants commented 4 years ago

For reference, this is how Chocolatey does this: https://chocolatey.org/docs/how-to-parse-package-parameters-argument

choco install git --params="'/GitAndUnixToolsOnPath /NoAutoCrlf'"

street-grease-coder commented 4 years ago

is still still not possible?! I mean... it really would be a very important feature...

sKGu8gxV commented 2 years ago

I would find this very useful.

Bindernews commented 2 years ago

Why was this labelled as "wontfix"? It seems like a popular request, and I'm certainly requesting it. Helper scripts post-setup are fine, but sometimes you want to change how the setup is performed in the first place.

Ama1999 commented 2 years ago

I'd also be in favor of having this, for what it's worth!

amd64fox commented 2 years ago

I support this great idea this will make the process of installing packages much easier and more flexible

pfmoore commented 2 years ago

@niheaven Could we have an explanation of why this is labelled as "wontfix"? Does that imply that if a community member submitted a PR to do this, it would be rejected? I'm fine if the problem is that the maintainers have no time to work on this (or simply aren't interested), but if someone else does the work, would you still be opposed? If so, why?

niheaven commented 2 years ago

In the foreseeable future, yes, Scoop won't support this feature, except for the common options supported by most of (if not all) apps/manifests.

If you need a customized app installation option, create your own manifest, and if you think this should be a widely used one, submit it in versions bucket (maybe someone is already in main?). The customized installation options will vary very much depending on apps, and are hard to be remembered for scoop users.

For busybox, there is busybox-lean that links only busybox.exe, and that's the standard solution for such cases.

There were lots of discussions about this before, and most of our members suggested creating different manifests. If someone submits such a feature, we will review it of cause but the merging process may take more time.

couleurm commented 1 year ago

If you guys can't wait to have conditional post install you can do this sort of logic for your own manifests:

$env:SCOOP_SUBLIMETEXT_CONTEXTMENU = $True scoop install mybucket/sublimetext

then in the postinstall

if ($env:SCOOP_SUBLIMETEXT_CONTEXTMENU){...