-
-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathChorus.proj
96 lines (80 loc) · 6.3 KB
/
Chorus.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
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build;Pack">
<PropertyGroup>
<RootDir Condition="'$(teamcity_build_checkoutDir)' == '' And '$(RootDir)'==''">$(MSBuildProjectDirectory)/..</RootDir>
<RootDir Condition="'$(teamcity_build_checkoutDir)' != ''">$(teamcity_build_checkoutDir)</RootDir>
<Solution>Chorus.sln</Solution>
<SolutionPath>$(RootDir)/$(Solution)</SolutionPath>
<ApplicationName Condition="'$(OS)'=='Windows_NT'">ChorusLibrary</ApplicationName>
<ApplicationName Condition="'$(OS)'!='Windows_NT'">Chorus</ApplicationName>
<ApplicationNameLC>chorus</ApplicationNameLC>
<Configuration Condition="'$(Configuration)'==''">Release</Configuration>
<ExtraExcludeCategories Condition="'$(OS)'!='Windows_NT'">KnownMonoIssue,</ExtraExcludeCategories>
<ExtraExcludeCategories Condition="'$(teamcity_version)' != ''">SkipOnTeamCity,SkipOnBuildServer,SkipOnTeamCityRandomTestFailure,$(ExtraExcludeCategories)</ExtraExcludeCategories>
<useNUnit-x86 Condition="'$(OS)'=='Windows_NT'">true</useNUnit-x86>
<useNUnit-x86 Condition="'$(OS)'!='Windows_NT'">false</useNUnit-x86>
<OutputDir>$(RootDir)/output/$(Configuration)</OutputDir>
<TeamCity Condition="'$(teamcity_version)' != ''">true</TeamCity>
<TeamCity Condition="'$(teamcity_version)' == ''">false</TeamCity>
<RestartBuild Condition="!Exists('$(RootDir)/packages/SIL.BuildTasks/tools/SIL.BuildTasks.dll') Or !Exists('$(RootDir)/packages/NUnit.ConsoleRunner/tools/nunit3-console.exe') Or !Exists('$(RootDir)/packages/BuildDependencyTasks/BuildDependencyTasks.dll')">true</RestartBuild>
<RestartBuild Condition="Exists('$(RootDir)/packages/SIL.BuildTasks/tools/SIL.BuildTasks.dll') And Exists('$(RootDir)/packages/NUnit.ConsoleRunner/tools/nunit3-console.exe') And Exists('$(RootDir)/packages/BuildDependencyTasks/BuildDependencyTasks.dll')">false</RestartBuild>
</PropertyGroup>
<Import Project="NuGet.targets"/>
<Target Name="RestoreBuildTasks" DependsOnTargets="CheckPrerequisites">
<Message Text="RestartBuild=$(RestartBuild)" />
<Exec Command='$(NuGetCommand) install NUnit.Console -excludeVersion -version 3.11.1 -solutionDirectory "$(RootDir)"' />
<Exec Command='$(NuGetCommand) install SIL.BuildTasks -excludeVersion -version 2.3.2 -solutionDirectory "$(RootDir)"' />
<Exec Command='$(NuGetCommand) install BuildDependencyTasks -excludeVersion -version 0.4.3 -solutionDirectory "$(RootDir)"' />
</Target>
<UsingTask TaskName="MakeWixForDirTree" AssemblyFile="$(RootDir)/packages/SIL.BuildTasks/tools/SIL.BuildTasks.dll"
Condition="'$(OS)'=='Windows_NT' And Exists('$(RootDir)/packages/SIL.BuildTasks/tools/SIL.BuildTasks.dll')"/>
<UsingTask TaskName="Archive" AssemblyFile="$(RootDir)/packages/SIL.BuildTasks/tools/SIL.BuildTasks.dll"
Condition="'$(OS)'!='Windows_NT' And Exists('$(RootDir)/packages/SIL.BuildTasks/tools/SIL.BuildTasks.dll')"/>
<UsingTask TaskName="FileUpdate" AssemblyFile="$(RootDir)/packages/SIL.BuildTasks/tools/SIL.BuildTasks.dll" Condition="Exists('$(RootDir)/packages/SIL.BuildTasks/tools/SIL.BuildTasks.dll')"/>
<UsingTask TaskName="NUnit3" AssemblyFile="$(RootDir)/packages/SIL.BuildTasks/tools/SIL.BuildTasks.dll" Condition="Exists('$(RootDir)/packages/SIL.BuildTasks/tools/SIL.BuildTasks.dll')"/>
<UsingTask TaskName="Dependencies" AssemblyFile="$(SolutionDir)/packages/BuildDependencyTasks/BuildDependencyTasks.dll" Condition="Exists('$(RootDir)/packages/BuildDependencyTasks/BuildDependencyTasks.dll')"/>
<!-- Windows installer stuff -->
<Target Name="Installer" DependsOnTargets="CleanInstaller; Build" Condition="'$(OS)'=='Windows_NT'">
<!-- set the version number in the installer configuration program. Perhaps there's a way to just send in the variables rather than this brute-force
changing of the script, but I haven't figured that out. -->
<FileUpdate File="$(RootDir)\src\Installer\ChorusMergeModule.wxs" Regex='Property_ProductVersion = ".*"'
ReplacementText ="Property_ProductVersion = "$(GitVersion_AssemblySemFileVer)"" />
<Message Text="Making Chorus Merge Module Version: $(GitVersion_AssemblySemFileVer)" Importance="high" />
<MSBuild Projects="$(RootDir)\src\Installer\ChorusMergeModule.wixproj"/>
</Target>
<Target Name="ChorusHubInstaller" DependsOnTargets="CleanInstaller;Build" Condition="'$(OS)'=='Windows_NT'">
<!-- set the version number in the installer configuration program. Perhaps there's a way to just send in the variables rather than this brute-force
changing of the script, but I haven't figured that out. -->
<FileUpdate File="$(RootDir)\src\Installer\ChorusHub.wxs" Regex='Property_ProductVersion = ".*"'
ReplacementText="Property_ProductVersion = "$(GitVersion_AssemblySemFileVer)"" />
<FileUpdate File="$(RootDir)\src\Installer\resources\License.rtf" RegEx='COPYRIGHTYEARPLACEHOLDER'
ReplacementText="$([System.DateTime]::Now.ToString(yyyy))" />
<Message Text="Making Chorus Hub installer with version: $(GitVersion_AssemblySemFileVer)" Importance="high" />
<MSBuild Projects="$(RootDir)\src\Installer\ChorusHub.wixproj"/>
</Target>
<Target Name="SignChorusHub" DependsOnTargets="ChorusHubInstaller">
<Message Text="Attempting to sign ChorusHubInstaller.msi" Importance="high" />
<Exec Command='sign "$(RootDir)\output\Release\ChorusHubInstaller.msi" ' />
</Target>
<Target Name="MakeWixForDistFiles" DependsOnTargets="Compile" Condition="'$(OS)'=='Windows_NT'">
<!-- NB: The Exclude argument doesn't seem to be working so you may need to hand edit the GeneratedMercurial.wxs -->
<MakeWixForDirTree
DirectoryReferenceId="mercurial"
ComponentGroupId="Mercurial"
RootDirectory="$(RootDir)\mercurial"
OutputFilePath="$(RootDir)\src\Installer\GeneratedMercurial.wxs"
IgnoreRegExPattern="IGNOREME|\.gitignore"
Exclude="$(RootDir)\mercurial\mercurial.ini;$(RootDir)\mercurial\default.d\cacerts.rc"
MatchRegExPattern=".*">
<Output TaskParameter="OutputFilePath" ItemName="Compile" />
</MakeWixForDirTree>
<MakeWixForDirTree
DirectoryReferenceId="MercurialExtensions"
ComponentGroupId="MercurialExtensions"
RootDirectory="$(RootDir)\MercurialExtensions"
OutputFilePath="$(RootDir)\src\Installer\GeneratedMercurialExtensions.wxs"
IgnoreRegExPattern="IGNOREME|\.gitignore"
MatchRegExPattern=".*">
<Output TaskParameter="OutputFilePath" ItemName="Compile" />
</MakeWixForDirTree>
</Target>
</Project>