Repository navigation
Expand file tree
/
Copy pathPrecinctMP.csproj
More file actions
63 lines (52 loc) · 2.99 KB
/
Copy pathPrecinctMP.csproj
File metadata and controls
63 lines (52 loc) · 2.99 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
<Project Sdk="Microsoft.NET.Sdk">
<!--
PrecinctMP - mod multijoueur expérimental pour The Precinct (MelonLoader, IL2CPP)
>>> MODIFIE UNIQUEMENT LA LIGNE GameDir CI-DESSOUS <<<
(Steam : clic droit sur le jeu > Gérer > Parcourir les fichiers locaux)
Le jeu doit avoir été lancé une fois avec MelonLoader pour générer
MelonLoader\Il2CppAssemblies.
-->
<PropertyGroup>
<GameDir>G:\SteamLibrary\steamapps\common\The Precinct</GameDir>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<PlatformTarget>x64</PlatformTarget>
<DefineConstants>$(DefineConstants);IL2CPP</DefineConstants>
<AssemblyName>PrecinctMP</AssemblyName>
<RootNamespace>PrecinctMP</RootNamespace>
<LangVersion>latest</LangVersion>
<Nullable>disable</Nullable>
<ImplicitUsings>disable</ImplicitUsings>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<MelonLibDir>$(GameDir)\MelonLoader\net6</MelonLibDir>
<GameLibDir>$(GameDir)\MelonLoader\Il2CppAssemblies</GameLibDir>
</PropertyGroup>
<ItemGroup>
<!-- Bibliothèque réseau UDP (MIT) -->
<PackageReference Include="LiteNetLib" Version="1.2.0" />
</ItemGroup>
<ItemGroup>
<Reference Include="MelonLoader"><HintPath>$(MelonLibDir)\MelonLoader.dll</HintPath><Private>false</Private></Reference>
<Reference Include="Il2CppInterop.Runtime"><HintPath>$(MelonLibDir)\Il2CppInterop.Runtime.dll</HintPath><Private>false</Private></Reference>
<Reference Include="Il2CppInterop.Common"><HintPath>$(MelonLibDir)\Il2CppInterop.Common.dll</HintPath><Private>false</Private></Reference>
<Reference Include="0Harmony"><HintPath>$(MelonLibDir)\0Harmony.dll</HintPath><Private>false</Private></Reference>
</ItemGroup>
<!-- Toutes les DLL générées par MelonLoader : UnityEngine*, Assembly-CSharp, Il2Cppmscorlib... -->
<ItemGroup>
<GameDll Include="$(GameLibDir)\*.dll" />
<Reference Include="@(GameDll)"><Private>false</Private></Reference>
</ItemGroup>
<!-- Messages clairs si un chemin est faux -->
<Target Name="CheckPaths" BeforeTargets="ResolveAssemblyReferences;Build">
<Error Condition="!Exists('$(GameDir)')" Text="GameDir introuvable : '$(GameDir)'. Corrige la ligne GameDir en haut de PrecinctMP.csproj." />
<Error Condition="!Exists('$(MelonLibDir)\MelonLoader.dll')" Text="MelonLoader introuvable dans '$(MelonLibDir)'. MelonLoader est-il installé sur le jeu ?" />
<Error Condition="!Exists('$(GameLibDir)\UnityEngine.CoreModule.dll')" Text="'$(GameLibDir)' vide ou absent. Lance le jeu une fois avec MelonLoader pour le générer." />
</Target>
<Target Name="CopyToGame" AfterTargets="Build">
<MakeDir Directories="$(GameDir)\Mods;$(GameDir)\UserLibs" />
<Copy SourceFiles="$(OutDir)PrecinctMP.dll" DestinationFolder="$(GameDir)\Mods" />
<Copy SourceFiles="$(OutDir)LiteNetLib.dll" DestinationFolder="$(GameDir)\UserLibs" />
</Target>
</Project>