Dawn is a cross-platform frontend for the PiE robotics control system. It is the application students will see and use when programming and testing their robots. It is written with web technologies and packaged via Electron. More details can be found on the Github wiki.
- Install the LTS version of NodeJS. For Linux users, your distribution's package repository may be outdated; if so, please look at alternative sources.
- Install Yarn.
- Dawn is a part of the PieCentral repository, which contains the code for many of PiE's projects. If you have not already cloned the PieCentral repo, do so now.
- From the Dawn folder under PieCentral:
- Run
make watch
. This will pull all the necessary dawn dependencies and start the webpack bundler. Leave this running, it will try to automatically rebundle the app as you make changes. If you encounter lint errors relating toExpected linebreaks to be 'LF'...
, fix the lint errors by runningyarn lint --fix
. If it doesn't rebuild after fixing your lint errors, you should kill it and restart. If you get a Python version error on Windows like%s:%s:%s invalid syntax
, runnpm config set python <PATH_2_PY_3>
, replacing <PATH_2_PY_3> with the path to your installation of Python 3. - In a separate terminal tab/window, launch the application itself:
make start
. Leave this terminal window also running. Dawn should open. (Note: For tmux users, do not use tmux for this step due to a bug in Electron.) - When you make a change, the webpack watcher should automatically re-bundle your code. To see your changes in the app, you can refresh by clicking
Debug > Reload
from the menu bar or enter CMD-R.
- Run
- Once all the features necessary for the next release of Dawn are in place, tag the repository with
dawn/{version}
. A script used in Travis CI will automatically build Dawn for Macs, Windows, and Linux as long as no errors were reported. Built versions will be located in Releases. - If ready to ship, bother Website to update the Software Page.
This is only relevant if you are testing a non-development version of Dawn just for yourself.
-
Build for production:
yarn run build
(as opposed toyarn run watch
during production). -
Package app:
- Packaging Dawn is done via a release script. To build for all platforms, run the following from the
dawn
folder:
yarn run release
You can build for a specific platform and arch by adding
--platform=<PLATFORM> --arch=<ARCH>
, where<PLATFORM>
is one of {win32, darwin, linux} and<ARCH>
is one of {ia32, x64}. To build without pruning (which removes your devDependencies) add--noprune
. - Packaging Dawn is done via a release script. To build for all platforms, run the following from the