Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
jsiegle committed Aug 8, 2022
1 parent cc4ae50 commit 635d9a6
Showing 1 changed file with 62 additions and 12 deletions.
74 changes: 62 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,69 @@
# Open Ephys HDF5 Common Library
A common library for all formats that write HDF5 files

## Installation
### Installing the HDF5 library
The plugin requires a specific version of the HDF5 library (≥1.8.12 and <1.8.21)
For windows, linux, and mac the required files are already included for the plugin
A common library for any Open Ephys GUI plugins that need to write HDF5 files, based on version 1.21.1 of the HDF5 library. When building the GUI locally, plugins that depend on this library (such as [nwb-format](https://github.com/open-ephys-plugins/nwb-format)) must be compiled *after* this library.

### Building the plugins
Building the plugins requires [CMake](https://cmake.org/). Detailed instructions on how to build open ephys plugins with CMake can be found in [our wiki](https://open-ephys.atlassian.net/wiki/spaces/OEW/pages/1259110401/Plugin+CMake+Builds).
## Building from source

#### [MacOS only] Update rpaths
Update the rpaths of HDF5 libraries linked to `libOpenEphysHDF5.dylib` by running the following commands:
First, follow the instructions on [this page](https://open-ephys.github.io/gui-docs/Developer-Guide/Compiling-the-GUI.html) to build the Open Ephys GUI.

**Important:** This library is intended for use with the latest version of the GUI, 0.6.X. The GUI should be compiled from the [`main`](https://github.com/open-ephys/plugin-gui/tree/main) branch, rather than the previous `master` branch.

Then, clone this repository into a directory at the same level as the `plugin-GUI`, e.g.:

```
install_name_tool -change /usr/local/lib/libhdf5.10.dylib @loader_path/libhdf5.10.dylib path/to/libOpenEphysHDF5.dylib
Code
├── plugin-GUI
│ ├── Build
│ ├── Source
│ └── ...
├── OEPlugins
│ └── OpenEphysHDF5Lib
│ ├── Build
│ ├── Source
│ └── ...
```

### Windows

**Requirements:** [Visual Studio](https://visualstudio.microsoft.com/) and [CMake](https://cmake.org/install/)

From the `Build` directory, enter:

```bash
cmake -G "Visual Studio 17 2022" -A x64 ..
```
install_name_tool -change /usr/local/lib/libhdf5_cpp.15.dylib @loader_path/libhdf5_cpp.15.dylib path/to/libOpenEphysHDF5.dylib
```

Next, launch Visual Studio and open the `OE_COMMONLIB_OpenEphysHDF5.sln` file that was just created. Select the appropriate configuration (Debug/Release) and build the solution.

Selecting the `INSTALL` project and manually building it will copy the library's `.dll` and any other required files into the GUI's `shared` directory.


### Linux

**Requirements:** [CMake](https://cmake.org/install/)

From the `Build` directory, enter:

```bash
cmake -G "Unix Makefiles" ..
cd Debug
make -j
make install
```

This will build the library and copy the `.so` file into the GUI's `plugins` directory.


### macOS

**Requirements:** [Xcode](https://developer.apple.com/xcode/) and [CMake](https://cmake.org/install/)

From the `Build` directory, enter:

```bash
cmake -G "Xcode" ..
```

Next, launch Xcode and open the `OE_COMMONLIB_OpenEphysHDF5.xcodeproj` file that now lives in the “Build” directory.

Running the `ALL_BUILD` scheme will compile the library; running the `INSTALL` scheme will install the `.dylib` file to `/Users/<username>/Library/Application Support/open-ephys/shared-api8`.

0 comments on commit 635d9a6

Please sign in to comment.