build: fix (hopefully) lua in the Windows installer.

See: https://gitlab.gnome.org/GNOME/gimp/-/issues/9653#note_1780587

Looking at MSYS2 logs, it looks like they very recently "fixed" the search paths
for lua files, which in turn broke our workaround (searching in subdirectories
of bin/ instead of share/ and lib/).

This should work better (though untested) with the workaround removed now.

Commit on luajit package at MSYS2:
703c7bae2f
This commit is contained in:
Jehan 2023-07-01 22:07:28 +02:00
parent e32a67d948
commit 8e4850dafe
2 changed files with 4 additions and 9 deletions

View File

@ -116,13 +116,8 @@ cp -fr ${MSYS_PREFIX}/share/libwmf ${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/
cp -fr ${MSYS_PREFIX}/share/lua/ ${GIMP_DISTRIB}/share/
cp -fr ${MSYS_PREFIX}/lib/lua/ ${GIMP_DISTRIB}/lib/
# XXX Are these themes really needed?
cp -fr ${MSYS_PREFIX}/share/themes ${GIMP_DISTRIB}/share/

View File

@ -55,6 +55,6 @@ Source: "{#DEPS_DIR}\{#DDIR}\lib\python3.10\*"; DestDir: "{app}\lib\python3.10";
#ifdef LUA
Source: "{#DEPS_DIR}\{#DDIR}\bin\luajit.exe"; DestDir: "{app}\bin"; Components: lua and gimp{#PLATFORM}; Flags: restartreplace uninsrestartdelete ignoreversion
Source: "{#DEPS_DIR}\{#DDIR}\bin\lua51.dll"; DestDir: "{app}\bin"; Components: lua and gimp{#PLATFORM}; Flags: restartreplace uninsrestartdelete ignoreversion
Source: "{#DEPS_DIR}\{#DDIR}\bin\lua\*"; DestDir: "{app}\bin\lua"; Components: lua and gimp{#PLATFORM}; Flags: recursesubdirs restartreplace ignoreversion uninsrestartdelete
Source: "{#DEPS_DIR}\{#DDIR}\bin\lgi\*"; DestDir: "{app}\bin\lgi"; Components: lua and gimp{#PLATFORM}; Flags: recursesubdirs restartreplace ignoreversion uninsrestartdelete
Source: "{#DEPS_DIR}\{#DDIR}\share\lua\*"; DestDir: "{app}\share\lua"; Components: lua and gimp{#PLATFORM}; Flags: recursesubdirs restartreplace ignoreversion uninsrestartdelete
Source: "{#DEPS_DIR}\{#DDIR}\lib\lua\*"; DestDir: "{app}\lib\lua"; Components: lua and gimp{#PLATFORM}; Flags: recursesubdirs restartreplace ignoreversion uninsrestartdelete
#endif