Commit Graph

6 Commits

Author SHA1 Message Date
George Kiagiadakis
fc526af744 m-lua-scripting: allow queuing-in scripts without the plugin being activated
This allows us to load the scripts from the config file without
WpCore being connected yet. We can later activate the lua-scripting
plugin at the right moment to start processing the scripts.
2021-02-03 17:16:51 +02:00
George Kiagiadakis
2d2668100c m-lua-scripting: refactor as a WpComponentLoader
also, add support for loading lua config files, denoted by the
"config/lua" component type
2021-02-03 17:16:51 +02:00
George Kiagiadakis
0d072874a1 lib: introduce WpComponentLoader and remove WpModule
The component loader is a more generic and extensible mechanism
of loading components; modules are one type of component...
The idea is to make scripts and config files also be components,
loaded by plugins that inherit WpComponentLoader
2021-02-03 17:16:51 +02:00
George Kiagiadakis
f61e292959 plugin: inherit from WpObject
* use the activate/deactivate system from WpObject,
  which allows async activation and error reporting
* drop 'module' property, use 'core' from WpObject
2021-02-03 17:16:51 +02:00
George Kiagiadakis
38f65ca960 m-lua-scripting: do stop the lua engine on deactivate()
deactivate() is normally called from WpCore's dispose() and
that's too late to convert a weak WpCore ref to a strong one,
so we cannot find the WpConfiguration and remove the engine.
So, keep a reference to the WpConfiguration earlier.

If the engine is not stopped on time, proxies on the export_core
are destroyed after their core and pipewire complains
2021-01-21 09:42:07 +02:00
George Kiagiadakis
879f771d7f modules: implement module-lua-scripting
a module that allows loading and executing Lua
scripts from a configured directory
2020-12-20 18:10:22 +02:00