• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
running a cocoa bundle's product via a shell script.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

running a cocoa bundle's product via a shell script.


  • Subject: running a cocoa bundle's product via a shell script.
  • From: Matthew <email@hidden>
  • Date: Wed, 15 Dec 2004 02:45:13 -0500

Hello.

Here's an interesting one. I've added a shell script build phase to my Cocoa app so that I can do some things to the application's environment before the app starts up.

The bundle is produced as whatever.app and I have an executable shell script produced in the whatever.app/Contents/MacOS/ directory along with the product that would normally be the only thing there (for me anyway). It does some chores and then runs the bundle's product with "exec"

Info.plist reflects that the shell script should be the thing executing because the CFBundleExecutable value is set to be the shell script.

If I run the app in Xcode, the shell script is ignored and the bundle's product is run (or so it appears).

If I run the app on the command line using "open" or double clicking in Finder, nothing happens. I just get a new prompt.

If I go into the bundle's MacOS directory, however, I can run the shell script manually and it launches the app, which does what I want it to do in the first place.

I think that the shell script is at least being checked for when I double click or use "open" because I get a message saying that the app can't open if I remove or rename the shell script to something else.

Can anyone provide insight here? I'm assuming that "open" and double clicking is associating the name "whatever" in "whatever.app" with the product "whatever" in the MacOS directory, and thereby ignoring the shell script specified in Info.plist.

Matthew

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: NSFilePromisePboardType
  • Next by Date: NSImage lockFocus in DrawRect while printing
  • Previous by thread: Re: Getting Pixel values of an image
  • Next by thread: NSImage lockFocus in DrawRect while printing
  • Index(es):
    • Date
    • Thread