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


Click here to return to the 'Another way to create Finder-clickable shell scripts' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Another way to create Finder-clickable shell scripts
Authored by: _merlin on Jul 31, '03 03:42:01AM

You also have to create a file foo.app/Contents/Info.plist containing keys identifying the name of the executable. In this exampe, it would contain:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
<plist version="0.9">
<dict>
<key>CFBundleExecutable</key>
<string>foo</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.3.0</string>
</dict>
</plist>



[ Reply to This | # ]
Another way to create Finder-clickable shell scripts
Authored by: foobar104 on Jul 31, '03 09:55:27AM

Nope. You don't actually have to do this.

When you double-click on foo.app, the Finder looks for a file foo.app/Contents/Info.plist. Not finding it, it looks for an executable file with the same name as the base name of the application package: foo.app/Contents/MacOS/foo. It then exec's it.

The only trick is that you have to be sure the file is executable.



[ Reply to This | # ]