[haiku-development] Re: Adding a mime-type for WonderBrush files?

  • From: Stephan Aßmus <superstippi@xxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Wed, 01 Aug 2012 10:31:44 +0200

On 31.07.2012 23:46, Matt Madia wrote:
On 7/31/12, Ryan Leavengood <leavengood@xxxxxxxxx> wrote:
On Mon, Jul 30, 2012 at 3:29 PM, Matt Madia <mattmadia@xxxxxxxxx> wrote:

Taking into consideration that WonderBrush isn't part of Haiku's
repository, would it still be OK to add a mime-type for it?

Doesn't Wonderbrush add the mime types and sniffer rules for its own
files when it is first run? Though I suppose your point here is to
identify Wonderbrush files even if it isn't installed?

For some reason, I don't think it adds a sniffer rule. That's mainly
what I'm interested in, as it'll allow users to simply double-click to
open wonderbrush files.

IIRC, it at least tries. But it may be broken. In any case, installing the mime type by the build system will allow to double click WonderBrush files without first running WonderBrush, even if WB did install a correct sniffer rule on first launch.

However, I think there is something broken about all this. Just the presence of the WonderBrush executable, or any other app for that matter, should declare the supported file types to the system and make double clicking work out of the box. At least as soon as the mime sniffer has seen the executable file. That's because apps are also supposed to declare their supported file types in their resources and the mime sniffer is supposed to extract the information. And we definitely run the mime sniffer past all installed apps on first boot.

So either something doesn't work with that, or not all apps declare all supported types the correct way, or the information in the resources is somehow not complete, i.e. lacks sniffer rules.

If we did everything correctly and how this is supposed to work, the only mime types we would need to declare separately in the build system are either types that we have no application for, or those types that are specific types which an app that has generic support doesn't want to mention. Like MediaPlayer shouldn't have to declare sniffer rules for AVIs or MP3s when it just wants to declare support for "video/*" and "audio/*".

Best regards,
-Stephan


Other related posts: