-
Notifications
You must be signed in to change notification settings - Fork 8
/
Release.proj.xml
95 lines (87 loc) · 4.12 KB
/
Release.proj.xml
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
<!--
The purpose of the is to demonstrate how we can build different VS
projects and copy the output to a given directory.
(c) Sayed Ibrahim Hashimi www.sedodream.com
-->
<Project DefaultTargets="BuildAll" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets"/>
<PropertyGroup>
<DestFolder>Deploy\</DestFolder>
<Configuration>Release</Configuration>
<DocumentationFile>Gearset.xml</DocumentationFile>
<Version>2.0.1</Version>
</PropertyGroup>
<ItemGroup>
<LicenseManagerProj Include="LicenseManager\LicenseManager.csproj"/>
<GearsetProj Include="Gearset\Windows - Gearset.csproj"/>
<DummyProjects Include="Gearset\Windows Phone - Dummy Gearset.csproj"/>
<DummyProjects Include="Gearset\Xbox 360 - Dummy Gearset.csproj"/>
<Documentation Include="Gearset\bin\x86\Release\$(DocumentationFile)"/>
<Misc Include="Misc/*"/>
</ItemGroup>
<PropertyGroup>
<BuildAllDependsOn>LicenseManagerBuild;GearsetBuild;DummiesBuild;CopyFiles;MakeZip</BuildAllDependsOn>
<SolutionPath>$(MSBuildThisFileDirectory)\GearsetTest.sln</SolutionPath>
</PropertyGroup>
<Target Name="BuildAll" DependsOnTargets="$(BuildAllDependsOn)"/>
<Target Name="LicenseManagerBuild">
<MSBuild Projects ="@(LicenseManagerProj)"
ContinueOnError ="false"
Properties="Configuration=$(Configuration);SolutionPath=$(SolutionPath)">
</MSBuild>
</Target>
<Target Name="GearsetBuild">
<MSBuild Projects ="@(GearsetProj)"
ContinueOnError ="false"
Properties="Configuration=$(Configuration);SolutionPath=$(SolutionPath);DocumentationFile=$(DocumentationFile)">
<Output ItemName="OutputFilesWin" TaskParameter="TargetOutputs"/>
</MSBuild>
</Target>
<Target Name="DummiesBuild">
<MSBuild Projects ="@(DummyProjects)"
ContinueOnError ="false"
Properties="Configuration=$(Configuration);SolutionPath=$(SolutionPath)">
<Output ItemName="OutputFilesDummies" TaskParameter="TargetOutputs"/>
</MSBuild>
</Target>
<Target Name="CopyFiles">
<Copy SourceFiles="@(OutputFilesWin)"
DestinationFiles="@(OutputFilesWin->'$(DestFolder)%(RecursiveDir)%(Filename)%(Extension)')" >
<Output ItemName="CopiedFilesWin" TaskParameter="CopiedFiles"/>
</Copy>
<Copy SourceFiles="@(OutputFilesDummies)"
DestinationFiles="@(OutputFilesDummies->'$(DestFolder)%(RecursiveDir)%(Filename)%(Extension)')" >
<Output ItemName="CopiedFilesDummies" TaskParameter="CopiedFiles"/>
</Copy>
<Copy SourceFiles="@(Documentation)"
DestinationFiles="@(Documentation->'$(DestFolder)%(RecursiveDir)%(Filename)%(Extension)')" >
<Output ItemName="CopiedFilesDoc" TaskParameter="CopiedFiles"/>
</Copy>
<Copy SourceFiles="@(Misc)"
DestinationFiles="@(Misc->'$(DestFolder)%(RecursiveDir)%(Filename)%(Extension)')" >
<Output ItemName="CopiedMisc" TaskParameter="CopiedFiles"/>
</Copy>
</Target>
<Target Name="MakeZip">
<Zip Files="@(CopiedFilesDummies);@(CopiedFilesWin);@(CopiedFilesDoc);@(CopiedMisc)"
WorkingDirectory="$(DestFolder)"
ZipFileName="$(DestFolder)Gearset-$(Version).zip" />
</Target>
<!--
This target can be used to clean all of the projects before you build them.
It will also delete any dll & exe files located in the the Deploy folder. This could be accomplished
much better than this, but this is quick and easy.
-->
<!--<Target Name="CleanAll">
--><!-- Delete any files this process may have created from a previous execution --><!--
<CreateItem Include="$(DestFolder)\**\*exe;$(DestFolder)\**\*dll">
<Output ItemName="GeneratedFiles" TaskParameter="Include"/>
</CreateItem>
<Delete Files="@(GeneratedFiles)"/>
<MSBuild Projects="@(ProjectsToBuild)" Targets="Clean" Properties="Configuration=$(Configuration);"/>
</Target>-->
<!-- Will simply print all of the project files to be built -->
<Target Name="PrintAll">
<Message Text="Project files:%0d%0a@(ProjectsToBuild,'%0d%0a')" Importance="high"/>
</Target>
</Project>