forked from DotNetOpenAuth/DotNetOpenAuth
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdrop.proj
254 lines (242 loc) · 13.3 KB
/
drop.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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), EnlistmentInfo.props))\EnlistmentInfo.props" Condition=" '$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), EnlistmentInfo.props))' != '' " />
<Import Project="$(MSBuildProjectDirectory)\DotNetOpenAuth.automated.props"/>
<Target Name="LayoutDependencies">
<MSBuild Projects="$(ProjectRoot)src\$(ProductName)\$(ProductName).proj"
Properties="TargetFrameworkVersion=v3.5"
Targets="BuildUnifiedProduct"
BuildInParallel="$(BuildInParallel)" />
<MSBuild Projects="$(ProjectRoot)src\$(ProductName)\$(ProductName).proj"
Properties="TargetFrameworkVersion=v4.0"
Targets="BuildUnifiedProduct"
BuildInParallel="$(BuildInParallel)" />
<MSBuild Projects="$(ProjectRoot)src\$(ProductName)\$(ProductName).proj"
Properties="TargetFrameworkVersion=v4.5"
Targets="BuildUnifiedProduct"
BuildInParallel="$(BuildInParallel)" />
<MSBuild Projects="@(DelaySignedProjects)"
Properties="TargetFrameworkVersion=v3.5"
Targets="Sign"
BuildInParallel="$(BuildInParallel)"
Condition=" '%(DelaySignedProjects.Nonshipping)' != 'true' and '%(DelaySignedProjects.TargetFrameworkVersion)' != 'v4.0' " />
<MSBuild Projects="@(DelaySignedProjects)"
Properties="TargetFrameworkVersion=v4.0"
Targets="Sign"
BuildInParallel="$(BuildInParallel)"
Condition=" '%(DelaySignedProjects.Nonshipping)' != 'true' " />
<MSBuild Projects="@(DelaySignedProjects)"
Properties="TargetFrameworkVersion=v4.5"
Targets="Sign"
BuildInParallel="$(BuildInParallel)"
Condition=" '%(DelaySignedProjects.Nonshipping)' != 'true' " />
</Target>
<Target Name="Layout" DependsOnTargets="LayoutDependencies">
<!-- Note that we use an MSBuild task for these dependencies rather than individual DependsOnTargets entries
so that these builds can be executed in parallel. -->
<ItemGroup>
<ProjectsToBuild Include="
$(ProjectRoot)vsix\vsix.proj;
$(ProjectRoot)samples\samples.proj;
">
<Properties>TargetFrameworkVersion=v4.0</Properties>
</ProjectsToBuild>
<!-- Sandcastle doesn't seem to be able to handle .NET 4.0 dependencies right now. -->
<ProjectsToBuild Include="$(ProjectRoot)doc\doc.proj">
<Properties>TargetFrameworkVersion=v3.5</Properties>
</ProjectsToBuild>
</ItemGroup>
<MSBuild Projects="@(ProjectsToBuild)"
Properties="%(ProjectsToBuild.Properties)"
BuildInParallel="$(BuildInParallel)">
<Output TaskParameter="TargetOutputs" ItemName="DropLayoutDependencies"/>
</MSBuild>
<PropertyGroup>
<DropBin35Directory>$(DropDirectory)Bin-net3.5\</DropBin35Directory>
<DropBin40Directory>$(DropDirectory)Bin-net4.0\</DropBin40Directory>
<DropBin45Directory>$(DropDirectory)Bin-net4.5\</DropBin45Directory>
<DropLibDirectory>$(DropDirectory)Lib\</DropLibDirectory>
<DropProjectTemplatesDirectory>$(DropDirectory)Project Templates\</DropProjectTemplatesDirectory>
<DropSamplesDirectory>$(DropDirectory)Samples\</DropSamplesDirectory>
<DropSpecsDirectory>$(DropDirectory)Specs\</DropSpecsDirectory>
</PropertyGroup>
<ItemGroup>
<RedistributableFiles Include="@(DropLayoutDependencies)">
<Package>DotNetOpenAuth project templates</Package>
</RedistributableFiles>
<ExtensionVsix Include="@(DropLayoutDependencies)" Condition=" '%(DropLayoutDependencies.MSBuildSourceProjectFile)' == '$(ProjectRoot)vsix\vsix.proj' " />
<ProjectTemplatesVsi Include="@(DropLayoutDependencies)" Condition=" '%(DropLayoutDependencies.MSBuildSourceProjectFile)' == '$(ProjectRoot)vsi\vsi.proj' " />
<DropDirectories Include="
$(DropDirectory);
$(DropBin35Directory);
$(DropBin40Directory);
$(DropBin45Directory);
$(DropLibDirectory);
$(DropProjectTemplatesDirectory);
$(DropSamplesDirectory);
$(DropSpecsDirectory);
" />
<DropSourceFiles Include="
$(ProjectRoot)Doc\$(ProductName).chm;
$(ProjectRoot)Doc\*.htm*;
$(ProjectRoot)LICENSE.txt;
$(ProjectRoot)CONTRIB.txt;
"
Exclude="$(ProjectRoot)Doc\README.*.html;" />
<DropBin35SourceFiles Include="
$(ILMergeOutputAssembly35Directory)$(SignedSubPath)$(ProductName).dll;
$(ILMergeOutputAssembly35Directory)$(ProductName).pdb;
$(ILMergeOutputAssembly35Directory)$(ProductName).xml;
$(OutputPath35)CodeContracts\$(SignedSubPath)$(ProductName).Contracts.???;
$(ProjectRoot)Doc\README.Bin.html;
$(ProjectRoot)src\$(ProductName).Core\Configuration\$(ProductName).xsd;
" />
<DropBin40SourceFiles Include="
$(ILMergeOutputAssembly40Directory)$(SignedSubPath)$(ProductName).dll;
$(ILMergeOutputAssembly40Directory)$(ProductName).pdb;
$(ILMergeOutputAssembly40Directory)$(ProductName).xml;
$(OutputPath40)CodeContracts\$(SignedSubPath)$(ProductName).Contracts.???;
$(ProjectRoot)Doc\README.Bin.html;
$(ProjectRoot)src\$(ProductName).Core\Configuration\$(ProductName).xsd;
" />
<DropBin45SourceFiles Include="
$(ILMergeOutputAssembly45Directory)$(SignedSubPath)$(ProductName).dll;
$(ILMergeOutputAssembly45Directory)$(ProductName).pdb;
$(ILMergeOutputAssembly45Directory)$(ProductName).xml;
$(OutputPath45)CodeContracts\$(SignedSubPath)$(ProductName).Contracts.???;
$(ProjectRoot)Doc\README.Bin.html;
$(ProjectRoot)src\$(ProductName).Core\Configuration\$(ProductName).xsd;
" />
<DropSatelliteSourceFiles Include="$(OutputPath)**\$(SignedSubPath)$(ProductName).resources.dll" />
<DropSatelliteSourceFiles>
<CultureDir>$([System.IO.Path]::GetDirectoryName('$([System.IO.Path]::GetDirectoryName('%(RecursiveDir)'))'))\</CultureDir>
</DropSatelliteSourceFiles>
<_DropLibSourceFiles Include="$(ProjectRoot)Lib\**\*" />
<DropLibSourceFiles Include="@(_DropLibSourceFiles)" Condition=" '%(FileName)' == 'log4net' or '%(FileName)' == 'System.Net.Http' " />
<DropProjectTemplatesSourceFiles Include="@(ProjectTemplatesVsi)" />
<DropVsixSourceFiles Include="@(ExtensionVsix)" Condition=" '%(ExtensionVsix.IncludeInDrop)' == 'true' " />
<ExcludedDropSamplesSourceFiles Include="
$(ProjectRoot)**\obj\**;
$(ProjectRoot)**\*.sln.cache;
$(ProjectRoot)**\*.suo;
$(ProjectRoot)**\*.user;
$(ProjectRoot)**\*.vs10x;
$(ProjectRoot)**\*.gitignore;
$(ProjectRoot)**\*.ldf;
$(ProjectRoot)**\*.log*;
$(ProjectRoot)**\*~;
$(ProjectRoot)**\Debug\**;
$(ProjectRoot)**\StyleCop.Cache;
$(ProjectRoot)Samples\_ReSharper.*\**;
$(ProjectRoot)Samples\**\bin\**;
$(ProjectRoot)Samples\**\obj\**;
$(ProjectRoot)Samples\**\*.refresh_;
$(ProjectRoot)Samples\*.proj;
" />
<ExcludedDropSamplesSourceFiles Condition=" '$(IncludeOAuth2)' == 'false' " Include="
$(ProjectRoot)Samples\OAuthClient\**;
$(ProjectRoot)Samples\OAuthAuthorizationServer\**;
$(ProjectRoot)Samples\OAuthResourceServer\**;
" />
<DropSamplesSourceFiles Include="$(ProjectRoot)Samples\**" Exclude="@(ExcludedDropSamplesSourceFiles)" />
<DropSamplesSourceFiles Include="$(ProjectRoot)Samples\**\Bin\*.refresh" />
<!-- Some .refresh files are only applicable to drop builds, so we rename them from *.refresh_ -->
<DropSamplesRefreshSourceFiles Include="$(ProjectRoot)Samples\**\*.refresh_" />
<DropSpecsSourceFiles Include="$(ProjectRoot)Doc\specs\*.htm*" />
<DropFiles Include="@(DropSourceFiles->'$(DropDirectory)%(RecursiveDir)%(FileName)%(Extension)')"/>
<DropBin35Files Include="@(DropBin35SourceFiles->'$(DropBin35Directory)%(RecursiveDir)%(FileName)%(Extension)')"/>
<DropBin40Files Include="@(DropBin40SourceFiles->'$(DropBin40Directory)%(RecursiveDir)%(FileName)%(Extension)')"/>
<DropBin45Files Include="@(DropBin45SourceFiles->'$(DropBin45Directory)%(RecursiveDir)%(FileName)%(Extension)')"/>
<DropSatelliteFiles Include="@(DropSatelliteSourceFiles->'$(DropBinDirectory)%(CultureDir)%(FileName)%(Extension)')" />
<DropLibFiles Include="@(DropLibSourceFiles->'$(DropLibDirectory)%(RecursiveDir)%(FileName)%(Extension)')"/>
<DropProjectTemplatesFiles Include="@(DropProjectTemplatesSourceFiles->'$(DropProjectTemplatesDirectory)%(FileName)%(Extension)')" />
<DropVsixFiles Include="@(DropVsixSourceFiles->'$(DropProjectTemplatesDirectory)%(FileName)%(Extension)')" />
<DropSamplesFiles Include="@(DropSamplesSourceFiles->'$(DropSamplesDirectory)%(RecursiveDir)%(FileName)%(Extension)')"/>
<DropSamplesRefreshFiles Include="@(DropSamplesRefreshSourceFiles->'$(DropSamplesDirectory)%(RecursiveDir)%(FileName).refresh')"/>
<DropSamplesToolsProjects Include="$(DropSamplesDirectory)OpenIdOfflineProvider\OpenIdOfflineProvider.csproj" />
<DropSpecsFiles Include="@(DropSpecsSourceFiles->'$(DropSpecsDirectory)%(RecursiveDir)%(FileName)%(Extension)')"/>
<AllDropSources Include="
@(DropSourceFiles);
@(DropBin35SourceFiles);
@(DropBin40SourceFiles);
@(DropBin45SourceFiles);
@(DropSatelliteSourceFiles);
@(DropLibSourceFiles);
@(DropProjectTemplatesSourceFiles);
@(DropVsixSourceFiles);
@(DropSamplesSourceFiles);
@(DropSamplesRefreshSourceFiles);
@(DropDocSourceFiles);
@(DropSpecsSourceFiles);
" />
<AllDropTargets Include="
@(DropFiles);
@(DropBin35Files);
@(DropBin40Files);
@(DropBin45Files);
@(DropSatelliteFiles);
@(DropLibFiles);
@(DropProjectTemplatesFiles);
@(DropVsixFiles);
@(DropSamplesFiles);
@(DropSamplesRefreshFiles);
@(DropDocFiles);
@(DropSpecsFiles)
" />
<DropSamplesFilesFixups Include="@(DropSamplesFiles)" Condition=" '%(Extension)' == '.aspx' ">
<Pattern><%@ Register Assembly="DotNetOpenAuth[^"]+"</Pattern>
<Replacement><%@ Register Assembly="DotNetOpenAuth"</Replacement>
</DropSamplesFilesFixups>
<DropSamplesFilesFixups Include="@(DropSamplesFiles)" Condition=" '%(Extension)' == '.xaml' ">
<Pattern>xmlns\:(.+)assembly=DotNetOpenAuth([^;"]+)</Pattern>
<Replacement>xmlns:$1assembly=DotNetOpenAuth</Replacement>
</DropSamplesFilesFixups>
<DropSamplesFilesFixups Include="@(DropSamplesFiles)" Condition=" '%(Extension)' == '.config' ">
<Pattern>type="DotNetOpenAuth([^,]+), DotNetOpenAuth([^"]+)"</Pattern>
<Replacement>type="DotNetOpenAuth$1, DotNetOpenAuth"</Replacement>
</DropSamplesFilesFixups>
</ItemGroup>
<!-- clean up any previous drop with the same name so we don't aggregate files. -->
<MakeDir Directories="@(DropDirectories)" />
<Copy SourceFiles="@(AllDropSources)" DestinationFiles="@(AllDropTargets)" SkipUnchangedFiles="true" />
<Purge Directories="$(DropDirectory)" IntendedFiles="@(AllDropTargets)" />
<!-- fix up the samples so that they will compile right out of the drop -->
<ItemGroup>
<SampleProjectTargets Include="$(DropSamplesDirectory)**\*.*proj" />
<SampleSolutionTargets Include="$(DropSamplesDirectory)**\*.sln" />
</ItemGroup>
<FixupShippingToolSamples Projects="@(DropSamplesToolsProjects)"
RemoveImportsStartingWith="%24(ProjectRoot)tools\" />
<ChangeProjectReferenceToAssemblyReference Projects="@(SampleProjectTargets)"
ProjectReferences="@(ProjectReferencesToRemove)" References="@(AssemblyReferencesToReplaceWith)" />
<RegexFileReplace
Files="@(DropSamplesFilesFixups)"
Pattern="%(Pattern)"
Replacement="%(Replacement)" />
<DowngradeProjects
Projects="@(SampleProjectTargets);@(SampleSolutionTargets)"
Condition=" '$(DowngradeVS2010ToVS2008)' != 'false' "
/>
<ItemGroup>
<!-- Go snag the newly created files so that .zip file will include them. -->
<AllDropTargets Include="$(DropSamplesDirectory)**\*-vs2008.*" />
</ItemGroup>
</Target>
<Target Name="Build" DependsOnTargets="Layout" Returns="@(RedistributableFiles)">
<ItemGroup>
<DropZip Include="$(DropDirectoryNoSlash).7z" />
<DropZip Include="$(DropDirectoryNoSlash).zip" />
<RedistributableFiles Include="@(DropZip)">
<Package>DotNetOpenAuth</Package>
</RedistributableFiles>
</ItemGroup>
<Delete Files="@(DropZip)" />
<AddFilesTo7Zip
Files="@(AllDropTargets)"
ZipFileName="%(DropZip.Identity)"
WorkingDirectory="$(DropsRoot)"
ToolPath="$(Zip7ToolPath)" />
</Target>
<Import Project="$(ProjectRoot)tools\DotNetOpenAuth.automated.targets"/>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), EnlistmentInfo.targets))\EnlistmentInfo.targets" Condition=" '$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), EnlistmentInfo.targets))' != '' " />
</Project>