forked from OrchardCMS/Orchard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ClickToBuild.cmd
35 lines (25 loc) · 953 Bytes
/
ClickToBuild.cmd
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
FOR %%b in (
"%VS140COMNTOOLS%..\..\VC\vcvarsall.bat"
"%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"
"%ProgramFiles%\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"
"%VS120COMNTOOLS%..\..\VC\vcvarsall.bat"
"%ProgramFiles(x86)%\Microsoft Visual Studio 12.0\VC\vcvarsall.bat"
"%ProgramFiles%\Microsoft Visual Studio 12.0\VC\vcvarsall.bat"
"%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."
:build
SET target=%1
SET project=%2
IF "%target%" == "" SET target=Build
IF "%project%" =="" SET project=Orchard.proj
lib\nuget\nuget.exe restore .\src\Orchard.sln
msbuild /t:%target% %project%
pause