Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > shell script and Cocoa app

shell script and Cocoa app
Thread Tools
Fresh-Faced Recruit
Join Date: Oct 2000
Location: CA
Status: Offline
Reply With Quote
Sep 6, 2001, 12:37 AM
 
Is there a way to wrap a Unix shell script as a Cocoa app? I'm trying to write a postprocessing application for OmniWeb downloads, and I need to invoke some Unix apps for this purpose. But Finder or OmniWeb won't recognize a shell script as an application.
     
Forum Regular
Join Date: Feb 2001
Location: Portland, OR, USA
Status: Offline
Reply With Quote
Sep 6, 2001, 02:51 AM
 
Check out DropScript.app here:
http://www.mit.edu/people/wsanchez/software/

It's a little application that creates apps out of shell scripts or command-line programs.
     
Fresh-Faced Recruit
Join Date: Oct 2000
Location: CA
Status: Offline
Reply With Quote
Sep 7, 2001, 01:38 AM
 
Sounds promising. But I couldn't figure out how to use it. Can you give me instructions? Thanks!
     
Dedicated MacNNer
Join Date: Jun 2000
Location: Dundas, Ontario, Canada
Status: Offline
Reply With Quote
Sep 7, 2001, 02:07 AM
 
Correct me if I am wrong but can't shell scripts be passed as arguments to their interpreters? If that is possible, you could simply use the unix script as an argument to an NSTask that launches the interpreter.

If you think that would be of assistance, take a look at some of my wrapped Unix programs:
http://www.indigox.dyndns.org/wrappers/
Spectral Class
"Shedding Light on Innovation"
     
Fresh-Faced Recruit
Join Date: Oct 2000
Location: CA
Status: Offline
Reply With Quote
Sep 8, 2001, 11:13 AM
 
I was just stupid.

DropScript works great! You just create a shell script, say, "example". Drag the file in Finder on DropScript icon. Then it creates a Cocoa app named "Dropexample". When you drop a file on the created Cocoa app ("Dropexample"), the name of the file is passed along to the script as $1. I don't know how to pass command line options, though.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 02:56 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2