Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The folder Builds/MacOSX/Plugins contains Xcode projects for all default plugins.  Each project gets most of its build settings from the shared Xcode shared Xcode configuration files in Builds/MacOSX/Plugins/Config.  All of the default plugin projects are included in the Xcode workspace Builds/MacOSX/OpenEphys.xcworkspace.  Building the "All" scheme in this workspace builds both the core GUI and all standard plugins.

To compile a new plugin on OS XmacOS, you must create an Xcode project for it.  The steps for creating this project are as follows:

  1. If the new plugin will be part of the default set, open OpenEphys.xcworkspace.  Otherwise, just open Xcode.
  2. Select File->New->Project.  In the dialog that pops up, choose OS XmacOS->Framework & Library->Bundle, and click Next.  Give your product a name (e.g. "ExampleProcessor"), then click Next.  A file selection dialog will pop up, allowing you to choose where the new project is created.  For non-default plugins, any location is fine.  Projects for default plugins should go in Builds/MacOSX/Plugins; also, in the "Add to" pop-up menu, select the OpenEphys workspace, then, in the "Group" menu that appears, select "Plugins".  Click Create, and Xcode should open the new project.
  3. Select File->Add Files to "<your project name>" to add source files to the project.  If the plugin is completely new, you can use the files in Source/Plugins/ExampleProcessor as a starting point.  (Ignore Makefile.example, which is not used on OS X.)

The next steps depend on whether the project is for a default plugin (included in the plugin-GUI source tree) or not.

...

To simplify configuration management, all default plugin projects get (most of) their build settings from the shared Xcode configuration files in Builds/MacOSX/Plugins/Config. To use these files with a new plugin project, follow these steps:

  1. Go to File->Add Files to "<your project name>", and select the three files Plugin_Debug.xcconfig files in and Plugin_Release.xcconfig in the Config folder.  Click the Options button, and in the "Add to targets" section, uncheck all targets.  Then, click Add.
  2. Select the project file in Xcode, and navigate to the top-level "Info" panel for the project.  In the "Configurations" section, expand Debug and Release, and select the appropriate configuration file for each configuration (Plugin_Debug for Debug, Plugin_Release for Release).
  3. Navigate to the project-level build settings.  Select "All" and "Levels".  Then, select all settings in the list, and press delete.  Once this is done, the column for project-level settings should be empty.
  4. Navigate to the target-level build settings.  Delete all settings except "Info.plist File", "Product Bundler Identifier", and "Product Name".
  5. (Optional) Add plugin-specific build settings (e.g. paths to external libraries) as needed.

The final step is adding the new plugin to the "All" scheme.  In the scheme selection drop-down menu, select "Manage Schemes", then double-click on the "All" scheme. Navigate to the Build section, and add the new plugin bundle to the list of targets.  (If desired, you can now delete the scheme that Xcode generated for the new plugin project.)