Important: The information in this document is obsolete and should not be used for new development.
If you already have existing code in another IDE, you can import your project contents into Xcode. Xcode provides an assistant for importing CodeWarrior and ProjectBuilderWO projects. Xcode also opens Project Builder projects. This section describes how to use Xcode’s project importer and open Project Builder projects in Xcode.
Importing CodeWarrior Projects
Converting a Project Builder Project
Importing Projects From ProjectBuilderWO
If you have existing code in a CodeWarrior project, you can use the Xcode importer to import your CodeWarrior project and create a corresponding Xcode project. This section gives a brief description of how to import a CodeWarrior project into Xcode and lists a few steps that you can take to make the conversion process easier. While this section assumes that you are converting a project that builds an application, many of the steps apply to other types of software as well.
To make it easier to get your project building in Xcode, you may need to make some changes to your project before you import it. Each of these steps is described in further detail in Moving Projects from CodeWarrior to Xcode.
Convert your code to use Carbon.
Set the Project Type setting of your CodeWarrior project to Application Package to build your application as a package.
Build the application in the Mach-O format. Mach-O is the native executable format in Mac OS X and is the only format supported by Xcode.
Remove unnecessary targets from the project.
To import your project:
Choose File > Import Project, which opens the Import Project Assistant.
Select Import CodeWarrior Project and click the Next button.
Click the Choose button and navigate to the CodeWarrior project file to import (or type in the path and filename).
You can specify a name for the new project in the New Project Name field. Otherwise, Xcode automatically uses the same name as that of the project that you are importing. The Xcode importer creates the new project in the same folder as the CodeWarrior project file.
When you import a CodeWarrior project, Xcode determines the
location of the CodeWarrior root folder (referred to as {Compiler} in
CodeWarrior’s search path) and adds it to the Source Trees list
in the Preferences window.
Select Import “Global Source Trees” from CodeWarrior if you want the importer to add any global source trees from CodeWarrior’s preferences to the Source Trees list in Xcode.
Select 'Import referenced projects' to import any additional CodeWarrior projects referenced by the project you are currently importing.
Click the Finish button to dismiss the assistant and start the import.
When the import is complete, the new project window opens.
Most projects will not build immediately; see Moving Projects from CodeWarrior to Xcode for more information on how to get your new Xcode project to build.
If you already have an existing Project Builder project, there
is very little you have to do to get it converted to, and building
in, Xcode. Xcode works seamlessly with Project Builder projects.
You can simply open the project in Xcode, by double-clicking on
the project (.pbproj) bundle, dragging
the project bundle to the Xcode application, or using the Open command
in Xcode and selecting the project bundle.
Note that if you also have Project Builder installed on your
computer, double-clicking the .pbproj bundle
will open the project in Project Builder. To open the project in
Xcode, you will have to use one of the other methods mentioned here.
Once you have opened your Project Builder project in Xcode, it should build with little or no additional work on your part. If you wish to take advantage of some of Xcode’s more significant features, such as ZeroLink, Fix and Continue, and the like, you will have to convert the targets in your project to use the native build system. Xcode does not automatically upgrade the existing targets, which use Project Builder’s Jam-based build system, when you open the project. To learn more about converting native targets, see “Converting a Project Builder Target.”
Xcode also supports importing projects from ProjectBuilderWO. To import a ProjectBuilderWO project, do the following:
Choose File > Import Project.
From the Import Project Assistant, choose Import ProjectBuilderWO Project and click Next.
Type the path to the ProjectBuilderWO project in the ProjectBuilderWO Project field or click Choose to select the project from an Open dialog.
Type the name you want to use for the new Xcode project in the New Project Name field and click Finish. If you do not specify a different name, Xcode uses the name of the existing project.
Xcode imports the ProjectBuilderWO project and creates a new Xcode project file. Where possible, Xcode imports the targets in the ProjectBuilderWO project as native targets. If the ProjectBuilderWO project contains targets not supported by Xcode’s native build system, the importer imports those targets as Jam-based targets.
Last updated: 2006-11-07