Fossil SCM
Update buildmsvc.bat to be able to be called in a normal command prompt and automatically load the needed MSVC build tools (x64 by default; x86 can be given as the first argument).
Commit
97971b9666180e7d5bcbf7577ff5d6736bbf0d93d4e9d08d345b6d3e0eed4c4a
Parent
38dad38b6d87e0f…
1 file changed
+7
-2
+7
-2
| --- win/buildmsvc.bat | ||
| +++ win/buildmsvc.bat | ||
| @@ -1,13 +1,15 @@ | ||
| 1 | 1 | @ECHO OFF |
| 2 | 2 | |
| 3 | 3 | :: |
| 4 | 4 | :: buildmsvc.bat -- |
| 5 | 5 | :: |
| 6 | -:: This batch file attempts to build Fossil using the latest version | |
| 6 | +:: This batch file attempts to build Fossil using the latest version of | |
| 7 | 7 | :: Microsoft Visual Studio installed on this machine. |
| 8 | 8 | :: |
| 9 | +:: For VS 2017 and later, it uses the x64 build tools by default; | |
| 10 | +:: pass "x86" as the first argument to use the x86 tools. | |
| 9 | 11 | :: |
| 10 | 12 | |
| 11 | 13 | SETLOCAL |
| 12 | 14 | |
| 13 | 15 | REM SET __ECHO=ECHO |
| @@ -50,11 +52,14 @@ | ||
| 50 | 52 | REM |
| 51 | 53 | REM Visual Studio 2017 / 2019 / 2022 |
| 52 | 54 | REM |
| 53 | 55 | CALL :fn_TryUseVsWhereExe |
| 54 | 56 | IF NOT DEFINED VSWHEREINSTALLDIR GOTO skip_detectVisualStudio2017 |
| 55 | -SET VSVARS32=%VSWHEREINSTALLDIR%\Common7\Tools\VsDevCmd.bat | |
| 57 | +SET VSVARS32=%VSWHEREINSTALLDIR%\VC\Auxiliary\Build\vcvars64.bat | |
| 58 | +IF "%~1" == "x86" ( | |
| 59 | + SET VSVARS32=%VSWHEREINSTALLDIR%\VC\Auxiliary\Build\vcvars32.bat | |
| 60 | +) | |
| 56 | 61 | IF EXIST "%VSVARS32%" ( |
| 57 | 62 | %_AECHO% Using Visual Studio 2017 / 2019 / 2022... |
| 58 | 63 | GOTO skip_detectVisualStudio |
| 59 | 64 | ) |
| 60 | 65 | :skip_detectVisualStudio2017 |
| 61 | 66 |
| --- win/buildmsvc.bat | |
| +++ win/buildmsvc.bat | |
| @@ -1,13 +1,15 @@ | |
| 1 | @ECHO OFF |
| 2 | |
| 3 | :: |
| 4 | :: buildmsvc.bat -- |
| 5 | :: |
| 6 | :: This batch file attempts to build Fossil using the latest version |
| 7 | :: Microsoft Visual Studio installed on this machine. |
| 8 | :: |
| 9 | :: |
| 10 | |
| 11 | SETLOCAL |
| 12 | |
| 13 | REM SET __ECHO=ECHO |
| @@ -50,11 +52,14 @@ | |
| 50 | REM |
| 51 | REM Visual Studio 2017 / 2019 / 2022 |
| 52 | REM |
| 53 | CALL :fn_TryUseVsWhereExe |
| 54 | IF NOT DEFINED VSWHEREINSTALLDIR GOTO skip_detectVisualStudio2017 |
| 55 | SET VSVARS32=%VSWHEREINSTALLDIR%\Common7\Tools\VsDevCmd.bat |
| 56 | IF EXIST "%VSVARS32%" ( |
| 57 | %_AECHO% Using Visual Studio 2017 / 2019 / 2022... |
| 58 | GOTO skip_detectVisualStudio |
| 59 | ) |
| 60 | :skip_detectVisualStudio2017 |
| 61 |
| --- win/buildmsvc.bat | |
| +++ win/buildmsvc.bat | |
| @@ -1,13 +1,15 @@ | |
| 1 | @ECHO OFF |
| 2 | |
| 3 | :: |
| 4 | :: buildmsvc.bat -- |
| 5 | :: |
| 6 | :: This batch file attempts to build Fossil using the latest version of |
| 7 | :: Microsoft Visual Studio installed on this machine. |
| 8 | :: |
| 9 | :: For VS 2017 and later, it uses the x64 build tools by default; |
| 10 | :: pass "x86" as the first argument to use the x86 tools. |
| 11 | :: |
| 12 | |
| 13 | SETLOCAL |
| 14 | |
| 15 | REM SET __ECHO=ECHO |
| @@ -50,11 +52,14 @@ | |
| 52 | REM |
| 53 | REM Visual Studio 2017 / 2019 / 2022 |
| 54 | REM |
| 55 | CALL :fn_TryUseVsWhereExe |
| 56 | IF NOT DEFINED VSWHEREINSTALLDIR GOTO skip_detectVisualStudio2017 |
| 57 | SET VSVARS32=%VSWHEREINSTALLDIR%\VC\Auxiliary\Build\vcvars64.bat |
| 58 | IF "%~1" == "x86" ( |
| 59 | SET VSVARS32=%VSWHEREINSTALLDIR%\VC\Auxiliary\Build\vcvars32.bat |
| 60 | ) |
| 61 | IF EXIST "%VSVARS32%" ( |
| 62 | %_AECHO% Using Visual Studio 2017 / 2019 / 2022... |
| 63 | GOTO skip_detectVisualStudio |
| 64 | ) |
| 65 | :skip_detectVisualStudio2017 |
| 66 |