Skip to content

Commit

Permalink
Adding special case for TAGame.PRI_Breakout_TA. Updating to use fra…
Browse files Browse the repository at this point in the history
…meworks that aren't obsolete (yet). Bumped major version number, since I may have broken the world.
  • Loading branch information
jjbott committed Mar 25, 2022
1 parent bd78ea6 commit 11090d3
Show file tree
Hide file tree
Showing 10 changed files with 34 additions and 47 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netcoreapp2.0;net45</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net462</TargetFrameworks>
<Title>RocketLeagueReplayParser.Console</Title>
<Company>Joe Bott</Company>
<Product>RocketLeagueReplayParser.Console</Product>
Expand All @@ -9,16 +9,6 @@
<OutputType>Exe</OutputType>
<StartupObject />
</PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net45'">
<PackageReference Include="CommandLineParser">
<Version>2.1.1-beta</Version>
</PackageReference>
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp1.0'">
<PackageReference Include="CommandLineParser">
<Version>2.3.0</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="CommandLineParser" Version="2.3.0" />
</ItemGroup>
Expand Down
12 changes: 6 additions & 6 deletions RocketLeagueReplayParser.Console/publish.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
$version = ([Xml] (Get-Content ../RocketLeagueReplayParser/RocketLeagueReplayParser.csproj)).Project.PropertyGroup.Version
Write-Host $version
Remove-Item ../publish -Recurse
dotnet publish -o ../publish/net45 -c Release -f net45
dotnet publish -o ../publish/netcoreapp2.0-portable -c Release -f netcoreapp2.0
dotnet publish -o ../publish/linux-x86 -c Release -f netcoreapp2.0 -r linux-x86
dotnet publish -o ../publish/linux-x64 -c Release -f netcoreapp2.0 -r linux-x64
dotnet publish -o ../publish/net462 -c Release -f net462
dotnet publish -o ../publish/netstandard2.0-portable -c Release -f netstandard2.0
dotnet publish -o ../publish/linux-x86 -c Release -f netstandard2.0 -r linux-x86
dotnet publish -o ../publish/linux-x64 -c Release -f netstandard2.0 -r linux-x64

