News for hackers. Stuff that matters.
Re:WinGet is terrible, I want AppGet back by yuuta on Saturday April 17, 2021 @02:12PM (#26846231)
WinGet is more like a "software center" of "application store" compared to what I understood a "package manager" is. From my understanding, a package manager should take care of the installation process: (optionally) compile the source and test them, copy the files to the system and run optional scripts and hooks. Most importantly, a package manager records all files that are installed and knows which file belongs to which package. When uninstalling, a package manager should remove the files by itself and make sure the software is uninstalled safely and completely. What WinGet does is just download the MSI or whatever setup binary and run it. It is more like a software index and downloader rather than an actual package manager.
Re:WinGet is terrible, I want AppGet back by voidfunc on Saturday April 17, 2021 @03:02PM (#26846577)
The MSI infrastructure already does most of that... there really shouldn’t be much need for all the other stuff. Windows isnt like Linux where programs spew files all over the FS. Programs stay pretty self-contained to their part of the registry, program files, and the user profile data directory
Re:WinGet is terrible, I want AppGet back by easton on Saturday April 17, 2021 @03:17PM (#26846696)
If application developers actually use MSI(X) instead of Nullsoft/InstallShield/Inno/random homegrown EXE installer that spews stuff all over the FS. I've been contributing a lot to the winget repo, and well over half of the applications (including Microsoft(!) software, including Office, Visual Studio, Teams, and VSCode) do not come in a MSI.

It's been a gigantic annoyance for the people at Microsoft as they are trying to figure out how to do upgrades/uninstalls without the data you'd usually get from a deb or whatever.

Re:WinGet is terrible, I want AppGet back by EvanAnderson on Saturday April 17, 2021 @06:19PM (#26847934)
As a Windows sysadmin I pine for developers to use MSI. Having applications managed by the Windows Installer makes automated installation, removal, and repair so easy. MSI has its warts, to be sure, but "clean" MSIs (that don't rely on lots of custom actions, embed binaries that the just execute, etc) are a joy to work with.

How well a software developer / "manufacturer" deals with "setup" in the Windows ecosystem has almost always been a proxy for overall software quality in my experience. When "setup" is left as an afterthought I can usually expect other corners have been cut. When I see a custom binary running an installation I start thinking "brown M&M's".

Re:WinGet is terrible, I want AppGet back by wvenable on Sunday April 18, 2021 @12:50AM (#26849907)
As someone who dabbles in Windows desktop development, I still don't know the best way to even make an MSI. Some of the tools from Microsoft are usable but they all seem to be obsolete.
Re:WinGet is terrible, I want AppGet back by ptx on Sunday April 18, 2021 @12:49PM (#26854051)
The preferred solution seems to be WiX, which was created by some of the people behind MSI and generates the MSI database from an XML description.

Unfortunately it requires you to write (or copy from somewhere) literally thousands of lines of incomprehensible XML. You have to learn all the details of both MSI and the various novel sublanguages embedded in the WiX XML.

But fortunately you can generate all the XML from just a few lines of nice and clean C# using WiX#, which adds a user-friendly API on top of WiX and lets you forget about XML and databases entirely: https://github.com/oleg-shilo/wixsharp

Re:WinGet is terrible, I want AppGet back by EvanAnderson on Sunday April 18, 2021 @04:03PM (#26855804)
The perspectives in the comments on this article re: WiX XML source and Windows Installer being difficult are interesting to me. Like I said elsewhere, I overcame that learning curve so long ago that I can't put myself in a position where it seems daunting now.

To be fair, though, an MSI to install a 10 files in "C:\Program Files\AppName", register a couple .NET assemblies, create a couple of shortcuts, and throw a few values into the registry would amount to <100 lines of XML.

Here's a years-old WiX 2.0 syntax source file to install 4 files in "C:\Program Files\appname" and run an EXE embedded in the MSI to install a service: https://github.com/EvanAnderson/ts_block/blob/master/MSI/ts_...

I've only seen "thousands of lines" of WiX source when dealing programs that install a ton of files, or put scads of entries in the registry.

Most of the MSIs with WiX are based on a simple skeleton generated from a template, and using "includes" generated by the "candle" tool.

Understanding the Windows Installer and the WiX source feels analogous to what I see in "modern" web development-- a bunch of tools that developers use, seemingly without understanding what they do, to create a massive pile of edifice into which original code is finally placed.

Re:WinGet is terrible, I want AppGet back by EvanAnderson on Sunday April 18, 2021 @01:51AM (#26850115)
The WiX toolset[1] is what I use. I've never used the Visual Studio extensions for WiX. I do everything with a plain ol' text editor.

[1] https://wixtoolset.org/

Re:WinGet is terrible, I want AppGet back by for_xyz on Sunday April 18, 2021 @03:59AM (#26850686)
If you start from scratch, I'd suggest to use MSIX [0] instead. It makes auto update trivial to implement with PackageManager.UpdatePackage(url_to_your_msix)[1] or plain execute via "ms-appinstaller:?source=url_to_your_msix". It'll do diffs properly and you also get package reflection for free via WinRT apis (such as where app is installed, appdata location, app version, etc).

[0] https://docs.microsoft.com/en-us/windows/msix/overview

[1] https://docs.microsoft.com/en-us/uwp/api/windows.management....

Re:WinGet is terrible, I want AppGet back by wvenable on Sunday April 18, 2021 @12:42PM (#26853990)
Assuming I'm not building a UWP app, how do I build an MSIX. The only thing I found was the MSIX packaging tool and the description is this:

"You can run your desktop application installers through this tool and obtain an MSIX package that you can install on your machine or upload to the Microsoft Store. "

Gross.

Re:WinGet is terrible, I want AppGet back by EvanAnderson on Sunday April 18, 2021 @04:03PM (#26855812)
I need to look into MSIX. MSI has been handling my needs for awhile now but I hear MSIX is really nice. Thanks for the nudge to look in that direction.
Re:WinGet is terrible, I want AppGet back by spaetzleesser on Saturday April 17, 2021 @07:52PM (#26848490)
“It's been a gigantic annoyance for the people at Microsoft”

Maybe they should provide better tools. Last I tried to deal with MSI I quickly went back to NSIS and got it done in a fraction of the time.

Re:WinGet is terrible, I want AppGet back by sixothree on Saturday April 17, 2021 @08:49PM (#26848816)
The tools in Visual Studio definitely feel clunky and dated.
Re:WinGet is terrible, I want AppGet back by EvanAnderson on Saturday April 17, 2021 @11:29PM (#26849597)
I use the WiX toolset[1] to build MSI files. I can't comment on the learning curve, though. I've been using WiX for far too long to remember what learning it was like. I find MSI files and Windows Installer itself immensely valuable, so I can't imagine using anything that doesn't generate MSI files.

[1] https://wixtoolset.org/

Re:WinGet is terrible, I want AppGet back by Varriount on Sunday April 18, 2021 @04:41AM (#26850838)
When I used WiX, I found it very... clunky? Everything in XML, lots of attributes to fill out, etc. And, at least when I was trying it out, the generated MSIs didn't appear to have any sort of GUI (or so I read. I don't believe I ever got to the point of generating an MSI).

I will say though, I remember the documentation being helpful and fairly straightforward, if a tad large (but that's what you get with a tool that's supposed to solve a complex problem).

Re:WinGet is terrible, I want AppGet back by merb on Sunday April 18, 2021 @04:35AM (#26850816)
msix is truly a good format, but it has some limitations. it's hard to have external dependencies and you NEED a certificate.
Re:WinGet is terrible, I want AppGet back by alkonaut on Saturday April 17, 2021 @05:11PM (#26847492)
Don't some of those help build msi packages? I thought at least InstallShield did.
Re:WinGet is terrible, I want AppGet back by EvanAnderson on Saturday April 17, 2021 @06:09PM (#26847864)
InstallShield can, but they're not particularly nice MSIs. I remember an old Symantec Antivirus MSI (2005-2006 timeframe) that used InstallShield's "ISScript" which ended up not being capable of being uninstalled in an automated manner. It was a pain. Search-engining those keywords today shows me that ISScript-related problems persist.
Re:WinGet is terrible, I want AppGet back by chungy on Saturday April 17, 2021 @04:39PM (#26847265)
> Windows isnt like Linux where programs spew files all over the FS.

Are we living in the same universe? Did you mix up the OSes?

Re:WinGet is terrible, I want AppGet back by majkinetor on Saturday April 17, 2021 @05:11PM (#26847496)
It was mostly true tho, even nowdays... Windows tools where historically in single folder.

Then came the registry

Then came the AppData.

Now its more or less the same as on linux.

Re:WinGet is terrible, I want AppGet back by alkonaut on Saturday April 17, 2021 @05:33PM (#26847630)
Linux does have some weirdness still where apps occasionally put files in the same directory not just under the same directory. You have the same separation in windows as in linux mostly (user data, app data, app binaries, settings, startup ...) but on windows all of those are directories per-app under the folder in question. Like %ProgramFiles\MyApp, %UserProfile%\AppData\Local\MyApp or %ProgramData%\MyApp for example.
Re:WinGet is terrible, I want AppGet back by majkinetor on Saturday April 17, 2021 @05:36PM (#26847652)
Matter of taste I guess. I always disliked the linux way and prefer clear separation of concerns.
Re:WinGet is terrible, I want AppGet back by alkonaut on Saturday April 17, 2021 @05:44PM (#26847696)
Same. Especially sharing any binaries between applications. For a single user desktop system it just seems like a backwards idea.
Re:WinGet is terrible, I want AppGet back by merb on Sunday April 18, 2021 @06:12AM (#26851223)
btw. with msix or flatpak things did change significantly. well microsoft does it a little better because production msix create a kind of sandbox appdata/storage.
Re:WinGet is terrible, I want AppGet back by horlux on Saturday April 17, 2021 @04:02PM (#26847010)
Linux programs don't normally do that, they put files in known places /bin, /etc /lib and so on
Re:WinGet is terrible, I want AppGet back by encryptluks2 on Saturday April 17, 2021 @06:00PM (#26847810)
And the package manager knows exactly where all the files are unless they are just config files, which are generally in .config or .local/share, and they are a lot easier than to track than the Windows registry.
Re:WinGet is terrible, I want AppGet back by TwoBit on Saturday April 17, 2021 @09:56PM (#26849134)
Seems like "and so on" implies there are a bunch of places.
Re:WinGet is terrible, I want AppGet back by ncmncm on Saturday April 17, 2021 @11:16PM (#26849546)
There are well-known places for well-known purposes.

Your house has a kitchen, bathroom, bedrooms, "and so on". You don't keep your car or skilsaw in the ones listed, but there is a place for each.

Re:WinGet is terrible, I want AppGet back by RedShift1 on Sunday April 18, 2021 @12:53AM (#26849917)
> Programs stay pretty self-contained to their part of the registry, program files, and the user profile data directory

There is nothing about MSI that enforces this. You can make an MSI that spews files all over, no problem.

Re:WinGet is terrible, I want AppGet back by thu2111 on Sunday April 18, 2021 @06:27AM (#26851278)
That's true for legacy MSI. MSI comes in two versions now. There is also MSIX.

MSIX is actually quite good. Apps run inside a semi-virtualised container, so that writes to the registry and AppData are redirected. Uninstalling the app therefore uninstalls all of it, even if the app doesn't cooperate. MSIX can also be upgraded automatically in the background by Windows itself.

However, it's new, so nothing uses it.

Re:WinGet is terrible, I want AppGet back by michannne on Saturday April 17, 2021 @02:52PM (#26846498)
That sounds so lazy