[Libreoffice-commits] core.git: basic/CppunitTest_basic_macros.mk configure.ac external/coinmp external/cppunit external/lcms2 external/python3

Tomoyuki Kubota (via logerrit) logerrit at kemper.freedesktop.org
Tue Apr 16 11:01:40 UTC 2019


 basic/CppunitTest_basic_macros.mk           |    2 
 configure.ac                                |   85 +++++++++++++++-------------
 external/coinmp/ExternalProject_coinmp.mk   |    3 
 external/cppunit/ExternalProject_cppunit.mk |    3 
 external/lcms2/ExternalProject_lcms2.mk     |    5 -
 external/python3/ExternalProject_python3.mk |    3 
 6 files changed, 58 insertions(+), 43 deletions(-)

New commits:
commit f61d6474205793b0838d90b09037cef52408a4b9
Author:     Tomoyuki Kubota <himajin100000 at gmail.com>
AuthorDate: Fri Feb 22 15:35:39 2019 +0900
Commit:     Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Tue Apr 16 13:01:03 2019 +0200

    Initial VS 2019 Support
    
    Change-Id: I8e08efb549ebd52c37183a1185d6de73f2b00601
    Reviewed-on: https://gerrit.libreoffice.org/64630
    Reviewed-by: himajin100000 <himajin100000 at gmail.com>
    Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>
    Tested-by: Michael Stahl <Michael.Stahl at cib.de>

diff --git a/basic/CppunitTest_basic_macros.mk b/basic/CppunitTest_basic_macros.mk
index e86c3dae27e4..7b9aed16dfaf 100644
--- a/basic/CppunitTest_basic_macros.mk
+++ b/basic/CppunitTest_basic_macros.mk
@@ -41,7 +41,7 @@ $(eval $(call gb_CppunitTest_use_libraries,basic_macros, \
 ifeq ($(OS),WNT)
 $(eval $(call gb_CppunitTest_use_system_win32_libs,basic_macros, \
 	oleaut32 \
-	$(if $(filter 150,$(VCVER)),legacy_stdio_definitions) \
+	$(if $(filter 150 160,$(VCVER)),legacy_stdio_definitions) \
 	odbc32 \
 	odbccp32 \
 ))
diff --git a/configure.ac b/configure.ac
index 2d62af9981a9..71e75103d38f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3199,7 +3199,9 @@ map_vs_year_to_version()
 
     case $1 in
     2017)
-        vsversion=15.0;;
+        vsversion=15;;
+    2019)
+        vsversion=16;;
     *)
         AC_MSG_ERROR([Assertion failure - invalid argument "$1" to map_vs_year_to_version()]);;
     esac
@@ -3217,7 +3219,7 @@ vs_versions_to_check()
         vsversions=$vsversion
     else
         # We accept only 2017
-        vsversions="15.0"
+        vsversions="15"
     fi
 }
 
@@ -3269,37 +3271,40 @@ find_ucrt()
 
 find_msvc()
 {
-    # Find Visual C++ 2017
+    # Find Visual C++ 2017/2019
     # Args: $1 (optional) : The VS version year
     # Return values: $vctest, $vcyear, $vcnum, $vcnumwithdot, $vcbuildnumber
 
     unset vctest vcnum vcnumwithdot vcbuildnumber
 
     vs_versions_to_check "$1"
-
+    vswhere="$(perl -e 'print $ENV{"ProgramFiles(x86)"}')"
+    vswhere+="\\Microsoft Visual Studio\\Installer\\vswhere.exe"
+    PathFormat "$vswhere"
+    vswhere=$formatted_path
     for ver in $vsversions; do
-        reg_get_value_32 HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/VisualStudio/$ver/Setup/VC/ProductDir
-        if test -n "$regvalue"; then
-            vctest=$regvalue
-            break
-        fi
-        reg_get_value_32 HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/VisualStudio/SxS/VS7/$ver
-        if test -n "$regvalue"; then
-            AC_MSG_RESULT([found: $regvalue])
-            PathFormat "$regvalue"
+        vswhereoutput=`$vswhere -version "@<:@ $ver , $(expr $ver + 1) @:}@" -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath | head -1`
+        if test -n "$vswhereoutput"; then
+            PathFormat "$vswhereoutput"
             vctest=$formatted_path
             break
         fi
     done
+
     if test -n "$vctest"; then
-        vcnumwithdot=$ver
+        vcnumwithdot="$ver.0"
         case "$vcnumwithdot" in
         15.0)
             vcyear=2017
             vcnum=150
