views:

605

answers:

2

I'm finding a few open source projects, mostly older, that lack an .xcodeproj directory hierarchy. It seems like all other crucial files are there.

Curiously enough, I'm wondering how these projects are even accessed via Xcode? I'd like to compile them, break them, fix them etc. Is there a way to open these more legacy projects?

Here's the contents of an open source Freecell project:

$ find . -type f  
./.DS_Store  
./Card.h  
./Card.m
./Cards/bonded.png
./Cards/large-bonded.png
./Cards/unedited-bonded.png
./CardView.h
./CardView.m
./Dutch.lproj/Credits.html
./Dutch.lproj/Help/Freecell.html
./Dutch.lproj/Help/game.html
./Dutch.lproj/Help/game.jpg
./Dutch.lproj/Help/game.png
./Dutch.lproj/Help/Help idx
./Dutch.lproj/Help/history.html
./Dutch.lproj/Help/history.jpg
./Dutch.lproj/Help/history.png
./Dutch.lproj/Help/links.html
./Dutch.lproj/Help/logo.png
./Dutch.lproj/Help/logos.png
./Dutch.lproj/Help/move-end.jpg
./Dutch.lproj/Help/move-end.png
./Dutch.lproj/Help/move-start.jpg
./Dutch.lproj/Help/move-start.png
./Dutch.lproj/Help/play.html
./Dutch.lproj/Help/preferences.html
./Dutch.lproj/Help/preferences.jpg
./Dutch.lproj/Help/preferences.png
./Dutch.lproj/Help/tips.html
./Dutch.lproj/InfoPlist.strings
./Dutch.lproj/Localizable.strings
./Dutch.lproj/MainMenu.nib/classes.nib
./Dutch.lproj/MainMenu.nib/Freecell.tiff
./Dutch.lproj/MainMenu.nib/info.nib
./Dutch.lproj/MainMenu.nib/objects.nib
./English.lproj/Credits.html
./English.lproj/Help/Freecell.html
./English.lproj/Help/game.html
./English.lproj/Help/game.png
./English.lproj/Help/Help idx
./English.lproj/Help/history.html
./English.lproj/Help/history.png
./English.lproj/Help/links.html
./English.lproj/Help/logo.png
./English.lproj/Help/logos.png
./English.lproj/Help/move-end.png
./English.lproj/Help/move-start.png
./English.lproj/Help/play.html
./English.lproj/Help/preferences.html
./English.lproj/Help/preferences.png
./English.lproj/Help/tips.html
./English.lproj/InfoPlist.strings
./English.lproj/Localizable.strings
./English.lproj/MainMenu.nib/classes.nib
./English.lproj/MainMenu.nib/info.nib
./English.lproj/MainMenu.nib/keyedobjects.nib
./Finnish.lproj/Credits.html
./Finnish.lproj/Help/Freecell.html
./Finnish.lproj/Help/game.html
./Finnish.lproj/Help/game.png
./Finnish.lproj/Help/Help idx
./Finnish.lproj/Help/history.html
./Finnish.lproj/Help/history.png
./Finnish.lproj/Help/links.html
./Finnish.lproj/Help/logo.png
./Finnish.lproj/Help/logos.png
./Finnish.lproj/Help/move-end.png
./Finnish.lproj/Help/move-start.png
./Finnish.lproj/Help/play.html
./Finnish.lproj/Help/preferences.html
./Finnish.lproj/Help/preferences.png
./Finnish.lproj/Help/tips.html
./Finnish.lproj/InfoPlist.strings
./Finnish.lproj/Localizable.strings
./Finnish.lproj/MainMenu.nib/classes.nib
./Finnish.lproj/MainMenu.nib/info.nib
./Finnish.lproj/MainMenu.nib/keyedobjects.nib
./Freecell.icns
./Freecell.pbproj/alisdair.mode1
./Freecell.pbproj/alisdair.pbxuser
./Freecell.pbproj/project.pbxproj
./Freecell_Prefix.h
./French.lproj/.typeAttributes.dict
./French.lproj/Credits.html
./French.lproj/Help/Freecell.html
./French.lproj/Help/game.html
./French.lproj/Help/game.png
./French.lproj/Help/Help idx
./French.lproj/Help/history.html
./French.lproj/Help/history.png
./French.lproj/Help/links.html
./French.lproj/Help/logo.png
./French.lproj/Help/logos.png
./French.lproj/Help/move-end.png
./French.lproj/Help/move-start.png
./French.lproj/Help/play.html
./French.lproj/Help/preferences.html
./French.lproj/Help/preferences.png
./French.lproj/Help/tips.html
./French.lproj/InfoPlist.strings
./French.lproj/Localizable.strings
./French.lproj/MainMenu.nib/classes.nib
./French.lproj/MainMenu.nib/info.nib
./French.lproj/MainMenu.nib/objects.nib
./Game.h
./Game.m
./GameController.h
./GameController.m
./GameView.h
./GameView.m
./History.h
./History.m
./HistoryController.h
./HistoryController.m
./Japanese.lproj/Credits.html
./Japanese.lproj/Credits.rtf
./Japanese.lproj/Help/Freecell.html
./Japanese.lproj/Help/game.html
./Japanese.lproj/Help/game.png
./Japanese.lproj/Help/Help idx
./Japanese.lproj/Help/history.html
./Japanese.lproj/Help/history.png
./Japanese.lproj/Help/links.html
./Japanese.lproj/Help/logo.png
./Japanese.lproj/Help/logos.png
./Japanese.lproj/Help/move-end.png
./Japanese.lproj/Help/move-start.png
./Japanese.lproj/Help/play.html
./Japanese.lproj/Help/preferences.html
./Japanese.lproj/Help/preferences.png
./Japanese.lproj/Help/tips.html
./Japanese.lproj/InfoPlist.strings
./Japanese.lproj/Localizable.strings
./Japanese.lproj/MainMenu.nib/classes.nib
./Japanese.lproj/MainMenu.nib/Freecell.tiff
./Japanese.lproj/MainMenu.nib/info.nib
./Japanese.lproj/MainMenu.nib/objects.nib
./Licence.rtf
./main.m
./PreferencesController.h
./PreferencesController.m
./Result.h
./Result.m
./Spanish.lproj/Credits.html
./Spanish.lproj/Credits.rtf
./Spanish.lproj/Help/Freecell.html
./Spanish.lproj/Help/game.html
./Spanish.lproj/Help/game.png
./Spanish.lproj/Help/Help idx
./Spanish.lproj/Help/history.html
./Spanish.lproj/Help/history.png
./Spanish.lproj/Help/links.html
./Spanish.lproj/Help/logo.png
./Spanish.lproj/Help/logos.png
./Spanish.lproj/Help/move-end.png
./Spanish.lproj/Help/move-start.png
./Spanish.lproj/Help/play.html
./Spanish.lproj/Help/preferences.html
./Spanish.lproj/Help/preferences.png
./Spanish.lproj/Help/tips.html
./Spanish.lproj/InfoPlist.strings
./Spanish.lproj/Localizable.strings
./Spanish.lproj/MainMenu.nib/classes.nib
./Spanish.lproj/MainMenu.nib/Freecell.tiff
./Spanish.lproj/MainMenu.nib/info.nib
./Spanish.lproj/MainMenu.nib/objects.nib
./Table.h
./Table.m
./TableLocation.h
./TableLocation.m
./TableMove.h
./TableMove.m
./vccRand.c
./vccRand.h
+9  A: 

