From 7d30d9d97177333ce3e06ff42bf8e11057c831c9 Mon Sep 17 00:00:00 2001 From: Niklas Kapelle Date: Mon, 5 Aug 2024 13:59:23 +0200 Subject: [PATCH] added build doc --- doc/Concepts.md | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/doc/Concepts.md b/doc/Concepts.md index 0d21433..f6633f1 100644 --- a/doc/Concepts.md +++ b/doc/Concepts.md @@ -57,7 +57,7 @@ Also peripherals can be made accessible via the network. More on that later. var back = Peripheral.getRedstone("back"); back.setOutput(true); -var drive Peripheral.getDrive("drive_0"); +var drive = Peripheral.getDrive("drive_0"); drive.eject(); ``` @@ -114,7 +114,7 @@ The idea is that you can register all you disposable resources in the handle and A process can be used as a command on the terminal or as a service. See [bin/HelloWorld.hx](../src/bin/HelloWorld.hx) for an example. Basically everything that runs and is not part of the kernel is a process. -In order for you program to be used it needs to be registered in the `BinStore` and the `DCEHack` manually. +~~In order for you program to be used it needs to be registered in the `BinStore` and the `DCEHack` manually. ~~ # EndOfLoop @@ -208,3 +208,19 @@ rpc.addNumber(3,7).handle((p)->{ } }); ``` + +# Build system and flags + +We use `make` to build the project. If you want a prod build just run `make` and if you want the debug build run `make debug`. +The `build` directory should contain all needed files. + +- `bundle.min.lua`: The minified final file +- `bundle.polyfill.lua`: The same as above just not minified. use this when debugging. +- `haxe.lua`: Intermediate file. Polyfill not yet added. +- `haxe.zip`: The compressed `bundle.min.lua`. +- `unpack.*`: Same as the bundle files. Used to unpack and run the `haxe.zip` file. + +The follwing haxe flags can be used in the code or can be set in the makefile. + +- `debug`: Is set when debug +- `kv_use_native`: If set use the native CC serialize and unserialize functions instead of the Haxe ones. See [KVStore.hx](../src/lib/KVStore.hx) for more.