Compress-Archive ../publish/net45/* "../publish/RocketLeagueReplayParser.Console.$version.zip"
Compress-Archive ../publish/netcoreapp2.0-portable/* "../publish/RocketLeagueReplayParser.Console.netcoreapp2.0.$version.zip"
Compress-Archive ../publish/net462/* "../publish/RocketLeagueReplayParser.Console.$version.zip"
Compress-Archive ../publish/netstandard2.0-portable/* "../publish/RocketLeagueReplayParser.Console.netstandard2.0.$version.zip"
Compress-Archive ../publish/linux-x86/* "../publish/RocketLeagueReplayParser.Console.linux-x86.$version.zip"
Compress-Archive ../publish/linux-x64/* "../publish/RocketLeagueReplayParser.Console.linux-x64.$version.zip"
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netcoreapp2.0;net45</TargetFrameworks>
<TargetFrameworks>net6.0;net462</TargetFrameworks>
<Title>RocketLeagueReplayParser.Tests</Title>
<Company>Joe Bott</Company>
<Product>RocketLeagueReplayParser.Tests</Product>
<Copyright>Copyright © 2018</Copyright>
<UserSecretsId>7442558f-f026-49e6-89bc-9f6e21a78ef7</UserSecretsId>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.8.0" />
<PackageReference Include="Moq" Version="4.9.0" />
<PackageReference Include="NUnit" Version="3.10.1" />
<PackageReference Include="NUnit3TestAdapter" Version="3.10.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.1.0" />
<PackageReference Include="Moq" Version="4.17.2" />
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="NUnit3TestAdapter" Version="3.17.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\RocketLeagueReplayParser\RocketLeagueReplayParser.csproj" />
Expand Down
8 changes: 4 additions & 4 deletions RocketLeagueReplayParser.sln
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27428.2027
# Visual Studio Version 16
VisualStudioVersion = 16.0.30503.244
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RocketLeagueReplayParser.Tests", "RocketLeagueReplayParser.Tests\RocketLeagueReplayParser.Tests.csproj", "{693ADC99-1BE6-4CBA-82F1-155891749118}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RocketLeagueReplayParser.Tests", "RocketLeagueReplayParser.Tests\RocketLeagueReplayParser.Tests.csproj", "{693ADC99-1BE6-4CBA-82F1-155891749118}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{54C32273-2458-4542-902C-73495336CBC5}"
ProjectSection(SolutionItems) = preProject
README.md = README.md
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RocketLeagueReplayParser.Console", "RocketLeagueReplayParser.Console\RocketLeagueReplayParser.Console.csproj", "{E3B4EC94-556E-42FF-B546-620B98A8B768}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RocketLeagueReplayParser.Console", "RocketLeagueReplayParser.Console\RocketLeagueReplayParser.Console.csproj", "{E3B4EC94-556E-42FF-B546-620B98A8B768}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RocketLeagueReplayParser", "RocketLeagueReplayParser\RocketLeagueReplayParser.csproj", "{AF3BE899-747D-4EF3-AC91-1F9373BEB9E3}"
EndProject
Expand Down
2 changes: 1 addition & 1 deletion RocketLeagueReplayParser/BitReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ public string ReadString(int? fixedLength = null)
if (length > 0)
{
var bytes = ReadBytes(length);
#if !NET45
#if !NET462
return CodePagesEncodingProvider.Instance.GetEncoding(1252).GetString(bytes, 0, length - 1);
#else
return Encoding.GetEncoding(1252).GetString(bytes, 0, length - 1);
Expand Down
2 changes: 1 addition & 1 deletion RocketLeagueReplayParser/ByteArrayExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public static string ReadString2(this BinaryReader br)
{
var bytes = br.ReadBytes(length);

#if !NET45
#if !NET462
return CodePagesEncodingProvider.Instance.GetEncoding(1252).GetString(bytes, 0, length - 1);
#else
return Encoding.ASCII.GetString(bytes, 0, length - 1);
Expand Down
3 changes: 2 additions & 1 deletion RocketLeagueReplayParser/NetworkStream/ActorState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,8 @@ public static ClassNetCache ObjectNameToClassNetCache(string objectName, IDictio
return classNetCacheByName["TAGame.GameEvent_Football_TA"];
case "TAGame.Default__PickupTimer_TA":
return classNetCacheByName["TAGame.PickupTimer_TA"];

case "TAGame.Default__PRI_Breakout_TA":
return classNetCacheByName["TAGame.PRI_Breakout_TA"];
}

if (objectName.Contains("CrowdActor_TA"))
Expand Down
3 changes: 3 additions & 0 deletions RocketLeagueReplayParser/Replay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,9 @@ public static Replay Deserialize(BinaryReader br)
replay.FixClassParent("Engine.TeamInfo", "Engine.ReplicationInfo");
replay.FixClassParent("TAGame.Team_TA", "Engine.TeamInfo");

// Fixes https://ballchasing.com/dl/replay/c0d0b0e0-562d-40a9-be75-410fbfd4d698
replay.FixClassParent("TAGame.PRI_Breakout_TA", "TAGame.PRI_TA");

replay.Frames = ExtractFrames(replay.MaxChannels(), replay.NetworkStream, replay.Objects, replay.ClassNetCaches, replay.EngineVersion, replay.LicenseeVersion, replay.NetVersion);

if (br.BaseStream.Position != br.BaseStream.Length)
Expand Down
26 changes: 9 additions & 17 deletions RocketLeagueReplayParser/RocketLeagueReplayParser.csproj
Original file line number Diff line number Diff line change
@@ -1,35 +1,27 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netcoreapp2.0;netstandard1.3;net45</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net462</TargetFrameworks>
<Title>RocketLeagueReplayParser</Title>
<Company>Joe Bott</Company>
<Product>RocketLeagueReplayParser</Product>
<Copyright>Copyright © 2015-2021</Copyright>

<!--Incrementing minor for every major patch -->
<Version>2.11.0</Version>
<FileVersion>2.11.0</FileVersion>
<PackageVersion>2.11.0</PackageVersion>
<AssemblyVersion>2.11.0</AssemblyVersion>
<Version>3.0.0</Version>
<FileVersion>3.0.0</FileVersion>
<PackageVersion>3.0.0</PackageVersion>
<AssemblyVersion>3.0.0</AssemblyVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="CompareNETObjects" Version="4.52.0" />
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
<PackageReference Include="CompareNETObjects" Version="4.76.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard1.3'">
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<PackageReference Include="System.Diagnostics.TraceSource">
<Version>4.3.0</Version>
</PackageReference>
<PackageReference Include="System.Text.Encoding.CodePages">
<Version>4.5.0</Version>
</PackageReference>
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp2.0'">
<PackageReference Include="System.Diagnostics.TraceSource">
<Version>4.3.0</Version>
</PackageReference>
<PackageReference Include="System.Text.Encoding.CodePages">
<Version>4.5.0</Version>
<Version>6.0.0</Version>
</PackageReference>
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion RocketLeagueReplayParser/StringExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public static IEnumerable<byte> Serialize(this string s)
}
else
{
#if !NET45
#if !NET462
result.AddRange(CodePagesEncodingProvider.Instance.GetEncoding(1252).GetBytes(s));
#else
result.AddRange(Encoding.GetEncoding(1252).GetBytes(s));
Expand Down

0 comments on commit 11090d3

Please sign in to comment.