That was created using Project Builder, the IDE shipped by Apple (and NeXT before them) which was ultimately renamed as Xcode. The project file is Freecell.pbproj, and you ought to be able to import it into Xcode without too much trouble.

Theoretically you should be able to use File->Open and point at the .pbproj wrapper; Xcode will then presumably ask to upgrade the project, which usually involves creating a new .xcodeproj version.

Jim Dovey
renaming the folder to .xcode first (not .xcodeproj) helped significantly. That did the trick.
Coocoo4Cocoa
Xcode 3 officially does not support upgrading Project Builder projects. Xcode 2.5 (available from http://connect.apple.com/ , can be installed alongside Xcode 3) does.
Ahruman
+1  A: 

I suggest another method (it helped me, maybe it will help someone too). The method is following (assuming that you have Xcode3.0 installed):
1) rename .pbproj to .xcode
2) using muCommander ( http://www.mucommander.com/index.php#download ) navigate to the .xcode folder. Inside the folder you will find 3 files. *.mode1, *.pdxuser, *.pbxproj (where * is some user name).
3) now replace the *.mode1 and *.pbxuser user name given with yours
(ex. johndow.mode1 to myusername.mode1)
4) after that replace .mode1 with .mode1v3 (ex. myusername.mode1 to myusername.mode1v3 )
5) select myusername.pbxproj and hit View[F3] button (located in the bottom left corner of the mnCommander screen) and locate this lines (the very top lines):
archiveVersion = 1;
classes = {
};
objectVersion = 39;
objects = {
Replace 39 with 44 (the number depends on Xcode version installed; you can find out yours by creating a new project and locating the same lines in it's *.pbxproj ). Close and save the edited document.
Thats all! Now try to open the project with Xcode.

Some optional steps. Must be taken after you've opened and closed the project with Xcode (after completing the previous section).
6) still in the same document scroll down and locate this lines:
CFBundleShortVersionString
0.5.0
CFBundleSignature
????
CFBundleVersion
0.5.0
Replace 0.5.0 to 1.0.23 or any other number starting from 1.0.0. The number corresponds to your product version.
7) now locate this lines:
OSBundleLibraries

com.apple.iokit.IOPCIFamily
1.4
com.apple.iokit.IOStorageFamily
1.3
com.apple.kernel.iokit
1.1
Replace each anynumber to the version number installed on your system. You can find out the version by typing in " kextfind -bundle-id com.apple.iokit.IOPCIFamily "(where com.apple...* is the key you are looking for) in the terminal and hiting enter.
You will get somthing like this:
/System/Library/Extensions/IOPCIFamily.kext
Now copy the line you get in the muCommander locations bar. Select version.plist and hit View[F3] button. Locate the number in:
CFBundleVersion
2.6
This number is what you've been looking for.
8) locate the " MODULE_VERSION = 0.5; " line (there must be several instances). Replace 0.5 with 1.0 where 0.5 is a first two digits of 0.5.0 (1.0.23)
9) locate the " compatibilityVersion = "Xcode 2.5"; " line and replace the " 2.5 " with " 3.0 " (which is the Xcode version)
The end.