Skip to content

Automatic self-compilation #1

Description

@pfeerick

With respect to this in the readme:

Before running Lite from repository source, you need to precompile the files inside the VBlib folder:

Open the radio file manager
Go to the VBlib folder
Run each file there one by one so EdgeTX compiles them to .luac
Reboot the radio
Start VBtlm

Have you thought about doing pre-compilation similar to how the Betaflight TX Lua does it? i.e. the first time you run the tool, it compiles everything, and then when you run it the second time, you are running the compiled .luac, not the .lua files.

It does this by basically checking if a flag has been changed in one of the files is true,

https://github.com/betaflight/betaflight-tx-lua-scripts/blob/46e19111faaa01298551dccfd4a3f1f20a4aafe5/src/SCRIPTS/TOOLS/bf.lua#L8-L19

and if not, then runs the compile.lua

https://github.com/betaflight/betaflight-tx-lua-scripts/blob/master/src/SCRIPTS/BF/COMPILE/compile.lua

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions