@REM @REM Licensed to the Apache Software Foundation (ASF) under one or more @REM contributor license agreements. See the NOTICE file distributed with @REM this work for additional information regarding copyright ownership. @REM The ASF licenses this file to You under the Apache License, Version 2.0 @REM (the "License"); you may not use this file except in compliance with @REM the License. You may obtain a copy of the License at @REM @REM http://www.apache.org/licenses/LICENSE-2.0 @REM @REM Unless required by applicable law or agreed to in writing, software @REM distributed under the License is distributed on an "AS IS" BASIS, @REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @REM See the License for the specific language governing permissions and @REM limitations under the License. @REM @echo STONEHENGE DOTNET BUILDER @echo ======================================================================= echo Building Stonehenge dotnet solutions @echo Build the solutions. This assumes you have your .Net3.5 installed. :: delims is a TAB followed by a space @FOR /F "tokens=2* delims= " %%A IN ( 'REG QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\3.5" /v MSBuildToolsPath' ) DO SET MSBuildToolsPath=%%B @echo MSBuildToolsPath=%MSBuildToolsPath% @if not exist %MSBuildToolsPath%\MSbuild.exe Goto :Error2 @echo Build the solutions. cd .\setup_utilities\SetupActions @if not exist SetupActions.sln Goto :Error1 @echo Build SetupActions "%MSBuildToolsPath%msbuild" SetupActions.sln /t:Clean /p:Configuration=Debug "%MSBuildToolsPath%msbuild" SetupActions.sln /t:Clean /p:Configuration=release "%MSBuildToolsPath%msbuild" SetupActions.sln /t:Build /p:Configuration=Debug;Platform="Any CPU" "%MSBuildToolsPath%msbuild" SetupActions.sln /t:Build /p:Configuration=release;Platform="Any CPU" cd ..\..\order_processor @if not exist OrderProcessorSolution.sln Goto :Error1 @echo Build order_processor "%MSBuildToolsPath%msbuild" OrderProcessorSolution.sln /t:Clean /p:Configuration=Debug "%MSBuildToolsPath%msbuild" OrderProcessorSolution.sln /t:Clean /p:Configuration=release "%MSBuildToolsPath%msbuild" OrderProcessorSolution.sln /t:Build /p:Configuration=Debug;Platform="Any CPU" "%MSBuildToolsPath%msbuild" OrderProcessorSolution.sln /t:Build /p:Configuration=release;Platform="Any CPU" cd ..\business_service @if not exist BusinessServiceSolution.sln Goto :Error1 @echo Build business_service "%MSBuildToolsPath%msbuild" BusinessServiceSolution.sln /t:Clean /p:Configuration=Debug "%MSBuildToolsPath%msbuild" BusinessServiceSolution.sln /t:Clean /p:Configuration=release "%MSBuildToolsPath%msbuild" BusinessServiceSolution.sln /t:Build /p:Configuration=Debug;Platform="Any CPU" "%MSBuildToolsPath%msbuild" BusinessServiceSolution.sln /t:Build /p:Configuration=release;Platform="Any CPU" cd ..\trader_client @if not exist StockTraderWebAppSolution.sln Goto :Error1 @echo Build trader_client "%MSBuildToolsPath%msbuild" StockTraderWebAppSolution.sln /t:Clean /p:Configuration=Debug "%MSBuildToolsPath%msbuild" StockTraderWebAppSolution.sln /t:Clean /p:Configuration=release "%MSBuildToolsPath%msbuild" StockTraderWebAppSolution.sln /t:Build /p:Configuration=Debug;Platform="Any CPU" "%MSBuildToolsPath%msbuild" StockTraderWebAppSolution.sln /t:Build /p:Configuration=release;Platform="Any CPU" @cd .. @goto :Exit :Error1 @echo Are you missing required solutions/directories? Cannot find the solution files (.sln) @echo This build script expects to build from the [dotnet] dir @echo .\setup_utilities\SetupActions\ @echo ..\..\order_processor @echo ..\business_service @echo ..\trader_client\ @echo These file directories are expected under the directory where this script is running from. @Set ERRORLEVEL=1 @goto Exit :Error2 @echo You are missing msbuild.exe which was expected at %MSBuildToolsPath%. Do you Have .Net3.5 SP1 properly installed? @Set ERRORLEVEL=2 @goto Exit :Exit @echo ERRORLEVEL is %ERRORLEVEL% @echo Done!