On 21 May 2016, at 15:46, Per Persson wrote:
The problem is that this information must be in the application’s
Info.plist, so if TextMate were to import this from bundles, it would
have to rewrite its own Info.plist […]
TextMate doesn't necessarily have to modify its own Info.plist, right?
By constructing a helper app, e.g. in Application Support, with a
tailored Info.plist based on info collected from the active bundles,
and then using lsregister to register/unregister UTI types there
wouldn't be any need to even run it (example below, based on
That is true, but if you want custom icons for the file types, they must
be assigned to this helper app.
This means the app will be launched when opening one of the file types,
and that’s where the signing requirement comes in, otherwise we’ll
get a GateKeeper warning.
If the user has the developer tools, it might be possible to do ad-hoc
signing, otherwise there is the ability to exclude certain files from
the signing, so it could maybe be possible to include a signed helper
app in TextMate.app where Info.plist and the Contents/Resources folder
are excluded from the signing, but I have not tested if the system will
actually allow this (the feature is so that language files can be
stripped without breaking the signature, so it might be limited in
So all in all, it might be made to work, but it’s definitely a kludge,
and while I do like the thought of having the file type UTI definitions
distributed over the bundles, it’s really no problem to add to
TextMate’s Info.plist (via a PR), the only downside here is that only
the major file types get custom icons, the rest share a generic document
That said, if you do a proof-of-concept for the above, I’m certainly
willing to give it a try and possibly merge it into TextMate, as we
would only need the helper when installing bundles with new UTI
definitions, so the implementation (e.g. right-clicking a file and
seeing it’s assigned to “TextMate Helper”, or seeing “TextMate
Helper” launching and quitting when opening the file) shouldn’t show
up for “normal use”.
Btw: Using the main textm...@lists.macromates.com even for “dev”
talk is perfectly fine, as it’s low traffic and the lines between
“dev” and “users” with TextMate is blurry.
textmate-dev mailing list