Christian Convey wrote:
>> #!/bin/sh
>> dir="`dirname $0`"
>> exec "$dir/name.app/Contents/MacOS/name" "$*"
Yes, that is probably better than 'open' in that you can
at least pass arguments to your app normally. open(1) is somewhat
limited when it comes to passing arguments through it.
One nit: in the above script, I think "$*" would be better
written as "$@".
With "$*", all the arguments will appear to the app as a
single string. eg. if the user invokes your script this way:
yourscript -arg1 -arg2 "/Volumes/X Raid Foo/somewhere/myfile.xyz"
..the exec to your app will see the arguments combined, eg:
argv[1] = "-arg1 -arg2 /Volumes/X Raid Foo/somewhere/myfile.xyz"
If you use "$@" instead, then you'll get the desired behavior:
argv[1] = "-arg1"
argv[2] = "-arg2"
argv[3] = "/Volumes/X Raid Foo/somewhere/myfile.xyz"
ie. arguments broken out, and args containing spaces preserved.
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk