wap: add some workaround to ensure that our package builds on 16.3 (#2730)
Fixes #2625.
This commit is contained in:
parent
1fccbc5304
commit
b693fd484a
|
@ -74,6 +74,14 @@ Try {
|
|||
If ($null -eq $AppXbf) {
|
||||
Throw "Failed to find App.xbf (TerminalApp project) in resources.pri"
|
||||
}
|
||||
|
||||
If ($Manifest.Package.Identity.ProcessorArchitecture -Ne "arm64") {
|
||||
### ARM64 doesn't package cpprest_2_10.
|
||||
If (($null -eq (Get-Item "$AppxPackageRootPath\cpprest_2_10.dll" -EA:Ignore)) -And
|
||||
($null -eq (Get-Item "$AppxPackageRootPath\cpprest_2_10d.dll" -EA:Ignore))) {
|
||||
Throw "Failed to find cpprest_2_10.dll -- check the WAP packaging project"
|
||||
}
|
||||
}
|
||||
} Finally {
|
||||
Remove-Item -Recurse -Force $AppxPackageRootPath
|
||||
}
|
||||
|
|
|
@ -295,7 +295,8 @@
|
|||
important reasons), that doesn't work for us.
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<_GenerateProjectPriFileDependsOn>OpenConsoleLiftDesktopBridgePriFiles;$(_GenerateProjectPriFileDependsOn)</_GenerateProjectPriFileDependsOn>
|
||||
<!-- Only for MSBuild versions < 16.3.0 -->
|
||||
<_GenerateProjectPriFileDependsOn Condition="$(MSBuildVersion) < '16.3.0'">OpenConsoleLiftDesktopBridgePriFiles;$(_GenerateProjectPriFileDependsOn)</_GenerateProjectPriFileDependsOn>
|
||||
</PropertyGroup>
|
||||
<Target Name="OpenConsoleLiftDesktopBridgePriFiles" DependsOnTargets="_ConvertItems">
|
||||
<ItemGroup>
|
||||
|
@ -305,4 +306,25 @@
|
|||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<!-- VS 16.3.0 added a rule to the WAP packaging project that removes all non-WAP payload, which we were relying on to
|
||||
roll up our subproject resources. We have to suppress that rule but keep part of its logic, because that rule is
|
||||
where the AppxPackagePayload items are created. -->
|
||||
<PropertyGroup>
|
||||
<!-- Only for MSBuild versions <= 16.4.0 -->
|
||||
<!-- TODO: Change this to hard less than once the 16.4.0 previews fix the bug. -->
|
||||
<WapProjBeforeGenerateAppxManifestDependsOn
|
||||
Condition="$(MSBuildVersion) <= '16.4.0'">
|
||||
$([MSBuild]::Unescape('$(WapProjBeforeGenerateAppxManifestDependsOn.Replace('_RemoveAllNonWapUWPItems', '_OpenConsoleRemoveAllNonWapUWPItems'))'))
|
||||
</WapProjBeforeGenerateAppxManifestDependsOn>
|
||||
</PropertyGroup>
|
||||
<Target Name="_OpenConsoleRemoveAllNonWapUWPItems">
|
||||
<ItemGroup>
|
||||
<AppxPackagePayload Include="@(WapProjPackageFile)" />
|
||||
<AppxUploadPackagePayload Include="@(UploadWapProjPackageFile)" />
|
||||
<!-- 16.3.0 - remove non-resources.pri PRI files since we just forced them back in. -->
|
||||
<AppxPackagePayload Remove="@(AppxPackagePayload)" Condition="'%(Extension)' == '.pri' and '%(Filename)' != 'resources'" />
|
||||
<AppxUploadPackagePayload Remove="@(AppxUploadPackagePayload)" Condition="'%(Extension)' == '.pri' and '%(Filename)' != 'resources'" />
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
|
|
Loading…
Reference in a new issue