Skip to content
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

Distribute via winget repository #262

Closed
Khaos66 opened this issue Dec 2, 2021 · 12 comments
Closed

Distribute via winget repository #262

Khaos66 opened this issue Dec 2, 2021 · 12 comments

Comments

@Khaos66
Copy link

Khaos66 commented Dec 2, 2021

Microsofts winget is great. But it would be even better if this tool was installable via winget ;)

Please see the docs to submit a package. Should be easy to include in the publish pipeline.
https://docs.microsoft.com/en-us/windows/package-manager/package/

@oleg-shilo
Copy link
Owner

oleg-shilo commented Dec 3, 2021

Interesting,
As a publisher I do prefer simplified Winget model over existing cs-script package on Chocolatey.
But as a consumer, would you prefer winget over choco?

@Khaos66
Copy link
Author

Khaos66 commented Dec 3, 2021

It wouldn't hurt to supply both or would it?
Winget comes preinstalled with current versions of window. So I think it will replace all other package managers once it is feature complete

@oleg-shilo
Copy link
Owner

...or would it?

It would "hurt my time" to implement it and add an addition flow in the release build process. :o)

Anyway, I have marked it as Enhancement. Will see what can be done with a minimal effort.

@Khaos66
Copy link
Author

Khaos66 commented Dec 5, 2021

Understandable ;)

@oleg-shilo
Copy link
Owner

Oh, there is a problem with winget. It only supports limited installers types. On Choco CS-Script is distributed as 7Zip package with the script engine file and and winget only supports
image

meaning that in order to publish it on winget one need to create a full scale installer instead of light weight shime based deployment as with Choco.
😞

@masterflitzer
Copy link

@oleg-shilo
Copy link
Owner

Excellent. Will have a look.
While WinGet is a little old school comparing to dotnet-tool, chocolatey and scoop, it has a very attractive side. The package manager itself is a part of OS.

@oleg-shilo
Copy link
Owner

oleg-shilo commented Nov 29, 2023

Done:

winget install cs-script  

WinGet was an interesting experience that left me with mixed feelings.

It offers arguably the best user experience. The development experience was quite OK as well. The "create package" wizard does an excellent job. I was able to register a couple other tools in no time.

However, the shortcomings of the technology are quite obvious. The inability to have any sort of behavior defined by the vendor is quite suffocating. Chocolatey ROCKS!

It's clear that portable packages are treated as second-class citizens. The concept of "winget links" is very weak. WinGet creates a sym-link to the primary executable from the package. It's not optional. You must define which link to create, even if you do not need/want to.

Though, it's well known that the sym-links do not work with exe that have heavy dependencies. Thus it puts in limbo any relatively complex .NET exe. Chocolatey has recognized this problem and introduced the concept of Shims instead. But WinGet team only discovered it recently. They are working on the problem without any indication of the timeline.

As a result, my cs-script submission was put in an indefinite pending state. Think about it. CS-Script package is not impacted by the widget sym-link problem but only shows to the WinGet team that the problem exists. They accepted that it is winget that needs to change but did not progress my submission even though the package can work with that winget limitation.

I only managed to get through by making the next version submission that simply avoids drawing attention to the problem.

Anyway you can use this distro now.

BTW as a side micro-project mkshim I have published on winget an equivalent of Chocolatey ShimGen tool so this functionality is available to anyone without the need to install choco.
Even WinGet team can use it 😄

@masterflitzer
Copy link

Hey, thank you very much for going through the whole process to make cs-script more easily available for those of us that only use winget due to company policy or due to any other reasons

I really appreciate it, even tho you encountered the shortcomings you described and had to make multiple attempts

@oleg-shilo
Copy link
Owner

only use winget due to company policy

I am a little surprised about that. Choco is a much stronger option from cybersecurity angle. Usually this angle is the main consideration of the IT team. 😄

@masterflitzer
Copy link

i never really looked into choco security wise (i actually used it only for a short while) but often you are not allowed to use certain things especially if they are not by microsoft while they provide an existing alternative

that's actually one of the reasons why i switched to macos at work, less restrictions and unix-like

on my personal computer i use winget over alternatives because it's already preinstalled and i don't heavily use package managers on my windows machine anyway it's more for gaming while i use linux for dev

anyway thx for making it happen

@oleg-shilo
Copy link
Owner

I do give Choco a preference even though it gives me as a vendor a headache.
A single PS command installs it and here we go. You have it.
Some of the advantages of choco:

  • it solved shiming problem
  • it screens vendors who wants to publish their products.
  • it runs TotalVirus agains all distributables. As a vendor I hate false positives, but as a user I don't mind it.
  • it allows vendors to do a good job at deploying
  • it can uninstall even locked (currently running) products

Winget fails on all of these points. Though it rocks on a very important one: it comes preinstalled.

Even though both solutions have virtually same CLI see how winget appeals.
If some ask me "how do I install sudo for win?", I have to options for an answer:

  • Just run winget install win-sudo
  • Install choco (you wil find the command on Chocolatey.com) and then just run choco install win-sudo

You know which one is easier :o)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants