Hey guys, I just had a quick question about copying files on Mac os x with ant. I've written myself a great little build script for my iPhone development. The script copies the compiled .app files that are created from xcodebuild. Anyway, the ant command does not seem to work. It does not copy the .app file correctly. it copies the contents of the .app file as if it were a folder. I understand that this is because its not preserving the meta data required to keep the folder a .app when copying. I can use ditto for the copy, but I'd like to know if there's something I'm missing with the ant command. So this is the summery of my question: How do I copy .app bundles with ant on mac os x? Any tips would be appreciated. Thanks, Sam
A:
Ant(or bash, or whatever your using) doesn't know that an App bundle is suppose to be treated like a file, it just sees it as a directory (which it is). So to make your Ant file work, you would want to use a command that works for coping folders, not files. I've never used ant, but it is probably like the cp unix command (cp -r origApp.app newApp.app)
Hope this helps...
micmoo
2009-07-11 18:36:10
I understand that. I just was wondering if any Ant experts could let me know of any hidden options for the ant <copy> command. Thanks for your help though Fabian.
2009-07-11 23:26:17
Ah, sorry :( I've never really used ant before... you could look here, I saw some things about copying directories...http://ant.apache.org/manual/CoreTasks/copy.html
micmoo
2009-07-12 00:15:03
I really appreciate your help, but I tried all of that. I even used the whole fileset thing when using <copy todir="">. There has to be an option to preserve resource forks, but I can't seem to find it.
2009-07-12 04:06:46
+1
A:
Ant's copy taskdef does not seem to have any OS X specific code for handling resource forks. Without resorting to ditto in an exec task, you might try explicitly copying the resource fork using the pathname suffix "/..namedfork/rsrc". I don't know if that will work across all releases (Jaguar, Tiger, Leopard, etc.)
unhillbilly
2009-07-21 20:49:47