|
1 | 1 | <?xml version="1.0" encoding="utf-8"?> |
2 | | -<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="15.0"> |
| 2 | +<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="Current"> |
3 | 3 | <!-- ########################################################################################################## --> |
4 | 4 | <!-- ### Configuration properties - Review and edit these values as needed. ### --> |
5 | 5 | <!-- ########################################################################################################## --> |
6 | 6 |
|
7 | 7 | <PropertyGroup> |
8 | 8 | <ApplicationName>FieldWorks Language Explorer</ApplicationName> |
9 | 9 | <SafeApplicationName>FieldWorks</SafeApplicationName> <!-- should not contain any spaces or illegal filename characters --> |
10 | | - <CopyrightYear>2021</CopyrightYear> |
11 | 10 | <Manufacturer>SIL International</Manufacturer> |
12 | 11 | <SafeManufacturer>SIL</SafeManufacturer> |
13 | 12 | </PropertyGroup> |
|
18 | 17 | <Configuration>Release</Configuration> |
19 | 18 | </PropertyGroup> |
20 | 19 |
|
21 | | - <!-- ########################################################################################################## --> |
22 | | - <!-- ### PRODUCT ID GUID definition : This value must be UNIQUE for each base build. Furthermore, every ### --> |
23 | | - <!-- ### base build must get its own unique third number (minor version) in the version number sequence. ### --> |
24 | | - <!-- ########################################################################################################## --> |
25 | | - |
26 | | - <!-- $(ApplicationName) 1.0.0.X ($(ApplicationName) build)--> |
27 | | - <PropertyGroup> |
28 | | - <ProductIdGuid>E6B62961-EA79-4E29-BA9C-6E19BB62656E</ProductIdGuid> |
29 | | - </PropertyGroup> |
30 | | - |
31 | 20 | <!-- ########################################################################################################## --> |
32 | 21 | <!-- ### UPGRADE CODE GUID definition : This value must be THE SAME for every version of this product. ### --> |
33 | 22 | <!-- ### Each product should have its own upgrade code. This allows installers and patches to upgrade ### --> |
|
104 | 93 | <Error Text="The Platform property must be set on the command line to x86 or x64." Condition="'$(Platform)' == ''" /> |
105 | 94 | <Error Text="Installer must be run for release builds [config=$(config)]" Condition="'$(config)' != 'release'" /> |
106 | 95 | </Target> |
| 96 | + |
| 97 | + <!-- |
| 98 | + Removing files breaks the ability to patch and requires a new Base build to update. |
| 99 | + To improve our user experience we may want to delay making a new Base build so this target adds zero byte files to |
| 100 | + replace files that were removed (for instance during a library update). |
| 101 | + A base build should warn if we have 'RemovedSinceLastBase' items to help us remember to clear these out. |
| 102 | + --> |
| 103 | + <Target Name="RescuePatching"> |
| 104 | + <!-- <ItemGroup> |
| 105 | + <RemovedSinceLastBase Include="$(dir-outputBase)/Example.dll" /> |
| 106 | + </ItemGroup> |
| 107 | + <WriteLinesToFile File="%(RemovedSinceLastBase.FullPath)" Lines="" /> --> |
| 108 | + </Target> |
107 | 109 | <!-- ########################################################################################################## --> |
108 | 110 | <!-- ### Compile Targets ### --> |
109 | 111 | <!-- ########################################################################################################## --> |
110 | | - <Target Name="ProductCompile" DependsOnTargets="remakefw"> |
| 112 | + <Target Name="ProductCompile" DependsOnTargets="remakefw;RescuePatching"> |
111 | 113 | <MSBuild Projects="$(InstallerDir)/CustomActions/CustomActions.sln" Targets="CustomActions" Properties="Configuration=Release;Platform=x86"/> |
112 | 114 | </Target> |
113 | 115 |
|
|
172 | 174 | <DevTestArtifacts Include="$(OutputDirForConfig)\*.vrs"/> <!-- versification files from some unit tests --> |
173 | 175 | <DevTestArtifacts Include="$(OutputDirForConfig)\Castle.Core.dll"/> |
174 | 176 | <DevTestArtifacts Include="$(OutputDirForConfig)\Moq.dll"/> |
175 | | - <DevTestArtifacts Include="$(OutputDirForConfig)\System.Runtime.CompilerServices.Unsafe.dll"/> |
176 | 177 | <DevTestArtifacts Include="$(OutputDirForConfig)\System.Threading.Tasks.Extensions.dll"/> |
177 | 178 | <FontFiles Include="$(fwrt)\DistFiles\Fonts\Raw\Quivira.otf"/> |
178 | 179 | <FontFiles Include="$(DownloadsDir)\Fonts\**\*.ttf"/> |
|
395 | 396 | Condition="!Exists('$(WixLibsDir)/vcredist_2015-19_x64.exe') And $(Platform)=='x64'" |
396 | 397 | DownloadsDir="$(WixLibsDir)"/> <!-- VisualC++ 14.1 runtime --> |
397 | 398 | <!-- FLEx Bridge --> |
398 | | - <DownloadFile Address="https://build.palaso.org/guestAuth/repository/download/FLExBridgeDevelopWin32InstallerSansPublish/fw-9.1.18.tcbuildtag/FLExBridge_Offline.exe" |
| 399 | + <DownloadFile Address="https://build.palaso.org/guestAuth/repository/download/FLExBridgeDevelopWin32InstallerSansPublish/fw-9.1.22.tcbuildtag/FLExBridge_Offline.exe" |
399 | 400 | Condition="!Exists('$(WixLibsDir)/FLExBridge_Offline.exe')" |
400 | 401 | DownloadsDir="$(WixLibsDir)"/> <!-- TODO: always download to get the latest version --> |
401 | 402 | </Target> |
|
431 | 432 | </PropertyGroup> |
432 | 433 |
|
433 | 434 | <Target Name="BuildProductBaseMsi" DependsOnTargets="InstallerVersionNumbers"> |
| 435 | + <Warning Text="RemovedSinceLastBase should be cleared out before making a new base build." Condition="'@(RemovedSinceLastBase)' != ''" /> |
434 | 436 | <Message Text="Building FieldWorks Base Msi for $(Arch)" Condition="'$(action)'!='test'"/> |
| 437 | + <MSBuild.ExtensionPack.Framework.Guid TaskAction="Create"> |
| 438 | + <Output TaskParameter="FormattedGuidString" PropertyName="ProductIdGuid"/> |
| 439 | + </MSBuild.ExtensionPack.Framework.Guid> |
| 440 | + <Message Text="Generated GUID '$(ProductIdGuid)'"/> |
435 | 441 | <PropertyGroup> |
436 | 442 | <MsiFile>$(SafeApplicationName)_$(Revision).msi</MsiFile> |
437 | 443 | <BaseBuildDir>$(InstallerDir)/BaseInstallerBuild</BaseBuildDir> |
438 | 444 | <BaseBuildArgs>"$(ApplicationName)" $(SafeApplicationName) $(BuildVersion) $(ProductIdGuid) $(UpgradeCodeGuid) "$(AppBuildDir)/$(BinDirSuffix)" "$(AppBuildDir)/$(DataDirSuffix)" $(CopyrightYear) "$(Manufacturer)" $(SafeManufacturer) $(Arch)</BaseBuildArgs> |
439 | 445 | </PropertyGroup> |
440 | 446 | <!-- Suppress ICE30 because we and Encoding Converters MM both install Geckofx, resulting in an ICE warning for double ref counting --> |
441 | 447 | <Exec WorkingDirectory="$(BaseBuildDir)" Command="(set SuppressICE=-sice:ICE30) & buildBaseInstaller.bat $(BaseBuildArgs)" /> |
442 | | - |
443 | 448 | <ItemGroup> |
444 | 449 | <InstallerFiles Include="$(BaseBuildDir)/**/$(SafeApplicationName)_*.exe"/> |
445 | 450 | <InstallerFiles Include="$(BaseBuildDir)/**/$(SafeApplicationName)_*.msi"/> |
446 | 451 | </ItemGroup> |
447 | 452 | <Move SourceFiles="@(InstallerFiles)" DestinationFiles="@(InstallerFiles -> '$(InstallersBaseDir)\%(Filename)_$(Arch)%(Extension)')"/> |
448 | 453 |
|
449 | 454 | <WriteLinesToFile File="$(AppBuildDir)/version" Overwrite="true" Lines="$(BuildVersion)" /> |
| 455 | + <WriteLinesToFile File="$(AppBuildDir)/ProductIdGuid" Overwrite="true" Lines="$(ProductIdGuid)" /> |
450 | 456 | </Target> |
451 | 457 |
|
452 | 458 | <Target Name="BuildProductPatchMsp" DependsOnTargets="InstallerVersionNumbers"> |
453 | 459 | <!-- TODO: work on Patch process --> |
454 | 460 | <ReadLinesFromFile File="$(AppBuildMasterDir)/version"> |
455 | 461 | <Output TaskParameter="Lines" PropertyName="BaseVersion" /> |
456 | 462 | </ReadLinesFromFile> |
| 463 | + <ReadLinesFromFile File="$(AppBuildMasterDir)/ProductIdGuid"> |
| 464 | + <Output TaskParameter="Lines" PropertyName="ProductIdGuid" /> |
| 465 | + </ReadLinesFromFile> |
457 | 466 | <PropertyGroup> |
458 | 467 | <MspFile>$(SafeApplicationName)_$(BuildVersion).msp</MspFile> |
459 | 468 | <PatchDir>$(InstallerDir)/CreateUpdatePatch</PatchDir> |
|
0 commit comments