[gimp/wip/Jehan/gitlab-ci-more-win] Bit more experiments.



commit 21c8d6c481e31222a4fc07b4636e9135c8b2b798
Author: Jehan <jehan girinstud io>
Date:   Fri May 7 14:17:42 2021 +0200

    Bit more experiments.

 build/windows/gitlab-ci/dll_link.py           |  9 +++++++--
 build/windows/gitlab-ci/package-gimp-msys2.sh | 26 ++++++++++++++++++++++++--
 2 files changed, 31 insertions(+), 4 deletions(-)
---
diff --git a/build/windows/gitlab-ci/dll_link.py b/build/windows/gitlab-ci/dll_link.py
index c1bd30398d..61528e7ed9 100755
--- a/build/windows/gitlab-ci/dll_link.py
+++ b/build/windows/gitlab-ci/dll_link.py
@@ -73,12 +73,17 @@ def find_dependencies(obj, srcdir):
       objdump = 'x86_64-w64-mingw32-objdump'
     elif 'PE32' in file_type:
       objdump = 'i686-w64-mingw32-objdump'
-    print("Objdump is: {}".format(objdump))
-    objdump = 'objdump.exe'
 
     if objdump is None:
       sys.stderr.write('File type of {} unknown: {}\n'.format(obj, file_type))
       sys.exit(os.EX_UNAVAILABLE)
+    elif shutil.which(objdump) is None:
+      # For native objdump case.
+      objdump = 'objdump.exe'
+
+    if shutil.which(objdump) is None:
+      sys.stderr.write("Executable doesn't exist: {}\n".format(objdump))
+      sys.exit(os.EX_UNAVAILABLE)
 
     result = subprocess.run([objdump, '-p', obj], stdout=subprocess.PIPE)
     out = result.stdout.decode('utf-8')
diff --git a/build/windows/gitlab-ci/package-gimp-msys2.sh b/build/windows/gitlab-ci/package-gimp-msys2.sh
index dfd0820ea0..bfd0897688 100644
--- a/build/windows/gitlab-ci/package-gimp-msys2.sh
+++ b/build/windows/gitlab-ci/package-gimp-msys2.sh
@@ -108,6 +108,29 @@ cp -fr ${MSYS_PREFIX}/lib/gdk-pixbuf-2.0 ${GIMP_DISTRIB}/lib/
 
 cp -fr ${MSYS_PREFIX}/share/glib-2.0 ${GIMP_DISTRIB}/share/
 
+ls ${MSYS_PREFIX}/share/locale/*/LC_MESSAGES/
+ls ${MSYS_PREFIX}/bin/
+
+# Only copy from langs supported in GIMP.
+for dir in ${GIMP_DISTRIB}/share/locale/*/;
+do
+  lang=`basename "$dir"`;
+  # TODO: ideally we could be a bit more accurate and copy only the
+  # language files from our dependencies and iso_639.mo.
+  cp -fr "${MSYS_PREFIX}/share/locale/${lang}/LC_MESSAGES/*.mo" 
"${GIMP_DISTRIB}/share/locale/${lang}/LC_MESSAGES/"
+done;
+
+# Only one iso-codes file is useful.
+mkdir -p ${GIMP_DISTRIB}/share/xml/iso-codes
+cp -fr ${MSYS_PREFIX}/share/xml/iso-codes/iso_639.xml ${GIMP_DISTRIB}/share/xml/iso-codes/
+
+# Adwaita can be used as the base icon set.
+cp -fr ${MSYS_PREFIX}/share/icons/Adwaita ${GIMP_DISTRIB}/share/icons/
+
+# Executables for supported interpreters.
+cp -fr ${MSYS_PREFIX}/bin/python*exe ${GIMP_DISTRIB}/bin/
+cp -fr ${MSYS_PREFIX}/bin/luajit*exe ${GIMP_DISTRIB}/bin/
+
 # Generate share/glib-2.0/schemas/gschemas.compiled
 glib-compile-schemas --targetdir=${GIMP_DISTRIB}/share/glib-2.0/schemas 
${GIMP_DISTRIB}/share/glib-2.0/schemas
 
@@ -155,5 +178,4 @@ for dll in ${GIMP_DISTRIB}/lib/gimp/2.99/plug-ins/*/*.exe; do
   python3 build/windows/gitlab-ci/dll_link.py $dll ${MSYS_PREFIX}/ ${GIMP_DISTRIB};
 done
 
-ls ${MSYS_PREFIX}/share/*/*
-ls ${MSYS_PREFIX}/lib/*/*
+ls ${MSYS_PREFIX}/ssl*/*


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