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.
- 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.Linux
-
Launch the application.
./node_modules/.bin/electron .
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
-
Install swig 3.0.5.
-
Clone OpenStudio
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