Background:
On Mac OS X one can use open -a PackageMaker
to run PackageMaker.app
, independent of its exact location.
Since XCode 4.3 doesn't install /Developer/usr/bin/packagemaker
any more, I would like to run PackageMaker.app/Contents/MacOS/PackageMaker
instead in a shell script. The problem is that I cannot rely on any standard location where the user could have put PackageMaker.app
. I would like to make sure that the script works an any machine that has PackageMaker.app
"installed", even if it resides in user's home.
Question:
How can I determine location from which open -a AnyApp
launches AnyApp.app
? Or maybe there exists some other command to run a binary inside Contents/MacOS
from within an .app
with specified name?