Scoop icon indicating copy to clipboard operation
Scoop copied to clipboard

Install options for an app?

Open pfmoore opened this issue 4 years ago • 10 comments

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.

pfmoore avatar Nov 07 '19 18:11 pfmoore

#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...

rikuben avatar Nov 09 '19 03:11 rikuben

Examples of existing apps which would benefit from this feature:

  • sublime-text

    "notes": "Add Sublime Text as a context menu option by running: "reg import '$dir\install-context.reg'"",

  • python

    "notes": "Allow applications and third-party installers to find python by running: "$dir\install-pep-514.reg"",

  • git-interactive-rebase-tool

    "notes": "Run 'git config --global sequence.editor interactive-rebase-tool' to configure as your rebase tool.",

  • Installing pshazz without changing the prompt - #2595


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 avatar Jun 10 '20 21:06 NotWearingPants

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

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

NotWearingPants avatar Jun 19 '20 19:06 NotWearingPants

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

street-grease-coder avatar Nov 13 '20 14:11 street-grease-coder

I would find this very useful.

sKGu8gxV avatar Feb 11 '22 12:02 sKGu8gxV

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.

Bindernews avatar May 15 '22 19:05 Bindernews

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

Ama1999 avatar Jun 28 '22 20:06 Ama1999

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

amd64fox avatar Aug 13 '22 09:08 amd64fox

@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?

pfmoore avatar Aug 13 '22 09:08 pfmoore

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.

niheaven avatar Aug 15 '22 03:08 niheaven

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){...

couleurm avatar Mar 11 '23 10:03 couleurm