[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

metadata query - help needed



Greetings,

Does anyone know where the information which Application a file is 
opened with is stored?
I am referring to the per-file information, ie. this is not about a 
generic assignment of, say, opening all *.txt files with BBEdit; this 
is about an individual assignment--open just a particular file with a 
particular application.

To explain:

I am working on a software distribution.
I am not a Real Programmer(R). ;-)
So far, I have done this:
I have written a shell script and chmod'ed it 755.
In Finder, I have assigned Terminal as the Application to open the file 
with.
I have copied that file with command-D and proceeded with the copy.
I have sudo chown'ed root:admin to be the owner/group.
I have tested double-clicking on the file and found it to work ok.
I have then built an installable package with PackageMaker 
(Panther/Xcode version 1.1.11).
(I got prompted to split resource forks, which I did. -- This may or 
may not have anything to do with that particular file.)
I have then test-installed my package (using Admin authorization, which 
I made the Installer ask for) and found my file in the right place, 
with the right permissions and root:admin as the owner. However, I 
found the file to lack the ability to double-click on it to open it in 
Terminal. This metadata did apparently not come across.

Now I wonder where that metadata is stored and if (and how) it can be 
carried forward in this context?

Any help MUCH appreciated.

Thanks and regards,
Jens Ropers

PS: I am now aware of a workaround (not tested, but should work), which 
is naming the script file /something/.command. This will make it 
executable on the target system. However I really hate making the file 
name part of the action. I'm not a friend of the kludge-ish Wintel file 
extension convention. If things can be done outside of the filename I'd 
rather do that instead.

http://www.ropersonline.com
Never pretend knowing something you don't. It will rob you of the 
chance to learn it.