[Libreoffice-commits] core.git: bin/bffvalidator.sh.in configure.ac .gitignore

Thorsten Behrens Thorsten.Behrens at CIB.de
Wed Jun 29 22:46:47 UTC 2016


 .gitignore             |    1 +
 bin/bffvalidator.sh.in |    3 +++
 configure.ac           |   11 ++++++++++-
 3 files changed, 14 insertions(+), 1 deletion(-)

New commits:
commit 76c2125ee3eeb64a95501c26c2fa660cd0f8818c
Author: Thorsten Behrens <Thorsten.Behrens at CIB.de>
Date:   Wed Jun 29 15:32:00 2016 +0200

    Add MS binary format validator support for wine
    
    Run bffvalidator also from Linux, reportedly works from wine 1.9
    upwards. Wraps stuff in a shell for path name conversion.
    
    Change-Id: I3093b10bbbf89aaff97f63485b8ccadb417b3561
    Reviewed-on: https://gerrit.libreoffice.org/26784
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
    Tested-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>

diff --git a/.gitignore b/.gitignore
index 01e57e1..cbdc3e98 100644
--- a/.gitignore
+++ b/.gitignore
@@ -55,6 +55,7 @@
 /config_build_lang.mk
 /configure
 /lo.xcent
+/bin/bffvalidator.sh
 /Makefile
 /NEWS
 /TODO
diff --git a/bin/bffvalidator.sh.in b/bin/bffvalidator.sh.in
new file mode 100644
index 0000000..e435227
--- /dev/null
+++ b/bin/bffvalidator.sh.in
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+wine @BFFVALIDATOR_EXE@ `winepath -w $1`
diff --git a/configure.ac b/configure.ac
index d99b4b4..39bc17f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2796,7 +2796,14 @@ if test "$with_bffvalidator" != "no"; then
         else
             AC_MSG_ERROR([bffvalidator not found, but required by --with-bffvalidator])
         fi
-    elif test -n "$BFFVALIDATOR" -a -e "$BFFVALIDATOR"; then
+    elif test -n "$BFFVALIDATOR"; then
+        # We are not in CygWin but need to run Windows binary with wine
+        AC_PATH_PROGS(WINE, wine)
+
+        # so swap in a shell wrapper that converts paths transparently
+        BFFVALIDATOR_EXE="$BFFVALIDATOR"
+        BFFVALIDATOR="$SRC_ROOT/bin/bffvalidator.sh"
+        AC_SUBST(BFFVALIDATOR_EXE)
         AC_MSG_RESULT($BFFVALIDATOR)
     else
         AC_MSG_ERROR([bffvalidator not found, but required by --with-bffvalidator])
@@ -4657,6 +4664,7 @@ if test "$cross_compiling" = "yes"; then
         config_host_lang.mk.in \
         Makefile.in \
         lo.xcent.in \
+        bin/bffvalidator.sh.in \
         instsetoo_native/util/openoffice.lst.in \
         config_host/*.in \
         sysui/desktop/macosx/Info.plist.in \
@@ -12991,6 +12999,7 @@ AC_CONFIG_FILES([config_host.mk
                  config_host_lang.mk
                  Makefile
                  lo.xcent
+                 bin/bffvalidator.sh
                  instsetoo_native/util/openoffice.lst
                  sysui/desktop/macosx/Info.plist
                  ios/lo.xcconfig])


More information about the Libreoffice-commits mailing list