Compiling the GUI#

If you’d like to build the GUI from source, you’ll have to download the code to your local machine. We recommend first forking the GUI’s GitHub repository to your own account, then cloning the fork via the command line or the GitHub Desktop app.

Windows#

Building the GUI on Windows requires Visual Studio (the free Community Edition is fine). We recommend using Visual Studio 2022 Community, but it will also work with VS2013, 2015, 2017, or 2019.

You’ll also need to install CMake from the official download page. During installation, we recommend selecting the option to “Add CMake to the system PATH” for either all users or current users, to allow easy use of the CMake command-line tools.

Once you have CMake installed, you can generate the Visual Studio project files by typing the following from the command prompt inside the plugin-GUI top-level directory:

> cd Build
> cmake -G "Visual Studio 17 2022" -A x64 ..

Note

For earlier version of Visual Studio, substitute the last command with:
cmake -G "Visual Studio 16 2019" -A x64 ..
cmake -G "Visual Studio 15 2017 Win64" ..
cmake -G "Visual Studio 14 2015 Win64" ..
or
cmake -G "Visual Studio 12 2013 Win64" ..

Next, launch Visual Studio and open the open-ephys-GUI.sln file that was just created in the “Build” folder.

To compile the GUI, select “Build > Build Solution” (shortcut key: F6), or press the “Debug” button to build and run. This will build the main application, the open-ephys.lib file, and all of the plugins that are included in the main repository.

Tip

In the “Solution Explorer,” right-click on open-ephys and select “Set as Startup Project” to automatically launch the GUI when you start the debugger.

macOS#

Building the GUI on a Mac requires Xcode. This can be installed via the App Store. You’ll also need to install the Xcode command-line tools by entering the following line in a terminal window:

$ command xcode-select --install

In order generate the build files for the GUI, you’ll need to install CMake for Mac OS X 10.7 or later. Once that’s installed, make the cmake command-line tools accessible system-wide by entering the following line in a terminal window:

$ sudo "/Applications/CMake.app/Contents/bin/cmake-gui" --install

Now, you’re ready to build the GUI! To create the Xcode project files, type the following commands from the plugin-GUI top-level directory:

$ cd Build
$ cmake -G "Xcode" ..

Note that the final two periods are critical for getting this command to work.

Next, launch Xcode and open the open-ephys-GUI.xcodeproj file that now lives in the “Build” directory.

Inside XCode, hit the “Run” button to build the GUI and plugins from source. To run the GUI from within XCode, select the “open-ephys” scheme from the drop-down menu next to the Run and Stop buttons, instead of “ALL_BUILD”.

Important

If you’re building the plugin on a Mac with Apple Silicon, you’ll need to make sure the ALL_BUILD profile is set use “Rosetta”. You will likely need to first set the build target to “Any Mac,” and then select the “My Mac (Rosetta)” option that appears. It is possible to build a version of the GUI that runs natively on Apple Silicon, but there are a few extra steps involved, and it won’t work with plugins downloaded via the Plugin Installer. If you’re interested in this, please reach out to support@open-ephys.org for more info.

Linux#

In order generate the build files for the GUI, you’ll need to install CMake for Linux. On Ubuntu and other Debian-based distributions, you can do so with the following commands:

$ sudo apt-get update
$ sudo apt-get install cmake

Next, install the Linux dependencies by entering the following line from the plugin-GUI top-level directory:

$ sudo Resources/Scripts/install_linux_dependencies.sh

If you want the GUI to be able to communicate with the Open Ephys acquisition board, you’ll also need to enter the following lines:

$ sudo cp Resources/Scripts/40-open-ephys.rules /etc/udev/rules.d
$ sudo service udev restart

Note

On Fedora/CentOS distros, substitute sudo udevadm conrol --reload-rules for the last command

Now, generate the Linux makefiles by entering:

$ cd Build
$ cmake -G "Unix Makefiles" ..

Note

To specify “Debug” or “Release” mode, add -DCMAKE_BUILD_TYPE=Release or -DCMAKE_BUILD_TYPE=Debug to the last command, just before the two periods. Setting a variable using a -D argument will be permanent, with following calls to cmake in the same folder using its set value even if the argument is not used in them. Variables can be either set to a different value by calling cmake with a different -D option (thereby overwriting the existing value) or unset by calling cmake -UVARIABLE.

Once the makefile generation step is finished, enter the following line from the “Build” directory:

$ make

This will build the main application as well as the plugins. If this step is successful, there will be a compiled binary at Build/Debug/open-ephys or Build/Release/open-ephys.