From ea1c81ca0fd03809c9fdc0d1a92e694c3fb94974 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Thu, 3 Dec 2015 11:40:28 -0800 Subject: [PATCH] add README and local binary cl options --- console/README.md | 25 +++++++++++++++++++++++++ console/main.js | 12 ++++++++++++ console/package.json | 3 +++ 3 files changed, 40 insertions(+) create mode 100644 console/README.md diff --git a/console/README.md b/console/README.md new file mode 100644 index 0000000000..528f9037ac --- /dev/null +++ b/console/README.md @@ -0,0 +1,25 @@ +### Console + +The High Fidelity Desktop Console, made with [Electron](http://electron.atom.io/). + +### Running Locally + +Make sure you have [Node.js](https://nodejs.org/en/) installed. Use the latest stable version. + +``` +npm install +npm start +``` + +To run, the console needs a build of Interface, domain-server, and assignment-client. + +The default, `npm start` tells the console to look for debug builds of those binaries in a build folder beside the console folder. + +If you want to use release builds use `npm run local-release`. + +### Packaging + +CMake produces a target `package-console` that will bundle up everything you need for the console on your platform. +It ensures that there are available builds for the domain-server, assignment-client, and Interface. Then it produces an executable for the console. + +Finally it copies all of the produced executables to a directory, ready for testing or packaging for deployment. diff --git a/console/main.js b/console/main.js index 5922f78a1e..0188bb11ab 100644 --- a/console/main.js +++ b/console/main.js @@ -31,6 +31,18 @@ app.on('window-all-closed', function() { } }); +// Check command line arguments to see how to find binaries +var argv = require('yargs'); + +if (argv.localDebugBuilds) { + // check in a dev folder structure for debug binaries +} else if (argv.localReleaseBuilds) { + // check in a dev folder structure for release binaries +} else { + // check beside the console application for the binaries +} + + // This method will be called when Electron has finished // initialization and is ready to create browser windows. app.on('ready', function() { diff --git a/console/package.json b/console/package.json index af9d962423..a6b4e9c9c2 100755 --- a/console/package.json +++ b/console/package.json @@ -20,5 +20,8 @@ "start": "electron . --local-debug-builds", "local-release": "electron . --local-release-builds", "package-darwin": "electron-packager . Console --platform=darwin --arch=x64 --version=0.35.2" + }, + "dependencies": { + "yargs": "^3.30.0" } }