-
Notifications
You must be signed in to change notification settings - Fork 57
/
Microsoft.PackageSupportFramework.targets
75 lines (70 loc) · 3.63 KB
/
Microsoft.PackageSupportFramework.targets
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
<?xml version="1.0" encoding="utf-8"?>
<Project ToolVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!--PSF SDK properties for building a fixup DLL-->
<PropertyGroup Condition="'$(ConfigurationType)'=='DynamicLibrary'">
<PSFIncDir>$(MSBuildThisFileDirectory)..\..\include</PSFIncDir>
<PSFLibDir>$(MSBuildThisFileDirectory)..\..\lib\</PSFLibDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(ConfigurationType)'=='DynamicLibrary'">
<ClCompile>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(PSFIncDir)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<AdditionalDependencies Condition="'$(Platform)'=='Win32'">%(AdditionalDependencies);$(PSFLibDir)PsfRuntime32.lib</AdditionalDependencies>
<AdditionalDependencies Condition="'$(Platform)'=='x64'">%(AdditionalDependencies);$(PSFLibDir)PsfRuntime64.lib</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<!--PSF redistributable properties for building WAP entry point project-->
<PropertyGroup Condition="'$(ConfigurationType)'=='Application'">
<PSFConfiguration Condition="'$(PSFConfiguration)'==''">release</PSFConfiguration>
<PSFBinDir>$(MSBuildThisFileDirectory)..\..\bin\</PSFBinDir>
<PSFRedistributables>
$(PSFRedistributables);
$(PSFBinDir)\PSF*32.*;
</PSFRedistributables>
<PSFRedistributables Condition="'$(Platform)'=='x64'">
$(PSFRedistributables);
$(PSFBinDir)\PSF*64.*;
</PSFRedistributables>
<BuildDependsOn>
$(BuildDependsOn);
PSFValidateProject
</BuildDependsOn>
<DesktopBridgeCopyLocalOutputGroupDependsOn>
$(DesktopBridgeCopyLocalOutputGroupDependsOn);
PSFAddFixupProjectReferenceOutput
</DesktopBridgeCopyLocalOutputGroupDependsOn>
</PropertyGroup>
<!--Evaluate all output groups consumed by DesktopBridge for referenced fixup projects,
and add these, as well as the PSF redistributables, as DesktopBridge package content.-->
<Target Name="PSFAddFixupProjectReferenceOutput" DependsOnTargets="ResolveProjectReferences">
<PropertyGroup>
<PSFFixupProjectReferenceOutputGroups>
BuiltProjectOutputGroup;
GetCopyToOutputDirectoryItems;
SatelliteDllsProjectOutputGroup;
SatelliteDllsProjectOutputGroupDependencies;
DebugSymbolsProjectOutputGroup;
DebugSymbolsProjectOutputGroupDependencies;
ContentFilesProjectOutputGroup;
SGenFilesOutputGroup;
</PSFFixupProjectReferenceOutputGroups>
</PropertyGroup>
<MSBuild Targets="$(PSFFixupProjectReferenceOutputGroups)" Projects="@(_MSBuildProjectReferenceExistent)" Properties="%(_MSBuildProjectReferenceExistent.SetConfiguration); %(_MSBuildProjectReferenceExistent.SetPlatform)">
<Output TaskParameter="TargetOutputs" ItemName="PSFFixupProjectReferencesOutput" />
</MSBuild>
<ItemGroup>
<ReferenceCopyLocalPaths Include="$(PSFRedistributables);@(PSFFixupProjectReferencesOutput)"/>
</ItemGroup>
</Target>
<!--Ideally, TargetName would be set automatically, but it relies on ConfigurationType,
which is set after importing psf.props and before importing all other targets.-->
<Target Name="PSFValidateProject">
<PropertyGroup>
<PSFTargetName Condition="'$(Platform)'=='Win32'">PsfLauncher32</PSFTargetName>
<PSFTargetName Condition="'$(Platform)'=='x64'">PsfLauncher64</PSFTargetName>
</PropertyGroup>
<Error Condition="'$(TargetName)'!='$(PSFTargetName)'"
Text="Please set the PSF TargetName to PsfLauncher32 (Win32), PsfLauncher64 (x64)."/>
</Target>
</Project>