I thought Linux app distribution was weird until I met Mac OS:

The standard way to distribute apps from websites (i.e. not the official store, not homebrew) is to package the app in a disk image (DMG, as it can hold the needed file permissions) then users download it, mount it like a CD from the 90s, then drag it to the applications folder (which, I guess, is how app installing worked since the 90s, but there isn't any hint in the UI explaining that to a first time user). If you open the app from the virtual drive (aka, without installing) it will work in a sandboxed state (seems useful IMHO).

That's weird. Mac OS users say it's simple. It isn't simple. That's fucked up. That's not intuitive at all. Apple surely doesn't care because they have their store.

#ux #linux #macos #technology

@qgustavor I always preferred it to the installers I had experienced in the windows days, but I agree it can’t compete with Linux. Both flatpaks and distro package installers make it easier to find, install, and update. On Mac, I do as much as I can in homebrew these days.
@thumbsup I'm learning Mac in order to develop a iOS app. I guess my lesson for today is: just use homebrew. I use apt get on (Debian) Linux, choco on Windows, it's just easier for me to just brew and get the job done.
@qgustavor Homebrew is excellent. You will feel right at home. There are even people who use it on linux.

@qgustavor

MacOS Leopard (10.5) and newer has a built-in installer program that can install an app from a package file, same as Windows.

The disk image approach exists for historical reasons. In the days before macOS 10, you'd typically install an app by drag-and-dropping it from a CD to wherever you want to install it. MacOS 9 added a disk image system so you could do the same with apps downloaded from the Internet, and this was kept in 10.

Why anyone is using disk images now, I don't know.

@qgustavor

My employer used to distribute apps on disk images as well, but we were forced to switch to installer packages because that's now the only way to show a license agreement before installation.

It used to be that a disk image could show a license agreement when you try to mount it, and I went to a great deal of trouble to figure out how to make it do that https://github.com/argv-minus-one/dmg-license , but Apple removed that functionality a while back. https://github.com/argv-minus-one/dmg-license/issues/11

GitHub - argv-minus-one/dmg-license: Generate license agreements for macOS .dmg files

Generate license agreements for macOS .dmg files. Contribute to argv-minus-one/dmg-license development by creating an account on GitHub.

GitHub

@argv_minus_one I searched about it before tooting, but it amused me seeing people saying "it's simple!". No, it isn't! The best DMGs I found include a shortcut to the applications folder and an arrow in the background (which, I guess, they put there using something akin to Windows's desktop.ini), but it surely isn't as intuitive nor simple as people think.

As for why people still use it, I guess backwards compatibility?

I could not install XAMPP at all from the DMG. It just failed. Said it might be unsafe. I then tried homebrew and it just worked. I will be using homebrew for now on!

@qgustavor

Backward compatibility with macOS 10.4? I seriously doubt it.

More likely it's just because developers don't know Installer exists.

As for “might be unsafe”, that's what macOS says when the app developer hasn't paid Apple a fee and submitted government ID to get a code signing certificate and then submitted the app itself for scanning and approval. Homebrew bypasses this whole system.

@qgustavor Yes, sometimes you need to know certain things. Just like anywhere else. I find it a bit absurd to expect that you can or must know everything about a system without any prior experience with it. And installing apps via DMGs is super easy. In most cases, the image also contains a link to /Applications. And many images also contain a background image showing the drag-and-drop installation. Just drag the app bundle onto the link. Done.

@hmpffff I couldn't install XAMPP using the provided DMG, I had to use brew.  

Edit: super easy  

@qgustavor I have been using macOS since 2002 and have never experienced a D'n'D installation that did not work. Of course, an app may not be executable, but that would be a bug in the app and not a problem with the installation method. This type of installation does have its limitations, of course, namely when files need to be distributed across multiple locations. In this case, installation via pkg is recommended.
@hmpffff What I find weird is that there was no instructions in the website I downloaded it. I tried moving to the applications folder and it didn't work, I tried opening it and it didn't work, the website said it was compatible with Intel Mac so it shouldn't be a problem. My issue with the installation method is because it looks obtuse. Sure, people used to it know workarounds and that's fine, it happens in every OS, but the error messages in this case were not helpful (it looks like the app wasn't signed) and I ended up just using brew, which worked.  

@qgustavor I just took a look at your XAMPP example. The problem here is, on the one hand, that the quarantine bit has to be deleted in order to start the installer. Then it is quite unusual to create installers via app bundles. The rule would be a pkg that is executed by the system's own installer.

You've used a very unusual case here to argue against DnD installation. :)

@hmpffff To be fair, I know I'm not used to Mac. It surely wasn't my first time using it, but using it as a kid in school back when Macs were huge colourful semitransparent big screens is different from having it today professionally. The installation issue might be just a XAMPP problem, after all, it surely would be better if I set up the staging environment using the same OS as the server (even more if I use Docker too) so using XAMPP on Mac maybe isn't the nicest of ideas. There is so much friction (as I'm not used to it, mainly shortcuts) that I'm considering developing everything on my PC and leaving the Mac just to compile the iOS builds. 
@qgustavor Maybe [Nix](https://nixos.org/) is worth a look. It's a great way to create dev environments for projects, so you get a totally reproducible installation of all tools on any Linux or macOS (with Nix installed). You can also use it to automatically start up the web server and a database, for example. I use it privately on my Mac (nix-darwin+home-manager), server (NixOS), and at work on OpenSUSE (home-manager).
Nix & NixOS | Declarative builds and deployments

Nix is a tool that takes a unique approach to package management and system configuration. Learn how to make reproducible, declarative and reliable systems.

@qgustavor A addition to DevEnvs with Nix. Based on Nix, there are at least three tools that provide DevEnvs without requiring you to delve deeper into Nix. I've never tried them because I prefer to use Nix directly (because of NixOS, nix-darwin, and home-manager). With regard to dev environments, you can probably do everything with them that you can with pure Nix, only with a lower barrier to entry.
https://devenv.sh/
https://flox.dev/
https://www.jetify.com/devbox
devenv

Fast, Declarative, Reproducible, and Composable Developer Environments using Nix

@qgustavor

Basically macOS has two app installation methods:

First is copying an App bundle into the

/Applications

folder. An App bundle is a directory using the .app extension. Inside it's structure you will find it's binay, assets and default configurations.

The other installation method is using a .pkg file that works similar to Microsoft's MSI packages. Just double click them and follow the instructions given by the installation wizard.

@qgustavor The app bundle installation method is kind of historically grown.

If you wanted to install software from a floppy to your HDD, you simply dragged and dropped your application from your floppy to the Applications folder.

Downloadable disc images mimic that behavior.

Yes, it's not very intuitive nowerdays, but it follows kind of an inner logic.

@kontrollierterWahnwitz That's what I commented on in other posts. I find it weird that people get so used to this behaviour that they find it "simple", while it's just a relic of the removable media era that some developers don't move on and have flaws.

In the end I ended up with the virtual media that I had to unmount, two versions of AnyDesk (my co-worker added a "AnyDesk 2" to that folder for whatever reason), XAMPP didn't work at all (I had to use brew), at least one installer didn't include a link to the applications folder. Well, my MacOS journey isn't going well: Xcode isn't working…