From 0b207a170d8af4bac547126fc617a2cf3b6199e3 Mon Sep 17 00:00:00 2001 From: Ted John Date: Tue, 18 Jan 2022 18:43:34 +0000 Subject: [PATCH] Add readme file for duktape sources --- src/thirdparty/duktape/README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/thirdparty/duktape/README.md diff --git a/src/thirdparty/duktape/README.md b/src/thirdparty/duktape/README.md new file mode 100644 index 0000000000..1253f03a04 --- /dev/null +++ b/src/thirdparty/duktape/README.md @@ -0,0 +1,20 @@ +## Duktape + +[Duktape](https://duktape.org/) is geared around compile time switches to minimise code size and memory footprint. Because of this, we can not rely on shared libraries, as we have no control on what switches it may have been compiled with. It also can cause inconsistent behaviour of plugins across multiple platforms, depending on what version of Duktape is installed on the system. + +[#14853](https://github.com/OpenRCT2/OpenRCT2/issues/14853) is the primary issue that was solved by embedding our own copy of duktape. + +This directory contains a pre-configured copy of duktape v2.6.0 with the following switches enabled: +* `DUK_USE_CPP_EXCEPTIONS` for C++ exception handling. +* `DUK_USE_DATE_NOW_WINDOWS` for Windows Vista compatibility. +* `DUK_USE_INTERRUPT_COUNTER` for aborting long or non-terminating scripts. + +duktape is configured with a command such as: +``` +python2 duktape-2.6.0/tools/configure.py --output-directory src/thirdparty/duktape \ + -DUK_USE_CPP_EXCEPTIONS + -DUK_USE_DATE_NOW_WINDOWS + -DUK_USE_INTERRUPT_COUNTER +``` + +See [Configuring Duktape for build](https://wiki.duktape.org/configuring) for more information.