Patch 9.0.0528
Problem:    MS-Windows: no batch files for more recent MSVC versions.
Solution:   Add batch files for 2017, 2019 and 2022. (Ken Takata,
            closes #11184)
Files:      Filelist, src/INSTALLpc.txt, src/msvc-latest.bat,
            src/msvc2017.bat, src/msvc2019.bat, src/msvc2022.bat


*** ../vim-9.0.0527/Filelist    2022-09-20 21:23:08.788163488 +0100
--- Filelist    2022-09-21 11:55:19.916354025 +0100
***************
*** 538,544 ****
--- 538,548 ----
                tools/rename.bat \
                src/bigvim.bat \
                src/bigvim64.bat \
+               src/msvc-latest.bat \
                src/msvc2015.bat \
+               src/msvc2017.bat \
+               src/msvc2019.bat \
+               src/msvc2022.bat \
                src/msys32.bat \
                src/msys64.bat \
                src/dlldata.c \
*** ../vim-9.0.0527/src/INSTALLpc.txt   2022-09-20 21:23:08.788163488 +0100
--- src/INSTALLpc.txt   2022-09-21 11:52:34.157348645 +0100
***************
*** 70,79 ****
  Building with Visual Studio (VS2015, VS2017, VS2019 and VS2022) is
  straightforward.  Older versions probably don't work.
  
! Visual Studio installed a batch file called vcvars32.bat, which you must
  run to set up paths for nmake and MSVC.  We provide a batch file
  "msvc2015.bat" for this.  You may need to edit it if you didn't instal Visual
  Studio in the standard location.
  
  To build Vim from the command line with MSVC, use Make_mvc.mak.
  
--- 70,84 ----
  Building with Visual Studio (VS2015, VS2017, VS2019 and VS2022) is
  straightforward.  Older versions probably don't work.
  
! Visual Studio installed a batch file called vcvarsall.bat, which you must
  run to set up paths for nmake and MSVC.  We provide a batch file
  "msvc2015.bat" for this.  You may need to edit it if you didn't instal Visual
  Studio in the standard location.
+ If you use VS2017 or later, you can use "msvc-latest.bat" (or "msvc2017.bat"
+ and so on for the specific version).  You must specify the architecture (e.g.
+ "x86", "x64", etc.) as the first argument when you use this.  If you use 
VS2017
+ Express, you must use "x86_amd64" instead of "x64" for targeting the x64
+ platform.
  
  To build Vim from the command line with MSVC, use Make_mvc.mak.
  
*** ../vim-9.0.0527/src/msvc-latest.bat 2022-09-21 11:55:36.160199866 +0100
--- src/msvc-latest.bat 2022-09-21 11:52:34.157348645 +0100
***************
*** 0 ****
--- 1,72 ----
+ @echo off
+ rem To be used on MS-Windows for Visual C++ 2017 or later.
+ rem See INSTALLpc.txt for information.
+ rem
+ rem Usage:
+ rem   For x86 builds run this with "x86" option:
+ rem     msvc-latest x86
+ rem   For x64 builds run this with "x86_amd64" option or "x64" option:
+ rem     msvc-latest x86_amd64
+ rem     msvc-latest x64
+ rem
+ rem Optional environment variables:
+ rem   VSWHERE:
+ rem     Full path to vswhere.exe.
+ rem   VSVEROPT:
+ rem     Option to search specific version of Visual Studio.
+ rem     Default: -latest
+ rem     To search VS2017:
+ rem       set "VSVEROPT=-version [15.0^,16.0^)"
+ rem     To search VS2019:
+ rem       set "VSVEROPT=-version [16.0^,17.0^)"
+ rem     To search VS2022:
+ rem       set "VSVEROPT=-version [17.0^,18.0^)"
+ 
+ if "%VSWHERE%"=="" (
+       set "VSWHERE=%ProgramFiles(x86)%\Microsoft Visual 
Studio\Installer\vswhere.exe"
+       set VSWHERE_SET=yes
+ )
+ if not exist "%VSWHERE%" (
+       echo Error: vswhere not found.
+       set VSWHERE=
+       set VSWHERE_SET=
+       exit /b 1
+ )
+ 
+ if "%VSVEROPT%"=="" (
+       set VSVEROPT=-latest
+       set VSVEROPT_SET=yes
+ )
+ 
+ rem Search Visual Studio Community, Professional or above.
+ for /f "usebackq tokens=*" %%i in (`"%VSWHERE%" %VSVEROPT% -products * 
-requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property 
installationPath`) do (
+       set InstallDir=%%i
+ )
+ if exist "%InstallDir%\VC\Auxiliary\Build\vcvarsall.bat" (
+       call "%InstallDir%\VC\Auxiliary\Build\vcvarsall.bat" %*
+       goto done
+ )
+ 
+ rem Search Visual Studio 2017 Express.
+ rem (Visual Studio 2017 Express uses different component IDs.)
+ for /f "usebackq tokens=*" %%i in (`"%VSWHERE%" %VSVEROPT% -products 
Microsoft.VisualStudio.Product.WDExpress -property installationPath`) do (
+       set InstallDir=%%i
+ )
+ if exist "%InstallDir%\VC\Auxiliary\Build\vcvarsall.bat" (
+       call "%InstallDir%\VC\Auxiliary\Build\vcvarsall.bat" %*
+ ) else (
+       echo Error: vcvarsall.bat not found.
+       rem Set ERRORLEVEL to 1.
+       call
+ )
+ 
+ :done
+ if "%VSWHERE_SET%"=="yes" (
+       set VSWHERE=
+       set VSWHERE_SET=
+ )
+ if "%VSVEROPT_SET%"=="yes" (
+       set VSVEROPT=
+       set VSVEROPT_SET=
+ )
+ set InstallDir=
*** ../vim-9.0.0527/src/msvc2017.bat    2022-09-21 11:55:36.164199827 +0100
--- src/msvc2017.bat    2022-09-21 11:52:34.157348645 +0100
***************
*** 0 ****
--- 1,13 ----
+ @echo off
+ rem To be used on MS-Windows for Visual C++ 2017.
+ rem See INSTALLpc.txt for information.
+ rem
+ rem Usage:
+ rem   For x86 builds run this with "x86" option:
+ rem     msvc2017 x86
+ rem   For x64 builds run this with "x86_amd64" option:
+ rem     msvc2017 x86_amd64
+ 
+ set "VSVEROPT=-version [15.0^,16.0^)"
+ call "%~dp0msvc-latest.bat" %*
+ set VSVEROPT=
*** ../vim-9.0.0527/src/msvc2019.bat    2022-09-21 11:55:36.168199790 +0100
--- src/msvc2019.bat    2022-09-21 11:52:34.157348645 +0100
***************
*** 0 ****
--- 1,13 ----
+ @echo off
+ rem To be used on MS-Windows for Visual C++ 2019.
+ rem See INSTALLpc.txt for information.
+ rem
+ rem Usage:
+ rem   For x86 builds run this with "x86" option:
+ rem     msvc2019 x86
+ rem   For x64 builds run this with "x64" option:
+ rem     msvc2019 x64
+ 
+ set "VSVEROPT=-version [16.0^,17.0^)"
+ call "%~dp0msvc-latest.bat" %*
+ set VSVEROPT=
*** ../vim-9.0.0527/src/msvc2022.bat    2022-09-21 11:55:36.176199712 +0100
--- src/msvc2022.bat    2022-09-21 11:52:34.157348645 +0100
***************
*** 0 ****
--- 1,13 ----
+ @echo off
+ rem To be used on MS-Windows for Visual C++ 2022.
+ rem See INSTALLpc.txt for information.
+ rem
+ rem Usage:
+ rem   For x86 builds run this with "x86" option:
+ rem     msvc2022 x86
+ rem   For x64 builds run this with "x64" option:
+ rem     msvc2022 x64
+ 
+ set "VSVEROPT=-version [17.0^,18.0^)"
+ call "%~dp0msvc-latest.bat" %*
+ set VSVEROPT=
*** ../vim-9.0.0527/src/version.c       2022-09-21 11:21:53.282431881 +0100
--- src/version.c       2022-09-21 11:54:42.692691539 +0100
***************
*** 701,702 ****
--- 701,704 ----
  {   /* Add new patch number below this line */
+ /**/
+     528,
  /**/

-- 
An actual excerpt from a classified section of a city newspaper:
"Illiterate?  Write today for free help!"

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20220921105714.8BA0A1C0EC3%40moolenaar.net.

Raspunde prin e-mail lui