[gimp/wip/Jehan/incremental-win-installer-improvements] build: move lua import files into bin/.




commit 1c42ac2c59dd08703e511883c3c8a45581417e69
Author: Jehan <jehan girinstud io>
Date:   Thu May 20 19:17:45 2021 +0200

    build: move lua import files into bin/.
    
    It looks like the DLL ends up searched into bin/lgi/ and other lua files
    from bin/lua/. There might be better solutions for the issue, but for
    the time being, it seems to work ok.
    
    Note that ender used instead to rebuild lua with the following changes
    (cf. IRC):
    
    > src/luaconf.h:
    > #define LUA_PATH_DEFAULT \
    >   "!\\..\\share\\lua\\5.1\\?.lua;" "!\\..\\share\\lua\\5.1\\?\\init.lua;" LUA_LDIR"?.lua;" 
LUA_LDIR"?\\init.lua;"
    > #define LUA_CPATH_DEFAULT \
    >   LUA_CDIR"..\\lib\\lua\\5.1\\?.dll;" LUA_CDIR"?.dll;" LUA_CDIR"loadall.dll"
    
    But moving files around in the installed tree is much simpler than
    rebuilding the whole lua just for this.

 build/windows/gitlab-ci/package-gimp-msys2.sh | 8 ++++++++
 1 file changed, 8 insertions(+)
---
diff --git a/build/windows/gitlab-ci/package-gimp-msys2.sh b/build/windows/gitlab-ci/package-gimp-msys2.sh
index cb87cd37ab..478d5ce725 100644
--- a/build/windows/gitlab-ci/package-gimp-msys2.sh
+++ b/build/windows/gitlab-ci/package-gimp-msys2.sh
@@ -131,6 +131,14 @@ cp -fr ${MSYS_PREFIX}/share/luajit-2.1.0-beta3 ${GIMP_DISTRIB}/share/
 cp -fr ${MSYS_PREFIX}/share/mypaint-data ${GIMP_DISTRIB}/share/
 cp -fr ${MSYS_PREFIX}/share/poppler ${GIMP_DISTRIB}/share/
 
+# Move these 2 folders into bin/ so that Lua plug-ins find the lua
+# dependencies. The alternative was to modify LUA_PATH_DEFAULT and
+# LUA_CPATH_DEFAULT macros in lua (which ender used to do, hence
+# rebuilding lua). But it's much simpler to just move these 2 folders as
+# bin/lua/ and bin/lgi/
+cp -fr ${MSYS_PREFIX}/share/lua/5.1/ ${GIMP_DISTRIB}/bin/lua
+cp -fr ${MSYS_PREFIX}/lib/lua/5.1/lgi/ ${GIMP_DISTRIB}/bin/
+
 # XXX Are these themes really needed?
 cp -fr ${MSYS_PREFIX}/share/themes ${GIMP_DISTRIB}/share/
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]