-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathproject.csproj
80 lines (66 loc) · 3.46 KB
/
project.csproj
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
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<BaseName>DarknessNotExcluded</BaseName>
<Version>1.3.2</Version>
<MinSupportedGameBuild>552078</MinSupportedGameBuild>
<AssemblyVersion>$(Version).0</AssemblyVersion>
<TargetFramework>net471</TargetFramework>
<RootNamespace>$(BaseName)</RootNamespace>
<AssemblyName>$(BaseName).mod</AssemblyName>
<NoWarn>CS0649</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="$([MSBuild]::IsOSPlatform('OSX'))">
<GameLibsDir>$(HOME)/Library/Application Support/Steam/steamapps/common/OxygenNotIncluded/OxygenNotIncluded.app/Contents/Resources/Data/Managed</GameLibsDir>
<LocalModsDir>$(HOME)/Library/Application Support/unity.Klei.Oxygen Not Included/mods/Local</LocalModsDir>
<ILRepack>mono $(ILRepack)</ILRepack>
</PropertyGroup>
<PropertyGroup Condition="$([MSBuild]::IsOSPlatform('Windows'))">
<GameLibsDir>C:\Program Files (x86)\Steam\steamapps\common\OxygenNotIncluded\OxygenNotIncluded_Data\Managed</GameLibsDir>
<LocalModsDir>$(OneDrive)\Documents\Klei\OxygenNotIncluded\mods\Local</LocalModsDir>
</PropertyGroup>
<PropertyGroup>
<BundleDir>$(MSBuildProjectDirectory)\bundle</BundleDir>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="ilmerge" Version="3.0.41" />
<PackageReference Include="ILRepack" Version="2.0.18" />
<PackageReference Include="PLib" Version="4.12.0" />
<Reference Include="System" />
<Reference Include="$(GameLibsDir)\0Harmony.dll" />
<Reference Include="$(GameLibsDir)\Assembly-CSharp-firstpass.dll" />
<Reference Include="$(GameLibsDir)\Assembly-CSharp.dll" />
<Reference Include="$(GameLibsDir)\Newtonsoft.Json.dll" />
<Reference Include="$(GameLibsDir)\Unity.TextMeshPro.dll" />
<Reference Include="$(GameLibsDir)\UnityEngine.CoreModule.dll" />
<Reference Include="$(GameLibsDir)\UnityEngine.TextRenderingModule.dll" />
<Reference Include="$(GameLibsDir)\UnityEngine.UI.dll" />
<Reference Include="$(GameLibsDir)\UnityEngine.UIModule.dll" />
</ItemGroup>
<Target Name="Merge" AfterTargets="Build">
<ItemGroup>
<InputAssemblies Include="$(OutDir)$(AssemblyName).dll" />
<InputAssemblies Include="$(OutDir)PLib.dll" />
</ItemGroup>
<ItemGroup>
<LibraryPath Include="$(GameLibsDir)" />
</ItemGroup>
<Exec Command="$(ILRepack) /internalize "/lib:$(GameLibsDir)" "/out:$(OutDir)$(BaseName).dll" "$(OutDir)$(AssemblyName).dll" "$(OutDir)PLib.dll"" />
</Target>
<Target Name="Bundle" AfterTargets="Merge">
<RemoveDir Directories="$(BundleDir)" />
<Copy SourceFiles="$(OutDir)$(BaseName).dll" DestinationFolder="$(BundleDir)" />
<Copy SourceFiles="mod.yaml" DestinationFolder="$(BundleDir)" />
<Copy SourceFiles="assets/square-192.png" DestinationFiles="$(BundleDir)\preview.png" />
<PropertyGroup>
<ModInfo>supportedContent: ALL
minimumSupportedBuild: 552078
version: $(Version)
APIVersion: 2</ModInfo>
</PropertyGroup>
<WriteLinesToFile File="$(BundleDir)/mod_info.yaml" Lines="$(ModInfo)" Overwrite="true"/>
</Target>
<Target Name="Install" AfterTargets="Bundle">
<ItemGroup>
<Bundle Include="$(BundleDir)\**\*" />
</ItemGroup>
<RemoveDir Directories="$(LocalModsDir)\$(BaseName)" />
<Copy SourceFiles="@(Bundle)" DestinationFolder="$(LocalModsDir)\$(BaseName)" />
</Target>
</Project>