-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMatterbridge.csproj
106 lines (98 loc) · 3.9 KB
/
Matterbridge.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
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
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net452</TargetFramework>
<LangVersion>latest</LangVersion>
<Nullable>enable</Nullable>
<AssemblyTitle>Matterbridge API Connector</AssemblyTitle>
<Version>0.0.6</Version>
<Description>A matterbridge api connector for VS server</Description>
<Authors>NikkyAI</Authors>
<WebPage>https://github.com/NikkyAI/vs-matterbridge</WebPage>
</PropertyGroup>
<ItemGroup>
<Reference Include="VintagestoryAPI">
<HintPath>$(VINTAGE_STORY)/VintagestoryAPI.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="VintagestoryLib">
<HintPath>$(VINTAGE_STORY)/VintagestoryLib.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="VSSurvivalMod">
<HintPath>$(VINTAGE_STORY)/Mods/VSSurvivalMod.dll</HintPath>
<Private>False</Private>
</Reference>
<!--
<Reference Include="VSEssentials">
<HintPath>$(VINTAGE_STORY)/Mods/VSEssentials.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="VSCreativeMod">
<HintPath>$(VINTAGE_STORY)/Mods/VSCreativeMod.dll</HintPath>
<Private>False</Private>
</Reference>
-->
<Reference Include="Newtonsoft.Json">
<HintPath>$(VINTAGE_STORY)/Lib/Newtonsoft.Json.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="websocket-sharp">
<HintPath>$(VINTAGE_STORY)/Lib/websocket-sharp.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="harmony">
<HintPath>$(VINTAGE_STORY)/Lib//0Harmony.dll</HintPath>
<Private>false</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="WebSocket4Net" Version="0.15.2" />
</ItemGroup>
<ItemGroup>
<None Include="resources\**\*.*">
<Link>%(RecursiveDir)%(Filename)%(Extension)</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<Target Name="GenerateResource" BeforeTargets="BeforeBuild">
<Delete Files=".generated\**\*.*" />
<GenerateModinfo InputFilename="modinfo.json" OutputFilename="resources/modinfo.json" Modid="$(AssemblyName)" Version="$(Version)" Description="$(Description)" Name="$(AssemblyTitle)" Author="$(Authors)" Website="$(WebPage)" />
<Message Importance="High" Text="generated .generated/modinfo.json" />
</Target>
<Target Name="Package" AfterTargets="PostBuildEvent">
<ZipDirectory DestinationFile="bin/$(TargetName).zip" SourceDirectory="$(TargetDir)" Overwrite="true" />
</Target>
<UsingTask TaskName="GenerateModinfo" TaskFactory="RoslynCodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.Core.dll">
<ParameterGroup>
<InputFilename ParameterType="System.String" Required="true" />
<OutputFilename ParameterType="System.String" Required="true" />
<Version ParameterType="System.String" Required="true" />
<Name ParameterType="System.String" Required="true" />
<Modid ParameterType="System.String" Required="true" />
<Description ParameterType="System.String" Required="true" />
<Author ParameterType="System.String" Required="true" />
<Website ParameterType="System.String" Required="true" />
</ParameterGroup>
<Task>
<Using Namespace="System" />
<Using Namespace="System.IO" />
<Code Type="Fragment" Language="cs">
<![CDATA[
Directory.CreateDirectory(System.IO.Directory.GetParent(OutputFilename).FullName);
Console.WriteLine(System.IO.Directory.GetParent(OutputFilename).FullName);
string content = File.ReadAllText(InputFilename)
.Replace("$Version$", Version)
.Replace("$Description$", Description)
.Replace("$Name$", Name)
.Replace("$Modid$", Modid.ToLower())
.Replace("$Author$", Author)
.Replace("$Website$", Website);
File.WriteAllText(
OutputFilename,
content
);
]]>
</Code>
</Task>
</UsingTask>
</Project>