5 ms·
This is mostly a historical thing. There’s no real reason to use .dmg these days - historically it was the only Apple-supported way of compressing macOS files a
by sitharus 5y ago
This is mostly a historical thing. There’s no real reason to use .dmg these days - historically it was the only Apple-supported way of compressing macOS files and keeping their resource forks intact. These days .zip is fine.
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.
- unnah 5y agoSo if installation means simply moving an application to your local disk, or specifically to the Applications folder... then how does stuff end up in ~/Library instead?
- IshKebab 5y agoThere totally is an install. Tons of apps use a Windows-style install process.
- sitharus 5y agoFor applications there is no Windows style install process where things like the registry have to be updated, the os manages these associations itself. 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.
- pjc50 5y agoAt work we make a .pkg inside a .dmg, and I'm told this is because that's the only way to have an icon? > 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.
- aasasd 5y ago> that's the only way to have an icon 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.
- sitharus 5y agoA .app inside a zip is fine. 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.