Versions Compared

Key

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

(NOTE: This page is currenty deprecated and will be removed soon, a  new and automated way of creating Build files is available)

Plugin files are built independently from the core GUI. As such, they have their own Visual Studio projects on Windows, Makefiles for Linux, and Xcode projects for OS X.

...

  1. Create a new C++ Empty Project in Visual Studio by either adding it to the existing Plugins solution (right click on the Solution in the Solution Explorer, and select Add > New project) if its to be included in the Open Ephys main repository or in its own solution (File > New > Project), if it's going to be developed or distributed in a standalone way. Remember to give it name.
  2. Add the .h and .cpp files, plus the OpenEphysLib.cpp file, to the "Source Files" folder of your project. If you don't have an OpenEphysLib.cpp file, copy one from another plugin and change the name, type, and creator fields. These files should live in the Source/Plugins/<PluginName> directory.
  3. Create x64 build configurations for the project if they are not created automatically.
    1. Open the Configuration Manager (Right click on the project, select "Properties," and then click on the "Configuration Manager" button in the upper right)
    2. Select x64 as Active solution platform on the top of the screen. If it doesn't appear, select "New" and select x64 in "Type or select the new platform", "Win32" on "Copy Settings from" and Check the "Create new project platforms".
    3. In the project list, if when x64 is selected in "Active solution platform" it still shows "Win32" on the "Platform" column, click there and either select x64 or new with the same settings as the when creating the solution platform, except unchecking the "Create new project platforms" this time (as we're already creating them).
    4. Check that for all 4 build combinations (Debug Win32, Release Win32, Debug x64, Release x64) the "Configuration" and "Platform" columns of the project match with the "Active solution configuration/platform" and that the "Build" checkbox is checked in all four.
  4. In the project properties pages window (Right click on the project, and select "Properties"), select "All configurations" in the "Configuration" field and "All platforms" in the "Platform" field and in "Configuration properties/General" set the "Project defaults/Configuration type" as "Dynamic Library (.dll)". In "Configuration Properties/C/C++/General", if "SDL checks" is set to "Yes", change it to "<inherit from parent or project defaults>". Save the changes immediately either by the OK or the Apply buttons.
  5. Close the "Property Pages" window and open the "Propery Property Manager" of VS (View Menu > Other Windows > Property Manager). Open your project and, for all four configurations, load (right click in the config, load existing property sheet) the corresponding ".props" file located on "Builds/VisualStudio2013/Plugins"

...

  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 macOS->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. Click the Options button, and in the "Add to targets" section, uncheck all targets. This will ensure that the files are referenced, not copied. Then, click Add.

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

...

  1. Go to File->Add Files to "<your project name>", and select the files Plugin_Debug.xcconfig and Plugin_Release.xcconfig in the Config folder.  Click Click the Options button, and in the "Add to targets" section, uncheck all targets.  ThenThen, 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.

...