-
Notifications
You must be signed in to change notification settings - Fork 9
/
make.msbuild
executable file
·85 lines (71 loc) · 4.58 KB
/
make.msbuild
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="All" ToolsVersion="14.0">
<PropertyGroup>
<MATLAB_PATH Condition="'$(MATLAB_PATH)'==''">C:\Program Files\MATLAB\R2011b</MATLAB_PATH>
</PropertyGroup>
<Import Project="externals\common-scripts\common.msbuild"/>
<Import Project="META.props"/>
<Target Name="CheckEnv" DependsOnTargets="CheckEnvGme;CheckEnvUdm">
<Error Text="DESERT_PATH='$(DESERT_PATH)' doesn't exist" Condition="!Exists('$(DESERT_PATH)')"/>
<Error Text="META_PATH='$(META_PATH)' doesn't exist" Condition="!Exists('$(META_PATH)')"/>
<Exec Command="where cl.exe" IgnoreExitCode="true" IgnoreStandardErrorWarningFormat="true" StandardOutputImportance="low" StandardErrorImportance="low">
<Output TaskParameter="ExitCode" PropertyName="Meta_ClInPath" />
</Exec>
<Exec Command="cl.exe 2>&1 | findstr /R /C:"Optimizing Compiler .* for x86"" IgnoreExitCode="true" IgnoreStandardErrorWarningFormat="true" StandardOutputImportance="low" StandardErrorImportance="low">
<Output TaskParameter="ExitCode" PropertyName="Meta_ClIsX86" />
</Exec>
<Error Text="Use "x86 Native Tools Command Prompt" not "VS2015 x64 Native Tools Command Prompt" nor "VS2015 x86 x64 Cross Tools Command Prompt"" Condition="$(Meta_ClInPath) == '0' AND $(Meta_ClIsX86) != '0'"/>
</Target>
<Target Name="Desert" DependsOnTargets="CheckEnv">
<PropertyGroup>
<DesertPlatform Condition="'$(Platform)'=='x64'">x64</DesertPlatform>
</PropertyGroup>
<PropertyGroup>
<DesertPlatform Condition="'$(Platform)'!='x64'">Win32</DesertPlatform>
</PropertyGroup>
<MSBuild Projects="externals/desert/desertVS2010.sln" Properties="Configuration=$(Configuration)Unicode;Platform=$(DesertPlatform)" Targets="desert"/>
</Target>
<Target Name="CyPhyML" DependsOnTargets="CheckEnv;Desert">
<Exec Command=".nuget\NuGet.exe restore CyPhyML.sln" WorkingDirectory="src" />
<ItemGroup>
<CyPhyMLIcons Include="$(MSBuildThisFileDirectory)meta\CyPhyML\icons\*"/>
</ItemGroup>
<Copy SourceFiles="@(CyPhyMLIcons)" DestinationFolder="$(MSBuildThisFileDirectory)generated\CyPhyML\models\icons" SkipUnchangedFiles="true" UseHardlinksIfPossible="true"/>
<PropertyGroup>
<CyPhyMLPlatform Condition="'$(Platform)'=='x64'">x64</CyPhyMLPlatform>
</PropertyGroup>
<PropertyGroup>
<CyPhyMLPlatform Condition="'$(Platform)'!='x64'">Mixed Platforms</CyPhyMLPlatform>
</PropertyGroup>
<MSBuild Projects="src/CyPhyML.sln" Properties="Configuration=$(Configuration);Platform=$(CyPhyMLPlatform);DESERT_PATH=$(DESERT_PATH);META_PATH=$(META_PATH)" Targets="Build"/>
</Target>
<Target Name="MetaLink">
<Error Text="JAVA_HOME='$(JAVA_HOME)' doesn't exist" Condition="!Exists('$(JAVA_HOME)')"/>
<Exec Command="set PATH=$(MSBuildThisFileDirectory)\3rdParty\apache-maven-3.0.5\bin;%PATH%
set M2=
set M2_HOME=
mvn --batch-mode install
" WorkingDirectory="$(MSBuildThisFileDirectory)\src\MetaLink"
CustomErrorRegularExpression="\[ERROR\]"/>
</Target>
<Target Name="Install_PythonLibs" DependsOnTargets="">
<!-- make sure pip works -->
<Exec Command="bin\Python27\Scripts\python.exe -m pip --disable-pip-version-check freeze >NUL" IgnoreExitCode="false" WorkingDirectory="$(MSBuildThisFileDirectory)"/>
</Target>
<Target Name="DownloadNuGetPackages">
<Exec Command="..\bin\Python27\Scripts\python.exe -c "import build_msi; build_msi.get_nuget_packages()"" WorkingDirectory="$(MSBuildThisFileDirectory)\deploy"
CustomErrorRegularExpression="is not found in the following primary source"
/>
</Target>
<Target Name="GenerateDocumentation">
<Exec Command="make.bat html" WorkingDirectory="$(MSBuildThisFileDirectory)\docs"/>
</Target>
<Target Name="All" DependsOnTargets="Install_PythonLibs;MetaLink;CyPhyML;DownloadNuGetPackages;GenerateDocumentation">
<MSBuild Projects="src/Run_PRISMATIC_toolchain/Run_Prismatic_toolchain.sln" Properties="Platform=Any CPU;Configuration=$(Configuration);META_PATH=$(META_PATH)" Targets="Build"/>
</Target>
<Target Name="source_code_analysis">
<Exec Command="..\bin\Python27\Scripts\python.exe source_code_analysis.py" WorkingDirectory="source_code_analysis" Condition="'$(Platform)' != 'x64'"/>
</Target>
<Target Name="Installer" DependsOnTargets="All">
<Exec Command="..\bin\Python27\Scripts\python.exe build_msi.py" WorkingDirectory="deploy" Condition="'$(Platform)' != 'x64'"/>
</Target>
</Project>