On 12/20/11 06:46, Gary Jaeger wrote:
>> Whatever you do, DON'T do the seemingly obvious thing
>> by making /usr/bin/nuke a symlink to the script on your NFS
>> server....
>
> OK, but what we *could* do is make a Mac alias to that file
> and put it in the Dock, so freelancers and employees could
> simply go to the dock as usual and click or double click.
> I'll have to decide which route to go.
Yes, feel free to do whatever you want on the desktop
to make that run.
Though I'm not sure what you describe is the right way
to make a script 'clickable'.
I believe the right Mac voodoo for making a Mac app bundle
for a script of any kind, in this case your /usr/bin/nuke script
would be as follows:
mkdir -m 755 nuke.app
mkdir -m 755 nuke.app/Contents
mkdir -m 755 nuke.app/Contents/MacOS
mkdir -m 755 nuke.app/Contents/Resources
echo APPLnone > nuke.app/Contents/PkgInfo
cp /usr/local/rush/examples/Applications/submit-maya.app/Contents/Resources/icon.icns nuke.app/Contents/
cat /usr/local/rush/examples/Applications/submit-maya.app/Contents/Info.plist | sed 's/submit-maya/nuke/' > nuke.app/Contents/Info.plist
chmod 644 nuke.app/Contents/PkgInfo
chmod 644 nuke.app/Contents/icon.icns
chmod 644 nuke.app/Contents/Info.plist
cp /usr/bin/nuke nuke.app/Contents/MacOS/nuke
chmod 755 nuke.app/Contents/MacOS/nuke
What this does is creates a Mac 'Bundle' around a copy of your
bash script (or for that matter, any script; bash, csh, python, perl..)
Once you have that 'nuke.app', you can move it to wherever you want,
and make Mac aliases to it. There should be no terminal popping open.
Just don't change the name of 'nuke.app' to something else; that breaks
the app bundle. (the names of files in the dir and Info.plist would have
to change accordingly)
There are other ways to do this, but this is the way I use
because it's 'scriptable'.. you can use this same technique
to make a .app bundle out of any script (just be sure to
change all instances of 'nuke' in the above to be the name
of your script; if the name of the bundle is foo.app,
then you have to make sure 'foo' is the name of the file
in the MacOS dir, and 'foo' is in the Info.plist file, etc.)
This is how Apple likes to make 'clickable' things.
You can change the icon.icns file in the above to something
more apropos for Nuke; you can probably use nuke's own
icon.icns file for instance. (you may need to restart the finder
to see the icon change).
Anyway, sorry for the complexity of the above, but that's
how you play ball on Macs to make executables 'clickable'.
|