|
1 | 1 | <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
2 | 2 | <PropertyGroup> |
3 | | - <RootDir Condition="'$(teamcity_version)' == ''">$(MSBuildProjectDirectory)\..</RootDir> |
4 | | - <RootDir Condition="'$(teamcity_version)' != ''">$(teamcity_build_checkoutDir)</RootDir> |
5 | | - <BUILD_NUMBER Condition="'$(BUILD_NUMBER)'==''">3.7.100</BUILD_NUMBER> |
| 3 | + <RootDir>$(MSBuildProjectDirectory)\..</RootDir> |
| 4 | + <RootDir Condition="'$(GITHUB_WORKSPACE)' != ''">$(GITHUB_WORKSPACE)</RootDir> |
6 | 5 | <BuildTasksDll Condition="Exists('$(RootDir)/packages/SIL.BuildTasks.3.1.1/tools/SIL.BuildTasks.dll')">$(RootDir)/packages/SIL.BuildTasks.3.1.1/tools/SIL.BuildTasks.dll</BuildTasksDll> |
7 | 6 | <BuildTasksDll Condition="!Exists('$(RootDir)/packages/SIL.BuildTasks.3.1.1/tools/SIL.BuildTasks.dll')">$(RootDir)/packages/SIL.BuildTasks/tools/SIL.BuildTasks.dll</BuildTasksDll> |
8 | 7 | <SILReleaseTasksProps>$(RootDir)/packages/SIL.ReleaseTasks.3.1.1/build/SIL.ReleaseTasks.props</SILReleaseTasksProps> |
|
20 | 19 | <Exec Command='$(NuGetCommand) install SIL.BuildTasks -excludeVersion -PreRelease -source "$(PackageSources)" -solutionDirectory "$(SolutionDir)."' /> |
21 | 20 | <Exec Command='$(NuGetCommand) install SIL.ReleaseTasks -excludeVersion -PreRelease -source "$(PackageSources)" -solutionDirectory "$(SolutionDir)"' /> |
22 | 21 | <Exec Command='$(NuGetCommand) install SIL.libpalaso.l10ns -excludeVersion -PreRelease -source "$(PackageSources)" -solutionDirectory "$(SolutionDir)."' /> |
23 | | - <Exec Command='$(NuGetCommand) install NUnit.Extension.TeamCityEventListener -excludeVersion -source "$(PackageSources)" -solutionDirectory "$(SolutionDir)."' /> |
24 | 22 | <MSBuild Projects="$(MSBuildProjectFullPath)" Targets="BuildInternal" |
25 | 23 | Properties="Configuration=$(Configuration)" Condition="$(RestartBuild)" /> |
26 | 24 | </Target> |
|
33 | 31 | <UsingTask TaskName="NUnit3" AssemblyFile="$(BuildTasksDll)" Condition="Exists('$(BuildTasksDll)')" /> |
34 | 32 |
|
35 | 33 | <Target Name="VersionNumbers"> |
36 | | - <Message Text="BUILD_NUMBER: $(BUILD_NUMBER)" Importance="high"/> |
| 34 | + <PropertyGroup> |
| 35 | + <!-- The Version should be set from the outside, if not, set a meaningless default value --> |
| 36 | + <Version Condition="'$(Version)' == ''">1.0.0.0</Version> |
| 37 | + </PropertyGroup> |
37 | 38 |
|
38 | | - <Split Input="$(BUILD_NUMBER)" Delimiter="." OutputSubString="2"> |
39 | | - <Output TaskParameter="ReturnValue" PropertyName="BuildCounter" /> |
40 | | - </Split> |
41 | | - |
42 | | - <Message Text="BuildCounter: $(BuildCounter)" Importance="high"/> |
43 | | - |
44 | | - <!-- Note, after some thought, we've decided this is the best place to keep the version number (not on TeamCity, not in the assemblies). --> |
45 | | - <CreateProperty Value="3.7.$(BuildCounter)"> |
46 | | - <Output PropertyName="Version" TaskParameter="Value"/> |
47 | | - </CreateProperty> |
48 | | - |
49 | | - <Message Text="Version: $(Version)" Importance="high"/> |
| 39 | + <Message Text="Version: $(Version)" Importance="high"/> |
50 | 40 | </Target> |
51 | 41 |
|
52 | 42 | <Import Project="$(SILReleaseTasksProps)" Condition="Exists('$(SILReleaseTasksProps)')" /> |
|
84 | 74 | <ItemGroup> |
85 | 75 | <TestAssemblies Include="$(RootDir)/output/release/*Tests.dll;"/> |
86 | 76 | </ItemGroup> |
87 | | - <NUnit3 Condition="'$(teamcity_version)' == ''" |
| 77 | + <NUnit3 |
88 | 78 | Assemblies="@(TestAssemblies)" |
89 | 79 | ToolPath="$(RootDir)/packages/NUnit.ConsoleRunner.3.20.1/tools" |
90 | 80 | ExcludeCategory="$(excludedCategories)" |
|
94 | 84 | OutputXmlFile="$(RootDir)/output/$(Configuration)/TestResults.xml" |
95 | 85 | UseNUnit3Xml = "true" |
96 | 86 | TeamCity="false"/> |
97 | | - <NUnit3 Condition="'$(teamcity_version)' != ''" |
98 | | - Assemblies="@(TestAssemblies)" |
99 | | - ToolPath="$(RootDir)/packages/NUnit.ConsoleRunner.3.20.1/tools" |
100 | | - ExcludeCategory="SkipOnTeamCity,$(excludedCategories)" |
101 | | - WorkingDirectory="$(RootDir)/output/$(Configuration)" |
102 | | - Force32Bit="$(useNUnit-x86)" |
103 | | - Verbose="true" |
104 | | - TeamCity="true"/> |
105 | | - </Target> |
| 87 | + </Target> |
106 | 88 |
|
107 | 89 | <Target Name="UpdateDownloadInfo" DependsOnTargets="VersionNumbers" > |
108 | 90 |
|
|
149 | 131 | changing of the script, but I haven't figured that out. --> |
150 | 132 |
|
151 | 133 | <FileUpdate File="$(RootDir)\src\Installer\Installer.wxs" Regex='Property_ProductVersion = ".*"' |
152 | | - ReplacementText ="Property_ProductVersion = "$(Version)"" /> |
| 134 | + ReplacementText ="Property_ProductVersion = "$(Version)"" /> |
153 | 135 |
|
154 | 136 | <Message Text="Making Installer Version: $(Version)" Importance="high" /> |
155 | 137 |
|
156 | 138 | <MSBuild Projects="$(RootDir)\src\Installer\Installer.wixproj"/> |
157 | 139 |
|
158 | | - <!-- remove an existing one with the same name, if necessary --> |
159 | | - <Delete Files="$(RootDir)\output\installer\SayMoreInstaller.$(Version).msi" TreatErrorsAsWarnings="false" /> |
| 140 | + <!-- Ensure destination folder exists --> |
| 141 | + <MakeDir Directories="$(RootDir)\output\installer" /> |
160 | 142 |
|
161 | | - <Exec Command='sign /d "SayMoreInstaller.$(Version).msi" "$(RootDir)\output\installer\SayMoreInstaller.msi"'></Exec> |
| 143 | + <PropertyGroup> |
| 144 | + <InstallerSourceMsi>$(RootDir)\output\installer\SayMoreInstaller.msi</InstallerSourceMsi> |
| 145 | + <InstallerSourceMsi Condition="!Exists('$(InstallerSourceMsi)')">$(RootDir)\src\Installer\bin\$(Configuration)\SayMoreInstaller.msi</InstallerSourceMsi> |
| 146 | + <InstallerSourceMsi Condition="!Exists('$(InstallerSourceMsi)')">$(RootDir)\src\Installer\bin\$(Configuration)\en-us\SayMoreInstaller.msi</InstallerSourceMsi> |
| 147 | + </PropertyGroup> |
162 | 148 |
|
163 | | - <Copy SourceFiles="$(RootDir)\output\installer\SayMoreInstaller.msi" |
164 | | - DestinationFiles="$(RootDir)\output\installer\SayMoreInstaller.$(Version).msi" |
165 | | - /> |
166 | | - |
| 149 | + <!-- Helpful debug --> |
| 150 | + <Message Text="Looking for MSI at: $(InstallerSourceMsi)" Importance="high" /> |
| 151 | + |
| 152 | + <!-- Guard with an explicit error if it's missing --> |
| 153 | + <Error |
| 154 | + Text="Expected MSI not found at $(InstallerSourceMsi)." |
| 155 | + Condition="!Exists('$(InstallerSourceMsi)')" /> |
| 156 | + |
| 157 | + <!-- Copy + rename with version --> |
| 158 | + <Copy |
| 159 | + SourceFiles="$(InstallerSourceMsi)" |
| 160 | + DestinationFiles="$(RootDir)\output\installer\SayMoreInstaller.$(Version).msi" /> |
| 161 | + |
167 | 162 | <!-- appcast.xml is used as part of the update notification system --> |
168 | 163 | <Copy SourceFiles ="$(RootDir)\src\Installer\appcast.xml" |
169 | 164 | DestinationFolder ="$(RootDir)\output\installer"/> |
|
177 | 172 |
|
178 | 173 | </Target> |
179 | 174 |
|
180 | | - <!-- The "Installer" Target used to depend on this, but the Edolo Sample data was removed |
181 | | - in version 3 of SayMore, so there is no need to continue to generate this WIX include |
182 | | - file. (See SampleData\ReadMe.txt) |
183 | | - <Target Name="MakeWixForSampleData"> |
184 | | - <MakeDir ContinueOnError ="true" Directories ="$(RootDir)\output\Installer\"/> |
185 | | -
|
186 | | - <MakeWixForDirTree |
187 | | - DirectoryReferenceId="SampleDataDir" |
188 | | - GiveAllPermissions="true" |
189 | | - ComponentGroupId="SampleData" |
190 | | - RootDirectory="$(RootDir)\SampleData" |
191 | | - OutputFilePath="$(RootDir)\output\Installer\GeneratedSampleDataFiles.wxs" |
192 | | - MatchRegExPattern=".*" |
193 | | - > |
194 | | - <Output TaskParameter="OutputFilePath" ItemName="Compile" /> |
195 | | - </MakeWixForDirTree> |
196 | | - </Target> |
197 | | - --> |
198 | | - |
199 | 175 | <Target Name="copyLibL10ns" DependsOnTargets="RestoreLocalPackages"> |
200 | 176 | <Error Text="Palaso L10ns package missing. Expected at $(RootDir)/packages/SIL.libpalaso.l10ns" |
201 | 177 | Condition="!Exists('$(RootDir)/packages/SIL.libpalaso.l10ns/SIL.libpalaso.l10ns.nupkg')" /> |
202 | 178 | <ItemGroup> |
203 | 179 | <XliffFiles Include="$(RootDir)/packages/SIL.libpalaso.l10ns/content/**/*.xlf"/> |
204 | 180 | </ItemGroup> |
205 | 181 | <Copy SourceFiles="@(XliffFiles)" |
206 | | - DestinationFiles="@(XliffFiles->'$(RootDir)/DistFiles/%(Filename)%(Extension)')" |
207 | | - SkipUnchangedFiles="true"/> |
| 182 | + DestinationFiles="@(XliffFiles->'$(RootDir)/DistFiles/%(Filename)%(Extension)')" |
| 183 | + SkipUnchangedFiles="true"/> |
208 | 184 | </Target> |
209 | 185 |
|
210 | 186 | <Target Name="MakeWixForDistFiles" DependsOnTargets="copyLibL10ns"> |
211 | 187 | <MakeDir ContinueOnError ="true" Directories ="$(RootDir)\output\Installer\"/> |
212 | 188 |
|
213 | 189 | <MakeWixForDirTree |
214 | | - DirectoryReferenceId="ProgramDir" |
215 | | - ComponentGroupId="DistFiles" |
216 | | - RootDirectory="$(RootDir)\DistFiles" |
217 | | - OutputFilePath="$(RootDir)\output\Installer\GeneratedDistFiles.wxs" |
218 | | - MatchRegExPattern=".*" |
219 | | - > |
| 190 | + DirectoryReferenceId="ProgramDir" |
| 191 | + ComponentGroupId="DistFiles" |
| 192 | + RootDirectory="$(RootDir)\DistFiles" |
| 193 | + OutputFilePath="$(RootDir)\output\Installer\GeneratedDistFiles.wxs" |
| 194 | + MatchRegExPattern=".*" |
| 195 | + > |
220 | 196 | <!--what does this do?--> |
221 | 197 | <Output TaskParameter="OutputFilePath" ItemName="Compile" /> |
222 | 198 | </MakeWixForDirTree> |
|
0 commit comments