-            vcbuildnumber=`ls $vctest/VC/Tools/MSVC -A1r | head -1`
+            ;;
+        16.0)
+            vcyear=2019
+            vcnum=160
             ;;
         esac
+        vcbuildnumber=`ls $vctest/VC/Tools/MSVC -A1r | head -1`
+
     fi
 }
 
@@ -3308,7 +3313,6 @@ MSBUILD_PATH=
 DEVENV=
 if test "$_os" = "WINNT"; then
     AC_MSG_CHECKING([Visual C++])
-
     find_msvc "$with_visual_studio"
     if test -z "$vctest"; then
         if test -n "$with_visual_studio"; then
@@ -3367,13 +3371,21 @@ if test "$_os" = "WINNT"; then
         AC_MSG_RESULT([found: $regvalue])
         MSBUILD_PATH=`win_short_path_for_make "$regvalue"`
     else
-        if test "$BITNESS_OVERRIDE" = ""; then
-            regvalue="$VC_PRODUCT_DIR/../MSBuild/$vcnumwithdot/Bin"
+        if test "$vcnumwithdot" = "16.0"; then
+            if test "$BITNESS_OVERRIDE" = ""; then
+                regvalue="$VC_PRODUCT_DIR/../MSBuild/Current/Bin"
+            else
+                regvalue="$VC_PRODUCT_DIR/../MSBuild/Current/Bin/amd64"
+            fi
         else
-            regvalue="$VC_PRODUCT_DIR/../MSBuild/$vcnumwithdot/Bin/amd64"
+            if test "$BITNESS_OVERRIDE" = ""; then
+                regvalue="$VC_PRODUCT_DIR/../MSBuild/$vcnumwithdot/Bin"
+            else
+                regvalue="$VC_PRODUCT_DIR/../MSBuild/$vcnumwithdot/Bin/amd64"
+            fi
         fi
         MSBUILD_PATH=`win_short_path_for_make "$regvalue"`
-	AC_MSG_RESULT([$regvalue])
+        AC_MSG_RESULT([$regvalue])
     fi
 
     # Find the version of devenv.exe
@@ -3466,9 +3478,8 @@ if test "$_os" = "WINNT"; then
         # The WINDOWS_SDK_ACCEPTABLE_VERSIONS is mostly an educated guess...  Assuming newer ones
         # are always "better", we list them in reverse chronological order.
 
-        case $vcnum in
-        150)
-            COMEX=19
+        case "$vcnum" in
+        150|160)
             WINDOWS_SDK_ACCEPTABLE_VERSIONS="10.0 8.1A 8.1 8.0 7.1A"
             ;;
         esac
@@ -5422,9 +5433,11 @@ find_winsdk()
 find_msms()
 {
     my_msm_files=Microsoft_VC${VCVER}_CRT_x86.msm
-    if test $VCVER = 150; then
+    case "$VCVER" in
+        150|160)
         my_msm_files="Microsoft_VC141_CRT_x86.msm ${my_msm_files}"
-    fi
+        ;;
+    esac
     AC_MSG_CHECKING([for ${my_msm_files}])
     msmdir=
     for ver in 14.0 15.0; do
@@ -5457,7 +5470,8 @@ find_msms()
     fi
 
     dnl Starting from MSVC 15.0, merge modules are located in different directory
-    if test $VCVER = 150; then
+    case "$VCVER" in
+    150|160)
         for l in `ls -1 $VC_PRODUCT_DIR/redist/MSVC/`; do
             AC_MSG_CHECKING([for $VC_PRODUCT_DIR/redist/MSVC/$l/MergeModules])
             my_msm_dir="$VC_PRODUCT_DIR/redist/MSVC/$l/MergeModules/"
