-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMile.Project.Wap.targets
More file actions
105 lines (103 loc) · 4.62 KB
/
Copy pathMile.Project.Wap.targets
File metadata and controls
105 lines (103 loc) · 4.62 KB
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
97
98
99
100
101
102
103
104
105
<?xml version="1.0" encoding="utf-8"?>
<!--
PROJECT: Mouri Internal Library Essentials
FILE: Mile.Project.Wap.targets
PURPOSE: Definition for Visual Studio Windows Packaging Project
LICENSE: The MIT License
MAINTAINER: MouriNaruto (Kenji.Mouri@outlook.com)
-->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(WapProjPath)\Microsoft.DesktopBridge.targets" />
<!-- ## BEGIN HACK - Put all output files to the AppX root folder ## -->
<!--
Reference: https://github.com/microsoft/terminal
/blob/a89c3e2f8527a51b39768980627ed8f7c1ea5f0b
/src/cascadia/CascadiaPackage/CascadiaPackage.wapproj#L73
-->
<!--
For our builds, we want to put all output files to the AppX root folder for
simplifying the implementation.
-->
<Target Name="MileProjectStompSourceProjectForWapProject" BeforeTargets="_ConvertItems">
<ItemGroup>
<!--
Stomp all "SourceProject" values for all incoming dependencies to
flatten the package.
-->
<_TemporaryFilteredWapProjOutput Include="@(_FilteredNonWapProjProjectOutput)" />
<_FilteredNonWapProjProjectOutput Remove="@(_TemporaryFilteredWapProjOutput)" />
<_FilteredNonWapProjProjectOutput Include="@(_TemporaryFilteredWapProjOutput)">
<!--
Blank the SourceProject here to vend all files into the root of the
package.
-->
<SourceProject>
</SourceProject>
</_FilteredNonWapProjProjectOutput>
</ItemGroup>
</Target>
<!-- ## END HACK - Put all output files to the AppX root folder ## -->
<!-- ## BEGIN HACK - Removing Microsoft.VCLibs Packages ## -->
<!--
Reference: https://github.com/microsoft/terminal
/blob/a89c3e2f8527a51b39768980627ed8f7c1ea5f0b
/src/cascadia/CascadiaPackage/CascadiaPackage.wapproj#L125
-->
<!--
For our builds, we're just using VC-LTL to compile the project and delete
the package dependencies. We don't want to rely on the Microsoft.VCLibs
packages. Because it's very difficult for users who do not have access to
the store to get our dependency packages, and we want to be robust and
deployable everywhere.
-->
<!--
This target removes the FrameworkSdkReferences from before the AppX package
targets manifest generation happens. This is part of the generic machinery
that applies to every AppX.
-->
<Target Name="MileProjectStripAllDependenciesFromPackageFirstManifest" BeforeTargets="_GenerateCurrentProjectAppxManifest">
<ItemGroup>
<FrameworkSdkReference Remove="@(FrameworkSdkReference)" />
</ItemGroup>
</Target>
<!--
This target removes the FrameworkSdkPackages from before the *desktop
bridge* manifest generation happens.
-->
<Target Name="MileProjectStripAllDependenciesFromPackageSecondManifest" BeforeTargets="_GenerateDesktopBridgeAppxManifest" DependsOnTargets="_ResolveVCLibDependencies">
<ItemGroup>
<FrameworkSdkPackage Remove="@(FrameworkSdkPackage)" />
</ItemGroup>
</Target>
<!-- ## END HACK - Removing Microsoft.VCLibs Packages ## -->
<!-- ## BEGIN HACK - Remove unnecessary files in the AppX folder ## -->
<!--
Reference: https://github.com/microsoft/terminal
/blob/f08321a0b24bd6870c2f868e19e7565193b615a1
/src/cascadia/CascadiaPackage/CascadiaPackage.wapproj#L147
-->
<!--
Visual Studio 2019 Version 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>
<WapProjBeforeGenerateAppxManifestDependsOn>
$([MSBuild]::Unescape('$(WapProjBeforeGenerateAppxManifestDependsOn.Replace('_RemoveAllNonWapUWPItems', 'MileProjectRemoveAllNonWapUWPItems'))'))
</WapProjBeforeGenerateAppxManifestDependsOn>
</PropertyGroup>
<Target Name="MileProjectRemoveAllNonWapUWPItems">
<ItemGroup>
<AppxPackagePayload Include="@(WapProjPackageFile)" />
<AppxUploadPackagePayload Include="@(UploadWapProjPackageFile)" />
<!--
Remove all of the xaml files, because we are using embedded xbf payloads
(saves about 500kb on disk!)
-->
<AppxPackagePayload Remove="@(AppxPackagePayload)" Condition="'%(Extension)' == '.xaml'" />
<AppxUploadPackagePayload Remove="@(AppxUploadPackagePayload)" Condition="'%(Extension)' == '.xaml'" />
</ItemGroup>
</Target>
<!-- ## END HACK - Remove unnecessary files in the AppX folder ## -->
</Project>