On 25 Aug 2008, at 19:07, Christian Convey wrote:

> Any advice regarding the following?

Possibly a few things, but likely nothing (from me) that is useful or  
constructive...

> I'm using CMake and FLTK 1.1.7 to build cross-platform GUI apps on  
> Linux and Windows.

I'd *strongly* advocate stepping up to 1.1.9.

> We tell CMake to build our apps (on OS X) as MACOSX_BUNDLEs,  
> because otherwise the menus don't work.

Yup - say thanks to Apple for that little gem.

*IF* you are running versions of OSX prior to 10.5, *AND IF* you  
attach a stub resource fork to your app (e.g. with fltk-config --post  
my_app), *THEN* you can make your app work correctly without bundling  
it.

However, since 10.5, the rez-fork hack is disabled, so the only way  
to make an app that "works" is to bundle it. This is widely  
acknowledged as a pain.

> But this has a downside:  In order to supply command-line args to  
> our apps, users have to invoke a version of the app that's buried  
> deep in a directory tree.  I.e., "bin/foo.app/Contents/MacOS/foo  
> arg1 arg2 ...".

Well, the "usual" hackaround is to write a shell script with the same  
name as your app, and place it in a suitable path, with the usual  
scripty goodness to recover its command line args and pass them to  
its target. The script, of course, uses the full path name to the  
"real" app as you have shown.

To the end user, it just seems as if they type the name of your app  
and up it pops.

> I thought maybe the way around this was to stop trying to build our  
> apps as proper app bundles, and just build them as plain old X11  
> apps, even on OS X.  So here was my (unsuccessful) approach:

This doesn't work.
It sort of worked for a bit whilst the OSX port was getting started,  
as a half-way house until real OSX support was going, but has since  
been dropped.
(Actually, fltk-2, since it's still fairly alpha, may still support  
this approach? Don't know.)








_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to