Signed-off-by: Dmitry Fleytman <dmi...@daynix.com> --- Tools/vs_cmdline.vbs | 23 +++++++++++++++++++++++ Tools/vs_run.bat | 26 ++++++++++++++++++++++++++ buildAll.bat | 15 +++++++++++++++ buildAll_NoSign.bat | 19 +++++++++++++++++++ qxldod/buildAll.bat | 31 ------------------------------- qxldod/callVisualStudio.bat | 28 ---------------------------- qxldod/checkWin8Tools.bat | 8 -------- qxldod/clean.bat | 12 ------------ 8 files changed, 83 insertions(+), 79 deletions(-) create mode 100644 Tools/vs_cmdline.vbs create mode 100644 Tools/vs_run.bat create mode 100644 buildAll.bat create mode 100644 buildAll_NoSign.bat delete mode 100755 qxldod/buildAll.bat delete mode 100755 qxldod/callVisualStudio.bat delete mode 100755 qxldod/checkWin8Tools.bat delete mode 100755 qxldod/clean.bat
diff --git a/Tools/vs_cmdline.vbs b/Tools/vs_cmdline.vbs new file mode 100644 index 0000000..65bd0e5 --- /dev/null +++ b/Tools/vs_cmdline.vbs @@ -0,0 +1,23 @@ +Dim strCmdLine, strTemp +Set WshShell = Wscript.CreateObject("Wscript.Shell") + +On Error Resume Next +strCmdLine = WshShell.RegRead("HKLM\SOFTWARE\Microsoft\VisualStudio\14.0\InstallDir") +' In case of error assume WoW64 case +If Err <> 0 Then + On Error Goto 0 + strCmdLine = WshShell.RegRead("HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\14.0\InstallDir") +End If + +On Error Goto 0 +strCmdLine = chr(34) + strCmdLine + "devenv.com" + chr(34) +For i = 0 to (Wscript.Arguments.Count - 1) + strTemp = Wscript.Arguments(i) + If InStr(strTemp, " ") Or InStr(strTemp, "|") Then + strCmdLine = strCmdLine + " " + chr(34) + strTemp + chr(34) + Else + strCmdLine = strCmdLine + " " + strTemp + End If +Next + +WScript.Echo strCmdLine + vbCrLf diff --git a/Tools/vs_run.bat b/Tools/vs_run.bat new file mode 100644 index 0000000..b057fe3 --- /dev/null +++ b/Tools/vs_run.bat @@ -0,0 +1,26 @@ +@echo off + +for /f "tokens=*" %%a in ( +'cscript.exe /nologo "%~dp0\vs_cmdline.vbs" %*' +) do ( +SET vs_cmd=%%a +) + +IF NOT DEFINED vs_cmd ( +echo Visual Studio not found +EXIT /b 1 +) + +SET vs_cmd_no_quotes="%vs_cmd:"=%" +IF "vs_cmd_no_quotes" == "" ( +echo Visual Studio not found +EXIT /b 2 +) + +%vs_cmd% +if %ERRORLEVEL% GEQ 1 ( +echo Build with Visual Studio FAILED +EXIT /b 3 +) + +EXIT /b 0 diff --git a/buildAll.bat b/buildAll.bat new file mode 100644 index 0000000..dbbd46b --- /dev/null +++ b/buildAll.bat @@ -0,0 +1,15 @@ +@echo off + +SETLOCAL EnableExtensions EnableDelayedExpansion + +del *.log + +call buildAll_NoSign.bat + +call tools\vs_run.bat qxldod.sln /Rebuild "Win10Debug|Win32" /Out build_Win10_Debug_Win32.log +if !ERRORLEVEL! NEQ 0 exit /B 1 + +call tools\vs_run.bat qxldod.sln /Rebuild "Win10Debug|x64" /Out build_Win10_Debug_x64.log +if !ERRORLEVEL! NEQ 0 exit /B 1 + +ENDLOCAL diff --git a/buildAll_NoSign.bat b/buildAll_NoSign.bat new file mode 100644 index 0000000..20f1db4 --- /dev/null +++ b/buildAll_NoSign.bat @@ -0,0 +1,19 @@ +@echo off + +SETLOCAL EnableExtensions EnableDelayedExpansion + +del *.log + +call tools\vs_run.bat qxldod.sln /Rebuild "Win10Debug_NoSign|Win32" /Out build_Win10_Debug_NoSign_Win32.log +if !ERRORLEVEL! NEQ 0 exit /B 1 + +call tools\vs_run.bat qxldod.sln /Rebuild "Win10Release|Win32" /Out build_Win10_Release_Win32.log +if !ERRORLEVEL! NEQ 0 exit /B 1 + +call tools\vs_run.bat qxldod.sln /Rebuild "Win10Debug_NoSign|x64" /Out build_Win10_Debug_NoSign_x64.log +if !ERRORLEVEL! NEQ 0 exit /B 1 + +call tools\vs_run.bat qxldod.sln /Rebuild "Win10Release|x64" /Out build_Win10_Release_x64.log +if !ERRORLEVEL! NEQ 0 exit /B 1 + +ENDLOCAL diff --git a/qxldod/buildAll.bat b/qxldod/buildAll.bat deleted file mode 100755 index 072a2b4..0000000 --- a/qxldod/buildAll.bat +++ /dev/null @@ -1,31 +0,0 @@ -@echo off - -call clean.bat - -rem WIN8_64 -setlocal -if exist Install\win8\amd64 rmdir Install\win8\amd64 /s /q -call callVisualStudio.bat 12 qxldod.vcxproj /Rebuild "Win8 Release|x64" /Out buildfre_win8_amd64.log -mkdir .\Install\Win8\x64 -del /Q .\Install\Win8\x64\* -copy /Y objfre_win8_amd64\amd64\qxldod.sys .\Install\Win8\x64 -copy /Y objfre_win8_amd64\amd64\qxldod.inf .\Install\Win8\x64 -copy /Y objfre_win8_amd64\amd64\qxldod.cat .\Install\Win8\x64 -copy /Y objfre_win8_amd64\amd64\qxldod.pdb .\Install\Win8\x64 -endlocal -if %ERRORLEVEL% NEQ 0 goto :eof - -rem WIN8_32 -setlocal -if exist Install\win8\x86 rmdir Install\win8\x86 /s /q -call callVisualStudio.bat 12 qxldod.vcxproj /Rebuild "Win8 Release|Win32" /Out buildfre_win8_x86.log -mkdir .\Install\Win8\x86 -del /Q .\Install\Win8\x86\* -copy /Y objfre_win8_x86\i386\qxldod.sys .\Install\Win8\x86 -copy /Y objfre_win8_x86\i386\qxldod.inf .\Install\Win8\x86 -copy /Y objfre_win8_x86\i386\qxldod.cat .\Install\Win8\x86 -copy /Y objfre_win8_x86\i386\qxldod.pdb .\Install\Win8\x86 -endlocal -if %ERRORLEVEL% NEQ 0 goto :eof - -:eof diff --git a/qxldod/callVisualStudio.bat b/qxldod/callVisualStudio.bat deleted file mode 100755 index 769752d..0000000 --- a/qxldod/callVisualStudio.bat +++ /dev/null @@ -1,28 +0,0 @@ -@echo off - -call %~dp0\checkWin8Tools.bat - -for /f "tokens=*" %%a in ( -'cscript.exe /nologo "%~dp0\getVisualStudioCmdLine.vbs" %*' -) do ( -set vs_cmd=%%a -) - -IF NOT DEFINED vs_cmd ( -echo Visual Studio not found -EXIT /b 1 -) - -SET vs_cmd_no_quotes="%vs_cmd:"=%" -IF "vs_cmd_no_quotes" == "" ( -echo Visual Studio not found -EXIT /b 2 -) - -call %vs_cmd% -if %ERRORLEVEL% GEQ 1 ( -echo Build with Visual Studio FAILED -exit /b %ERRORLEVEL% -) - -exit /b 0 diff --git a/qxldod/checkWin8Tools.bat b/qxldod/checkWin8Tools.bat deleted file mode 100755 index 66a9436..0000000 --- a/qxldod/checkWin8Tools.bat +++ /dev/null @@ -1,8 +0,0 @@ -@echo off - -reg query HKLM\Software\Microsoft\VisualStudio\12.0 /v InstallDir > nul 2>nul -if %ERRORLEVEL% EQU 0 exit /b 0 -reg query HKLM\Software\Wow6432Node\Microsoft\VisualStudio\12.0 /v InstallDir > nul 2>nul -if %ERRORLEVEL% EQU 0 exit /b 0 -echo ERROR building Win8 drivers: VS12 is not installed -exit /b 2 \ No newline at end of file diff --git a/qxldod/clean.bat b/qxldod/clean.bat deleted file mode 100755 index 83da6de..0000000 --- a/qxldod/clean.bat +++ /dev/null @@ -1,12 +0,0 @@ -@echo on - -rmdir /S /Q .\Install - -rmdir /S /Q objfre_win8_x86 -rmdir /S /Q objfre_win8_amd64 -rmdir /S /Q objchk_win8_x86 -rmdir /S /Q objchk_win8_amd64 - -del /F *.log *.wrn *.err - - -- 1.8.3.1 _______________________________________________ Spice-devel mailing list Spice-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/spice-devel