Skip to content

open-ephys-plugins/OEPlugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Open Ephys GUI Plugin Template (deprecated)

This repository contains a generic plugin template for building plugins for an older version of the Open Ephys GUI (0.5.x).

To build plugins for the latest version of the GUI (0.6.x), you should use one of the following templates instead:

More information about building your own plugins can be found in the Open Ephys GUI Developer Guide.

Using this template

  1. Add source code files to the Source directory. The existing files can be used as a starting point.
  2. Edit the OpenEphysLib.cpp file to include the correct plugin metadata.
  3. Create the build files using CMake

Using external libraries

To link the plugin to external libraries, it is necessary to manually edit the Build/CMakeLists.txt file. The code for linking libraries is located in comments at the end. For most common libraries, the find_package option is recommended. An example would be

find_package(ZLIB)
target_link_libraries(${PLUGIN_NAME} ${ZLIB_LIBRARIES})
target_include_directories(${PLUGIN_NAME} PRIVATE ${ZLIB_INCLUDE_DIRS})

If there is no standard package finder for cmake, find_libraryand find_path can be used to find the library and include files respectively. The commands will search in a variety of standard locations For example

find_library(ZMQ_LIBRARIES NAMES libzmq-v120-mt-4_0_4 zmq zmq-v120-mt-4_0_4) #the different names after names are not a list of libraries to include, but a list of possible names the library might have, useful for multiple architectures. find_library will return the first library found that matches any of the names
find_path(ZMQ_INCLUDE_DIRS zmq.h)

target_link_libraries(${PLUGIN_NAME} ${ZMQ_LIBRARIES})
target_include_directories(${PLUGIN_NAME} PRIVATE ${ZMQ_INCLUDE_DIRS})

Providing libraries for Windows

Since Windows does not have standardized paths for libraries, as Linux and macOS do, it is sometimes useful to pack the appropriate Windows version of the required libraries alongside the plugin. To do so, a libs directory has to be created at the top level of the repository, alongside this README file, and files from all required libraries placed there. The required folder structure is:

    libs
    ├─ include           #library headers
    ├─ lib
        ├─ x64           #64-bit compile-time (.lib) files
        └─ x86           #32-bit compile time (.lib) files, if needed
    └─ bin
        ├─ x64           #64-bit runtime (.dll) files
        └─ x86           #32-bit runtime (.dll) files, if needed

DLLs in the bin directories will be copied to the open-ephys GUI shared folder when installing.

About

Open Ephys GUI Plugin Template (deprecated)

Resources

License

Stars

Watchers

Forks