News for hackers. Stuff that matters.
Re:Open Question: How Can We Fix Files? by pjc50 on Friday August 06, 2021 @04:34AM (#28084604)
At 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.

Re:Open Question: How Can We Fix Files? by sitharus on Friday August 06, 2021 @06:39PM (#28093597)
A .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.

Re:Open Question: How Can We Fix Files? by aasasd on Friday August 06, 2021 @06:21AM (#28085267)
> 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.