0

I have an shell script file which is wrapped up in Mac's .app package. When I run the .app file the app crashes or sometimes doesn't show the UI. This is a Java swing application. When I run the same script file from the same current directory it runs fine.

So my .app contents are like below

build
->sample.app
 -->Contents
  -->MacOS
    -->sample-mac.sh

On the terminal from build directory if I do

open sample.app

it crashes if I do sh -x sample.app/Contents/MacOS/sample-mac.sh it runs perfectly

Can you tell me what are the differences in running the app file and underlying script file?

Praneeth Chinta
  • 95
  • 1
  • 1
  • 5
  • Not been an expert in the lower aspect of the OS, I might "suggest" that open is trying to perform an execution of the main entry point using a method which can't run shell scripts...but that's just a guess – MadProgrammer Sep 29 '15 at 03:51
  • For [reference](http://stackoverflow.com/a/8956715/230513), what is the value of key `CFBundleExecutable` in your `Info.plist`? – trashgod Sep 29 '15 at 09:07

0 Answers0