Signed-off-by: Dmitry Fleytman <dmitry@xxxxxxxxxx> --- Tools/vs_cmdline.vbs | 23 +++++++++++++++++++++++ Tools/vs_run.bat | 26 ++++++++++++++++++++++++++ buildAll.bat | 14 ++++++++++++++ rebuildAll.bat | 13 +++++++++++++ 4 files changed, 76 insertions(+) create mode 100644 Tools/vs_cmdline.vbs create mode 100644 Tools/vs_run.bat create mode 100644 buildAll.bat create mode 100644 rebuildAll.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..2f33ead --- /dev/null +++ b/buildAll.bat @@ -0,0 +1,14 @@ +@echo off + +SETLOCAL EnableExtensions EnableDelayedExpansion + +git submodule update --init + +cd cximage +call buildAll.bat +if !ERRORLEVEL! NEQ 0 exit /B 1 +cd .. + +call rebuildAll.bat + +ENDLOCAL diff --git a/rebuildAll.bat b/rebuildAll.bat new file mode 100644 index 0000000..37ae925 --- /dev/null +++ b/rebuildAll.bat @@ -0,0 +1,13 @@ +@echo off + +SETLOCAL EnableExtensions EnableDelayedExpansion + +del *.log + +call tools\vs_run.bat vdagent.sln /Rebuild "Win10_Debug|Win32" /Out build_Win10_Debug.log +if !ERRORLEVEL! NEQ 0 exit /B 1 + +call tools\vs_run.bat vdagent.sln /Rebuild "Win10_Release|Win32" /Out build_Win10_Release.log +if !ERRORLEVEL! NEQ 0 exit /B 1 + +ENDLOCAL -- 1.8.3.1 _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel