2021-05-27 13:46:51 +02:00
|
|
|
-- this file is used by lite-xl to setup the Lua environment when starting
|
|
|
|
VERSION = "1.16.11"
|
2021-05-05 22:38:29 +02:00
|
|
|
MOD_VERSION = "1"
|
2021-02-24 16:29:39 +01:00
|
|
|
|
|
|
|
SCALE = tonumber(os.getenv("LITE_SCALE")) or SCALE
|
|
|
|
PATHSEP = package.config:sub(1, 1)
|
|
|
|
|
2021-04-18 17:51:31 +02:00
|
|
|
EXEDIR = EXEFILE:match("^(.+)[/\\][^/\\]+$")
|
|
|
|
if MACOS_RESOURCES then
|
|
|
|
DATADIR = MACOS_RESOURCES
|
|
|
|
else
|
|
|
|
local prefix = EXEDIR:match("^(.+)[/\\]bin$")
|
|
|
|
DATADIR = prefix and (prefix .. '/share/lite-xl') or (EXEDIR .. '/data')
|
|
|
|
end
|
2021-02-24 16:29:39 +01:00
|
|
|
USERDIR = HOME and (HOME .. '/.config/lite-xl') or (EXEDIR .. '/user')
|
|
|
|
|
|
|
|
package.path = DATADIR .. '/?.lua;' .. package.path
|
|
|
|
package.path = DATADIR .. '/?/init.lua;' .. package.path
|
2021-03-03 12:20:22 +01:00
|
|
|
package.path = USERDIR .. '/?.lua;' .. package.path
|
|
|
|
package.path = USERDIR .. '/?/init.lua;' .. package.path
|
2021-02-24 16:29:39 +01:00
|
|
|
|