-
-
Notifications
You must be signed in to change notification settings - Fork 26
/
recompile60.bat
50 lines (40 loc) · 1.77 KB
/
recompile60.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
@echo off
set pre=Microsoft.VisualStudio.Product.
set ids=%pre%Community %pre%Professional %pre%Enterprise %pre%BuildTools
for /f "usebackq tokens=1* delims=: " %%i in (`"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere" -latest -products %ids% -requires Microsoft.Component.MSBuild`) do (
if /i "%%i"=="installationPath" set InstallDir=%%j
)
IF NOT EXIST %InstallDir%nul goto MissingMSBuildToolsPath
IF NOT EXIST %InstallDir%\MSBuild\Current\Bin\MSBuild.exe goto MissingMSBuildExe
ECHO =========== Starting Release Compile ==================
ECHO Command line Compiler compiling....
ECHO -----------------------------------
REM /m:2 is used to build using parallel compilation
"%InstallDir%\MSBuild\Current\Bin\MSBuild.exe" elenasrc3\elenasrc3.sln /p:configuration=release /p:Platform="x86" /m:2
IF NOT %ERRORLEVEL%==0 GOTO CompilerError
bin\elena-tests.exe
IF NOT %ERRORLEVEL%==0 GOTO CompilerError
REM /m:2 is used to build using parallel compilation
"%InstallDir%\MSBuild\Current\Bin\MSBuild.exe" elenasrc3\elenasrc3.sln /p:configuration=release /p:Platform="x64" /m:2
IF NOT %ERRORLEVEL%==0 GOTO CompilerError
ECHO =========== Release Compiled ==================
ECHO ============== x86 build ======================
CALL build\rebuild_lib60_x86.bat
IF NOT %ERRORLEVEL%==0 GOTO CompilerError
ECHO ============== x64 build ======================
CALL build\rebuild_lib60_x64.bat
goto:eof
::ERRORS
::---------------------
:MissingMSBuildRegistry
echo Cannot obtain path to MSBuild tools from registry
goto:eof
:MissingMSBuildToolsPath
echo The MSBuild tools path from the registry '%InstallDir%' does not exist
goto:eof
:MissingMSBuildExe
echo The MSBuild executable could not be found at '%InstallDir%'
goto:eof
:CompilerError
echo The MSBuild returns error %ERRORLEVEL%
goto:eof