Daemon is a cross-platform frontend for a robotics control system. It's also the future.
- Ensure you have
git
,npm
. Don't usebrew
to install npm; on OS X (and probably Linux) you can follow the first guide here. git clone [this repo]
cd daemon
npm install -g brunch bower
npm install
Install node dependencies.bower install
Install frontend dependencies.npm run compiler
This will run a watching compiler. You can run a one-time compiler by runningbrunch b
instead.npm run app
cd app/assets; npm install
Install frontend node dependencies.- If you want to work with anything that depends on the radio, you will need to compile your Serialport; see instructions below.
You need the following stuff installed on your machine:
- Node.js & NPM (see the instructions for your operating system. Ensure that globally installed NPM modules are in your PATH!)
- Git. Windows users: try Git Bash, there is a good usable CLI included which should work with the workflow out-of-the-box. Use Git Bash instead of CMD.exe.
- Linux Users: You may have to do a weird patch.
- Brunch and Bower via a global npm installation:
npm install -g brunch bower
. (You can also install these separately.) Once you've got those things installed, do npm install
in your directory to install dependenciesbower install
in your directory to install frontend. There will sometimes be choices because some packages require different versions of other packages; it's usually ok to just pick the latest version of the package.cd app/assets; npm install
Install frontend node dependencies.- You should be done with everything except the radio. To compile Serialport to use the radio, see instructions below.
npm run
to see the various scripts you can run.npm run compiler
assembles your application into/_public
and watches file changes.npm run app
starts your application locally.npm run deploy
builds your app for windows, osx and linux. the binaries are placed in/dist
after building.bower install <frontend-module>
for any frontend-related stuff.npm install my-module
inside ofapp/assets
to install node.js modules.
Serialport is a Node.js package to interface with hardware serial ports, such as the ones we need to communicate over the radio. There are precompiled binaries online available for Node.js, but not for node-webkit. We have to compile our own.
- First, cd into your
app/assets
folder. You should already have runnpm install
in this folder, but running it again won't hurt. cd node_modules/serialport
.- Now that we're in the Serialport folder, we need to build it. You should install
node-pre-gyp
andnw-gyp
:npm install -g node-pre-gyp nw-gyp
. You could also install them locally, but they need to be on your path. - Run
node-pre-gyp build --runtime=node-webkit --target=0.10.0
- You should get a bunch of green output. If you get an error, someone will have to help debug your system.