Recently, I've added the Dart.tmbundle to TextMate 2. It works OK however I'd like adding a "Dart_file.icns" in order to get the right icon. I've added some lines in the Info.plist of TextMate 2, the Icon file into the Resources directory but nothing change.
Then, what is the correct way to add a file icon into TextMate 2 ? Also, using applescript, i've found the identifier for *.dart files, it is part of archive file one terminating by -dart, strange... Before any trick the file icon was of a dmg one...
On 29 Nov 2013, at 1:26, Yvon Thoraval wrote:
I've added some lines in the Info.plist of TextMate 2, the Icon file into the Resources directory but nothing change […]
Adding icon plus proper Info.plist entries should do it. Though you may need to “touch” TextMate.app, relaunch Finder, or similiar, to get the system to pick up the change. Also, you may want to run “codesign” on TextMate.app to give it a valid signature after your changes.
Then, what is the correct way to add a file icon into TextMate 2 ?
As of such, this isn’t supported. Adding stuff to TextMate.app will be lost after an update and it breaks the signature.
Apple doesn’t provide a system for dealing with this in a way that supports TextMate’s distributed approach to file type support.
Also, using applescript, i've found the identifier for *.dart files, it is part of archive file one terminating by -dart, strange... Before any trick the file icon was of a dmg one...
Indeed: com.apple.disk-image-dart
So that might also be your issue. I.e. after changing TextMate.app you will also need to change one .dart document to “open in TextMate” (to make it use the TextMate icon you added).
We can btw add a definition for .dart to the Info.plist we ship with TextMate, that at least should give it the “blank” TextMate icon (if you assign TextMate as app to open these files).
If you already have a proper declaration (UTI) for the .dart file, then please provide it, so that I can add it.
Fine, thanks a lot.
what I've added to the Info.plist is : { LSItemContentTypes = ( "com.apple.disk-image-dart" ); CFBundleTypeRole = Editor; LSHandlerRank = Alternate; CFBundleTypeIconFile = "Dart_file.icns"; },
AppleScript : set i to info for (POSIX file "/Users/yt/dart/tests/web_server_hello_world.dart") as alias
giving : name extension:"dart", ..., default application:alias "SSD:System:Library:CoreServices:DiskImageMounter.app:", kind:"Image disque DART", ..., type identifier:"com.apple.disk-image-dart" , ...
then it seems UTI would be "com.apple.disk-image-dart", i suspect something wrong on the Mac OS X side.. Those text files having nothing to do with DiskImageMounter ;-)
then, that's OK to me having a blank icon at least.
for the remaining i gave up :)
attached the Dart_file.icns
2013/11/29 Allan Odgaard mailinglist@textmate.org
On 29 Nov 2013, at 1:26, Yvon Thoraval wrote:
I've added some lines in the Info.plist of TextMate 2, the Icon file into
the Resources directory but nothing change […]
Adding icon plus proper Info.plist entries should do it. Though you may need to “touch” TextMate.app, relaunch Finder, or similiar, to get the system to pick up the change. Also, you may want to run “codesign” on TextMate.app to give it a valid signature after your changes.
Then, what is the correct way to add a file icon into TextMate 2 ?
As of such, this isn’t supported. Adding stuff to TextMate.app will be lost after an update and it breaks the signature.
Apple doesn’t provide a system for dealing with this in a way that supports TextMate’s distributed approach to file type support.
Also, using applescript, i've found the identifier for *.dart files, it is
part of archive file one terminating by -dart, strange... Before any trick the file icon was of a dmg one...
Indeed: com.apple.disk-image-dart
So that might also be your issue. I.e. after changing TextMate.app you will also need to change one .dart document to “open in TextMate” (to make it use the TextMate icon you added).
We can btw add a definition for .dart to the Info.plist we ship with TextMate, that at least should give it the “blank” TextMate icon (if you assign TextMate as app to open these files).
If you already have a proper declaration (UTI) for the .dart file, then please provide it, so that I can add it.
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate