From 1b7388683f6f3e9c04137ef70d23635e56244db5 Mon Sep 17 00:00:00 2001 From: Ryan Lucia Date: Mon, 26 Feb 2018 01:37:54 -0500 Subject: [PATCH] Document process for updating mooonscript --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 2f1f70021..2bb3358f5 100644 --- a/README.md +++ b/README.md @@ -78,6 +78,17 @@ wxWidgets is located in vendor/wxWidgets, and can be built like so: Once the dependencies are installed, build Aegisub with `autoreconf && ./configure --with-wxdir=/path/to/Aegisub/vendor/wxWidgets && make && make osx-bundle`. `autoreconf` should be skipped if you are building from a source tarball rather than `git`. +## Updating Moonscript + +From within the Moonscript repository, run `bin/moon bin/splat.moon -l moonscript moonscript/ > bin/moonscript.lua`. +Open the newly created `bin/moonscript.lua`, and within it make the following changes: + +1. Prepend the final line of the file, `package.preload["moonscript"]()`, with a `return`, producing `return package.preload["moonscript"]()`. +2. Within the function at `package.preload['moonscript.base']`, remove references to `moon_loader`, `insert_loader`, and `remove_loader`. This means removing their declarations, definitions, and entries in the returned table. +3. Within the function at `package.preload['moonscript']`, remove the line `_with_0.insert_loader()`. + +The file is now ready for use, to be placed in `automation/include` within the Aegisub repo. + ## License All files in this repository are licensed under various GPL-compatible BSD-style licenses; see LICENCE and the individual source files for more information.