Before running, setup up cron or other job scheduler to call experiment_check.sh
bash script every 30 seconds to ensure that running experiments are not unintentionally lost. In addition, edit config.sh
to include the path to runningExpts.txt
before running experiment_check.sh
- If you have installation or compilation issues with this project, please see the debugging guide
Install dependencies with yarn.
$ cd your_directory/evolver-electron
$ yarn
Start the app in the dev
environment. This starts the renderer process in hot-module-replacement mode and starts a webpack dev server that sends hot updates to the renderer process:
$ yarn dev
Use the command line to commit to the repo, using the Github App will throw errors:
git add .
git commit -a --no-verify -m "Put comment here"
To package apps for the local platform (Does not work well when compiling in other platforms. e.g. compile in OSX for OSX):
$ yarn package
To package app for Raspberry Pi, first simulate Pi with Docker container:
docker run --rm -ti --env-file <(env | grep -iE 'DEBUG|NODE_|ELECTRON_|YARN_|NPM_|CI|CIRCLE|TRAVIS_TAG|TRAVIS|TRAVIS_REPO_|TRAVIS_BUILD_|TRAVIS_BRANCH|TRAVIS_PULL_REQUEST_|APPVEYOR_|CSC_|GH_|GITHUB_|BT_|AWS_|STRIP|BUILD_') --env ELECTRON_CACHE="/root/.cache/electron" --env ELECTRON_BUILDER_CACHE="/root/.cache/electron-builder" -v ${PWD}:/project -v ${PWD##*/}-node-modules:/project/node_modules -v ~/.cache/electron:/root/.cache/electron -v ~/.cache/electron-builder:/root/.cache/electron-builder electronuserland/builder:wine
Install dependencies again in environment. Remember to reinstall dependences for local platforms after exiting Docker.:
$ yarn
Package for Raspberry Pi:
$ yarn package-rpi
Next, scp the file to the Raspberry Pi:
$ scp release/evolver-electron-1.0.0.AppImage pi@<RPI_IP>:~/evolver-electron-1.0.0.AppImage-new
NOTE: Do not directly overwrite the file - add -new
to the end so that it copies next to the current build.
Now ssh to the Raspberry Pi, backup the old version and replace it with the new. Restart the raspberry pi to finish the installation.
$ ssh pi@<RPI_IP>
$ mv evolver-electron-1.0.0.AppImage evolver-electron-1.0.0.AppImage-old
$ mv evolver-electron-1.0.0.AppImage-new evolver-electron-1.0.0.AppImage
$ sudo reboot now
- Zachary Heins
- Brandon Wong
- Electron-React Boilerplate Repo - All this work is based on infrastructure from their repo