r/programming • u/Wireless_Life • May 19 '20
Microsoft announces the Windows Package Manager Preview
https://devblogs.microsoft.com/commandline/windows-package-manager-preview/?WT.mc_id=ITOPSTALK-reddit-abartolo
4.6k
Upvotes
1.7k
u/Wireless_Life May 19 '20
Just about every developer has wanted a native package manager in Windows. That day is finally here. You are going to be able to winget install your way to bliss. One of the best parts is that it is open source. I had to pinch myself when I was able to winget install terminal, and then winget install powershell, and then winget install powertoys.
16
u/Wireless_Life May 19 '20 edited May 19 '20
Windows Package Manager Preview is available for download here
228
u/[deleted] May 19 '20
c:\ > runas Administrator winget install update
481
u/RecursiveAstronaut May 19 '20
Hell just froze.
242
u/Nefari0uss May 19 '20
Fucking finally. Really looking forward to this and migrating away from Chocolatey, Scoop, and the like.
40
u/asegura May 19 '20 edited May 19 '20
Very nice indeed! but:
33
u/Nowaker May 20 '20
Issue #223 is hilarious and brutally true.
79
u/amroamroamro May 19 '20
I don't see this as a proper "package manager" (neither Chocolatey, scoop, .. for that matters), all they do is automate downloading existing installers (exe, msi, zip, ...) and taking care of running the installers, unpacking the archive, etc.
For it to be a package manager they need to design a well-defined packaging format, and everyone else releasing their apps packaged using that format (I'm thinking MSIX).
Hence this will still suffer from the same shortcomings as all the other solutions that already exist.
74
u/[deleted] May 19 '20
As someone that never used the other 3rd party windows package managers -- but read about them and was recently considering getting familiar -- is this a replacement for the normal application manager ala "Add/Remove Programs"?
What is uninstalling and upgrading like with this? I hate the cruft that is left behind in the registry, and ApplicationData and other locations throughout Windows, so I would love for this to be a major shift in how this is handled.
50
u/duyaw May 19 '20
Pretty awesome. I hope they have good powershell cmdlets,
chocoalways annoys me when I have to check for exit codes.Also a Windows equivalent of
sudowould be nice.19
u/krystalgamer May 19 '20
rip chocolatey
29
u/jeeeeefff May 19 '20
Huh. The name is literally "wing it". Years and years of jokes inbound
8
u/CatchGerardDobby May 19 '20
Will this support shared dependencies?
As I understand it in Linux, if multiple programs reference, say, the same version of ffmpeg, they will all use the same binaries for that dependency. Will this be the case here?
8
u/[deleted] May 19 '20
MFW windows changes its name to WINDos and says it stands for”WINDos Is Not Dos”
32
u/DarknessKinG May 19 '20
Did any of you that are complaining read the Roadmap ?
They are going to add (uninstall, update, dependency support etc.. )
26
u/moopet May 19 '20
Let's all put our hands together and welcome Microsoft to 1997.
17
u/no_nick May 19 '20
Microsoft should just rewrite windows as a DM for Linux and port office and its other stuff to Linux as well at this point
12
u/KallDrexx May 19 '20
God please let this not be piggy backing off the terrible Microsoft store infrastructure. I don't understand how the Microsoft store has gone for so long as the most buggy download system known to man.
134
u/Parachuteee May 19 '20
Ubuntu: Noooo you can't just keep copying Linux features
Microsoft: haha developer user base goes brrr
6
u/teiman May 19 '20
Honestly: when I install something on mac, I try brew first. is just too smooth compared to the app store. I also forget my passwords often :(
35
u/thanasis2028 May 19 '20
And only like 25 years late!
28
u/nuunien May 19 '20
This looks really stupid. Just a yaml file to tell where to download outdated software from, then silently execute it. No way to specify dependencies, uninstall, or update something.
This is NOT a package manager, you should not have released this under the guise of "wanted to make it OSS". This is shit, and you should be ashamed.
Then you have the gall to ask us to contribute to your piece of shit software. Perhaps get actual software engineers involved with such a much-needed critical software, and not the first rando interns you had available.
21
u/amazingmrbrock May 19 '20
Yes the linuxifocation of Windows is coming along nicely. I'm predicting full kernel switchover by 2025
11
u/Splanky222 May 19 '20
How does this compare with vcpkg?
8
u/mishugashu May 19 '20
Wow, Microsoft stepping into the 21st century finally. Welcome, Windows users.
8
u/-Defkon1- May 19 '20
Redmond: Becoming Linux
4
u/[deleted] May 19 '20
I really hope we would have the ability to create our own custom repositories. Imagine how useful this will be for businesses to keep software updated on client machines. They could have their own repository as the only repository with all the apps that they approve of and a scheduled task that can update and upgrade all the software on their client machines.
9
u/dood1337 May 19 '20
Is this a dream?
3
u/AttackOfTheThumbs May 19 '20
Can we control updates / schedule? I don't want stuff to update unless I say yes.
4
u/Pixa May 19 '20
Huh... Everyone's probably going to be like "finally catching up to Linux", except this is nothing like that, it's just a worse version of chocolatey...
At least chocolatey packages contain the installer. What happens if your software vendor updates their website and changes the download URL?
Any Windows package manager that doesn't put its foot down and insist on a real software package format like MSI or MSIX isn't a package manager, it's cruft that gets in the way.
I don't get what the use case for something like this is anyway. I don't re-image my PCs regularly enough to warrant automating the installation process, and if I did, there will always a few pieces of software where the vendor doesn't upload packages or manifests and the guy who was uploading them in his spare time stopped 4 years ago after he graduated and got a full time job. If I wanted to deploy software across a fleet of PCs I'd either use Active directory, or just script the exe I wanted to use in the first place! After all, that's all this tool is doing.
5
u/antenore May 19 '20
We want a package manager!
20 years later…
Now we want custom repositories and user contributed packages!
…
2
u/ftgander May 20 '20
Lmk when it does all the things scoop does
2
u/Corvokillsalot May 20 '20
another attack surface
2
u/[deleted] May 20 '20
This looks a lot like Homebrew Cask (or at least it will when they add all the functionalities such as uninstallation and upgrade).
On macOS though, many apps are just .app folders and the OS can keep track of the files installed by a .pkg installer, so the whole uninstallation process is managed quite decently (although it's still very ugly compared to a real Linux package manager).
I'm not sure how this would be feasible on Windows, where 90% of the software uses .exe installers that can do whatever they want (or at least this was my understanding).
Nowadays Scoop follows the best approach IMHO, using portable installation every time it's possible and putting everything in a single place managed by Scoop itself, but I don't think that Microsoft is going to follow the same path here..
2
u/panorambo May 20 '20 edited May 21 '20
I have to admit I don't understand why most of you think Windows was lacking a package manager.
Not very long time ago I had to learn how to distribute a good old desktop application I wrote for Windows. Now, before we start classifying Windows software, you have to understand that by good old desktop application I mean one that basically relies on the venerable Win32 API. Win32 is the largest set of functionality Windows provides, by far, so just about anything that can be written and has been written to run on Windows uses Win32, directly or not. I am including things like COM and DirectX there.
Anyway, I had to pick a packaging technology. I've always majorly disliked the idea of distributing an installation as an .exe file, for several reasons I consider good ones. For one, .exe files can't be easily introspected for what is actually being installed (application files, configuration, auxilary services, drivers, etc) where and what options one has for customizing the installation. Unless the vendor has gone out of their way documenting command line options to said .exe file, which they normally don't. Second, .exe files have been, still are and will always be a great malware vector -- tempting to hide a bootstrapping worm or other malicious piece of code in that PE file, with all the granularity it provides. Third, .exe files are subject to all kinds of restrictions, being how they're native program images. There are other reasons, but these three are enough for me to not ever consider distributing Windows application installations (or packages) as .exe files.
A ZIP/similar archival format is also not optimal -- it's just short of a package format (unless it's self-extractable which makes it an .exe again, with most of the latter's shortcomings in this context), as such only suited for purely portable distributions -- no file type registrations (before first launch) or application registration (in the program list, for one) of other kinds. All you have is ability to unpack a bunch of files and folders somewhere. An installation often requires a good bit more than that.
Anyway, with any novel package file format or technology, there always is the "boostrapping" problem -- you need to obtain the actual package manager before you can use it to install and manage your software. It's a barrier to entry for every such product that isn't part of Windows already.
Now, Microsoft has been shipping Windows Installer for many years now, and given how they're in a unique position to bundle anything they want with their operating system (we'll ignore antitrust issues here), that's what I'd call the homefield advantage. Anyway, Windows Installer has been there for 30 years and if you have ever had to deal with .msi files one way or another, well that is it.
Some good things about .msi files are that they're declarative, essentially self-contained, extensible relational databases consisting of installation components, features, files, registry values and other kind of elements (COM classes come to mind, which I think is an awesome technology). There are other redeemable features, too -- Windows Installer, specifically its command line agent
msiexec.execan install and uninstall packages by URLs. And here you already have the markings of the repository concept -- since a person installing a product implicitly has to trust the vendor of the product, they will trust the vendors Internet domain name. It makes all kinds of sense then to be able to install the product using an URL with the vendors domain name as host name -- directly from the vendor. But if the user would, for some reason, prefer another mirror or be forced to use one, you can still host a bunch of .msi files with a HTTP proxy or mirror..msi files can be signed. They can track versions of the components they package, too. Installations are transactional by nature, and can be extended through custom actions -- for things that don't lend to the kind of declarations built into Windows Installer (files, registry values, COM classes, and some others). Windows Installer transparently supports installation of the same package through unattended/command-line/GUI installation method, with minimal provision from package author -- the same package can be installed with a GUI or without it, unattended if desired.
The picture I am trying to paint is that perhaps we could instead invest time and energy into solutions that have been "hiding in plain sight", instead of acting like the new shiny is much better anyhow. In Windows, things either collect dust on the shelf or are replaced so rapidly you aren't sure you missed it. How is Winget going to be better than what's already there?
For me, a package manager is a way to conveniently manage installed software, and thinking about it, I don't miss all that much from Windows Installer save for market penetration. I think Microsoft were a bit shy about it, for one reason or another, and it had its market share eaten by the likes of InstallShield (ugh, I have banged my head against that wall), NSIS, WYSE, and InnoSetup to name some, all in a critical period of time when it was in its infancy and needed to make it. It was ironically much loved in organisations where wieldly package management across entire organisational domain was critical.
With MSI, you can install software with:
If the vendor updates the msi file served with above URL, the same command can intelligently (the package can have a say in it) update the software. Uninstallation is done with
/xinstead of/i.How isn't that at least decent form of package management? And if you can't be arsed with remembering URLs for your favourite software, then use a proxy and a mirror with as short URLs as you can have without name collision.
We could also at least have an MSI-compatible package manager on top of msiexec, if it's too low-level or insufficient. That way Microsoft could perhaps get back into Windows Installer game -- the latter hasn't seen an update in 10 years or so. It has dust on it, but the engine is good, I think.
11
u/Smaktat May 19 '20 edited May 19 '20
Looking for some why from the perspective of someone who's excited about this.
e: Yo if you downvote legit questions, others may not see it and it'll collapse the comment node automatically. Please have some respect for asking questions and don't create an environment where we can't ask them.
3
u/bmw_fan1986 May 20 '20
ITT: People pissed off at a very early initial v1.0 release of software.
Honestly, it’s a huge step in the right direction. If MS starts including feature function everyone has complained about in this thread, it won’t be that bad. They probably open sourced it to start getting more developers to commit ideas and code, make it better, and design and develop it the way the community wants.
2
u/[deleted] May 19 '20
Oh sweet baby Jesus, yes!
2
u/Where_Do_I_Fit_In May 19 '20
Fucking finally. If they continue to adopt Linux features. Windows might become at least a usable (less frustrating) piece of software down the line. I almost feel like it is too late though with all the legacy third-party installers that have to be accommodated. Idk at the very least it's another move in the right direction.
1
u/chutiyabehenchod May 19 '20
who actually uses windows over linux for development?
1
u/Bjartensen May 19 '20
This really is the one killer feature that I think Linux had over Windows. I cringe thinking about when I used to uncritically google my way to a website to download an .exe file. I have seen many times people end up on weird unofficial websites to get the file.
1
u/[deleted] May 19 '20
Will this help Sys Admins?
1
u/SurelyNotAnOctopus May 19 '20
Does that mean standardized / preinstalled libraries? Oh boy
1
u/[deleted] May 20 '20
A terminal that actually works and a package manager? It's taking them a while, but they're slowly dragging Windows out of the dark ages and making it useful for developers.
1
u/[deleted] May 20 '20
Didn't Windows Store update software ?
1
u/Lucarai May 20 '20
WSL2 going public/main update branch this month too, SICK
1
u/bombastica May 20 '20
Nice. I love homebrew on macOS. This is a big feature win for Windows.
1
u/EarLil May 20 '20
would really wish that microsoft store worked without login in... maybe installing this app will be enough to overcome that restriction
1
u/[deleted] May 20 '20
So more stuff that Linux has enjoyed for years finally comes to Windows.
1
u/bowmanpete123 May 20 '20
It's a weird hunch windows is becoming more and more like the tech company version of that boomer uncle that's like "Hey kids, I can shizzle with you groovy young ones."
1
u/[deleted] May 20 '20
Thanks to Linux again and again (30 years later)
1
u/germandiago May 20 '20
Finally! apt in Linux! Very handy.
1
u/sephirothbahamut May 20 '20
How long would it take to simply let traditional programs in the app store so third parties can simply make their installers available there, and later give the store package manager capabilities (shifting updates to the store rather than individual programs etcc)?
1
u/JJakk10 May 20 '20
Why would you need that when you can just use WSL
1
u/emdeka87 May 20 '20
Chocolately worked just fine. No need to fucking reinvent the wheel
1
u/bundt_chi May 20 '20
I'm glad they're finally doing this but I recently discovered scoop.sh and I really like it a lot. One of the biggest things that turned me on to it over chocolatey is how transparent the repository maintenance and configuration is (managed as json files in "buckets" in a github repo).
I often work in an environment that's pretty locked down and the ability to quickly setup a custom software repo (bucket) that's all allowed SW and their versions was one of the biggest features.
I hope MS allows for locally hosted package repos and an as transparent and easy to use system...
1
u/not_perfect_yet May 20 '20
I really hate how software companies get away with lies like this.
They didn't want to. Simple as that.
Linux package managers are secure. If Microsoft wants features like static analysis to be included in the package somehow, I'm sure there is way to integrate that into existing system.
It's ok to not want to directly build for your competition. Just admit it. Even if it's just "We did a cost benefit analysis and interacting with the community to collaborate on this didn't meet our requirements".
But I am so tired of the bullshitting. "hurr durr durr, can't be done" "we love open source".
Probably big news though, even if I don't like the way it's presented.
1
u/tgejesse May 20 '20
Long overdue
1
u/tgejesse May 20 '20
I wonder when this will be native
1
u/shawntco May 20 '20
Reading the comments, it makes me think they simply announced this too soon. Surely they knew devs would rip them a new one for its incomplete nature. I can excuse them a little since it's called a Preview, but saying "You can start using it today!" is disingenuous.
1
u/panorambo May 20 '20
Anyone knows if this package manager can use the AppX package format, or MSI, or both, or neither?
1
u/hoppi_ May 27 '20
This is not as awesome and super great as people seem to think. There is something interesting in the sysadmin sub about the implications and consequences. More here: https://www.reddit.com/r/sysadmin/comments/gmrwxi/windows_package_manager_wingetexe/fr6b7wi/
1
u/TheRexedS May 19 '20
Can anyone explain to me what advantages does this have over downloading an app from the Microsoft Store (Microsoft Store takes care of automatic downloads as well).
1
u/badpotato May 19 '20 edited May 20 '20
Now if they could just provide an up-to-date version of Windows for Vagrant without license so we can install a Windows VM from our Linux OS, so people don't need to reload a snapshot every so often when the license is out-to-date, just to run their corporate Windows-only app to get their token for authentication, etc. That would be nice.
1
u/port53 May 20 '20
Just in time for everyone else to move away from managed packages and on to big blobs of self-contained code and data that can be deployed rapidly on any platform, regardless of base os or even architecture.
1
u/sucuk May 20 '20
Please Microsoft, we're so tired of winning