Schniz / fnm

🚀 Fast and simple Node.js version manager, built in Rust
https://fnm.vercel.app
GNU General Public License v3.0
17.93k stars 458 forks source link

`winget` support for Windows (requires installer) #683

Open janpio opened 2 years ago

janpio commented 2 years ago

Now that Windows binaries are available, it would be great to make them available via winget:

We now ship Windows binaries! Now we need to figure out how to make it easy to install it on Windows. What are the cool people using? Scoop? Chocolatey?

Originally posted by @Schniz in https://github.com/Schniz/fnm/issues/4#issuecomment-716360005

winget will probably get traction since it's supporter by Microsoft.

https://docs.microsoft.com/en-us/windows/package-manager/

Originally posted by @ulrikstrid in https://github.com/Schniz/fnm/issues/4#issuecomment-716382270^

winget would be very nice, however it requires that packages have an installer. This could easily be created with msitools or NSIS under Linux.

Originally posted by @alumni in https://github.com/Schniz/fnm/issues/4#issuecomment-832589427

winget would be very nice, however it requires that packages have an installer. This could easily be created with msitools or NSIS under Linux.

Sorry for the bump / necropost winget in the future doesn't need the package to have an installer, but we need to wait for microsoft/winget-cli#140

Originally posted by @Hazmi35 in https://github.com/Schniz/fnm/issues/4#issuecomment-921762739

So while it would be nice if winget could already install plain .zip files, that is currently not the case yet.

Creating an installer that also takes care of setting the PATH seems like the best option then, which could then easily be turned into a winget package:

janpio commented 2 years ago

Volta seems to have an interesting GH Actions workflow that could probably help with the first step: https://github.com/volta-cli/volta/blob/7eb56c3aab5fbe47effe156a3f573428a4ed44ae/.github/workflows/release.yml#L106-L158

awdr74100 commented 2 years ago

Very important for users who transfer from scoop to winget! Where can I help right now? Although I'm not familiar with rust.

latipun7 commented 2 years ago

winget now support portable software installation: https://github.com/microsoft/winget-cli/releases/tag/v1.3.2091 Didn't require installer, CMIIW it only require the portable binary (*.exe). If fnm release the exe file (not inside zip), I think it could be done using winget-create in CI/CD. (I'm not familiar with winget workflows yet).

alumni commented 1 year ago

Seems to have been implemented in https://github.com/microsoft/winget-pkgs/pull/98786