|
Getting Started
SDK API Reference
SDK API Features
Other Documentation
|
|
|
This page describes the process for moving your Metrowerks CodeWarrior project to an Apple Xcode project.
For more information on this topic, please see the documentation found on the Apple web site: http://developer.apple.com
- Note:
- The samples here use the specific project 'simpleformat'. Substitute your project names for 'simpleformat'.
- The required development environment for this conversion is Apple Xcode Version 3.1.2
- The system requirement is Mac OS X Version 10.5.8
- From the Xcode menus choose File and then New Project.
- From the Bundle section choose Carbon Bundle.
- Click Next.
- Type in your project name and location.
- Project name: simpleformat
- Project Directory: ../samplecode/format/simpleformat/mac/simpleformat/
- Click Finish.
- Remove the InfoPlist.strings file from Resources.
(Choose Delete references and files from the dialog.) - Remove main.c.
(Choose Delete references and files from the dialog.)
Xcode makes a new folder and puts the project there. I want things up a level to be consistent with my windows environment.
- Note:
- You can skip this step for your projects. Please make a note of your level change when using the relative paths later in this document.
- Close project and navigate to location. We want it up a level.
- Select the project file (simpleformat.xcodeproj).
- Select the Info.plist.
- Select the pre compiled header (simpleformat_Prefix.pch).
- Move them up a level (../samplecode/format/simpleformat/mac).
- Delete the simpleformat folder that the files where copied from.
- Open the project from the new location.
- Add FlatCarbon (/Developer/Headers/FlatCarbon).
Use drag and drop from finder. - Add the Photoshop SDK photoshopapi headers from ../photoshopapi/
Use drag and drop from finder.
Remove stuff you don't need, (adm, c++wrapperclasses, etc...)
OR
Only add the files that you need. - Add the Photoshop SDK Common headers and resources from ../samplecode/common/
Use drag and drop from finder.
Remove stuff you don't need, (resources mostly)
OR
Only add the files that you need. - Add your project specific files (headers, sources, and resources)
- Click the main project group (simpleformat).
- Click info.
- Click on the 'build' configuration.
- Select all settings.
- Change Build Products Path to (../../../Output/Mac).
- Go down to 'Targets' and select 'simpleformat'.
- Right click select Add -> New Build Phase -> New Build ResourceManager Resources Build Phase.
- Close the window that pops open.
- Find your project .r files that you added.
- Select them one in turn and make sure the checkbox is selected for including in the build process.
- You should see the file number increase each time you add one.
- Do the same to Info.plist.
This file needs to be edited to be the type of plug-in you are working on.
- Click the main project group (simpleformat).
- Click info.
- Click on the 'build' configuration.
- Select all settings.
- Search for 'Rez'.
- Change Rez Prefix File to (/../../../common/includes/MachOMacrezXcode.h).
- Xcode defines: use __APPLE_CC__ for compiling with Xcode, use __LP64__ for compiling on MacTel 64 bit machines, use __i386__ for compiling on MacTel 32 bit binaries
- Dissolve is the only example working for MacIntel
- Xcode project settings can be fun. Make sure you are at the right level during edits. More information can be found here. Project Settings Info
- Use "lipo -detailed_info YourPluginName" to see what kind of binary you have. You will need to navigate inside the package to the actual plug-in.
- Use "nm -g YourPluginName" to see what functions you have exported. You must have your main function exported. Something like T _PluginMain.
Another option is to use the File->Import Project... Follow the instructions from the Xcode dialogs during the conversion process. Also, see the documentation and help on the Apple Developers web site for more information on using this feature.
|
|