Add v8 snapshot support

This commit is contained in:
luboslenco
2020-11-03 15:19:41 +01:00
parent b86479041a
commit bc841a537a
2 changed files with 15 additions and 2 deletions
+8 -2
View File
@@ -116,9 +116,15 @@ git submodule update --init --recursive
# Delete `armorpaint/build` directory if present
```
**How to generate or update a locale file**
**Generating a v8 snapshot file**
```bash
./Krom . . --snapshot
# Generates a `krom.bin` file
```
**Generating a locale file**
```bash
pip install typing_extensions -t Assets/locale/tools
python ./Assets/locale/tools/extract_locales.py <locale code>
# Generated or updated in `Assets/locale/<locale code>.json`
# Generates an `Assets/locale/<locale code>.json` file
```
+7
View File
@@ -26,7 +26,14 @@ class Main {
static var tasks: Int;
// Generating snapshot
public static function main() {
js.Syntax.code("globalThis.kickstart = Main.kickstart");
}
// Program startup
@:keep
public static function kickstart() {
// Used to locate external application data folder
Krom.setApplicationName("ArmorPaint");