Flow-Launcher / Flow.Launcher

:mag: Quick file search & app launcher for Windows with community-made plugins
https://flowlauncher.com
MIT License
8.11k stars 316 forks source link

[Feature Request] Add Flow-launcher on scoop #961

Closed lenicyl closed 2 years ago

lenicyl commented 2 years ago

For those who do not know, Scoop is another very popular open source package manager for windows.

Adding Flow-Launcher to scoop should be pretty simple. I wrote a manifest for it below, and it should be all you need to do other than specifying to the user which bucket to install from.

{
    "version": "1.9.1",
    "description": "Quick file search & app launcher for Windows with community-made plugins",
    "homepage": "https://www.flowlauncher.com",
    "license": "MIT",
    "notes": "The \"Restart Flow\" function might be broken for now. Sorry for the inconvinience",
    "suggest": {
        "python": "python"
    },
    "architecture": {
        "64bit": {
            "url": "https://github.com/Flow-Launcher/Flow.Launcher/releases/download/v1.9.1/FlowLauncher-1.9.1-full.nupkg",
            "hash": "050c5b13e58aaced52852ed551d4b1a78e3710cbd39e495e03e80bf3c11f5833"
        }
    },
    "extract_dir": "lib\\net5.0-windows",
    "shortcuts": [
        [
            "Flow.Launcher.exe",
            "Flow Launcher"
        ]
    ],
    "persist": "UserData",
    "checkver": {
        "github": "https://github.com/Flow-Launcher/Flow.Launcher"
    },
    "autoupdate": {
        "url": "https://github.com/Flow-Launcher/Flow.Launcher/releases/download/v$version/FlowLauncher-$version-full.nupkg"
    }
}

i originally wrote this when i was making a personal bucket

Thanks :D

jjw24 commented 2 years ago

Hi @lenicyl, thanks for this. We can add to scoop, but will need a way to use our deploy pipeline to do it so we don't have to manually do this every release. Does scoop have a cli that we can utilise to auto generate the above yml? Everything would be static except for version which needs to be dynamically passed in (which our current pipeline is already doing for others).

lenicyl commented 2 years ago

Hi @jjw24 Im not too sure if what you want is achievable, but scoop does has an auto-update functionality. This auto-update doesnt update the app itself but it updates the manifest. Its meant for package maintainers to update their manifests without human error. I think that this could be used to auto-update the manifest and then the json file could be pushed to the Repository using GIT

You can read the documentation for the auto-update functionality here

I have tested the auto update functionality on the manifest specified in the issue by downgrading to 1.9.0 and using the auto update for 1.9.1 and it does indeed work.

image

Thanks

lenicyl commented 2 years ago

In case you see this, the manifest in the issue doesnt get Update.exe, breaking some stuff

I changed it to use the portable version instead and this works like intended now

{
    "version": "1.9.1",
    "description": "Quick file search & app launcher for Windows with community-made plugins",
    "homepage": "https://www.flowlauncher.com",
    "license": "MIT",
    "architecture": {
        "64bit": {
            "url": "https://github.com/Flow-Launcher/Flow.Launcher/releases/download/v1.9.1/Flow-Launcher-Portable.zip",
            "hash": "c2560b0ed1d157e4ad6aab0193404583c79f9f50e08b44061cf1f998e01a7ef2",
        }
    },
    "extract_dir": "FlowLauncher",
    "bin": "Flow.Launcher.exe",
    "shortcuts": [
        [
            "Flow.Launcher.exe",
            "Flow Launcher"
        ]
    ],
    "persist": [
        "UserData",
        [
            "app-1.9.1\\UserData",
            "UserData"
        ]
    ],
    "suggest": {
        "python": "python"
    },
    "checkver": {
        "github": "https://github.com/Flow-Launcher/Flow.Launcher"
    },
    "autoupdate": {
        "url": "https://github.com/Flow-Launcher/Flow.Launcher/releases/download/v$version/Flow-Launcher-Portable.zip",
        "persist": [
            "UserData",
            [
                "app-$version\\UserData",
                "UserData"
            ]
        ]
    }
}
jjw24 commented 2 years ago

This auto-update doesnt update the app itself but it updates the manifest. Its meant for package maintainers to update their manifests without human error.

Yep, this is what I am after. Just had a quick read their doco, totally doable.

In your manifest for "architecture" why are you referencing the NuGet package instead of just the Flow-Launcher-Setup.exe?

Can we install with the setup file or is it a requirement to use zip/portable?

