forked from mono/linux-packaging-fsharp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.bat
60 lines (40 loc) · 3.75 KB
/
build.bat
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
@echo off
:: Check prerequisites
set _msbuildexe="%ProgramFiles(x86)%\MSBuild\14.0\Bin\MSBuild.exe"
if not exist %_msbuildexe% set _msbuildexe="%ProgramFiles%\MSBuild\14.0\Bin\MSBuild.exe"
if not exist %_msbuildexe% set _msbuildexe="%ProgramFiles(x86)%\MSBuild\12.0\Bin\MSBuild.exe"
if not exist %_msbuildexe% set _msbuildexe="%ProgramFiles%\MSBuild\12.0\Bin\MSBuild.exe"
if not exist %_msbuildexe% echo Error: Could not find MSBuild.exe. Please see http://www.microsoft.com/en-us/download/details.aspx?id=40760. && goto :eof
set msbuildflags=/maxcpucount
set _ngenexe="%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\ngen.exe"
if not exist %_ngenexe% echo Note: Could not find ngen.exe.
::Build
%_ngenexe% install .\.nuget\NuGet.exe
.\.nuget\NuGet.exe restore packages.config -PackagesDirectory packages -ConfigFile .nuget\nuget.config
@if ERRORLEVEL 1 echo Error: Nuget restore failed && goto :failure
%_ngenexe% install packages\FSharp.Compiler.Tools.4.0.1.3\tools\fsc.exe
%_msbuildexe% src\fsharp-proto-build.proj
@if ERRORLEVEL 1 echo Error: "%_msbuildexe% src\fsharp-proto-build.proj" failed && goto :failure
%_ngenexe% install lib\proto\fsc-proto.exe
%_msbuildexe% %msbuildflags% src\fsharp-library-build.proj /p:TargetFramework=net40 /p:Configuration=Release
@if ERRORLEVEL 1 echo Error: "%_msbuildexe% %msbuildflags% src\fsharp-library-build.proj /p:TargetFramework=net40 /p:Configuration=Release" failed && goto :failure
%_msbuildexe% %msbuildflags% src\fsharp-library-unittests-build.proj /p:TargetFramework=net40 /p:Configuration=Release
@if ERRORLEVEL 1 echo Error: "%_msbuildexe% %msbuildflags% src\fsharp-library-unittests-build.proj /p:TargetFramework=net40 /p:Configuration=Release" failed && goto :failure
%_msbuildexe% %msbuildflags% src\fsharp-compiler-build.proj /p:TargetFramework=net40 /p:Configuration=Release
@if ERRORLEVEL 1 echo Error: "%_msbuildexe% %msbuildflags% src\fsharp-compiler-build.proj /p:TargetFramework=net40 /p:Configuration=Release" failed && goto :failure
%_msbuildexe% %msbuildflags% src\fsharp-compiler-unittests-build.proj /p:TargetFramework=net40 /p:Configuration=Release
@if ERRORLEVEL 1 echo Error: "%_msbuildexe% %msbuildflags% src\fsharp-compiler-unittests-build.proj /p:TargetFramework=net40 /p:Configuration=Release" failed && goto :failure
%_msbuildexe% %msbuildflags% src\fsharp-library-build.proj /p:TargetFramework=portable47 /p:Configuration=Release
@if ERRORLEVEL 1 echo Error: "%_msbuildexe% %msbuildflags% src\fsharp-library-build.proj /p:TargetFramework=portable47 /p:Configuration=Release" failed && goto :failure
%_msbuildexe% %msbuildflags% src\fsharp-library-build.proj /p:TargetFramework=portable7 /p:Configuration=Release
@if ERRORLEVEL 1 echo Error: "%_msbuildexe% %msbuildflags% src\fsharp-library-build.proj /p:TargetFramework=portable7 /p:Configuration=Release" failed && goto :failure
%_msbuildexe% %msbuildflags% src\fsharp-library-build.proj /p:TargetFramework=portable78 /p:Configuration=Release
@if ERRORLEVEL 1 echo Error: "%_msbuildexe% %msbuildflags% src\fsharp-library-build.proj /p:TargetFramework=portable78 /p:Configuration=Release" failed && goto :failure
%_msbuildexe% %msbuildflags% src\fsharp-library-build.proj /p:TargetFramework=portable259 /p:Configuration=Release
@if ERRORLEVEL 1 echo Error: "%_msbuildexe% %msbuildflags% src\fsharp-library-build.proj /p:TargetFramework=portable259 /p:Configuration=Release" failed && goto :failure
%_msbuildexe% %msbuildflags% src\fsharp-library-build.proj /p:TargetFramework=monotouch /p:Configuration=Release /p:KeyFile=..\..\..\mono.snk
@if ERRORLEVEL 1 echo Error: "%_msbuildexe% %msbuildflags% src\fsharp-library-build.proj /p:TargetFramework=monotouch /p:Configuration=Release /p:KeyFile=..\..\..\mono.snk" failed && goto :failure
@echo "Finished"
goto :eof
:failure
exit /b 1