I'm trying to shoe-horn a shell script into an application bundle so that the shell script will be run when I open
the bundle, as opposed to the executable put in there.
Specifically, I'm trying to do some environment setup before running the binary, e.g. setting environment variables (I already tried just putting the environment variables into the Info.plist, which didn't work, presumably because MATLAB is stupid), and when I cd
into the bundle and manually execute my script, (./StartMATLAB
) it works; The program launches, and the environment variables are recognized.
When I double-click on the .app in Finder, or call open MATLAB_R2011b.app
however, it fails. When calling open
from the commandline, I get:
LSOpenURLsWithRole() failed with error -10810 for the file /Applications/MATLAB_R2011b.app
I've tried playing around with the Info.plist to no avail, but I'm not too familiar with how they are put together. Does anyone know why I cannot open
this bundle?
Thanks!
EDIT: The Info.plist for the program I'm trying to edit seems to have a lot of java-related stuff. I've tried to remove it, but no luck so far. I'm thinking the problem may be with the .plist file, as it is expecting a java-based program as opposed to any other executable