[gimp-help] gitlab-ci, configure, build: new --enable-windows-installer option.



commit c0151108a985cd6972d21f4791694d0c25bcc129
Author: Jehan <jehan girinstud io>
Date:   Mon Mar 21 12:11:19 2022 +0100

    gitlab-ci, configure, build: new --enable-windows-installer option.
    
    I was initially unsure if this option (same as in GIMP repo) was
    necessary. But come to think of it, it's probably better not to force
    building the .isl files as in most cases, especially as it requires
    tools (intltool) not necessary in other parts of the build.
    
    I also make the 2 other intltool check (for the `make update-po` call
    inside po-windows-intaller/) not breaking the rest of the
    internationalization. These are also not mandatory for most of the
    localization process.
    
    (cherry picked from commit 476b3a6922b63d8b25a271c50039347f772f8af2)

 .gitlab-ci.yml            |  5 ++---
 build/windows/Makefile.am |  7 ++++++-
 configure.ac              | 31 ++++++++++++++++++++++++++-----
 3 files changed, 34 insertions(+), 9 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 7b2971029..1ac9ea97e 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -37,7 +37,6 @@ build-image:
     paths:
     - "${HELP_DIR}"
     - "${PDF_DIR}"
-    - "po-windows-installer"
   script:
     - mkdir _build
     - cd _build
@@ -91,9 +90,10 @@ www-debian:
     - build/windows/installer/lang/
     - htdocs/
   script:
+    # build the installer language files only.
     - mkdir _build
     - cd _build
-    - ../autogen.sh --prefix=${INSTALL_PREFIX} --without-gimp
+    - ../autogen.sh --prefix=${INSTALL_PREFIX} --without-gimp --enable-windows-installer
     - cd build/windows/installer/lang
     - make
     - cd ../../../..
@@ -129,7 +129,6 @@ win-installer:
     expire_in: 1 week
     paths:
     - build/windows/installer/_Output
-    - build/windows/installer/lang/
     - installer.log
   script:
     - C:\msys64\usr\bin\pacman --noconfirm -Syyuu
diff --git a/build/windows/Makefile.am b/build/windows/Makefile.am
index 65f8c9b4b..06fa799d3 100644
--- a/build/windows/Makefile.am
+++ b/build/windows/Makefile.am
@@ -1 +1,6 @@
-SUBDIRS = installer
+if BUILD_WINDOWS_INSTALLER
+installer = installer
+endif
+
+SUBDIRS = \
+       $(installer)
diff --git a/configure.ac b/configure.ac
index bc8a90b8a..460e03175 100644
--- a/configure.ac
+++ b/configure.ac
@@ -195,23 +195,44 @@ AC_SUBST(MSGCATFLAGS)
 MSGWIDTH=79
 AC_SUBST(MSGWIDTH)
 
+AC_MSG_CHECKING([if building the Windows installer])
+AC_ARG_ENABLE(windows-installer,
+              [  --enable-windows-installer
+                          generate files needed for the Windows installer
+                          (default=no)],,
+              enable_windows_installer=no)
+AC_MSG_RESULT([$enable_windows_installer])
+AM_CONDITIONAL(BUILD_WINDOWS_INSTALLER, test "x$enable_windows_installer" != xno)
+
 # Not calling:
 # IT_PROG_INTLTOOL(intltool_required_version)
 # on purpose because it tries to init po/ and we don't want this as we
 # handle our main docs po files differently. So checking the tools we
 # need individually for po-windows-installer/.
 
-AC_PATH_PROG(INTLTOOL_MERGE, intltool-merge)
-if test -z "$INTLTOOL_MERGE" && test "x$enable_i18n" = "xyes"; then
-  missing_i18n_tools=${missing_i18n_tools:+"${missing_i18n_tools} "}intltool-merge
+if test "x$enable_windows_installer" != xno; then
+  AC_PATH_PROG(INTLTOOL_MERGE, intltool-merge)
+  if test -z "$INTLTOOL_MERGE"; then
+    AC_MSG_ERROR([
+** Couldn't find intltool-merge(8). It is necessary to build the
+** language files for the Windows installer.
+** Install the intltool or configure with --disable-windows-installer])
+  fi
 fi
+
+# The below tools are only necessary to build `make update-po` in
+# po-windows-intaller/.
 AC_PATH_PROG(INTLTOOL_UPDATE, intltool-update)
 if test -z "$INTLTOOL_UPDATE" && test "x$enable_i18n" = "xyes"; then
-  missing_i18n_tools=${missing_i18n_tools:+"${missing_i18n_tools} "}intltool-update
+  AC_MSG_WARN([
+** Couldn't find intltool-update(8). You will not be able to run
+** `make update-po` in po-windows-intaller/.])
 fi
 AC_PATH_PROG(INTLTOOL_EXTRACT, intltool-extract)
 if test -z "$INTLTOOL_EXTRACT" && test "x$enable_i18n" = "xyes"; then
-  missing_i18n_tools=${missing_i18n_tools:+"${missing_i18n_tools} "}intltool-extract
+  AC_MSG_WARN([
+** Couldn't find intltool-extract(8). You will not be able to run
+** `make update-po` in po-windows-intaller/.])
 fi
 
 #  Optional: dot to create build system map


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