Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'Double-clickable and CLI' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Double-clickable and CLI
Authored by: englabenny on Apr 25, '03 12:12:29PM
A quick hack to get a doubleclickable app out of a unixexecutable like this (or a shell script!) is to take some small applicationbundle, like clock or something, and rip out all resources and the inner executable in Contents/MacOS/.

In that folder place your executable, and rename the App bundle to the same name. Also change the value corresponding to the key CFBundleExecutable in Contents/Info.plist correspondingly. I have used this previously to create a double-clickable shell script that starts a backround screen saver, or if it's already running, quits it.

Also note that you can compile this quick and easy in Terminal, without doing all the PB Project creation stuff. You still need DevTools, ofcourse. Just put the code in serviceupdate.m and compile it with cc serviceupdate.m -o ServicesRestart -framework Cocoa, ServicesRestart being the name of the final executable.

[ Reply to This | # ]