forked from 0x0ade/CelesteNet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCelesteNet.props
51 lines (40 loc) · 2.49 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
<Project>
<PropertyGroup>
<LangVersion>latest</LangVersion>
<Nullable Condition="'$(Nullable)' == ''">enable</Nullable>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<IsServer>$(AssemblyName.EndsWith('Server'))</IsServer>
<IsModule>$(AssemblyName.EndsWith('Module'))</IsModule>
<Version>2.0.0.0</Version>
<CelestePrefix Condition="'$(CelestePrefix)' == '' And Exists('..\..\..\Celeste.dll')">..\..\..</CelestePrefix>
<CelestePrefix Condition="'$(CelestePrefix)' == ''">..\lib-stripped</CelestePrefix>
<CopyCeleste Condition="'$(CopyCeleste)' == ''">$(IsServer)</CopyCeleste>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\CelesteNet.Server\CelesteNet.Server.csproj" Private="false" Condition="$(IsModule)" />
</ItemGroup>
<Target Name="EnsureCelesteExists" BeforeTargets="PreBuildEvent">
<Error
Condition="!Exists('$(CelestePrefix)\Celeste.dll')"
Text="Cannot find Celeste. Make sure CelesteNet is cloned in your Celeste/Mods folder. Alternatively, copy Celeste.dll, FNA.dll and MMHOOK_Celeste.dll to a folder called 'lib-stripped' in the repository root." />
</Target>
<ItemGroup>
<PackageReference Include="MonoMod.RuntimeDetour" Version="25.0.2" PrivateAssets="all" ExcludeAssets="runtime" />
<PackageReference Include="MonoMod.Utils" Version="25.0.3" />
<PackageReference Include="YamlDotNet" Version="15.1.2" />
</ItemGroup>
<ItemGroup>
<Reference Include="Celeste" HintPath="$(CelestePrefix)\Celeste.dll" Private="$(CopyCeleste)" />
<Reference Include="MMHOOK_Celeste" HintPath="$(CelestePrefix)\MMHOOK_Celeste.dll" Private="$(CopyCeleste)" />
<!-- core is always FNA, so we can ditch XNA :lfgeline: -->
<Reference Include="FNA" HintPath="$(CelestePrefix)\FNA.dll" Private="$(CopyCeleste)" />
</ItemGroup>
<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>