b1524 - Added Text Tranformation pipeline
This commit is contained in:
parent
286185bf1c
commit
256e2370a3
4 changed files with 59 additions and 12 deletions
|
@ -15,7 +15,7 @@ using System.Resources;
|
||||||
[assembly: AssemblyCulture("")]
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
// Version informationr(
|
// Version informationr(
|
||||||
[assembly: AssemblyVersion("0.0.0.1510")]
|
[assembly: AssemblyVersion("0.0.0.1524")]
|
||||||
[assembly: AssemblyFileVersion("0.0.0.1510")]
|
[assembly: AssemblyFileVersion("0.0.0.1524")]
|
||||||
[assembly: NeutralResourcesLanguageAttribute( "en-US" )]
|
[assembly: NeutralResourcesLanguageAttribute( "en-US" )]
|
||||||
|
|
||||||
|
|
|
@ -496,6 +496,10 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="Console\Console Commands.txt" />
|
<Content Include="Console\Console Commands.txt" />
|
||||||
|
<Content Include="modinfo.tt">
|
||||||
|
<Generator>TextTemplatingFileGenerator</Generator>
|
||||||
|
<LastGenOutput>modinfo.json</LastGenOutput>
|
||||||
|
</Content>
|
||||||
<Content Include="Properties\AssemblyInfo.tt">
|
<Content Include="Properties\AssemblyInfo.tt">
|
||||||
<Generator>TextTemplatingFileGenerator</Generator>
|
<Generator>TextTemplatingFileGenerator</Generator>
|
||||||
<LastGenOutput>AssemblyInfo.cs</LastGenOutput>
|
<LastGenOutput>AssemblyInfo.cs</LastGenOutput>
|
||||||
|
@ -513,7 +517,11 @@
|
||||||
<EmbeddedResource Include="srmultiplayer.dat" />
|
<EmbeddedResource Include="srmultiplayer.dat" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<EmbeddedResource Include="modinfo.json" />
|
<EmbeddedResource Include="modinfo.json">
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DesignTime>True</DesignTime>
|
||||||
|
<DependentUpon>modinfo.tt</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
|
@ -521,7 +529,13 @@
|
||||||
</PostBuildEvent>
|
</PostBuildEvent>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<PreBuildEvent>
|
<PreBuildEvent>if "$(ConfigurationName)" == "Standalone" (
|
||||||
</PreBuildEvent>
|
"$(DevEnvDir)TextTransform.exe" "$(ProjectDir)Properties\AssemblyInfo.tt"
|
||||||
|
"$(DevEnvDir)TextTransform.exe" "$(ProjectDir)modinfo.tt"
|
||||||
|
)
|
||||||
|
if "$(ConfigurationName)" == "SRML" (
|
||||||
|
"$(DevEnvDir)TextTransform.exe" "$(ProjectDir)Properties\AssemblyInfo.tt"
|
||||||
|
"$(DevEnvDir)TextTransform.exe" "$(ProjectDir)modinfo.tt"
|
||||||
|
)</PreBuildEvent>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
|
@ -1,9 +1,10 @@
|
||||||
{
|
{
|
||||||
"id": "srmp",
|
"id": "srmp",
|
||||||
"name": "Slime Rancher Multiplayer",
|
"name": "Slime Rancher Multiplayer",
|
||||||
"version": "0.0.1510",
|
"version": "0.0.1524",
|
||||||
"author": "SatyPardus",
|
"author": "SatyPardus",
|
||||||
"dependencies": [
|
"dependencies": [
|
||||||
|
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
]
|
|
||||||
}
|
|
32
SRMP/modinfo.tt
Normal file
32
SRMP/modinfo.tt
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
<#@ template debug="true" hostspecific="true" language="C#" #>
|
||||||
|
<#@ output extension=".json" #>
|
||||||
|
<#@ import namespace="System.IO" #>
|
||||||
|
<#@ import namespace="System.Text.RegularExpressions" #>
|
||||||
|
<#
|
||||||
|
string output = File.ReadAllText(this.Host.ResolvePath("Properties/AssemblyInfo.cs"));
|
||||||
|
Regex pattern = new Regex("AssemblyVersion\\(\"(?<major>\\d+)\\.(?<minor>\\d+)\\.(?<revision>\\d+)\\.(?<build>\\d+)\"\\)");
|
||||||
|
MatchCollection matches = pattern.Matches(output);
|
||||||
|
if( matches.Count == 1 )
|
||||||
|
{
|
||||||
|
major = Convert.ToInt32(matches[0].Groups["major"].Value);
|
||||||
|
minor = Convert.ToInt32(matches[0].Groups["minor"].Value);
|
||||||
|
build = Convert.ToInt32(matches[0].Groups["build"].Value);
|
||||||
|
revision = Convert.ToInt32(matches[0].Groups["revision"].Value);
|
||||||
|
}
|
||||||
|
#>
|
||||||
|
{
|
||||||
|
"id": "srmp",
|
||||||
|
"name": "Slime Rancher Multiplayer",
|
||||||
|
"version": "0.0.<#= this.build #>",
|
||||||
|
"author": "SatyPardus",
|
||||||
|
"dependencies": [
|
||||||
|
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
<#+
|
||||||
|
int major = 0;
|
||||||
|
int minor = 0;
|
||||||
|
int revision = 0;
|
||||||
|
int build = 0;
|
||||||
|
#>
|
Loading…
Reference in a new issue