Information about development matters related to Graphite.
To build the project, first run ./configure. There are some configuration options available, see ./configure --help, and by default all possible platforms are built. Then, run make build to compile the project.
We use Jinja2 as a templating system to handle elements that need to be repeated in multiple files, such as configuration defaults, messaging keys or the version number. Then, files like package.json are build from a template (package.template.json). For most files, we use a custom inline template syntax, though, which is directly inside the source files. For instance, you might find something like this:
// -- autogen
// -- #define GRAPHITE_N_CONFIG {{ num_config_items }}
#define GRAPHITE_N_CONFIG 10
// -- end autogen
This is a section that gets automatically generated. All lines starting with // -- after the autogen line are the template, which can refer to template variables such as num_config_items. Then following lines are then the instantiation of that template, automatically generated by the templating system. To update the section if the template variables change, run make initialize. All template variables are defined in scripts/initialize.py.
To release a new version, do the following:
- Make changes to Graphite.
- Update screenshots if necessary (in particular, if there are new widgets).
- Document changes in
README.mdin the changelog. - Update version number in
scripts/initialize.py. - Update table in
README.mdthat relates app version numbers with configuration version numbers.- Publish a new branch
config-Xif a new configuration versionXwas necessary. Can be done usingmake config_new_version.
- Publish a new branch
- Build a clean release version:
make release. - Commit new files in
releasefolder. - Upload and publish new version.
- Update website if necessary.
If after adding a new feature, Graphite crashes, it might be because Graphite ran out of memory. The resources need at runtime (fonts and icons), and the buffer used by pebble-fctx use a lot of memory.
- Pebble Original: 144x168
- Pebble Time: 144x168
- Pebble Round: 180x180
- Pebble 2: 144x168
- Pebble Time 2: 200x228