Skip to content

fthorey/pebbleSDK2

Repository files navigation

PebbleSDK2

Improve waf-based Pebble SDK build system regarding dependencies handling.

How to create the waf script for PebbleSDK

Simply execute in this directory:

./waf-light configure build

And replace the generated waf script into your PebbleSDK/Pebble directory

The refactored Pebble SDK build doesn't copy 'raw' resources from resources/data to build/resources/data because it's not necessary and generates (small) overhead. However, a python script called 'PblBuildCommand' in the Pebble SDK is run after the build and is in charge of checking correctness of generated resources. This script have been slightly modified. The 'ext' folder contains this modified 'PblBuildCommand' script that checks both resources/data and build/resources/data in case of 'raw' resources. If you don't want to get a warning at the end of the build about non-existing 'raw' resource, simply replace the file in '/PebbleSDK/tools/pebble/PblBuildCommand.py' by the one located in 'ext/PblBuildCommand.py'.

Modifications

  • waflib.Task.Task have been overloaded to make signature of Tasks in charge of handling resources (.raw, .png, .png-trans, .font) depends on the hash of the dictionnary generated by parsing appinfo.json. Each time the appinfo.json file is modified, all resources-based files are re-build and related dependent Tasks are re-executed. Each time a resource file is modified, all file based on this resource file are re-build.

  • Build have been refactored into 5 Task Generators: appinfo_res, datapack, appinfo_auto_c, pbl_program, pbl_bundle. Only general purpose Task Generator are used instead of Rule-based ones.

  • Dependencies of Nodes generated into each of the 5 Task Generators are properly handled so that re-build are triggered only when necessary.

  • Append the attribute ext_out=['.h'] to the Task in charge of generating src/resource_ids.auto.h header so that it is guaranted to be executed before any c compilation task.

  • Add arm-toolchain-path option to specify the path the ARM cross toolchain and pebble-sdk option to specify the path of the PebbleSDK directory. Useful when using directly waf in the app build directory.

  • All tests in PebbleSDK/Pebble/Examples build successfully.

About

Improve waf-based Pebble SDK build system

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published