Changeset 4874
- Timestamp:
- 11/20/10 16:35:45 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Visualization/Build.cmd
r4831 r4874 1 1 @ECHO OFF 2 2 3 REM == CONFIGURATION SECTION == 4 SET VSSOLUTION=HeuristicLab.Visualization.sln 5 SET /P CONFIGURATION=Which configuration to build [Debug]: 3 SET /A COUNT=0 4 FOR /F "tokens=*" %%A IN ('dir /B *.sln') DO ( 5 CALL :forloopbody "%%A") 6 7 IF "%COUNT%"=="1" ( 8 SET SELECTED=%SOLUTIONS.1% 9 ECHO Building %SOLUTIONS.1% as it is the only solution that was found ... 10 GOTO :config_platform_selection) 11 12 ECHO Found the following solutions: 13 FOR /F "tokens=2* delims=.=" %%A IN ('SET SOLUTIONS.') DO ECHO %%A = %%B 14 ECHO. 15 SET /P SOLUTIONINDEX=Which solution to build (type the number): 16 17 SET SELECTED="" 18 FOR /F "tokens=2* delims=.=" %%A IN ('SET SOLUTIONS.') DO ( 19 IF "%%A"=="%SOLUTIONINDEX%" SET SELECTED=%%B) 20 21 IF %SELECTED%=="" GOTO :eof 22 23 :config_platform_selection 24 SET /P CONFIGURATION=Which configuration to build [Debug]: 6 25 IF "%CONFIGURATION%"=="" SET CONFIGURATION=Debug 7 SET /P PLATFORM=Which platform to build [Any CPU]: 26 SET /P PLATFORM=Which platform to build [Any CPU]: 8 27 IF "%PLATFORM%"=="" SET PLATFORM=Any CPU 9 REM == END CONFIGURATION SECTION ==10 28 11 29 REM First find the path to the msbuild.exe by performing a registry query 12 FOR /F "tokens=1,3 delims= " %%A IN ('REG QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\4.0"') DO IF "%%A"=="MSBuildToolsPath" SET MSBUILDPATH=%%B 30 FOR /F "tokens=1,3 delims= " %%A IN ('REG QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\4.0"') DO ( 31 IF "%%A"=="MSBuildToolsPath" SET MSBUILDPATH=%%B) 13 32 14 33 REM Then execute msbuild to clean and build the solution … … 16 35 SET MSBuildUseNoSolutionCache=1 17 36 REM Run msbuild to clean and then build 18 %MSBUILDPATH%msbuild.exe % VSSOLUTION% /target:Clean /p:Configuration="%CONFIGURATION%",Platform="%PLATFORM%" /nologo19 %MSBUILDPATH%msbuild.exe % VSSOLUTION% /target:Build /p:Configuration="%CONFIGURATION%",Platform="%PLATFORM%" /nologo37 %MSBUILDPATH%msbuild.exe %SELECTED% /target:Clean /p:Configuration="%CONFIGURATION%",Platform="%PLATFORM%" /nologo 38 %MSBUILDPATH%msbuild.exe %SELECTED% /target:Build /p:Configuration="%CONFIGURATION%",Platform="%PLATFORM%" /nologo 20 39 21 40 PAUSE 41 42 GOTO :eof 43 44 REM This workaround is necessary so that COUNT gets reevaluated 45 :forloopbody 46 SET /A COUNT+=1 47 SET SOLUTIONS.%COUNT%=%1 48 GOTO :eof
Note: See TracChangeset
for help on using the changeset viewer.