Gaia Build System introduction

A357616c0a9197fccbaf5aceb92d94f3?s=47 Yuren Ju
September 17, 2014

Gaia Build System introduction

A357616c0a9197fccbaf5aceb92d94f3?s=128

Yuren Ju

September 17, 2014
Tweet

Transcript

  1. Yuren Gaia Build System

  2. • generate profile directory • run tests (integration, unit, build,

    lint) make
  3. $ make

  4. Make xpcshell ! Download xpcshell runtime

  5. None
  6. Xpcshell

  7. :-(

  8. Using CommonJs Just like ! var fs = require(‘fs’); fs.readFileSync(FILE,

    {encoding: ‘UTF-8’});
  9. xpcshell -f xpcshell-commonjs.js -e “run(BUILD_SCRIPT);” initial script build script

  10. • Initial require() function • Binding work directory for first

    argument of require() ! • utils => GAIA_DIR/build/utils.js • submodule => GAIA_DIR/apps/keyboard/build/submodule.js xpcshell-commonjs.js
  11. pre-app.js

  12. options Makefile - declare - export xpcshell-commonjs - get from

    env variable
  13. utils utils-node utils-xpc

  14. • getFile(); • ls(nsIFile) • getFileContent(nsIFile) • writeContent(nsIFile) • ensureFolderExists(nsIFile)

    utils • copyFileTo() • log() • Commander • scriptLoader.load()
  15. build modules

  16. src dirs stage dir profile dir

  17. build modules

  18. • make build-test-integration • make build-test-unit test