@@ -5468,7 +5482,8 @@ find_msms()
                 fi
             done
         done
-    fi
+        ;;
+    esac
 
     if test -n "$msmdir"; then
         msmdir=`cygpath -m "$msmdir"`
@@ -5486,7 +5501,8 @@ find_msms()
 find_msvc_x64_dlls()
 {
     msvcdllpath="$VC_PRODUCT_DIR/redist/x64/Microsoft.VC${VCVER}.CRT"
-    if test "$VCVER" = 150; then
+    case "$VCVER" in
+    150|160)
         for l in `ls -1 $VC_PRODUCT_DIR/redist/MSVC/`; do
             AC_MSG_CHECKING([for $VC_PRODUCT_DIR/redist/MSVC/$l/x64/Microsoft.VC141.CRT])
             if test -d "$VC_PRODUCT_DIR/redist/MSVC/$l/x64/Microsoft.VC141.CRT"; then
@@ -5498,7 +5514,8 @@ find_msvc_x64_dlls()
                 break
             fi
         done
-    fi
+        ;;
+    esac
     msvcdlls="msvcp140.dll vcruntime140.dll"
     for dll in $msvcdlls; do
         if ! test -f "$msvcdllpath/$dll"; then
@@ -12617,15 +12634,9 @@ if test "$build_os" = "cygwin"; then
         ATL_INCLUDE="$WINDOWS_SDK_HOME/include/atl"
     fi
     if test "$BITNESS_OVERRIDE" = 64; then
-        if test $VCVER = "150"; then
-            ATL_LIB="$ATL_LIB/x64"
-        else
-            ATL_LIB="$ATL_LIB/amd64"
-        fi
+        ATL_LIB="$ATL_LIB/x64"
     else
-        if test $VCVER = "150"; then
-            ATL_LIB="$ATL_LIB/x86"
-        fi
+        ATL_LIB="$ATL_LIB/x86"
     fi
     # sort.exe and find.exe also exist in C:/Windows/system32 so need /usr/bin/
     PathFormat "/usr/bin/find.exe"
diff --git a/external/coinmp/ExternalProject_coinmp.mk b/external/coinmp/ExternalProject_coinmp.mk
index 4e77e37c4e08..f7362f6a1e1a 100644
--- a/external/coinmp/ExternalProject_coinmp.mk
+++ b/external/coinmp/ExternalProject_coinmp.mk
@@ -20,7 +20,8 @@ $(call gb_ExternalProject_get_state_target,coinmp,build) :
 			/p:Configuration=$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release) \
 			/p:Platform=$(if $(filter INTEL,$(CPUNAME)),Win32,x64) \
 			$(if $(filter 150,$(VCVER)),/p:PlatformToolset=v141 /p:VisualStudioVersion=15.0 /ToolsVersion:15.0) \
-			$(if $(filter 150-10,$(VCVER)-$(WINDOWS_SDK_VERSION)),/p:WindowsTargetPlatformVersion=$(UCRTVERSION)) \
+			$(if $(filter 160,$(VCVER)),/p:PlatformToolset=v142 /p:VisualStudioVersion=16.0 /ToolsVersion:Current) \
+			$(if $(filter 10,$(WINDOWS_SDK_VERSION)),/p:WindowsTargetPlatformVersion=$(UCRTVERSION)) \
 	,CoinMP/MSVisualStudio/v9)
 
 else
