summaryrefslogtreecommitdiff
path: root/Docs
diff options
context:
space:
mode:
authorMichael Drake <michael.drake@codethink.co.uk>2017-03-22 15:35:19 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2017-03-23 14:56:32 +0000
commit736bbbed715d6db1eec2a9947b86787d8f9e680e (patch)
treed5c0475fe88071419436e0d87b687dad05a6d200 /Docs
parent6bfc8ba547698e81dd33f0fdaff29bb227906d8d (diff)
downloadnetsurf-736bbbed715d6db1eec2a9947b86787d8f9e680e.tar.gz
netsurf-736bbbed715d6db1eec2a9947b86787d8f9e680e.tar.bz2
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
Diffstat (limited to 'Docs')
-rw-r--r--Docs/updating-duktape.md29
1 files changed, 29 insertions, 0 deletions
diff --git a/Docs/updating-duktape.md b/Docs/updating-duktape.md
new file mode 100644
index 000000000..a3e5a79b1
--- /dev/null
+++ b/Docs/updating-duktape.md
@@ -0,0 +1,29 @@
+Updating Duktape
+================
+
+1. Fetch the [latest release](http://duktape.org/download.html) 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`.
+