extensions: install the lua interpreter for all non-relocatable builds.

As discussed in #11876, the interp files work fine on Linux (and other
platforms) too, and this allows to properly redirect to the working
interpreter found at configure time, without touching the scripts'
shebang.
This commit is contained in:
Jehan 2024-08-09 14:32:28 +02:00
parent 7fd75ee074
commit 063324cff0
2 changed files with 20 additions and 16 deletions

View File

@ -1,5 +1,5 @@
lua=@LUA_PATH@luajit.exe
luajit=@LUA_PATH@luajit.exe
/usr/bin/luajit=@LUA_PATH@luajit.exe
/usr/bin/lua=@LUA_PATH@luajit.exe
:Lua:E::lua::luajit:
lua=@LUA_PATH@
luajit=@LUA_PATH@
/usr/bin/luajit=@LUA_PATH@
/usr/bin/lua=@LUA_PATH@
:Lua:E::lua::@LUA_PATH@:

View File

@ -1,15 +1,19 @@
subdir('goat-exercises')
# Fallback fix to the problem of non-configured interpreters
if platform_windows and not meson.is_cross_build() and lua.found()
if not meson.is_cross_build() and lua.found() and (platform_windows or not relocatable_bundle)
lua_config = configuration_data()
lua_config.set('LUA_PATH', '')
# For Windows, we set the binary name only.
# For other OSes, we use the full path (when not in a relocatable
# bundle).
if platform_windows
lua_config.set('LUA_PATH', lua_bin + '.exe')
else
lua_config.set('LUA_PATH', lua.full_path())
endif
configure_file(
input : 'lua.interp.in',
configure_file(input : 'lua.interp.in',
output: 'lua.interp',
configuration: lua_config,
install: true,
install_dir: gimpplugindir / 'interpreters',
)
install_dir: gimpplugindir / 'interpreters')
endif