-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathSampleScript.netfx.targets
233 lines (218 loc) · 9.94 KB
/
SampleScript.netfx.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
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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
<!--
*
* WARNING: This MSBuild file requires MSBuild 4.0 features.
*
* Based on System.Data.SQLite.Core.targets, written by Joe Mistachkin and David Archer.
* Released to the public domain, use at your own risk!
*
-->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!--
******************************************************************************
** Load Per-User Settings **
******************************************************************************
-->
<!--
Create "Joveler.Compression.ZLib.Precompiled.Exclude" file in project directory
to disable copying precompiled zlib binaries.
-->
<PropertyGroup>
<ExcludeInteropLib Condition="Exists('$(MSBuildProjectDirectory)\Joveler.DynLoader.Tests.Lib.Exclude')">true</ExcludeInteropLib>
<ExcludeInteropMgc Condition="Exists('$(MSBuildProjectDirectory)\Joveler.DynLoader.Tests.Mgc.Exclude')">true</ExcludeInteropMgc>
</PropertyGroup>
<!--
******************************************************************************
** Interop Library Build Items **
******************************************************************************
-->
<ItemGroup Condition="'$(ExcludeInteropLib)' != 'true' And
'$(MSBuildThisFileDirectory)' != '' And
HasTrailingSlash('$(MSBuildThisFileDirectory)')">
<InteropLibFiles_x86 Include="$(MSBuildThisFileDirectory)..\..\runtimes\win-x86\native\*.dll" />
<InteropLibFiles_x64 Include="$(MSBuildThisFileDirectory)..\..\runtimes\win-x64\native\*.dll" />
<InteropLibFiles_arm64 Include="$(MSBuildThisFileDirectory)..\..\runtimes\win-arm64\native\*.dll" />
</ItemGroup>
<ItemGroup Condition="'$(ExcludeInteropMgc)' != 'true' And
'$(MSBuildThisFileDirectory)' != '' And
HasTrailingSlash('$(MSBuildThisFileDirectory)')">
<InteropMgcFiles Include="$(MSBuildThisFileDirectory)..\..\contentFiles\any\any\*" />
</ItemGroup>
<!--
******************************************************************************
** Interop Library Content Items **
******************************************************************************
-->
<ItemGroup Condition="'$(ExcludeInteropLib)' != 'true'">
<None Condition="'@(InteropLibFiles_x86)' != ''" Include="@(InteropLibFiles_x86)">
<Link>x86\%(FileName)%(Extension)</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Condition="'@(InteropLibFiles_x64)' != ''" Include="@(InteropLibFiles_x64)">
<Link>x64\%(FileName)%(Extension)</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Condition="'@(InteropLibFiles_arm64)' != ''" Include="@(InteropLibFiles_arm64)">
<Link>arm64\%(FileName)%(Extension)</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup Condition="'$(ExcludeInteropMgc)' != 'true'">
<None Condition="'@(InteropMgcFiles)' != ''" Include="@(InteropMgcFiles)">
<Link>%(FileName)%(Extension)</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<!--
******************************************************************************
** Interop Library Build Targets **
******************************************************************************
-->
<Target Name="CopyInteropLibFiles_x86"
Condition="'$(CopyInteropLibFiles_x86)' != 'false' And
'$(OutDir)' != '' And
HasTrailingSlash('$(OutDir)') And
Exists('$(OutDir)')"
Inputs="@(InteropLibFiles_x86)"
Outputs="@(InteropLibFiles_x86 -> '$(OutDir)x86\%(Filename)%(Extension)')">
<Copy SourceFiles="@(InteropLibFiles_x86)"
DestinationFiles="@(InteropLibFiles_x86 -> '$(OutDir)x86\%(Filename)%(Extension)')" />
</Target>
<Target Name="CopyInteropLibFiles_x64"
Condition="'$(CopyInteropLibFiles_x64)' != 'false' And
'$(OutDir)' != '' And
HasTrailingSlash('$(OutDir)') And
Exists('$(OutDir)')"
Inputs="@(InteropLibFiles_x64)"
Outputs="@(InteropLibFiles_x64 -> '$(OutDir)x86\%(Filename)%(Extension)')">
<Copy SourceFiles="@(InteropLibFiles_x64)"
DestinationFiles="@(InteropLibFiles_x64 -> '$(OutDir)x64\%(Filename)%(Extension)')" />
</Target>
<Target Name="CopyInteropLibFiles_arm64"
Condition="'$(CopyInteropLibFiles_arm64)' != 'false' And
'$(OutDir)' != '' And
HasTrailingSlash('$(OutDir)') And
Exists('$(OutDir)')"
Inputs="@(InteropLibFiles_arm64)"
Outputs="@(InteropLibFiles_arm64 -> '$(OutDir)x86\%(Filename)%(Extension)')">
<Copy SourceFiles="@(InteropLibFiles_arm64)"
DestinationFiles="@(InteropLibFiles_arm64 -> '$(OutDir)arm64\%(Filename)%(Extension)')" />
</Target>
<Target Name="CopyInteropMgcFiles"
Condition="'$(CopyInteropMgcFiles)' != 'false' And
'$(OutDir)' != '' And
HasTrailingSlash('$(OutDir)') And
Exists('$(OutDir)')"
Inputs="@(InteropMgcFiles)"
Outputs="@(InteropMgcFiles -> '$(OutDir)x86\%(Filename)%(Extension)')">
<Copy SourceFiles="@(InteropMgcFiles)"
DestinationFiles="@(InteropMgcFiles -> '$(OutDir)%(Filename)%(Extension)')" />
</Target>
<!--
******************************************************************************
-->
<Target Name="CleanInteropLibFiles_x86"
Condition="'$(CleanInteropLibFiles_x86)' != 'false' And
'$(OutDir)' != '' And
HasTrailingSlash('$(OutDir)') And
Exists('$(OutDir)')">
<Delete Files="@(InteropLibFiles_x86 -> '$(OutDir)x86\%(Filename)%(Extension)')" />
</Target>
<Target Name="CleanInteropLibFiles_x64"
Condition="'$(CleanInteropLibFiles_x64)' != 'false' And
'$(OutDir)' != '' And
HasTrailingSlash('$(OutDir)') And
Exists('$(OutDir)')">
<Delete Files="@(InteropLibFiles_x64 -> '$(OutDir)x64\%(Filename)%(Extension)')" />
</Target>
<Target Name="CleanInteropLibFiles_arm64"
Condition="'$(CleanInteropLibFiles_arm64)' != 'false' And
'$(OutDir)' != '' And
HasTrailingSlash('$(OutDir)') And
Exists('$(OutDir)')">
<Delete Files="@(InteropLibFiles_arm64 -> '$(OutDir)arm64\%(Filename)%(Extension)')" />
</Target>
<Target Name="CleanInteropMgcFiles"
Condition="'$(CleanInteropMgcFiles)' != 'false' And
'$(OutDir)' != '' And
HasTrailingSlash('$(OutDir)') And
Exists('$(OutDir)')">
<Delete Files="@(InteropMgcFiles -> '$(OutDir)mgc\%(Filename)%(Extension)')" />
</Target>
<!--
******************************************************************************
-->
<Target Name="CollectInteropLibFiles_x86"
Condition="'$(CollectInteropLibFiles_x86)' != 'false'">
<ItemGroup>
<FilesForPackagingFromProject Include="@(InteropLibFiles_x86)">
<DestinationRelativePath>bin\x86\%(Filename)%(Extension)</DestinationRelativePath>
</FilesForPackagingFromProject>
</ItemGroup>
</Target>
<Target Name="CollectInteropLibFiles_x64"
Condition="'$(CollectInteropLibFiles_x64)' != 'false'">
<ItemGroup>
<FilesForPackagingFromProject Include="@(InteropLibFiles_x64)">
<DestinationRelativePath>bin\x64\%(Filename)%(Extension)</DestinationRelativePath>
</FilesForPackagingFromProject>
</ItemGroup>
</Target>
<Target Name="CollectInteropLibFiles_arm64"
Condition="'$(CollectInteropLibFiles_arm64)' != 'false'">
<ItemGroup>
<FilesForPackagingFromProject Include="@(InteropLibFiles_arm64)">
<DestinationRelativePath>bin\arm64\%(Filename)%(Extension)</DestinationRelativePath>
</FilesForPackagingFromProject>
</ItemGroup>
</Target>
<Target Name="CollectInteropMgcFiles"
Condition="'$(CollectInteropMgcFiles)' != 'false'">
<ItemGroup>
<FilesForPackagingFromProject Include="@(InteropMgcFiles)">
<DestinationRelativePath>bin\%(Filename)%(Extension)</DestinationRelativePath>
</FilesForPackagingFromProject>
</ItemGroup>
</Target>
<!--
******************************************************************************
** Interop Library Build Properties **
******************************************************************************
-->
<PropertyGroup>
<PostBuildEventDependsOn>
$(PostBuildEventDependsOn);
CopyInteropLibFiles_x86;
CopyInteropLibFiles_x64;
CopyInteropLibFiles_arm4;
CopyInteropMgcFiles;
</PostBuildEventDependsOn>
<BuildDependsOn>
$(BuildDependsOn);
CopyInteropLibFiles_x86;
CopyInteropLibFiles_x64;
CopyInteropLibFiles_arm64;
CopyInteropMgcFiles;
</BuildDependsOn>
<CleanDependsOn>
$(CleanDependsOn);
CleanInteropLibFiles_x86;
CleanInteropLibFiles_x64;
CleanInteropLibFiles_arm64;
CleanInteropMgcFiles;
</CleanDependsOn>
</PropertyGroup>
<!--
******************************************************************************
** Interop Library Publish Properties for Visual Studio 201x **
******************************************************************************
-->
<PropertyGroup>
<PipelineCollectFilesPhaseDependsOn>
CollectInteropLibFiles_x86;
CollectInteropLibFiles_x64;
CollectInteropLibFiles_arm64;
CollectInteropMgcFiles;
$(PipelineCollectFilesPhaseDependsOn);
</PipelineCollectFilesPhaseDependsOn>
</PropertyGroup>
</Project>