K.Takata's patch queue for Vim
Revision | eb9fd6ba94a46ad4ad37f77ed91d0c52f9ea734f (tree) |
---|---|
Time | 2022-01-23 11:52:13 |
Author | K.Takata <kentkt@csc....> |
Commiter | K.Takata |
Update msvc-latest.bat
@@ -1,34 +1,52 @@ | ||
1 | 1 | # HG changeset patch |
2 | -# Parent a8376b89aaf6d0f698f092d89816363900f6b356 | |
2 | +# Parent e9523f06f4e039b9d4aff7400b1f8cfb516f7dfe | |
3 | 3 | |
4 | 4 | diff --git a/src/msvc-latest.bat b/src/msvc-latest.bat |
5 | 5 | new file mode 100644 |
6 | 6 | --- /dev/null |
7 | 7 | +++ b/src/msvc-latest.bat |
8 | -@@ -0,0 +1,46 @@ | |
8 | +@@ -0,0 +1,71 @@ | |
9 | 9 | +@echo off |
10 | -+rem To be used on MS-Windows for Visual C++ 2017 or later | |
10 | ++rem To be used on MS-Windows for Visual C++ 2017 or later. | |
11 | 11 | +rem See INSTALLpc.txt for information. |
12 | 12 | +rem |
13 | 13 | +rem Usage: |
14 | 14 | +rem For x86 builds run this with "x86" option: |
15 | 15 | +rem msvc-latest x86 |
16 | -+rem For x64 builds run this with "amd64" option: | |
17 | -+rem msvc-latest amd64 | |
16 | ++rem For x64 builds run this with "x86_amd64" option or "x64" option: | |
17 | ++rem msvc-latest x86_amd64 | |
18 | ++rem msvc-latest x64 | |
19 | ++rem | |
20 | ++rem Optional environment variables: | |
21 | ++rem VSWHERE: | |
22 | ++rem Full path to vswhere.exe. | |
23 | ++rem VSVEROPT: | |
24 | ++rem Option to search specific version of Visual Studio. | |
25 | ++rem Default: -latest | |
26 | ++rem To search VS2017: | |
27 | ++rem set VSVEROPT=-version [15.0^^,16.0^^) | |
28 | ++rem To search VS2019: | |
29 | ++rem set VSVEROPT=-version [16.0^^,17.0^^) | |
30 | ++rem To search VS2022: | |
31 | ++rem set VSVEROPT=-version [17.0^^,18.0^^) | |
18 | 32 | + |
19 | -+set "VSWHERE=%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" | |
33 | ++if "%VSWHERE%"=="" ( | |
34 | ++ set "VSWHERE=%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" | |
35 | ++ set VSWHERE_SET=yes | |
36 | ++) | |
20 | 37 | +if not exist "%VSWHERE%" ( |
21 | -+ where vswhere > nul 2>&1 | |
22 | -+ if errorlevel 1 ( | |
23 | -+ echo Error: vswhere not found. | |
24 | -+ set VSWHERE= | |
25 | -+ exit /b 1 | |
26 | -+ ) | |
27 | -+ set VSWHERE=vswhere | |
38 | ++ echo Error: vswhere not found. | |
39 | ++ set VSWHERE= | |
40 | ++ exit /b 1 | |
41 | ++) | |
42 | ++ | |
43 | ++if "%VSVEROPT%"=="" ( | |
44 | ++ set VSVEROPT=-latest | |
45 | ++ set VSVEROPT_SET=yes | |
28 | 46 | +) |
29 | 47 | + |
30 | 48 | +rem Search Visual Studio Community, Professional or above. |
31 | -+for /f "usebackq tokens=*" %%i in (`"%VSWHERE%" -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath`) do ( | |
49 | ++for /f "usebackq tokens=*" %%i in (`"%VSWHERE%" %VSVEROPT% -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath`) do ( | |
32 | 50 | + set InstallDir=%%i |
33 | 51 | +) |
34 | 52 | +if exist "%InstallDir%\VC\Auxiliary\Build\vcvarsall.bat" ( |
@@ -38,7 +56,7 @@ | ||
38 | 56 | + |
39 | 57 | +rem Search Visual Studio 2017 Express. |
40 | 58 | +rem (Visual Studio 2017 Express uses different component IDs.) |
41 | -+for /f "usebackq tokens=*" %%i in (`"%VSWHERE%" -latest -products Microsoft.VisualStudio.Product.WDExpress -property installationPath`) do ( | |
59 | ++for /f "usebackq tokens=*" %%i in (`"%VSWHERE%" %VSVEROPT% -products Microsoft.VisualStudio.Product.WDExpress -property installationPath`) do ( | |
42 | 60 | + set InstallDir=%%i |
43 | 61 | +) |
44 | 62 | +if exist "%InstallDir%\VC\Auxiliary\Build\vcvarsall.bat" ( |
@@ -50,5 +68,66 @@ | ||
50 | 68 | +) |
51 | 69 | + |
52 | 70 | +:done |
53 | -+set VSWHERE= | |
71 | ++if "%VSWHERE_SET%"=="yes" ( | |
72 | ++ set VSWHERE= | |
73 | ++ set VSWHERE_SET= | |
74 | ++) | |
75 | ++if "%VSVEROPT_SET%"=="yes" ( | |
76 | ++ set VSVEROPT= | |
77 | ++ set VSVEROPT_SET= | |
78 | ++) | |
54 | 79 | +set InstallDir= |
80 | +diff --git a/src/msvc2017.bat b/src/msvc2017.bat | |
81 | +new file mode 100644 | |
82 | +--- /dev/null | |
83 | ++++ b/src/msvc2017.bat | |
84 | +@@ -0,0 +1,13 @@ | |
85 | ++@echo off | |
86 | ++rem To be used on MS-Windows for Visual C++ 2017. | |
87 | ++rem See INSTALLpc.txt for information. | |
88 | ++rem | |
89 | ++rem Usage: | |
90 | ++rem For x86 builds run this with "x86" option: | |
91 | ++rem msvc2017 x86 | |
92 | ++rem For x64 builds run this with "x86_amd64" option: | |
93 | ++rem msvc2017 x86_amd64 | |
94 | ++ | |
95 | ++set VSVEROPT=-version [15.0^^,16.0^^) | |
96 | ++call %~dp0msvc-latest.bat %* | |
97 | ++set VSVEROPT= | |
98 | +diff --git a/src/msvc2019.bat b/src/msvc2019.bat | |
99 | +new file mode 100644 | |
100 | +--- /dev/null | |
101 | ++++ b/src/msvc2019.bat | |
102 | +@@ -0,0 +1,13 @@ | |
103 | ++@echo off | |
104 | ++rem To be used on MS-Windows for Visual C++ 2019. | |
105 | ++rem See INSTALLpc.txt for information. | |
106 | ++rem | |
107 | ++rem Usage: | |
108 | ++rem For x86 builds run this with "x86" option: | |
109 | ++rem msvc2019 x86 | |
110 | ++rem For x64 builds run this with "x86_amd64" option: | |
111 | ++rem msvc2019 x86_amd64 | |
112 | ++ | |
113 | ++set VSVEROPT=-version [16.0^^,17.0^^) | |
114 | ++call %~dp0msvc-latest.bat %* | |
115 | ++set VSVEROPT= | |
116 | +diff --git a/src/msvc2022.bat b/src/msvc2022.bat | |
117 | +new file mode 100644 | |
118 | +--- /dev/null | |
119 | ++++ b/src/msvc2022.bat | |
120 | +@@ -0,0 +1,13 @@ | |
121 | ++@echo off | |
122 | ++rem To be used on MS-Windows for Visual C++ 2022. | |
123 | ++rem See INSTALLpc.txt for information. | |
124 | ++rem | |
125 | ++rem Usage: | |
126 | ++rem For x86 builds run this with "x86" option: | |
127 | ++rem msvc2022 x86 | |
128 | ++rem For x64 builds run this with "x86_amd64" option: | |
129 | ++rem msvc2022 x86_amd64 | |
130 | ++ | |
131 | ++set VSVEROPT=-version [17.0^^,18.0^^) | |
132 | ++call %~dp0msvc-latest.bat %* | |
133 | ++set VSVEROPT= |