[Libreoffice-commits] core.git: configure.ac

Tomofumi Yagi yagit at mknada.sakura.ne.jp
Fri Mar 18 07:53:59 UTC 2016


 configure.ac |   20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

New commits:
commit 7fcf65da3bc95371f5d2763bcad21b52bae8ab6a
Author: Tomofumi Yagi <yagit at mknada.sakura.ne.jp>
Date:   Tue Mar 15 21:32:55 2016 +0900

    autogen.sh probably should search UCRT for yet another location too
    
    This patch adds a function to autogen.sh.
    autogen.sh will search UCRT path using not only registry database but also vsvars32.bat(one of Visual Studio Tools).
    
    I seem that autogen.sh fails to find UCRT path in some environments installed Visual Studio Community 2015 or Enterprise 2015 at the moment.
    
    Change-Id: Ib24b8f60f0d9a656d3d69931b18fde8a897f4e61
    Reviewed-on: https://gerrit.libreoffice.org/23273
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: jan iversen <jani at documentfoundation.org>
    Tested-by: jan iversen <jani at documentfoundation.org>

diff --git a/configure.ac b/configure.ac
index c2bb656..d2bdd4d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3386,6 +3386,19 @@ find_msvs()
     done
 }
 
+win_get_env_from_vsvars32bat()
+{
+    WRAPPERBATCHFILEPATH="`mktemp -t wrpXXXXXX.bat`"
+    echo -e "@setlocal\r\n" >> $WRAPPERBATCHFILEPATH
+    echo -e "@call \"`cygpath -w $VC_PRODUCT_DIR`/../Common7/Tools/vsvars32.bat\"\r\n" >> $WRAPPERBATCHFILEPATH
+    echo -e "@echo %$1%\r\n" >> $WRAPPERBATCHFILEPATH
+    echo -e "@endlocal\r\n" >> $WRAPPERBATCHFILEPATH
+    chmod +x $WRAPPERBATCHFILEPATH
+    _win_get_env_from_vsvars32bat="`$WRAPPERBATCHFILEPATH | $SED -e s/^M^J//`"
+    rm -f $WRAPPERBATCHFILEPATH
+    echo $_win_get_env_from_vsvars32bat
+}
+
 find_ucrt()
 {
     reg_get_value_32 "HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Microsoft SDKs/Windows/v10.0/InstallationFolder"
@@ -3394,6 +3407,13 @@ find_ucrt()
         reg_get_value_32 "HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Microsoft SDKs/Windows/v10.0/ProductVersion"
         ucrtdir=$regvalue
     fi
+    if test -z "$ucrttest"; then
+        if test -f "$VC_PRODUCT_DIR/../Common7/Tools/vsvars32.bat"; then
+            PathFormat "`win_get_env_from_vsvars32bat "UniversalCRTSdkDir"`"
+            ucrttest=$formatted_path
+            ucrtdir=`win_get_env_from_vsvars32bat "UCRTVersion"`
+        fi
+    fi
 }
 
 find_msvc()


More information about the Libreoffice-commits mailing list