-
Notifications
You must be signed in to change notification settings - Fork 51
Expand file tree
/
Copy pathMenuAPI.csproj
More file actions
87 lines (73 loc) · 3.79 KB
/
Copy pathMenuAPI.csproj
File metadata and controls
87 lines (73 loc) · 3.79 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
<Project Sdk="Microsoft.NET.Sdk">
<!-- Shared settings (framework, langversion, nullable, ...) live in ../Directory.Build.props. -->
<PropertyGroup>
<TargetName>MenuAPI</TargetName>
<AssemblyTitle>MenuAPI FiveM Enhanced</AssemblyTitle>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<Description>An advanced Menu API for FiveM (Enhanced) C# resources.</Description>
<PackageId>MenuAPI.FiveM.Enhanced</PackageId>
<PackageTags>FiveM Enhanced MenuAPI</PackageTags>
<PackageProjectUrl>https://github.com/tomgrobbe/menuapi/</PackageProjectUrl>
<RepositoryUrl>https://github.com/tomgrobbe/menuapi/</RepositoryUrl>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageLicenseExpression>LGPL-3.0-or-later</PackageLicenseExpression>
</PropertyGroup>
<PropertyGroup Condition="'$(NativeHooks)' == 'true'">
<PackageId>MenuAPI.FiveM.Enhanced.NativeHooks</PackageId>
<Description>Profiling build of MenuAPI for FiveM (Enhanced). Every native call is wrapped in a profiler scope, which costs performance. Never ship this, use MenuAPI.FiveM.Enhanced instead.</Description>
<TargetsForTfmSpecificBuildOutput>$(TargetsForTfmSpecificBuildOutput);AddNativeHooksToPackage</TargetsForTfmSpecificBuildOutput>
</PropertyGroup>
<Target Name="AddNativeHooksToPackage" Condition="'$(NativeHooks)' == 'true'" DependsOnTargets="ResolveReferences">
<ItemGroup>
<BuildOutputInPackage Include="@(ReferenceCopyLocalPaths)"
Condition="'%(Filename)%(Extension)' == 'MenuAPI.NativeHooks.dll'" />
</ItemGroup>
</Target>
<ItemGroup>
<Compile Include="..\shared\Controls.cs" Link="Controls.cs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="CitizenFX.FiveM.Client" />
</ItemGroup>
<ItemGroup>
<MenuApiUiSource Include="ui/*.css;ui/*.js" />
<MenuApiUiOutput Include="@(MenuApiUiSource->'ui-dist/%(Filename).min%(Extension)')" />
</ItemGroup>
<ItemGroup>
<None Include="ui/**/*"
Exclude="@(MenuApiUiSource)"
TargetPath="menuapi/%(RecursiveDir)%(Filename)%(Extension)"
CopyToOutputDirectory="PreserveNewest"
Pack="true"
PackagePath="contentFiles/any/net10.0/menuapi/"
PackageCopyToOutput="true" />
<!-- Named, not globbed: globs expand before any target runs, so ui-dist would be empty. -->
<None Include="@(MenuApiUiOutput)"
TargetPath="menuapi/%(Filename)%(Extension)"
CopyToOutputDirectory="PreserveNewest"
Pack="true"
PackagePath="contentFiles/any/net10.0/menuapi/"
PackageCopyToOutput="true" />
</ItemGroup>
<Target Name="MinifyUiAssets"
BeforeTargets="AssignTargetPaths;_GetPackageFiles"
Inputs="@(MenuApiUiSource);$(MSBuildThisFileDirectory)../tools/minify-ui.mjs"
Outputs="@(MenuApiUiOutput)">
<Exec Command="node "$(MSBuildThisFileDirectory)../tools/minify-ui.mjs""
WorkingDirectory="$(MSBuildThisFileDirectory).."
ContinueOnError="WarnAndContinue">
<Output TaskParameter="ExitCode" PropertyName="MinifyUiExitCode" />
</Exec>
<Warning Condition="'$(MinifyUiExitCode)' != '0'"
Text="Could not run tools/minify-ui.mjs, shipping the unminified web files instead. Install Node and run 'npm ci' for smaller files." />
<Copy Condition="'$(MinifyUiExitCode)' != '0'"
SourceFiles="@(MenuApiUiSource)"
DestinationFiles="@(MenuApiUiOutput)" />
</Target>
<ItemGroup>
<None Include="..\README.md" Pack="true" PackagePath="\" />
<!-- LGPL-3.0 is written as a set of additional permissions on top of the GPL-3.0, so both texts ship. -->
<None Include="..\LICENSE.md" Pack="true" PackagePath="\" />
<None Include="..\LICENSE.GPL.md" Pack="true" PackagePath="\" />
</ItemGroup>
</Project>