-
Notifications
You must be signed in to change notification settings - Fork 263
Developer Setup
First, fork the repo and clone it locally. When done, return here.
There are a few extra steps to be able to run the GUI from VSCode:
- Open the "System Properties" window:
- Type "Advanced System Settings" in the windows search bar
- Select "View advanced system settings"
- In the "System Properties" window, click on the Advanced tab.
- In the "Advanced" section, click the Environment Variables button.
- Edit the "Path" variable. Append the processing path (Example:
C:\Program Files\Processing-3.0.1\
) to the variable value. Each entry is separated with a semicolon.
There are a few extra steps to be able to run the GUI from VSCode:
- Launch Processing
- Go to the menu
Tools -> Install "processing-java"
- Click
OK
and enter your password.
This is an excellent guide for installing Processing on Linux
To build from VSCode, you also have to add processing-java to your PATH:
sudo su -c "ln -s /opt/processing-3.0.2/processing-java /usr/local/bin/processing-java"
- Open VSCode
- Click
"Open folder..."
- Select your
OpenBCI_GUI
folder. (NOTOpenBCI_GUI/OpenBCI_GUI
)
Now you should see all the files in the explorer on the left.
-
Go to the
OpenBCI_GUI
folder you cloned. -
Copy the contents of
OpenBCI_GUI/OpenBCI_GUI/libraries
to Processing'slibraries
folder:- On Mac:
/Users/<username>/Documents/Processing/libraries
- On Windows:
C:\Users\<username>\Documents\Processing\libraries
- On Mac:
-
If you get
Duplicate libraries found for com.sun.jna.
, delete thejna
library in Processing folder you just copied to. Keeping this library in the project folder fixes LSL networking in GUI Standalone for all OS. -
Even better if you don't want to copy libraries every time: make a symbolic link.
- On Windows:
mklink /D C:\Users\<username>\Documents\Processing\libraries C:\Users\<username>\git\OpenBCI_GUI\OpenBCI_GUI\libraries
- On Windows:
- Switch to the Extensions manager with
Ctrl+ Shift + X
or click the icon on the left. - Search for Processing and install the Processing Language extension.
- Click "reload" after it installs. Or relaunch VSCode.
- With the GUI project open, Hit
Ctrl + Shift + B
on Windows, orCmd + Shift + B
on Mac. - Click on the message
No build task to run found. Configure Build Task...
- Click
Create tasks.json file from template
thenOthers
This will create a tasks.json
file under a .vscode
directory. Open it, and replace it with this file. Text here:
{
"version": "2.0.0",
"tasks": [
{
"label": "Run Sketch",
"type": "shell",
"group": {
"kind": "build",
"isDefault": true
},
"command": "${config:processing.path}",
"presentation": {
"echo": true,
"reveal": "always",
"focus": false,
"panel": "dedicated"
},
"args": [
"--force",
"--sketch=${workspaceRoot}/OpenBCI_GUI",
"--output=${workspaceRoot}/OpenBCI_GUI/build",
"--run"
],
"windows": {
"args": [
"--force",
"--sketch=\"${workspaceRoot}\\OpenBCI_GUI\"",
"--output=${workspaceRoot}\\OpenBCI_GUI\\build",
"--run"
]
}
}
]
}
Now you can launch the GUI with Ctrl+ Shift + B
.
On Windows, git conveniently provides the Git Bash, which can be used from VSCode as pictured below. It's a great way to run git commands, such as branching, fetching, pushing, etc.
VSCode has lots of great functionality, hidden from plain sight. It can help you with github commits, staging files, handling merge conflics, and much more. There are many extensions to discover. If you find something useful, please share it here!
If you get Error: Could not find build output: ......./application.linux64
when running make-release.py
, there may be an issue with permissions. This can be fixed by using built-in Linux repair tools. Try sudo touch /forcefsck
to force Ubuntu to check the filesystem on next boot.
Please feel free to contribute tips, tricks and best practices.