diff --git a/external/cppunit/ExternalProject_cppunit.mk b/external/cppunit/ExternalProject_cppunit.mk
index 1b3406f3d756..4bacac8ffe80 100644
--- a/external/cppunit/ExternalProject_cppunit.mk
+++ b/external/cppunit/ExternalProject_cppunit.mk
@@ -19,7 +19,8 @@ $(call gb_ExternalProject_get_state_target,cppunit,build) :
 	    PROFILEFLAGS="$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release) \
 		/p:Platform=$(if $(filter INTEL,$(CPUNAME)),Win32,x64) \
 			$(if $(filter 150,$(VCVER)),/p:PlatformToolset=v141 /p:VisualStudioVersion=15.0 /ToolsVersion:15.0) \
-			$(if $(filter 150-10,$(VCVER)-$(WINDOWS_SDK_VERSION)),/p:WindowsTargetPlatformVersion=$(UCRTVERSION))" \
+			$(if $(filter 160,$(VCVER)),/p:PlatformToolset=v142 /p:VisualStudioVersion=16.0 /ToolsVersion:Current) \
+			$(if $(filter 10,$(WINDOWS_SDK_VERSION)),/p:WindowsTargetPlatformVersion=$(UCRTVERSION))" \
 		&& msbuild.exe cppunit_dll.vcxproj /p:Configuration=$${PROFILEFLAGS}  \
 		&& cd ../DllPlugInTester \
 		&& msbuild.exe DllPlugInTester.vcxproj /p:Configuration=$${PROFILEFLAGS} \
diff --git a/external/lcms2/ExternalProject_lcms2.mk b/external/lcms2/ExternalProject_lcms2.mk
index 60b221ffc746..062a727e04fe 100644
--- a/external/lcms2/ExternalProject_lcms2.mk
+++ b/external/lcms2/ExternalProject_lcms2.mk
@@ -19,10 +19,11 @@ $(call gb_ExternalProject_get_state_target,lcms2,build):
 	$(call gb_ExternalProject_run,build,\
 		MSBuild.exe lcms2_DLL.vcxproj \
 			$(if $(filter 150,$(VCVER)),/p:PlatformToolset=v141 /p:VisualStudioVersion=15.0 /ToolsVersion:15.0) \
-			$(if $(filter 150-10,$(VCVER)-$(WINDOWS_SDK_VERSION)),/p:WindowsTargetPlatformVersion=$(UCRTVERSION)) \
+			$(if $(filter 160,$(VCVER)),/p:PlatformToolset=v142 /p:VisualStudioVersion=16.0 /ToolsVersion:Current) \
+			$(if $(filter 10,$(WINDOWS_SDK_VERSION)),/p:WindowsTargetPlatformVersion=$(UCRTVERSION)) \
 			/p:Configuration=$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release) \
 			/p:Platform=$(if $(filter INTEL,$(CPUNAME)),Win32,x64) /p:TargetName=lcms2 \
-	,Projects/VC2013/lcms2_DLL)
+	,Projects/VC2017/lcms2_DLL)
 else
 $(call gb_ExternalProject_get_state_target,lcms2,build):
 	$(call gb_ExternalProject_run,build,\
diff --git a/external/python3/ExternalProject_python3.mk b/external/python3/ExternalProject_python3.mk
index cd5d2c23d7b6..dafeb1ca5ae8 100644
--- a/external/python3/ExternalProject_python3.mk
+++ b/external/python3/ExternalProject_python3.mk
@@ -38,7 +38,8 @@ $(call gb_ExternalProject_get_state_target,python3,build) :
 			/p:Platform=$(if $(filter INTEL,$(CPUNAME)),Win32,x64) \
 			/maxcpucount \
 			$(if $(filter 150,$(VCVER)),/p:PlatformToolset=v141 /p:VisualStudioVersion=15.0 /ToolsVersion:15.0) \
-			$(if $(filter 150-10,$(VCVER)-$(WINDOWS_SDK_VERSION)),/p:WindowsTargetPlatformVersion=$(UCRTVERSION)) \
+			$(if $(filter 160,$(VCVER)),/p:PlatformToolset=v142 /p:VisualStudioVersion=16.0 /ToolsVersion:Current) \
+			$(if $(filter 10,$(WINDOWS_SDK_VERSION)),/p:WindowsTargetPlatformVersion=$(UCRTVERSION)) \
 	,PCBuild)
 
 else


More information about the Libreoffice-commits mailing list