Fossil SCM
Improve error handling. Allow Visual Studio version to be manually overridden. Pass extra arguments to NMAKE. Preserve existing environment and current directory. Miscellaneous style fixes.
Commit
8fab3e3f6ccafdb31f291d8287382e5c390c19e1
Parent
555c44eb5d9506e…
2 files changed
+8
-42
-42
+8
-42
| --- a/win/buildmsvc.bat | ||
| +++ b/win/buildmsvc.bat | ||
| @@ -1,42 +1,8 @@ | ||
| 1 | -@echo off | |
| 2 | - | |
| 3 | -rem this batch file tries to compile fossil using the latest available version | |
| 4 | -rem of Microsoft Visual Studio that can be found on the machine. | |
| 5 | - | |
| 6 | -rem visual studio 2013 | |
| 7 | -SET vsvars32="%VS120COMNTOOLS%\vsvars32.bat" | |
| 8 | -rem visual studio 2012 | |
| 9 | -IF NOT EXIST %vsvars32% SET vsvars32="%VS110COMNTOOLS%\vsvars32.bat" | |
| 10 | -rem visual studio 2010 | |
| 11 | -IF NOT EXIST %vsvars32% SET vsvars32="%VS100COMNTOOLS%\vsvars32.bat" | |
| 12 | -rem visual studio 2008 | |
| 13 | -IF NOT EXIST %vsvars32% SET vsvars32="%VS90COMNTOOLS%\vsvars32.bat" | |
| 14 | -rem visual studio 2005 | |
| 15 | -IF NOT EXIST %vsvars32% SET vsvars32="%VS80COMNTOOLS%\vsvars32.bat" | |
| 16 | -rem visual studio 2003 .NET | |
| 17 | -IF NOT EXIST %vsvars32% SET vsvars32="%VS71COMNTOOLS%\vsvars32.bat" | |
| 18 | - | |
| 19 | -rem check everything is correct | |
| 20 | -IF NOT EXIST %vsvars32% goto:bad_environment | |
| 21 | - | |
| 22 | -rem setting environment variables for building with Microsoft Visual C++ | |
| 23 | -call %vsvars32% | |
| 24 | - | |
| 25 | -rem making build directory | |
| 26 | -pushd "%~dp0" | |
| 27 | -cd .. | |
| 28 | -mkdir msvc_build | |
| 29 | -cd msvc_build | |
| 30 | - | |
| 31 | -rem building | |
| 32 | -nmake /f "%~dp0\Makefile.msc" | |
| 33 | - | |
| 34 | -rem leaving | |
| 35 | -popd | |
| 36 | -pause | |
| 37 | -goto:eof | |
| 38 | - | |
| 39 | -:bad_environment | |
| 40 | -echo "vsvars32.bat could not be found on this system." | |
| 41 | -pause | |
| 42 | -goto:eof | |
| 1 | +\x64*\x64*Root = '%ROOT%'compileseGOTO skip_se2 | |
| 2 | +REMGOTO skip_se0 | |
| 3 | +REMGOTO skip_se08 | |
| 4 | +REMGOTO skip_se05 | |
| 5 | +REMGOTO skip_se03 | |
| 6 | +REMGOTO skip_seseVerify that the specified Visual Studio environment batch file | |
| 7 | +REM existsVSVARS32%" ( | |
| 8 | + ECHO Visual Studio\x64*\x64*Root |
| --- a/win/buildmsvc.bat | |
| +++ b/win/buildmsvc.bat | |
| @@ -1,42 +1,8 @@ | |
| 1 | @echo off |
| 2 | |
| 3 | rem this batch file tries to compile fossil using the latest available version |
| 4 | rem of Microsoft Visual Studio that can be found on the machine. |
| 5 | |
| 6 | rem visual studio 2013 |
| 7 | SET vsvars32="%VS120COMNTOOLS%\vsvars32.bat" |
| 8 | rem visual studio 2012 |
| 9 | IF NOT EXIST %vsvars32% SET vsvars32="%VS110COMNTOOLS%\vsvars32.bat" |
| 10 | rem visual studio 2010 |
| 11 | IF NOT EXIST %vsvars32% SET vsvars32="%VS100COMNTOOLS%\vsvars32.bat" |
| 12 | rem visual studio 2008 |
| 13 | IF NOT EXIST %vsvars32% SET vsvars32="%VS90COMNTOOLS%\vsvars32.bat" |
| 14 | rem visual studio 2005 |
| 15 | IF NOT EXIST %vsvars32% SET vsvars32="%VS80COMNTOOLS%\vsvars32.bat" |
| 16 | rem visual studio 2003 .NET |
| 17 | IF NOT EXIST %vsvars32% SET vsvars32="%VS71COMNTOOLS%\vsvars32.bat" |
| 18 | |
| 19 | rem check everything is correct |
| 20 | IF NOT EXIST %vsvars32% goto:bad_environment |
| 21 | |
| 22 | rem setting environment variables for building with Microsoft Visual C++ |
| 23 | call %vsvars32% |
| 24 | |
| 25 | rem making build directory |
| 26 | pushd "%~dp0" |
| 27 | cd .. |
| 28 | mkdir msvc_build |
| 29 | cd msvc_build |
| 30 | |
| 31 | rem building |
| 32 | nmake /f "%~dp0\Makefile.msc" |
| 33 | |
| 34 | rem leaving |
| 35 | popd |
| 36 | pause |
| 37 | goto:eof |
| 38 | |
| 39 | :bad_environment |
| 40 | echo "vsvars32.bat could not be found on this system." |
| 41 | pause |
| 42 | goto:eof |
| --- a/win/buildmsvc.bat | |
| +++ b/win/buildmsvc.bat | |
| @@ -1,42 +1,8 @@ | |
| 1 | \x64*\x64*Root = '%ROOT%'compileseGOTO skip_se2 |
| 2 | REMGOTO skip_se0 |
| 3 | REMGOTO skip_se08 |
| 4 | REMGOTO skip_se05 |
| 5 | REMGOTO skip_se03 |
| 6 | REMGOTO skip_seseVerify that the specified Visual Studio environment batch file |
| 7 | REM existsVSVARS32%" ( |
| 8 | ECHO Visual Studio\x64*\x64*Root |
D
win/msvc_build.bat
-42
| --- a/win/msvc_build.bat | ||
| +++ b/win/msvc_build.bat | ||
| @@ -1,42 +0,0 @@ | ||
| 1 | -@echo off | |
| 2 | - | |
| 3 | -rem this batch file tries to compile fossil using the latest available version | |
| 4 | -rem of Microsoft Visual Studio that can be found on the machine. | |
| 5 | - | |
| 6 | -rem visual studio 2013 | |
| 7 | -SET vsvars32="%VS120COMNTOOLS%\vsvars32.bat" | |
| 8 | -rem visual studio 2012 | |
| 9 | -IF NOT EXIST %vsvars32% SET vsvars32="%VS110COMNTOOLS%\vsvars32.bat" | |
| 10 | -rem visual studio 2010 | |
| 11 | -IF NOT EXIST %vsvars32% SET vsvars32="%VS100COMNTOOLS%\vsvars32.bat" | |
| 12 | -rem visual studio 2008 | |
| 13 | -IF NOT EXIST %vsvars32% SET vsvars32="%VS90COMNTOOLS%\vsvars32.bat" | |
| 14 | -rem visual studio 2005 | |
| 15 | -IF NOT EXIST %vsvars32% SET vsvars32="%VS80COMNTOOLS%\vsvars32.bat" | |
| 16 | -rem visual studio 2003 .NET | |
| 17 | -IF NOT EXIST %vsvars32% SET vsvars32="%VS71COMNTOOLS%\vsvars32.bat" | |
| 18 | - | |
| 19 | -rem check everything is correct | |
| 20 | -IF NOT EXIST %vsvars32% goto:bad_environment | |
| 21 | - | |
| 22 | -rem setting environment variables for building with Microsoft Visual C++ | |
| 23 | -call %vsvars32% | |
| 24 | - | |
| 25 | -rem making build directory | |
| 26 | -pushd "%~dp0" | |
| 27 | -cd .. | |
| 28 | -mkdir msvc_build | |
| 29 | -cd msvc_build | |
| 30 | - | |
| 31 | -rem building | |
| 32 | -nmake /f "%~dp0\Makefile.msc" | |
| 33 | - | |
| 34 | -rem leaving | |
| 35 | -popd | |
| 36 | -pause | |
| 37 | -goto:eof | |
| 38 | - | |
| 39 | -:bad_environment | |
| 40 | -echo "vsvars32.bat could not be found on this system." | |
| 41 | -pause | |
| 42 | -goto:eof |
| --- a/win/msvc_build.bat | |
| +++ b/win/msvc_build.bat | |
| @@ -1,42 +0,0 @@ | |
| 1 | @echo off |
| 2 | |
| 3 | rem this batch file tries to compile fossil using the latest available version |
| 4 | rem of Microsoft Visual Studio that can be found on the machine. |
| 5 | |
| 6 | rem visual studio 2013 |
| 7 | SET vsvars32="%VS120COMNTOOLS%\vsvars32.bat" |
| 8 | rem visual studio 2012 |
| 9 | IF NOT EXIST %vsvars32% SET vsvars32="%VS110COMNTOOLS%\vsvars32.bat" |
| 10 | rem visual studio 2010 |
| 11 | IF NOT EXIST %vsvars32% SET vsvars32="%VS100COMNTOOLS%\vsvars32.bat" |
| 12 | rem visual studio 2008 |
| 13 | IF NOT EXIST %vsvars32% SET vsvars32="%VS90COMNTOOLS%\vsvars32.bat" |
| 14 | rem visual studio 2005 |
| 15 | IF NOT EXIST %vsvars32% SET vsvars32="%VS80COMNTOOLS%\vsvars32.bat" |
| 16 | rem visual studio 2003 .NET |
| 17 | IF NOT EXIST %vsvars32% SET vsvars32="%VS71COMNTOOLS%\vsvars32.bat" |
| 18 | |
| 19 | rem check everything is correct |
| 20 | IF NOT EXIST %vsvars32% goto:bad_environment |
| 21 | |
| 22 | rem setting environment variables for building with Microsoft Visual C++ |
| 23 | call %vsvars32% |
| 24 | |
| 25 | rem making build directory |
| 26 | pushd "%~dp0" |
| 27 | cd .. |
| 28 | mkdir msvc_build |
| 29 | cd msvc_build |
| 30 | |
| 31 | rem building |
| 32 | nmake /f "%~dp0\Makefile.msc" |
| 33 | |
| 34 | rem leaving |
| 35 | popd |
| 36 | pause |
| 37 | goto:eof |
| 38 | |
| 39 | :bad_environment |
| 40 | echo "vsvars32.bat could not be found on this system." |
| 41 | pause |
| 42 | goto:eof |
| --- a/win/msvc_build.bat | |
| +++ b/win/msvc_build.bat | |
| @@ -1,42 +0,0 @@ | |