Hi Eric,

We'll try out you suggestions on running .app's tomorrow.

I don't think running things using
./osganimate,app/Contents/MacOS/osganimate is any way acceptable
though, users who work on other platforms will expect the examples to
all build and run like on any other platforms, its seems crazy that
OSX should be so different.  For instance try running the
runexamples.bat with the .app approach...

If we want to have native style OSX examples then fine, but I don't
think this need spill over into standard OSG examples - they
practically all expect command line options, its just the way they are
written - they are OSG scene graph examples, they are not GUI
examples.

To help get things running in a more platform neutral way I've
introduced a new variable into the CMake build for OSX,
OSG_BUILD_APPLICATION_BUNDLES which you can use to switch on/off the
use of bundles.  I've set this to OFF so that things work more in
keeping with the way the rest of world work.

We've tested this change out on Martin's Mac Pro and things have now
built and installed cleanly using CMake command line build.  All the
apps work pretty well as expected, and in keeping with general
OpenSceneGraph docs on the running examples and test scripts.  These
changes are now checked into SVN.

Robert.

On 6/4/07, E. Wing <[EMAIL PROTECTED]> wrote:
So weird...it should work. There could be a bug somewhere. But
ignoring that for a moment, for some app in your current directly
like:
osganimate.app
You can run the from the command line via standard Unix ways by
invoking the actual Unix executable inside the app, e.g.
./osganimate,app/Contents/MacOS/osganimate
(You can also cd directly into that directory or invoke it from
anywhere using relative or absolute paths, just as standard Unix).
You can also pass command line arguments this way (remember that end
users will never do this as most don't know what a command line is)
./osganimate,app/Contents/MacOS/osganimate --help

You should also just be able to double-click osganimate.app in Finder
(you don't see the .app extension).

Also, another convenient command is 'open' which will launch a program
from the command line as if the user had double-clicked it.

open osganimate.app
This works for both applications (.app) and also known data file
formats (e.g. foo.mov will launch Quicktime Player and start playing
the foo.mov movie file.)

Another nifty trick is
open .
which opens a Finder window in your current directory. (You can also
supply a path to elsewhere.)


As for why it doesn't work for you and assuming you did everything
correctly...I'm not sure. I haven't had that problem on my system
(though I haven't svn updated in a bit). One thought is the
install_name issue (see osgbuild), but we don't have that in the build
system yet, so it should work at least in-place. Maybe it will break
if you do a 'make install'. I don't know if CMake rewrites the
install_name on install by default. If you're installing to a place
not searched by Apple, and the install_name is not correct, the
dynamic libraries will not be found (unless you explicitly set
DYLD_LIBRARY_PATH) and the program will fail to launch. But on the
command line, you should have seen a message complaining.

My other thought is that you are trying to run a program that requires
a command line argument (like an .osg model). This is a real sore
point on double-click launching on all platforms (I really think a
default fallback would be useful), but if you're invoking through the
command line, you should have seen the text output.

-Eric
_______________________________________________
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

_______________________________________________
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to