-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathuEssentials.csproj
More file actions
109 lines (108 loc) · 4.28 KB
/
uEssentials.csproj
File metadata and controls
109 lines (108 loc) · 4.28 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
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
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration>
<OutputType>Library</OutputType>
<RootNamespace>Essentials</RootNamespace>
<TargetFramework>netstandard2.1</TargetFramework>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<OutputPath>bin\</OutputPath>
<DefineConstants>TRACE;DEBUG;DEV</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<Optimize>false</Optimize>
</PropertyGroup>
<PropertyGroup>
<RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
</PropertyGroup>
<PropertyGroup>
<StartupObject />
<BaseOutputPath>C:\Users\funes\Desktop\uEssentials-master\publish</BaseOutputPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG;DEV</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
</PropertyGroup>
<ItemGroup>
<Reference Update="System">
<Private>False</Private>
</Reference>
<Reference Update="System.Core">
<Private>False</Private>
</Reference>
<Reference Update="System.Xml.Linq">
<Private>False</Private>
</Reference>
<Reference Update="System.Xml">
<Private>False</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="default\lang_en.json" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="default\lang_pt-br.json" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="default\lang_es.json" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="default\lang_ru.json" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="RocketModFix.Rocket.API" Version="4.23.1" />
<PackageReference Include="RocketModFix.Rocket.Core" Version="4.23.1" />
<PackageReference Include="RocketModFix.Rocket.Unturned" Version="4.23.1" />
<PackageReference Include="RocketModFix.UnityEngine.Redist" Version="2022.3.62.3" />
<PackageReference Include="RocketModFix.Unturned.Redist.Client" Version="3.26.2.2" />
</ItemGroup>
<ItemGroup>
<Compile Remove="Properties\AssemblyInfo - copia.cs" />
<Compile Remove="src\Commands\CommandInventory.cs" />
<Compile Remove="src\Components\Player\TpaPlayer.cs" />
<Compile Remove="src\Updater\GithubUpdater.cs" />
<Compile Remove="src\Updater\IUpdater.cs" />
<Compile Remove="src\Updater\UpdateResult.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="0Harmony">
<HintPath>Libraries\0Harmony.dll</HintPath>
</Reference>
</ItemGroup>
<UsingTask TaskName="ReplaceDevPluginVersion" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
<ParameterGroup>
<Phase ParameterType="System.String" Required="true" />
</ParameterGroup>
<Task>
<Reference Include="System.Core" />
<Using Namespace="System" />
<Using Namespace="System.IO" />
<Using Namespace="System.Text.RegularExpressions" />
<Code Type="Fragment" Language="cs"><![CDATA[
var random = new Random();
var matchPattern = "PLUGIN_VERSION = \"999\\.\\d+\\.\\d+\\.\\d+\";";
var replacementVersion = Phase == "before"
? string.Format("999.{0}.{1}.{2}", random.Next(100), random.Next(100), random.Next(100))
: "999.0.0.0";
var replacement = string.Format("PLUGIN_VERSION = \"{0}\";", replacementVersion);
File.WriteAllText(
"src/Core/EssCore.cs",
Regex.Replace(File.ReadAllText("src/Core/EssCore.cs"), matchPattern, replacement));
]]></Code>
</Task>
</UsingTask>
<Target Name="BeforeBuild">
<ReplaceDevPluginVersion Phase="before" />
</Target>
<Target Name="AfterBuild">
<ReplaceDevPluginVersion Phase="after" />
</Target>
</Project>