Project Builder and CVS

rhg

Registered
Whatever I try, I can't get CVS to work within Project Builder. Using PB Version 2.1, I have checked out an existing project hierarchy and then created a Project Builder project. The .pbpro is located in the project's base directory. I manually created it from an "Empty project" template. After creating a "Legacy Makefile" target I could build the program. Then, after adding a custom executable I could run and debug it.

There are valid CVS directories in the base directory and each subdirectory created by "cvs checkout". I can use command-line CVS from within these directories, no problem.

In Project Builder Preferences I checked "Use CVS by default: Yes". Project Info says "Activate CVS integration for this project: Yes".

In Project Builder File View, I used "Add Files..." to populate it with the related source and header files. These files are located in subdirectories below the base directory.

However, Project Builder does not recognize CVS. No CVS column in File View, Menu CVS -> Show CVS gives an empty list, Menu CVS -> Enable CVS integration is grayed-out.

I'm out of ideas what I did wrong. Hope that anyone here can help me. Thank you!
 
You may need to create the correct environment variables. To do this you need to create a hidden folder named ~/.MacOSX containing a file called "environment.plist" which - at minimum - defines CVSROOT like so:

Code:
{
 CVSROOT = ":local:/usr/local/cvs";
}

Log out and then log back in to initialize the environment variable(s).

Apple has a KB article on the subject here:

http://developer.apple.com/qa/qa2001/qa1067.html
 
Thank you! I think that's the missing link. I already setup a /etc/bashrc which initializes the shell environment but this does not come into effect if I don't use the shell. I remember that I already wondered how to set global environment variables, now I know how. Excellent!
 
Seems that I was too euphoric. It didn't work. I defined the user-specific CVSROOT environment variable. I even re-created the .MacOSX/environment.plist with the Property List Editor which lays-out the file's contents in XML. I verified that the CVSROOT variable is really set. As I said, I can command-line cvs without any problems, but Project Builder does not enable CVS.

No idea what to do. I browsed the Apple Knowledge Base to no avial. Anyone here who could help me? Thank you very much!
 
OK, I found out what happened. It works now.

The key is that the .pbproj itself must be checked-in so that it contains its own CVS subdirectory. I did not check-in the .pbproj directories because they are in a preliminary state and I might want to re-create them.
 
Back
Top