Skip to content

Latest commit

 

History

History
54 lines (36 loc) · 2.02 KB

README.md

File metadata and controls

54 lines (36 loc) · 2.02 KB

openstudio.js

This is an experiment in loading OpenStudio into electron using OpenStudio's Node bindings. In this repository will be notes and files to support that effort.

Setup

  • Clone openstudio.js repository. (Or whatever it should be called)
git clone https://github.com/kbenne/openstudio.js.git
cd openstudio.js
  • Install io.js or nodejs. This will only be used for bootstrapping. Specific versions of the required dependencies will be installed through npm.

  • Install openstudio.js dependencies.

npm install
  • Extract OpenStudio node bindings to <project root>/services/. You should end up with a directory <project root>/services/openstudio-node/ that contains a bunch of shared libraries and .node native extensions.

    Mac - 64 bit

    Windows - 64 bit

    Linux

  • Launch the application.

./node_modules/.bin/electron .

Building OpenStudio Node Bindings

If precompiled binaries are not available then do this.

  • Install the dependencies required to make native node modules that are compatible with electron. The general method is described here.
HOME=~/.electron-gyp ./node_modules/.bin/node-gyp install --target=0.28.0 --arch=ia64 --dist-url=https://atom.io/download/atom-shell
cd ../
git clone https://github.com/NREL/OpenStudio/tree/openstudiojs
cd OpenStudio
  • Configure top level OpenStudio to build node bindings. Enable BUILD_NODE_MODULES. Set NODE_INCLUDE_DIR to $HOME/.electron-gyp/.node-gyp/0.28.0/ replacing $HOME with path to home, where .electron-gyp is located.

  • Build OpenStudio