Refactoring build scripts

This commit is contained in:
qt1 2014-10-30 12:57:01 -07:00 committed by Sebastien Ros
parent e1bb92e709
commit 8c969850f0
3 changed files with 26 additions and 62 deletions

View File

@ -1,35 +1,29 @@
FOR %%b in (
"%VS120COMNTOOLS%..\..\VC\vcvarsall.bat"
"%ProgramFiles(x86)%\Microsoft Visual Studio 12.0\VC\vcvarsall.bat"
"%ProgramFiles%\Microsoft Visual Studio 12.0\VC\vcvarsall.bat"
if exist "%ProgramFiles%\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" goto initialize2k8on64Dev12
if exist "%ProgramFiles(x86)%\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" goto initialize2k8Dev12
if exist "%ProgramFiles%\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" goto initialize2k8on64Dev11
if exist "%ProgramFiles(x86)%\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" goto initialize2k8Dev11
"%VS110COMNTOOLS%..\..\VC\vcvarsall.bat"
"%ProgramFiles(x86)%\Microsoft Visual Studio 11.0\VC\vcvarsall.bat"
"%ProgramFiles%\Microsoft Visual Studio 11.0\VC\vcvarsall.bat"
) do (
if exist %%b (
call %%b x86
goto build
)
)
echo "Unable to detect suitable environment. Build may not succeed."
goto build
:initialize2k8Dev12
call "%ProgramFiles(x86)%\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86
goto build
:initialize2k8on64Dev12
call "%ProgramFiles%\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86
goto build
:initialize2k8Dev11
call "%ProgramFiles(x86)%\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" x86
goto build
:initialize2k8on64Dev11
call "%ProgramFiles%\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" x86
goto build
:build
if "%~1"=="" msbuild /t:Build Orchard.proj
msbuild /t:%~1 Orchard.proj
SET target=%1
SET project=%2
IF "%target%" == "" SET target=Build
IF "%project%" =="" SET project=Orchard.proj
msbuild /t:%target% %project%
pause
goto end
:end

View File

@ -1,35 +1,6 @@
SET target=%1
if exist "%ProgramFiles%\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" goto initialize2k8on64Dev12
if exist "%ProgramFiles(x86)%\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" goto initialize2k8Dev12
if exist "%ProgramFiles%\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" goto initialize2k8on64Dev11
if exist "%ProgramFiles(x86)%\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" goto initialize2k8Dev11
IF "%target%"=="" SET target=Build
echo "Unable to detect suitable environment. Build may not succeed."
goto build
ClickToBuild %target% AzurePackage.proj
:initialize2k8Dev12
call "%ProgramFiles(x86)%\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86
goto build
:initialize2k8on64Dev12
call "%ProgramFiles%\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86
goto build
:initialize2k8Dev11
call "%ProgramFiles(x86)%\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" x86
goto build
:initialize2k8on64Dev11
call "%ProgramFiles%\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" x86
goto build
:build
if "%~1"=="" msbuild /t:Build AzurePackage.proj
msbuild /t:%~1 AzurePackage.proj
pause
goto end
:end

View File

@ -1,2 +1 @@
if "%~1"=="" call clicktobuild
call clicktobuild %~1
clicktobuild %*