> Putting an application bundle on your local disk anywhere is sufficient to get file type mappings to work.
How does this work "under the hood"?
"Bundles" and "packages" as a general concept are interesting. Lots of games from DOOM upwards use "packfiles", which are effectively lots of files in a never-unpacked container. You can't see them in the filesystem, because the intent was to avoid incurring filesystem overhead for them. MacOS bundles appear to have gone in the opposite direction: the structure is brittle (if you move anything it breaks signing), but it's unpacked into the filesystem.
Under the hood, Apple used to have a tech note on it but I can’t find it right now. Essentially the OS uses file system event notifications to watch for bundles being added or removed. It maintains a database of the mappings declared in the plist for fast lookups.
Icon for what? .apps inside dmgs have icons just fine, like anywhere else (locally). Moreover, people add background images via some special metadata files, to have those arrows telling you to drop the .app onto the symlink to the Applications folder.
For things like kernel extensions yes there’s an installer, and some more invasive apps do that as well. But for a plain app there’s no _need_ for an installer. That doesn’t prohibit them of course.
That said there isn’t an ‘install’ as such on macOS. Applications isn’t a special folder, it’s a regular folder like anything else. Putting an application bundle on your local disk anywhere is sufficient to get file type mappings to work.
The downside of course is there’s no corresponding uninstall that removes anything extra the app dropped in to ~/Library.