Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Orion/Documentation/Developer Guide/Electron

Development Setup

To begin working on the electron app, there are a bunch of steps to go through to get up and running.

First, you have to clone the client repo on your local machine. At the moment, we do not have a developer scenario for working on the Electron app in the Orion cloud editor.

Next, make sure you have Node.js and NPM installed.

Now, make sure you have a good command line to work from. If you are on Linux or Mac OS, you are good to go. On Windows, a good option is to use git-bash.

Lastly, if you plan on debugging the Electron app (especially for the server code), a good resource is to use VS Code. It has an attachable debugger that can be used to debug the server running in Electron (more on this in the debugging section).

Install the dependencies

With everything cloned and installed, let's get the dependencies installed, and the project ready for development.

Working from the command line, find where you cloned the Orion client repository and change into the orionode folder. For example, if you cloned into your gitfolder, the command would be:

  cd ~/git/org.eclipse.orion.client/modules/orionode

Once there, we want to install all of the dependencies, so we simply run the command:

  npm install

This can take a while to complete, as it drags in nodegit and electron. When the install does complete, we need to replace the nodegit binaries it grabbed during the install, with the ones from the nodegit binaries section. Once you have the binary versions you need (based on whats in the package.json file), copy them from the location you downloaded them to and into the Release folder for nodegit.

The folder is located in node_modules here:

  ~/git/org.eclipse.orion.client/modules/orionode/node_modules/nodegit/build/Release

Once you have replaced the binaries, run the app using:

   node_modules/electron/dist/electron server.js

Get the nodegit binaries

After everything is installed, before you can start running the app, you have to replace the binaries of nodgit with our custom built ones. Below is the listing of all of our pre-built binaries, so grab the ones you need for the version of electron + version of nodegit you are using (you can check in the package.json file to see which one is in use).

Electron 1.4.10

Electron 1.2.7

Back to the top