Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: ssexton on September 10, 2008, 12:41:42 am

Title: TIP: File Association handling for Mac
Post by: ssexton on September 10, 2008, 12:41:42 am
I'm new to C::B so please bear with me if this has been covered.  I didn't find it when I searched the forums.

There is a very easy way to do "launch the associated application" feature for Mac version of C::B - use /usr/bin/open !  This makes LaunchServices do all the work.  In current released version of C::B, you have to set this up as "Launch an external program" set to "/usr/bin/open", but it sure would be nice (any devs listening?) if a future version of C::B Mac could do this internally (in other words, implement "launch the associated application" as equivalent to "Launch an external program: /usr/bin/open").

With this setting, I can now easily launch Property List Editor for my Info.plist from within C::B.  In fact, /usr/bin/open seems to be the only way to do so - setting the external program to Property List Editor doesn't work.
Title: Re: TIP: File Association handling for Mac
Post by: dmoore on September 10, 2008, 03:08:41 am
same goes for linux with xdg-open
Title: Re: TIP: File Association handling for Mac
Post by: Auria on September 10, 2008, 03:50:06 pm
C::B development for mac is not very active i think

If you can make a patch and submit it, it would be ideal for it not to be lost
Title: Re: TIP: File Association handling for Mac
Post by: dmoore on September 10, 2008, 04:15:46 pm
here's a link to the patch I wrote for linux:

http://forums.codeblocks.org/index.php/topic,7197.msg54956.html#msg54956
Title: Re: TIP: File Association handling for Mac
Post by: ssexton on September 14, 2008, 06:22:11 pm
@dmoore
Thanks for the tip for Linux, and thanks for spending the time figuring out a patch.

@Auria
Looks like dmoore has done most of the legwork on this one.  Unfortunately, I don't have any time available for hacking C::B, the most I can commit to is helping test the Mac version. 
Title: Re: TIP: File Association handling for Mac
Post by: afb on September 21, 2008, 09:07:18 pm
Looks simple enough, will add for wxGTK (xdg-open) and wxMac (open)...