Use the start.lua file in data/core as a template
Instead of having a separate start.lua.in file in the scripts directory and no start.lua file in data/core we use the file data/core/start.lua as a template for Meson to generate the final start.lua file for release. In this way people naturally trying to run lite-xl from the source folder will have a start.lua file albeit without a resolved version number. Otherwise, when using run-local script or the meson install command the meson-generated start.lua file will be used as it should be.
This commit is contained in:
committed by
Francesco
parent
2fdde9cc99
commit
3396a6c802
+4
-1
@@ -76,10 +76,13 @@ copy_lite_build () {
|
||||
cp "$builddir/src/lite-xl" "$bindir"
|
||||
fi
|
||||
mkdir -p "$datadir/core"
|
||||
cp "$builddir/start.lua" "$datadir/core"
|
||||
for module_name in core plugins colors fonts; do
|
||||
cp -r "data/$module_name" "$datadir"
|
||||
done
|
||||
# The start.lua file is generated by meson in $builddir but
|
||||
# there is already a start.lua file in data/core so the command below
|
||||
# should be executed after we copy the data/core directory.
|
||||
cp "$builddir/start.lua" "$datadir/core"
|
||||
}
|
||||
|
||||
run_lite () {
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
-- this file is used by lite-xl to setup the Lua environment when starting
|
||||
VERSION = "@PROJECT_VERSION@"
|
||||
MOD_VERSION = "1"
|
||||
|
||||
SCALE = tonumber(os.getenv("LITE_SCALE")) or SCALE
|
||||
PATHSEP = package.config:sub(1, 1)
|
||||
|
||||
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
|
||||
USERDIR = (os.getenv("XDG_CONFIG_HOME") and os.getenv("XDG_CONFIG_HOME") .. "/lite-xl")
|
||||
or (HOME and (HOME .. '/.config/lite-xl') or (EXEDIR .. '/user'))
|
||||
|
||||
package.path = DATADIR .. '/?.lua;' .. package.path
|
||||
package.path = DATADIR .. '/?/init.lua;' .. package.path
|
||||
package.path = USERDIR .. '/?.lua;' .. package.path
|
||||
package.path = USERDIR .. '/?/init.lua;' .. package.path
|
||||
Reference in New Issue
Block a user