2022-10-11 18:34:07 +02:00
|
|
|
-- set_paths.lua
|
|
|
|
local version = _VERSION:match "%d+%.%d+"
|
|
|
|
|
|
|
|
local function lua_module_paths(module_base_path: string): string
|
|
|
|
local paths = (module_base_path .. "/?.lua;")
|
|
|
|
.. (module_base_path .. "/?/init.lua;")
|
|
|
|
|
|
|
|
return paths
|
|
|
|
end
|
|
|
|
|
|
|
|
package.path = lua_module_paths("lua_modules/share/lua/" .. version)
|
|
|
|
.. lua_module_paths "types"
|
2023-09-03 18:38:11 +02:00
|
|
|
.. lua_module_paths "src"
|
2022-10-11 18:34:07 +02:00
|
|
|
.. package.path
|
|
|
|
|
|
|
|
package.cpath = "lua_modules/lib/lua/" .. version .. "/?.so;" .. package.cpath
|