mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-04-05 20:09:09 +08:00
Refactoring build scripts
This commit is contained in:
parent
e1bb92e709
commit
8c969850f0
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user