[gimp] build: improve Windows installer language test.



commit ad83fd04ba7faca24a985d687ea7ee4beeeddeed
Author: Jehan <jehan girinstud io>
Date:   Wed Sep 8 10:20:25 2021 +0200

    build: improve Windows installer language test.
    
    For the installer, we must also manually pull all used official
    language, so I am adding a test checking that the list of pulled file
    matches the list from the installer script.

 .../windows/installer/lang/test-installer-langs.sh | 22 +++++++++++++++++++---
 1 file changed, 19 insertions(+), 3 deletions(-)
---
diff --git a/build/windows/installer/lang/test-installer-langs.sh 
b/build/windows/installer/lang/test-installer-langs.sh
index a1099abcbf..35815befd2 100755
--- a/build/windows/installer/lang/test-installer-langs.sh
+++ b/build/windows/installer/lang/test-installer-langs.sh
@@ -36,12 +36,28 @@ MESON_LANGS=`grep "'code':" ${GIMP_TESTING_ABS_TOP_SRCDIR}/build/windows/install
             sed "s/^.*'code': *'\([^']*\)'.*$/\1/" |sort`
 MESON_LANGS=`echo "$MESON_LANGS" | tr '\n\r' ' ' | sed 's/\<en\> //'`
 
-if [ "$PO_LANGS" = "$MESON_LANGS" ]; then
-  exit 0
-else
+if [ "$PO_LANGS" != "$MESON_LANGS" ]; then
   echo "Error: languages listed in the meson script do not match the .po files in po-windows-installer/."
   echo "- PO languages:    $PO_LANGS"
   echo "- Meson languages: $MESON_LANGS"
   echo "Please verify: build/windows/installer/lang/meson.build"
   exit 1
 fi
+
+INSTALLER_LANGS=`grep -rI '^Name:.*MessagesFile.*Unofficial' 
${GIMP_TESTING_ABS_TOP_SRCDIR}/build/windows/installer/gimp3264.iss | \
+                 sed 's/^.*Unofficial\\\\\([a-zA-Z_.]*\),.*$/\1/' | sort`
+INSTALLER_LANGS=`echo "$INSTALLER_LANGS" | tr '\n\r' ' '`
+
+PULLED_UNOFFICIAL=`grep '^wget .*Unofficial/' 
${GIMP_TESTING_ABS_TOP_SRCDIR}/build/windows/gitlab-ci/installer-gimp-msys2.sh | \
+                   sed 's$^wget.*Unofficial/\([^.]*.isl.\?\)$\1$' | sort`
+PULLED_UNOFFICIAL=`echo "$PULLED_UNOFFICIAL" | tr '\n\r' ' '`
+
+if [ "$INSTALLER_LANGS" = "$PULLED_UNOFFICIAL" ]; then
+  exit 0
+else
+  echo "Error: unofficial languages listed in the Windows installer script do not match the pulled InnoSetup 
files."
+  echo "- Pulled files:        $PULLED_UNOFFICIAL"
+  echo "- Installer languages: $INSTALLER_LANGS"
+  echo "Please verify: build/windows/gitlab-ci/installer-gimp-msys2.sh"
+  exit 1
+fi


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