lenicyl commented 2 years ago

Yep, this is what I am after. Just had a quick read their doco, totally doable.

In your manifest for "architecture" why are you referencing the NuGet package instead of just the Flow-Launcher-Setup.exe?

The manifest you are referring to is old, and i just picked it because i thought it would have the update.exe inside the main folder since thats needed to restart flow launcher. I didnt check my assumption and was wrong.

The new manifest which i uploaded above uses the portable release and works with all functions and plugins.

Can we install with the setup file or is it a requirement to use zip/portable?

Not really as long as you get it working. However if you check scoop in depth you will know that its meant to be a little different compared to other package managers. You can read about those here and here But the main points are :

  • Installs to ~/scoop/ by default. You can set up your own programs and not worry that they'll interfere with other users' programs (or theirs with yours, perhaps more importantly). You can optionally choose to install programs system-wide if you have administrator rights.
    • No UAC popups, doesn't require admin rights. Since programs are installed just for your user account, you won't be interrupted by UAC popups.

Which is why i used the portable package later, and most scoop apps i have seen do use zip whenever possible


Another thing i wanted to ask is maybe we could add a pull request and add flow to the Extra's Bucket (a very popular official bucket) Apps in this bucket apparantly auto-update the manifest every hour as stated here

I just wanted to tell you that yeah this exists as well

jjw24 commented 2 years ago

Sounds good and thank you for letting me know.

Looks like you tested the old manifest for updating, just double checking have you tested the new one using the portable updating to new version again (e.g. 1.9.0 to 1.9.1)?

Did you want to create a PR to add to the Extra's bucket (happy to do it if you would like me to)?

Edit: Just tested, updating is good. Please remove suggest as Flow will download and install Embedded Python automatically when it detects Python plugins.

lenicyl commented 2 years ago

Did you want to create a PR to add to the Extra's bucket (happy to do it if you would like me to)?

No, not yet. I just wanted to like finalize the manifest and stuff

Edit: Just tested, updating is good. Please remove suggest as Flow will download and install Embedded Python automatically when it detects Python plugins.

Sure This would be the manifest then

{
    "version": "1.9.1",
    "description": "Quick file search & app launcher for Windows with community-made plugins",
    "homepage": "https://www.flowlauncher.com",
    "license": "MIT",
    "architecture": {
        "64bit": {
            "url": "https://github.com/Flow-Launcher/Flow.Launcher/releases/download/v1.9.1/Flow-Launcher-Portable.zip",
            "hash": "c2560b0ed1d157e4ad6aab0193404583c79f9f50e08b44061cf1f998e01a7ef2",
        }
    },
    "extract_dir": "FlowLauncher",
    "bin": "Flow.Launcher.exe",
    "shortcuts": [
        [
            "Flow.Launcher.exe",
            "Flow Launcher"
        ]
    ],
    "persist": [
        "UserData",
        [
            "app-1.9.1\\UserData",
            "UserData"
        ]
    ],
    "checkver": {
        "github": "https://github.com/Flow-Launcher/Flow.Launcher"
    },
    "autoupdate": {
        "url": "https://github.com/Flow-Launcher/Flow.Launcher/releases/download/v$version/Flow-Launcher-Portable.zip",
        "persist": [
            "UserData",
            [
                "app-$version\\UserData",
                "UserData"
            ]
        ]
    }
}

Did you want to create a PR to add to the Extra's bucket (happy to do it if you would like me to)?

yeah i think it would be better if you do it because I do not understand the part with "creating an issue before opening a pull request" You might want to need to read the Contribution Guidelines before though.

Edit : i think its just opening an issue and then a pull request

jjw24 commented 2 years ago

To-do before closing:

lenicyl commented 2 years ago

To-do before closing:

* add Scoop install to readme

* add Scoop install to website

Looks like the pull request has been accepted !!

By the way you would have to add it to the readme and website this way :

Scoop :

scoop bucket add extras
scoop install flow-launcher
jjw24 commented 2 years ago

Would you say that ppl who use scoop would know this type of apps are under the extras bucket, so we don't need to mention add the bucket?

lenicyl commented 2 years ago

Yeah i think people would know that it would be under the extras bucket, but most sofware i have seen that are officially in scoop do put the add command as well

Its honestly up to you :)

jjw24 commented 2 years ago

Added to readme and website.

I had a quick look around some apps, seems they don't include the add bucket command, and Scoop is really good at clarifying which apps belong to which bucket so I have left it out as well.

Thanks for this great suggestion.