forked from Waffle/waffle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Waffle.proj
113 lines (113 loc) · 7.88 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
<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>5</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="doc" />
<CallTarget Targets="drop" />
<CallTarget Targets="javainterface" Condition="'%(Configuration.Identity)'=='Release'" />
<CallTarget Targets="jar" Condition="'%(Configuration.Identity)'=='Release'" />
<CallTarget Targets="javademo" 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\**\obj;Source\Jar" Recursive="true" />
<MSBuild Projects="Waffle.sln" Targets="Clean" Properties="Configuration=%(Configuration.Identity)" />
<Delete Files="Source\Version\GlobalAssemblyInfo.cs" />
<Delete Files="Waffle.$(Major).$(Minor).zip" />
</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="doc" DependsOnTargets="version;configurations" Inputs="@(Configuration)" Outputs="target\%(Configuration.FileName)">
<Error Condition="'$(DXROOT)'==''" Text="Missing Sandcastle, DXROOT environment variable not set, install from http://www.codeplex.com/Sandcastle" />
<Error Condition="'$(SHFBROOT)'==''" Text="Missing Sandcastle Builder, SHFBROOT environment variable not set, install from http://www.codeplex.com/SHFB" />
<Delete Files="Documentation\%(Configuration.Identity)\Waffle.chm" />
<Exec Command="$(MSBuild_4_0_ExeFilePath) Documentation\Waffle.shfbproj /p:Configuration=%(Configuration.Identity)" />
<Error Condition="Exists('Documentation\%(Configuration.Identity)\LastBuild.log')" Text="Documentation build failed, check Documentation\%(Configuration.Identity)\LastBuild.log" />
</Target>
<Target Name="drop" DependsOnTargets="version;configurations" Inputs="@(Configuration)" Outputs="target\%(Configuration.FileName)">
<Copy SourceFiles="CHANGELOG.md" DestinationFiles="$(ReleaseDir)\CHANGELOG.md" />
<Copy SourceFiles="LICENSE" DestinationFiles="$(ReleaseDir)\LICENSE" />
<Copy SourceFiles="Documentation\%(Configuration.Identity)\Waffle.chm" DestinationFolder="$(ReleaseDir)" />
<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">
<Exec WorkingDirectory="Source\JNAWindowsAuthProvider" Command="ant" />
<Copy SourceFiles="Source\JNAWindowsAuthProvider\build\waffle-jna.jar" DestinationFolder="$(ReleaseDir)\Bin" />
<Copy SourceFiles="Source\JNAWindowsAuthProvider\build\waffle-src.zip" DestinationFolder="$(ReleaseDir)\Bin" />
<Copy SourceFiles="Source\ThirdParty\commons-logging\commons-logging-1.1.1.jar" DestinationFolder="$(ReleaseDir)\Bin" />
<Copy SourceFiles="Source\ThirdParty\jna\jna.jar" DestinationFolder="$(ReleaseDir)\Bin" />
<Copy SourceFiles="Source\ThirdParty\jna\platform.jar" DestinationFolder="$(ReleaseDir)\Bin" />
<Copy SourceFiles="Source\ThirdParty\guava\guava-r07.jar" DestinationFolder="$(ReleaseDir)\Bin" />
</Target>
<Target Name="javainterface">
<Exec WorkingDirectory="Source\WindowsAuthProvider\bin\Release" Command="regasm.exe /codebase /tlb:Waffle.Windows.AuthProvider.tlb Waffle.Windows.AuthProvider.dll" />
<Exec WorkingDirectory="Source\WindowsAuthProvider\bin\Release" Command="regasm.exe /codebase /regfile:Waffle.Windows.AuthProvider.reg Waffle.Windows.AuthProvider.dll" />
<Exec WorkingDirectory="Tools\JacobGen" Command="jacobgen.bat -destdir:"$(MSBuildProjectDirectory)\Source\Jar" -package:com.waffle.auth "$(MSBuildProjectDirectory)/Source/WindowsAuthProvider/bin/Release/Waffle.Windows.AuthProvider.tlb"" />
<Exec WorkingDirectory="Source\Jar" Command=""$(JAVA_HOME)\bin\javac.exe" com\waffle\auth\*.java -cp ..\..\Tools\Jacob\jacob.jar" />
<Exec WorkingDirectory="Source\Jar" Command=""$(JAVA_HOME)\bin\jar.exe" cvf "$(MSBuildProjectDirectory)\$(ReleaseDir)\Bin\waffle-jacob.jar" com\waffle\auth\*.class" />
</Target>
<ItemGroup>
<DemoFiles Include="Source\JNAWindowsAuthProvider\demo\**\*.jsp" />
<DemoFiles Include="Source\JNAWindowsAuthProvider\demo\**\*.xml" />
<DemoFiles Include="Source\JNAWindowsAuthProvider\demo\**\*.html" />
<DemoFiles Include="Source\JNAWindowsAuthProvider\demo\**\*.properties" />
<DemoFiles Include="Source\JNAWindowsAuthProvider\demo\**\*.policy" />
<DemoFiles Include="Source\JNAWindowsAuthProvider\demo\**\*.conf" />
</ItemGroup>
<Target Name="javademo">
<Copy SourceFiles="@(DemoFiles)" DestinationFolder="$(ReleaseDir)\Samples\%(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>