News for hackers. Stuff that matters.
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.