netsurf/Docs/updating-duktape.md
Michael Drake 736bbbed71 Duktape 2.X: Update to Duktape 2.0.2.
Note that DUK_OPT_XXX feature selection has been removed.

This means we can't use `DUK_OPT_HAVE_CUSTOM_H`, so we need another
way to tell duktape about our custom header.

This means assembling our own duktape distribution with a
duktape "tools/configure.py" invocation.

Instructions for updating duktape have been added to NetSurf's
`Docs/` directory.

See:
https://github.com/svaarala/duktape/blob/master/doc/release-notes-v2-0.rst#duk_opt_xxx-feature-option-support-removed
2017-03-23 14:56:32 +00:00

848 B

Updating Duktape

  1. Fetch the latest release archive.

  2. Extract it somewhere.

  3. That extracts to a duktape-[VERSION] directory.

  4. We need to tell duktape about our duk_custom.h header:

    1. Change into the duktape-[VERSION] directory.

    2. Run the following command:

      python2 tools/configure.py
      --output-directory /tmp/output
      --source-directory src-input
      --config-metadata config
      --fixup-line '#include "duk_custom.h"'

    3. This generates a suitable set of duktape sources in /tmp/output

  5. Replace the duktape.c, duktape.h and duk_config.h files in the netsurf source tree (in content/handlers/javascript/duktape) with those generated in /tmp/output.