mirror of
https://github.com/tio/tio.git
synced 2026-05-01 14:57:59 +02:00
Add Lua scripting feature
Add support for running Lua scripts that can manipulate the tty control lines. Script is activated automatically on connect or manually via in session key command. The Lua scripting feature opens up for many posibilities in the future such as adding expect like functionality to easily and programatically interact with the connected device.
This commit is contained in:
parent
6fee8514f4
commit
0becfa3274
12 changed files with 590 additions and 72 deletions
|
|
@ -18,14 +18,27 @@ tio_sources = [
|
|||
'rs485.c',
|
||||
'timestamp.c',
|
||||
'alert.c',
|
||||
'xymodem.c'
|
||||
'xymodem.c',
|
||||
'script.c'
|
||||
]
|
||||
|
||||
|
||||
foreach name: ['lua-5.4', 'lua-5.3', 'lua-5.2', 'lua-5.1', 'lua']
|
||||
lua_dep = dependency(name, version: '>=5.1', required: false)
|
||||
if lua_dep.found()
|
||||
break
|
||||
endif
|
||||
endforeach
|
||||
if not lua_dep.found()
|
||||
error('Lua could not be found!')
|
||||
endif
|
||||
|
||||
tio_dep = [
|
||||
dependency('threads', required: true),
|
||||
dependency('inih', required: true,
|
||||
fallback : ['libinih', 'inih_dep'],
|
||||
default_options: ['default_library=static', 'distro_install=false'])
|
||||
default_options: ['default_library=static', 'distro_install=false']),
|
||||
lua_dep
|
||||
]
|
||||
|
||||
tio_c_args = ['-Wno-unused-result']
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue