View Full Version : newbie: please help
Jun 6, 2006, 04:39 PM
I am new to macs coming from pc, I have a unix executable that i need to have an icon and file associations. Is there a way in XCode to simply make an application that runs my unix executable when the application's icon is double clicked?
Jun 6, 2006, 04:46 PM
Add .command as a file extension and any Darwin executable will automagically open Terminal.app and run.
Jun 6, 2006, 04:49 PM
Yeah I figured that out but is there then a way to add an icon and file associations after i add the .command extension?
Jun 6, 2006, 04:50 PM
Google for how to add an icon to a Mac file..
I don't know what you mean by "file associations".. isn't it associated with Terminal.app because it's a UNIX executable?
Jun 6, 2006, 04:54 PM
The executable is a program used to analyze data so it needs to be able to open the data files and this can be done once the program is running by opening the files but i wanted to be able to double click on a data file and have it open the executable program.
Jun 6, 2006, 04:56 PM
Ah.. I see now. Then you will have to create an application in XCode.
Jun 6, 2006, 04:59 PM
Ok I guess my real question is then, what kind of application do i choose when all I want it to do is run the executable?
Jun 6, 2006, 06:48 PM
as in what type of project should i build to simply run an executable but be able to add file associations and icons
Jun 7, 2006, 06:09 AM
You might want to read these two articles:
Wrapping a Unix Executable 1 (http://www.cocoadevcentral.com/articles/000025.php)
Wrapping a Unix Executable 2 (http://www.cocoadevcentral.com/articles/000031.php)
Note that these actually end up with you having a Cocoa GUI that wraps the Unix executable. I think you will end up needing to have some sort of real app that OSX thinks is an app to get the file associations working. Instead of writing a GUI you could write a tiny little bit of Cocoa and AppleScript to work out where the file is when you are asked to execute it and then run the script with the correct args in Terminal.
The again, maybe you want a cool Cocoa GUI?
Jun 7, 2006, 08:35 AM
Platypus (http://www.versiontracker.com/dyn/moreinfo/macosx/19870)to the rescue !