cannot open GUI

I made a simple app on Mac OS X with a GUI interface created by R fgui package. The GUI interface works well if I go into ~/Desktop/myapp.app/Contents/MacOS/myapp folder and click myapp shell script. But the GUI cannot be invoked by clicking the desktop icon. I am wondering how to solve this issue and make it possible to activate GUI by clicking on the desktop icon?

cannot open GUI
 
 
Q