Christian Convey wrote:
>> Greg Ercolano wrote:
>>> Do you find your app opens 'below' other windows, and that ALL widgets
>>> in your app, not just the menu bar, are unresponsive to mouse clicks?
>>> If so, make sure you've first created a real Mac ".app bundle" for your
>>> app.
>
> Thanks, Greg and Ian. My program *does* only show up below other windows [..]
Yeah, that's a sure sign of non-bundle.
If you're running on Leopard, you pretty much /have/ to make a bundle
for GUIs to work correctly. This is new as of Leopard; before you could
put the resource fork whammy on the executable and it would work, but
apparently no longer.
> I hadn't really looked at app bundles before, since my terminal-based programs
> ported from Linux worked just fine. I guess it's time for me to drink a
> little
> more of the Apply Cool-Aid.
Yes, take a hit of the apple cool-aid regarding app bundles.
If you want to run your app from the command line, make a small
shell script that invokes your app with 'open', eg:
#!/bin/sh
open /Applications/YourProgram.app
Good luck if you want to pass command line arguments.
This might work as well, in which case you probably can
pass arguments:
#!/bin/sh
/Applications/YourProgram.app/Contents/MacOS/YourProgram
.app bundles seem to actually be a decent solution to the problem of
dealing with programs that include other files.. you can just put things
like icons, config files etc. into the approriate subdirs of the .app
directory.
See the OS's own .app dirs for examples, eg.
/Applications/Utilities/*.app
With bundles, your program has 'its own dedicated directory' where you
can
put all your extra config files, images, etc. such that the user can
just
drag the directory around to 'install' it with a single drag-and-drop,
as opposed to the unix-y way of having to run an 'install script'
that scatters stuff all over /usr/local/
> I'm using CMake to build the project, so I'm going to need to look into how
> CMake does OS X bundles. Man, this OS X programming is one... learning
> opportunity... after another :)
There are some weirdnesses about Mac, but from a unixy point of view,
not all that terrible. (Resource Forks I found 'terrible', and am glad
they're getting away from them)
From an admin point of view, Apple meddles waaay too much with unix
internals. They keep adding non-unixy stuff for their GUIs, and keep
forgetting
(or choose to ignore) the wisdom of ascii config files over binary, and
create non-unixy daemons, and change them around randomly from release
to release.
man pages are often out of date, wrong, document commands that have
been removed,
or don't document commands that exist.
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk