Thanks a lot for the tips, this is how I solved it...
Daniel H?pfl wrote:
> Hello!
>
[quoted text clipped - 15 lines]
> Go into the bundle: cd myApp.app/Contents/MacOS and start the executable
> from there (should be ./myApp).
At first, this did not work because some files were leaded from other
sources, and the relative paths did not work from within
myApp.app/Contents/... However, in Qt there is the option not to build
the files as a bundle but directly. This gives more Linux-Style files
which can be started directly by typing ./myApp
Having changed this option in the project file by CONFIG-=app_bundle
and rebuilt the whole thing, I can now start the application by ./myApp
and the output goes where it belongs: The terminal.
> open sends the given file to the default application which is - for
> applications - the Finder. Starting applications with the Finder
> connects stdout with /dev/null and everything written to stderr is sent
> to console.log.
Good to know, thanks!
Greetings
Tim
> HTH,
> Daniel
Michael Ash - 28 Nov 2006 15:56 GMT
> At first, this did not work because some files were leaded from other
> sources, and the relative paths did not work from within
> myApp.app/Contents/... However, in Qt there is the option not to build
> the files as a bundle but directly. This gives more Linux-Style files
> which can be started directly by typing ./myApp
If you want something that acts like a normal Mac applicaiton then you
should continue to build a bundled .app. (You should also avoid Qt, but
that's a topic for another day.) The problem is not the bundled app, but
rather that Mac applications cannot depend on the working directory to be
set to anything useful when they start. If your code needs the working
directory to be set to, for example, your Contents/Resources directory,
then you should set it yourself. You can do this by using CFBundle to
get/construct the path, then set the working directory appropriately early
on in your code.

Signature
Michael Ash
Rogue Amoeba Software