Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > how to make a Darwin app a browser helper?

how to make a Darwin app a browser helper?
Thread Tools
Fresh-Faced Recruit
Join Date: Jul 2001
Location: New Jersey, USA
Status: Offline
Reply With Quote
Jul 30, 2001, 01:29 PM
 
I have a command line application (constructed with "cc -o app app.c")
which plays audio files. For concreteness, let's call the app mp3play.
It has no GUI, no nib etc, no event model. It's just a Unix app, in
fact it's the same app that runs on other Unices and Windoze albeit
with different audio playback code. "mp3play" runs fine in Terminal, produces nice sound, etc.

I'd like to associate "mp3play" with the file extension ".mp3" so
that when a browser encounters a file foo.mp3, it funnels the mp3
data into my mp3play.

In both MSIE and Opera, when I bring up the appropriate menu panel that
creates this association, and browse to the directory with the file mp3play, mp3play is indicated as a generic document (icon of page with corner turned down) and is grayed out, which is to say that these browsers won't accept mp3play as a valid executable.

Can anyone advise what sort of magic must be performed, and where,
so that these browsers will recognize "mp3play" as a valid helper
app?

I'm told that there are at least two system-wide file extension/type registries that associate apps with their files, but I'm not clear
as to how one enters new associations. Frex it'd be convenient as
well if double-clicking a file ".mp3" or of type "mp3" caused the
mp3player app to be launched.

(It's not in fact an mp3 player, so no need to point out that I'll
break things by reassociating ".mp3")

Thanks,
jim snyder
     
Mac Elite
Join Date: Sep 2000
Status: Offline
Reply With Quote
Jul 30, 2001, 01:36 PM
 
Originally posted by jhsnyder:
<STRONG>I'm told that there are at least two system-wide file extension/type registries that associate apps with their files, but I'm not clear
as to how one enters new associations.</STRONG>
Unfortunately, there is no easy, intuitive way to do this... in fact, there's no way AT ALL sometimes. The info is stored in the LS* files in your ~/Library/Preferences directory. Unfortunately, these can't be edit by hand because of the cryptic way they're generated by the Finder. You can supposedly use the Get Info window when you've selected an mp3 (or any other type) file to set an application to open with, but even that doesn't work all the time.

I can't emphasize this issue enough:
Write to Apple! Make suggestions! Complain!

[ 07-30-2001: Message edited by: starfleetX ]
The server made a boo boo. (403)
     
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status: Offline
Reply With Quote
Jul 30, 2001, 02:18 PM
 
Starfleet, that doesn't get around the problem where you can't select standard darwin executables.
     
Dedicated MacNNer
Join Date: Jun 2000
Location: Dundas, Ontario, Canada
Status: Offline
Reply With Quote
Jul 31, 2001, 11:58 AM
 
I know how you could make this work.

If you wrap your darwin program in an OS X GUI and then set its document settings (or whatever it is called) in the active target to read ".mp3" (or whatever it is) it will work.

Wrapping is pretty easy, there is a tutorial at "www.cocoadevcentral.com" and I also have the source code to my wrappers available with them on my web site: http://www.indigox.dyndns.org/wrappers/

Good luck,
Jeff.
Spectral Class
"Shedding Light on Innovation"
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 09:47 AM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2