diff --git a/build/windows/gitlab-ci/build-gimp-msys2.sh b/build/windows/gitlab-ci/build-gimp-msys2.sh index 32b333a640..1f66ea1426 100644 --- a/build/windows/gitlab-ci/build-gimp-msys2.sh +++ b/build/windows/gitlab-ci/build-gimp-msys2.sh @@ -20,8 +20,10 @@ else # [[ "$MSYSTEM" == "CLANGARM64" ]]; fi export OPTIONAL_PACKAGES="" -if [[ "$MSYSTEM" != "CLANGARM64" ]]; then +if [[ "$MSYSTEM" == "CLANGARM64" ]]; then # No luajit package on clangarm64 for the time being. + export OPTIONAL_PACKAGES="mingw-w64-$MSYS2_ARCH-lua51" +else export OPTIONAL_PACKAGES="mingw-w64-$MSYS2_ARCH-luajit" fi @@ -39,6 +41,7 @@ pacman --noconfirm -S --needed \ mingw-w64-$MSYS2_ARCH-meson \ \ $OPTIONAL_PACKAGES \ + mingw-w64-$MSYS2_ARCH-lua51-lgi \ \ mingw-w64-$MSYS2_ARCH-aalib \ mingw-w64-$MSYS2_ARCH-appstream-glib \ diff --git a/build/windows/gitlab-ci/package-gimp-msys2.sh b/build/windows/gitlab-ci/package-gimp-msys2.sh index 9543897b15..6be6761101 100644 --- a/build/windows/gitlab-ci/package-gimp-msys2.sh +++ b/build/windows/gitlab-ci/package-gimp-msys2.sh @@ -23,8 +23,10 @@ else # [[ "$MSYSTEM" == "CLANGARM64" ]]; fi export OPTIONAL_PACKAGES="" -if [[ "$MSYSTEM" != "CLANGARM64" ]]; then - export OPTIONAL_PACKAGES="mingw-w64-$MSYS2_ARCH-luajit mingw-w64-$MSYS2_ARCH-lua51-lgi" +if [[ "$MSYSTEM" == "CLANGARM64" ]]; then + export OPTIONAL_PACKAGES="mingw-w64-$MSYS2_ARCH-lua51" +else + export OPTIONAL_PACKAGES="mingw-w64-$MSYS2_ARCH-luajit" fi # Update everything @@ -38,6 +40,7 @@ pacman --noconfirm -S --needed \ mingw-w64-$MSYS2_ARCH-ccache \ \ $OPTIONAL_PACKAGES \ + mingw-w64-$MSYS2_ARCH-lua51-lgi \ \ mingw-w64-$MSYS2_ARCH-aalib \ mingw-w64-$MSYS2_ARCH-appstream-glib \ @@ -127,10 +130,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/ -if [[ "$MSYSTEM" != "CLANGARM64" ]]; then - cp -fr ${MSYS_PREFIX}/share/lua/ ${GIMP_DISTRIB}/share/ - cp -fr ${MSYS_PREFIX}/lib/lua/ ${GIMP_DISTRIB}/lib/ -fi +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/ @@ -179,7 +180,10 @@ python3 build/windows/gitlab-ci/dll_link.py ${GIMP_DISTRIB}/bin/python3w.exe ${G cp -fr ${MSYS_PREFIX}/bin/python3.exe ${GIMP_DISTRIB}/bin/ python3 build/windows/gitlab-ci/dll_link.py ${GIMP_DISTRIB}/bin/python3.exe ${GIMP_PREFIX}/ ${MSYS_PREFIX}/ ${GIMP_DISTRIB} --output-dll-list done-dll.list -if [[ "$MSYSTEM" != "CLANGARM64" ]]; then +if [[ "$MSYSTEM" == "CLANGARM64" ]]; then + cp -fr ${MSYS_PREFIX}/bin/lua5.1.exe ${GIMP_DISTRIB}/bin/ + python3 build/windows/gitlab-ci/dll_link.py ${GIMP_DISTRIB}/bin/lua5.1.exe ${GIMP_PREFIX}/ ${MSYS_PREFIX}/ ${GIMP_DISTRIB} --output-dll-list done-dll.list +else cp -fr ${MSYS_PREFIX}/bin/luajit.exe ${GIMP_DISTRIB}/bin/ python3 build/windows/gitlab-ci/dll_link.py ${GIMP_DISTRIB}/bin/luajit.exe ${GIMP_PREFIX}/ ${MSYS_PREFIX}/ ${GIMP_DISTRIB} --output-dll-list done-dll.list fi diff --git a/build/windows/installer/files.isi b/build/windows/installer/files.isi index 234830e216..7ec33ef2b6 100644 --- a/build/windows/installer/files.isi +++ b/build/windows/installer/files.isi @@ -59,7 +59,11 @@ Source: "{#DEPS_DIR}\{#DDIR}\lib\python3.11\*"; DestDir: "{app}\lib\python3.11"; #endif #ifdef LUA +#if PLATFORM==ARM64 +Source: "{#DEPS_DIR}\{#DDIR}\bin\lua5.1.exe"; DestDir: "{app}\bin"; Components: lua and gimp{#COMPONENT}; Flags: restartreplace uninsrestartdelete ignoreversion +#else Source: "{#DEPS_DIR}\{#DDIR}\bin\luajit.exe"; DestDir: "{app}\bin"; Components: lua and gimp{#COMPONENT}; Flags: restartreplace uninsrestartdelete ignoreversion +#endif Source: "{#DEPS_DIR}\{#DDIR}\bin\lua51.dll"; DestDir: "{app}\bin"; Components: lua and gimp{#COMPONENT}; Flags: restartreplace uninsrestartdelete ignoreversion Source: "{#DEPS_DIR}\{#DDIR}\share\lua\*"; DestDir: "{app}\share\lua"; Components: lua and gimp{#COMPONENT}; Flags: recursesubdirs restartreplace ignoreversion uninsrestartdelete Source: "{#DEPS_DIR}\{#DDIR}\lib\lua\*"; DestDir: "{app}\lib\lua"; Components: lua and gimp{#COMPONENT}; Flags: recursesubdirs restartreplace ignoreversion uninsrestartdelete diff --git a/build/windows/installer/gimp3264.iss b/build/windows/installer/gimp3264.iss index 3c83caac86..86830e886c 100755 --- a/build/windows/installer/gimp3264.iss +++ b/build/windows/installer/gimp3264.iss @@ -819,7 +819,7 @@ end; procedure PrepareInterp(); -var InterpFile,InterpContent: String; +var InterpFile,InterpContent,LuaBin: String; begin #ifdef PYTHON if IsComponentSelected('py') then @@ -856,11 +856,19 @@ begin InterpFile := ExpandConstant('{app}\lib\gimp\{#DIR_VER}\interpreters\lua.interp'); DebugMsg('PrepareInterp','Writing interpreter file for lua: ' + InterpFile); - InterpContent := 'lua=' + ExpandConstant('{app}\bin\luajit.exe') + #10 + - 'luajit=' + ExpandConstant('{app}\bin\luajit.exe') + #10 + - '/usr/bin/luajit=' + ExpandConstant('{app}\bin\luajit.exe') + #10 + - '/usr/bin/lua=' + ExpandConstant('{app}\bin\luajit.exe') + #10 + - ':Lua:E::lua::luajit:'#10; + if IsComponentSelected('gimpARM64') then + begin + LuaBin := 'lua5.1.exe' + end else + begin + LuaBin := 'luajit.exe' + end; + + InterpContent := 'lua=' + ExpandConstant('{app}\bin\') + LuaBin + #10 + + 'luajit=' + ExpandConstant('{app}\bin\') + LuaBin + #10 + + '/usr/bin/luajit=' + ExpandConstant('{app}\bin\') + LuaBin + #10 + + '/usr/bin/lua=' + ExpandConstant('{app}\bin\') + LuaBin + #10 + + ':Lua:E::lua::' + LuaBin + ':'#10; if not SaveStringToUTF8File(InterpFile,InterpContent,False) then begin