forked from Waffle/waffle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Waffle.proj
86 lines (86 loc) · 4.91 KB
/
Waffle.proj
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
86
<Project DefaultTargets="all" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" >
<Import Project="$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets"/>
<Import Project="Version.proj"/>
<PropertyGroup Condition="'$(Configuration)'==''">
<Configuration>Release</Configuration>
</PropertyGroup>
<PropertyGroup>
<ReleaseDir>target\$(Configuration)\Waffle</ReleaseDir>
<MSBuild_4_0_ExeFilePath>%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\msbuild.exe</MSBuild_4_0_ExeFilePath>
</PropertyGroup>
<Target Name="configurations">
<CreateItem Include="$(Configuration)">
<Output TaskParameter="Include" ItemName="Configuration" />
</CreateItem>
</Target>
<PropertyGroup>
<ProductName>WAFFLE</ProductName>
<CompanyName>Application Security Inc.</CompanyName>
<Copyright>Copyright (c) Application Security Inc. & Contributors</Copyright>
<Trademark>All Rights Reserved</Trademark>
<MajorVersion>1</MajorVersion>
<MinorVersion>7</MinorVersion>
</PropertyGroup>
<Target Name="all" DependsOnTargets="configurations" Inputs="@(Configuration)" Outputs="target\%(Configuration.FileName)">
<CallTarget Targets="clean" />
<CallTarget Targets="version" />
<CallTarget Targets="build" />
<CallTarget Targets="test" />
<CallTarget Targets="drop" />
<CallTarget Targets="jar" Condition="'%(Configuration.Identity)'=='Release'" />
<CallTarget Targets="zip" />
</Target>
<Target Name="clean" DependsOnTargets="configurations" Inputs="@(Configuration)" Outputs="target\%(Configuration.FileName)">
<Message Importance="high" Text="Cleaning project, %(Configuration.Identity) ..." />
<DeleteTree Directories="target" Recursive="true" />
<DeleteTree Directories="Source\**\bin" Recursive="true" />
<DeleteTree Directories="Source\**\obj" Recursive="true" />
<DeleteTree Directories="Source\**\target" Recursive="true" />
<MSBuild Projects="Waffle.sln" Targets="Clean" Properties="Configuration=%(Configuration.Identity)" />
<!-- This directory is getting recreated from MSBuild above, Delete it again -->
<DeleteTree Directories="Source\**\obj" Recursive="true" />
<Delete Files="Source\Common\GlobalAssemblyInfo.cs" />
<Delete Files="Source\Version\Version.properties" />
<Delete Files="Source\Version\Version.wxi" />
</Target>
<Target Name="build" DependsOnTargets="version;configurations" Inputs="@(Configuration)" Outputs="target\%(Configuration.FileName)">
<Message Importance="high" Text="Compiling and linking project, %(Configuration.Identity) ..." />
<MSBuild Projects="Waffle.sln" Targets="Build" Properties="Configuration=%(Configuration.Identity)" />
</Target>
<Target Name="test" DependsOnTargets="configurations" Inputs="@(Configuration)" Outputs="target\%(Configuration.FileName)">
<Message Importance="high" Text="Running tests, %(Configuration.Identity) ..." />
<CreateItem Include="Source\**\bin\%(Configuration.Identity)\Waffle.*UnitTests.dll">
<Output TaskParameter="Include" ItemName="UnitTestAssemblies"/>
</CreateItem>
<Message Text="@(UnitTestAssemblies)" />
<NUnit Assemblies="@(UnitTestAssemblies)" ToolPath="$(NUnitBinDir)" Force32Bit="true" />
</Target>
<Target Name="drop" DependsOnTargets="version;configurations" Inputs="@(Configuration)" Outputs="target\%(Configuration.FileName)">
<CreateItem Include="Source\**\%(Configuration.Identity)/Waffle.*.dll" Exclude="Source\**\%(Configuration.Identity)/Waffle.*UnitTests.dll">
<Output TaskParameter="Include" ItemName="BinaryFiles" />
</CreateItem>
<CreateItem Include="Source\**\%(Configuration.Identity)/Waffle.*.msm">
<Output TaskParameter="Include" ItemName="BinaryFiles" />
</CreateItem>
<Copy SourceFiles="@(BinaryFiles)" DestinationFolder="$(ReleaseDir)\Bin" />
<CreateItem Include="Source\**\*.vbs">
<Output TaskParameter="Include" ItemName="SampleFiles" />
</CreateItem>
<Copy SourceFiles="@(SampleFiles)" DestinationFolder="$(ReleaseDir)\Samples" />
</Target>
<Target Name="jar" DependsOnTargets="version">
<Exec WorkingDirectory="Source\ThirdParty" Command="maven-install.cmd" />
<Exec WorkingDirectory="Source\JNA" Command="mvn clean install" />
<CreateItem Include="Source\JNA\waffle-distro\target\waffle-distro\**\*.*">
<Output TaskParameter="Include" ItemName="JnaFiles"/>
</CreateItem>
<Copy SourceFiles="@(JnaFiles)" DestinationFolder="$(ReleaseDir)\%(RecursiveDir)" />
</Target>
<Target Name="zip" DependsOnTargets="version">
<CreateItem Include="target\$(Configuration)\**\*" Exclude="target\$(Configuration)\*.zip">
<Output TaskParameter="Include" ItemName="PackageFiles" />
</CreateItem>
<Zip WorkingDirectory="target\$(Configuration)" ZipFileName="target\$(Configuration)\Waffle.$(Major).$(Minor).zip" Files="@(PackageFiles)" />
<Message Text="Version: $(Major).$(Minor).$(Build).$(Revision)"/>
</Target>
</Project>