forked from 0x0ade/CelesteNet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CelesteNet.props
133 lines (117 loc) · 6.04 KB
/
CelesteNet.props
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
<Project>
<PropertyGroup>
<LangVersion>9</LangVersion>
<Nullable Condition="'$(Nullable)' == ''">enable</Nullable>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<CopyCeleste Condition="'$(CopyCeleste)' == ''">false</CopyCeleste>
<IsServer>$(AssemblyName.EndsWith('Server'))</IsServer>
<IsModule>$(AssemblyName.EndsWith('Module'))</IsModule>
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
<DefineConstants>INTERNAL_NULLABLE_ATTRIBUTES;$(DefineConstants)</DefineConstants>
<Version>2.0.0.0</Version>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\CelesteNet.Shared\NullableAttributes.cs" />
</ItemGroup>
<Choose>
<When Condition="$(TargetFramework.Contains('.'))">
<PropertyGroup>
<IsNetCore>true</IsNetCore>
<IsNetFramework>false</IsNetFramework>
<DefineConstants>NETCORE;$(DefineConstants)</DefineConstants>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
<IsNetCore>false</IsNetCore>
<IsNetFramework>true</IsNetFramework>
<DefineConstants>NETFRAMEWORK;$(DefineConstants)</DefineConstants>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.CSharp" />
<PackageReference Include="System.ValueTuple" Version="4.5.0" Condition="$(IsServer) Or $(IsModule)" />
</ItemGroup>
</Otherwise>
</Choose>
<ItemGroup>
<ProjectReference Include="..\CelesteNet.Server\CelesteNet.Server.csproj" Private="false" Condition="$(IsModule)" />
</ItemGroup>
<Choose>
<When Condition="Exists('..\..\..\Celeste.exe')">
<PropertyGroup>
<CelesteDir>..\..\..</CelesteDir>
<InCelesteModDir>true</InCelesteModDir>
<CopyCeleste Condition="'$(CopyCeleste)' == ''">false</CopyCeleste>
</PropertyGroup>
</When>
<When Condition="Exists('..\..\Celeste\Celeste.exe')">
<PropertyGroup>
<CelesteDir>..\..\Celeste</CelesteDir>
<InCelesteModDir>false</InCelesteModDir>
<CopyCeleste Condition="'$(CopyCeleste)' == ''">!$(IsModule)</CopyCeleste>
</PropertyGroup>
</When>
<When Condition="'$(CelesteDir)' == ''">
<!-- Whoops. -->
<PropertyGroup>
<CelesteDir></CelesteDir>
<InCelesteModDir>false</InCelesteModDir>
<CopyCeleste Condition="'$(CopyCeleste)' == ''">!$(IsModule)</CopyCeleste>
</PropertyGroup>
</When>
</Choose>
<Target Name="CheckCelesteDir" BeforeTargets="PreBuildEvent">
<Error Condition="'$(CelesteDir)' == ''" Text="Cannot find Celeste." />
</Target>
<ItemGroup>
<PackageReference Include="MonoMod.RuntimeDetour" Version="21.07.22.03">
<PrivateAssets Condition="$(InCelesteModDir) And $(IsNetFramework)">all</PrivateAssets>
<ExcludeAssets Condition="$(InCelesteModDir) And $(IsNetFramework)">runtime</ExcludeAssets>
</PackageReference>
<PackageReference Include="MonoMod.Utils" Version="21.07.22.03">
<PrivateAssets Condition="$(InCelesteModDir) And $(IsNetFramework)">all</PrivateAssets>
<ExcludeAssets Condition="$(InCelesteModDir) And $(IsNetFramework)">runtime</ExcludeAssets>
</PackageReference>
<PackageReference Include="YamlDotNet" Version="8.1.2">
<PrivateAssets Condition="$(InCelesteModDir) And $(IsNetFramework)">all</PrivateAssets>
<ExcludeAssets Condition="$(InCelesteModDir) And $(IsNetFramework)">runtime</ExcludeAssets>
</PackageReference>
<!-- .NET Framework 4.0+ reference assemblies aren't always available system-wide. -->
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.*">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<Reference Include="Celeste" HintPath="$(CelesteDir)\Celeste.exe" Private="$(CopyCeleste)" />
<Reference Include="MMHOOK_Celeste" HintPath="$(CelesteDir)\MMHOOK_Celeste.dll" Private="$(CopyCeleste)" />
<Reference Include="Stearmworks.NET.dll" HintPath="..\lib\Steamworks.NET.dll" Private="$(CopyCeleste)" />
</ItemGroup>
<Choose>
<When Condition="!Exists('$(CelesteDir)\BuildIsXNA.txt') And $(IsNetCore)">
<ItemGroup>
<Reference Include="FNA" HintPath="..\lib\net6.0\FNA.dll" Private="!$(IsModule)" />
</ItemGroup>
</When>
<When Condition="'$(OS)' != 'Windows_NT' Or (!Exists('$(CelesteDir)\BuildIsXNA.txt') And Exists('$(CelesteDir)\FNA.dll'))">
<ItemGroup>
<Reference Include="FNA" HintPath="$(CelesteDir)\FNA.dll" Private="$(CopyCeleste)" />
</ItemGroup>
</When>
<Otherwise>
<ItemGroup>
<Reference Include="Microsoft.Xna.Framework" HintPath="$(WINDIR)\Microsoft.NET\assembly\GAC_32\Microsoft.Xna.Framework\v4.0_4.0.0.0__842cf8be1de50553\Microsoft.Xna.Framework.dll" Private="false" />
<Reference Include="Microsoft.Xna.Framework.Game" HintPath="$(WINDIR)\Microsoft.NET\assembly\GAC_32\Microsoft.Xna.Framework.Game\v4.0_4.0.0.0__842cf8be1de50553\Microsoft.Xna.Framework.Game.dll" Private="false" />
<Reference Include="Microsoft.Xna.Framework.Graphics" HintPath="$(WINDIR)\Microsoft.NET\assembly\GAC_32\Microsoft.Xna.Framework.Graphics\v4.0_4.0.0.0__842cf8be1de50553\Microsoft.Xna.Framework.Graphics.dll" Private="false" />
</ItemGroup>
</Otherwise>
</Choose>
<Target Name="CopyModuleAssembly" AfterTargets="PostBuildEvent" Condition="$(IsModule)">
<ItemGroup>
<MainFiles Include="bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).*" Exclude="" />
<MiscFiles Include="bin\$(Configuration)\$(TargetFramework)\*" Exclude="@(MainFiles)" />
</ItemGroup>
<Copy SourceFiles="@(MiscFiles)" DestinationFolder="..\CelesteNet.Server\bin\$(Configuration)\$(TargetFramework)\Modules" SkipUnchangedFiles="true" ContinueOnError="true" Retries="1" />
<Copy SourceFiles="@(MainFiles)" DestinationFolder="..\CelesteNet.Server\bin\$(Configuration)\$(TargetFramework)\Modules" SkipUnchangedFiles="true" ContinueOnError="false" />
</Target>
</Project>