Wednesday, December 17, 2008

Renaming an XCode project

UPDATE: As of Xcode 3.2 you can rename projects from the Projects->Rename dropdown.

UPDATE: Be sure to see my post about the shell script I wrote to rename from the command line.


For those wanting to rename their XCode project, here how you do it manually:

1) copy your project to a new folder, rename the folder to your new project name, delete the build directory in the new folder.

2) drag the entire new project folder onto the TextMate text editor

3) In TextMate, remove (delete references) to anything non-text such as images and sounds. [UPDATE: TextMate will ignore the non-text files, so step 3 is unnecessary.]

4) Replace in Project (old project name) with (new project name), save all files. Close TextMate.

5) Now drag the (project name).xcodeproj file into Text Mate, repeat Replace in Project processm, save all files. Close Text Mate. If you have spaces in your project name, look for all instances of your project with spaces replaced with underscores too.

6) Rename all files containing (old project name) to (new project name). Be sure to check the Classes directory too. If your project name contains spaces, look for all instances of filenames with spaces replaced with underscores too.

That's it! Your new project should be good to go. I don't think cleaning of targets is necessary, since the build directory is removed (correct me if I'm wrong though!)

Tuesday, December 9, 2008

iDVD with a PC burner

So you have a Mac with iDVD, but no superdrive (DVD burner.) However, you have this trusty old PC with a DVD burner. Wouldn't it be nice to burn your iDVD projects on the PC's burner? Well you can, and here is how:

1) Once your iDVD project is ready for burning, go to File->Save as disc image. This will save the project as an .img file.

2) In the finder, double click the .img file. This will mount the image.

3) Open Disc Utility. Click on your mounted image on the left pane and click "Convert". Choose the "CD Master .cdr" option. This will create a .cdr file.

4) Copy the .cdr file to a place where you can access it from your PC. Rename *.cdr to *.iso.

5) On the PC, Use your favorite DVD burner software to burn the .iso image to a DVD. I like ImgBurn, it's free and easy to use.

That's it, hope that helps!