<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div dir="auto" style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">My initial email from yesterday got held back because the size was too big. Hopefully this version makes it through.<br class=""><div><br class=""><div class="">Begin forwarded message:</div><br class="Apple-interchange-newline"><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;" class=""><span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif; color:rgba(0, 0, 0, 1.0);" class=""><b class="">From: </b></span><span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif;" class="">Elsie Hupp <<a href="mailto:xdg@elsiehupp.com" class="">xdg@elsiehupp.com</a>><br class=""></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;" class=""><span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif; color:rgba(0, 0, 0, 1.0);" class=""><b class="">Subject: </b></span><span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif;" class=""><b class="">Re: Feature request to expand MIME in order to allow application register default treatment of directories with custom extension</b><br class=""></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;" class=""><span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif; color:rgba(0, 0, 0, 1.0);" class=""><b class="">Date: </b></span><span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif;" class="">June 17, 2022 at 3:00:12 PM EDT<br class=""></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;" class=""><span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif; color:rgba(0, 0, 0, 1.0);" class=""><b class="">To: </b></span><span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif;" class=""><a href="mailto:xdg@lists.freedesktop.org" class="">xdg@lists.freedesktop.org</a><br class=""></span></div><br class=""><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi H.G., et al,<div class=""><br class=""></div><div class="">One potentially useful precedent here is RFC 2557, or “MIME Encapsulation of Aggregate Documents, such as HTML (MHTML)”:</div><div class=""><br class=""></div><div class=""><a href="https://datatracker.ietf.org/doc/html/rfc2557" class="">https://datatracker.ietf.org/doc/html/rfc2557</a></div><div class=""><br class=""></div><div class="">I’m not entirely sure why this never caught on.</div><div class=""><br class=""></div><div class="">…</div><div class=""><br class=""></div><div class="">Another potentially useful precedent is the AppImage Project (discussed further in the conclusion):</div><div class=""><br class=""></div><div class=""><a href="https://appimage.org/" class="">https://appimage.org/</a></div><div class=""><br class=""></div><div class="">…<br class=""><div class=""><br class=""></div><div class="">The related format for macOS is called `CFBundles`, specifically the `CFBundles` subtype `DocumentPackages`:</div><div class=""><br class=""></div><div class=""><a href="https://developer.apple.com/library/archive/documentation/CoreFoundation/Conceptual/CFBundles/DocumentPackages/DocumentPackages.html" class="">https://developer.apple.com/library/archive/documentation/CoreFoundation/Conceptual/CFBundles/DocumentPackages/DocumentPackages.html</a></div><div class=""><br class=""></div><div class="">CFBundles are structured something like the following:</div><div class=""><br class=""></div><div class=""><img apple-inline="yes" id="A4DA55DC-BAF4-494A-9283-EB1BD4929915" src="cid:C506405B-93BD-4868-A7B6-F0505029AE3F" class=""></div><div class=""><br class=""></div><div class="">Note that this example has most of the contents removed, and I manually changed the icon of the topmost folder, because you can’t actually show the contents of a CFBundle in this way in the Finder unless you break the extension (i.e by literally adding the string “ <with certain items removed>”).</div><div class=""><br class=""></div><div class="">On an aggressively simplified level, the contents are as follows:</div><div class=""><br class=""></div><div class="">(1) `Info.plist` is an XML manifest describing the contents so that the operating system knows how to treat the bundle.</div><div class="">(2) The `MacOS` directory contains any executables.</div><div class="">(3) The `Resources` contains almost everything else, such as, for example, the application icon, etc.</div><div class=""><br class=""></div><div class="">`CFBundles` that are not applications only need a top-level `Info.plist` (with or without the `Contents` directory) and can use basically any directory structure they want, but historically `DocumentPackages` have used structures very similar to application bundles.</div><div class=""><br class=""></div><div class="">Also IIRC at some point Apple added the ability to have `CFBundles` that are ZIP archives, but I don’t entirely know what’s involved with that.</div><div class=""><br class=""></div><div class="">It’s worth mentioning that Apple has moved away from `DocumentPackages` (as evidenced by the fact that the documentation for them is no longer updated) as they have instead encouraged developers to use obfuscated storage in the `~/Library` folder, since this type of storage works better when cloud-syncing user data with iOS apps.</div><div class=""><br class=""></div><div class="">…</div><div class=""><br class=""></div><div class="">While it would be nice if Linux file managers had at least a basic level of support for `CFBundles` (i.e. showing them as “files" rather than as “folders”, along with some clever icon heuristic, even if only to keep users from accidentally mangling them), and it would be nice if bundles created by Linux applications also “just worked” on macOS, there isn’t any inherent reason an XDG standard would need to be 100% cross-compatible with the corresponding macOS format.</div><div class=""><br class=""></div><div class="">That said, the basic idea of `CFBundles`, with a “file extension” appended to a directory and an XML (or similar) manifest explaining (though not necessarily enumerating) the bundle’s contents could be a good place to start for a similar XDG standard.</div><div class=""><br class=""></div><div class="">Considering what standards XDG does already support, some starting points for a manifest format could be:</div><div class=""><br class=""></div><div class="">The XDG Desktop Entry specification:</div><div class=""><a href="https://specifications.freedesktop.org/desktop-entry-spec/" class="">https://specifications.freedesktop.org/desktop-entry-spec/</a></div><div class=""><br class=""></div><div class="">The XDG AppStream specification:</div><div class=""><a href="https://www.freedesktop.org/software/appstream/docs/" class="">https://www.freedesktop.org/software/appstream/docs/</a></div><div class=""><br class=""></div><div class="">(The Desktop Entry specification is probably more applicable, though.)</div><div class=""><br class=""></div><div class="">The AppImage Project may also be relevant to an extent (as it parallels the portability of macOS application bundles):</div><div class=""><br class=""></div><div class=""><a href="https://appimage.org/" class="">https://appimage.org/</a></div><div class=""><br class=""></div><div class="">One potential option for cross-compatibility could be a mostly boilerplate `Info.plist` “wrapping” an XDG Desktop Entry (rather similar to or even compatible with the AppImage `AppDir`), though I know little enough about how either format is parsed to know how exactly this sort of hybrid bundle would be implemented.</div><div class=""><br class=""></div><div class="">…</div><div class=""><br class=""></div><div class="">Anybody else have any thoughts here?</div><div class=""><br class=""></div><div class="">Best,</div><div class="">Elsie Hupp</div></div></div></div></div></div></body></html>