Compare commits

...

2 Commits

Author SHA1 Message Date
Francesco Abbate a2bf028f2b Fix copying of start file in build-packages script 2021-08-12 09:20:55 +02:00
Francesco Abbate 750f713aa4 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.
2021-08-12 09:03:57 +02:00
4 changed files with 19 additions and 9 deletions

View File

@ -71,6 +71,8 @@ lite_build_package_windows () {
for module_name in core plugins colors fonts; do
copy_directory_from_repo --strip-components=1 "data/$module_name" "$datadir"
done
# copy the meson generated start.lua file
cp "$build/start.lua" "$datadir/core"
for module_name in plugins colors; do
cp -r "$build/third/data/$module_name" "$datadir"
done
@ -97,6 +99,8 @@ lite_build_package_macos () {
for module_name in core plugins colors fonts; do
copy_directory_from_repo --strip-components=1 "data/$module_name" "$datadir"
done
# copy the meson generated start.lua file
cp "$build/start.lua" "$datadir/core"
for module_name in plugins colors; do
cp -r "$build/third/data/$module_name" "$datadir"
done
@ -135,6 +139,8 @@ lite_build_package_linux () {
for module_name in core plugins colors fonts; do
copy_directory_from_repo --strip-components=1 "data/$module_name" "$datadir"
done
# copy the meson generated start.lua file
cp "$build/start.lua" "$datadir/core"
for module_name in plugins colors; do
cp -r "$build/third/data/$module_name" "$datadir"
done

View File

@ -16,11 +16,6 @@ conf_data.set('PROJECT_BUILD_DIR', meson.current_build_dir())
conf_data.set('PROJECT_SOURCE_DIR', meson.current_source_dir())
conf_data.set('PROJECT_VERSION', meson.project_version())
configure_file(
input : 'scripts/start.lua.in',
output : 'start.lua',
configuration : conf_data
)
if host_machine.system() == 'windows'
configure_file(
input : 'scripts/innosetup/innosetup.iss.in',
@ -117,13 +112,19 @@ endif
install_data('licenses/licenses.md', install_dir : lite_docdir)
foreach data_module : ['core', 'fonts', 'plugins', 'colors']
install_subdir('data' / 'core' , install_dir : lite_datadir, exclude_files : 'start.lua')
foreach data_module : ['fonts', 'plugins', 'colors']
install_subdir('data' / data_module , install_dir : lite_datadir)
endforeach
install_data(
meson.current_build_dir() / 'start.lua', install_dir : lite_datadir / 'core'
configure_file(
input : 'data/core/start.lua',
output : 'start.lua',
configuration : conf_data,
install : true,
install_dir : lite_datadir / 'core',
)
#===============================================================================
# Targets
#===============================================================================

View File

@ -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 () {