Skip to content

Commit

Permalink
Updating to the latest version of LancachePrefill.Common
Browse files Browse the repository at this point in the history
  • Loading branch information
tpill90 committed Nov 23, 2024
1 parent 764fbf6 commit 1992e44
Show file tree
Hide file tree
Showing 8 changed files with 302 additions and 226 deletions.
Original file line number Diff line number Diff line change
@@ -1,33 +1,26 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<OutputType>Library</OutputType>

<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="coverlet.collector" Version="3.0.2">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.4" />
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="NUnit3TestAdapter" Version="4.2.1" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\BattleNetPrefill\BattleNetPrefill.csproj" />
</ItemGroup>

<ItemGroup>
<!-- Custom Spectre.Console build, includes changes to display transfer speed in bits -->
<Reference Include="Spectre.Console">
<HintPath>..\LancachePrefill.Common\lib\Spectre.Console.dll</HintPath>
</Reference>
<Reference Include="Spectre.Console.Testing">
<HintPath>..\LancachePrefill.Common\lib\Spectre.Console.Testing.dll</HintPath>
</Reference>
</ItemGroup>

</Project>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<OutputType>Library</OutputType>

<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="coverlet.collector" Version="3.0.2">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.4" />
<PackageReference Include="Spectre.Console" Version="0.49.2-preview.0.67" />
<PackageReference Include="Spectre.Console.Testing" Version="0.49.2-preview.0.67" />
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="NUnit3TestAdapter" Version="4.2.1" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\BattleNetPrefill\BattleNetPrefill.csproj" />
</ItemGroup>


</Project>
52 changes: 26 additions & 26 deletions BattleNetPrefill.Test/BattleNetPrefill.Test.csproj
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<OutputType>Library</OutputType>

<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="coverlet.collector" Version="3.0.2">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="HexMate" Version="0.0.3" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.4" />
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="NUnit3TestAdapter" Version="4.2.1" />
<PackageReference Include="Spectre.Console.Testing" Version="0.44.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\BattleNetPrefill\BattleNetPrefill.csproj" />
<ProjectReference Include="..\Benchmarks\Benchmarks.csproj" />
</ItemGroup>

</Project>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<OutputType>Library</OutputType>

<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="coverlet.collector" Version="3.0.2">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="HexMate" Version="0.0.3" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.4" />
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="NUnit3TestAdapter" Version="4.2.1" />
<PackageReference Include="Spectre.Console.Testing" Version="0.49.2-preview.0.67" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\BattleNetPrefill\BattleNetPrefill.csproj" />
<ProjectReference Include="..\Benchmarks\Benchmarks.csproj" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion BattleNetPrefill/AppConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ static AppConfig()
/// Downloaded archive indexes, as well as other metadata, are saved into this directory to speedup future prefill runs.
/// All data in here should be able to be deleted safely.
/// </summary>
public static readonly string CacheDir = CacheDirUtils.GetCacheDirBaseDirectories("BattlenetPrefill", cacheDirVersion: "");
public static readonly string CacheDir = TempDirUtils.GetTempDirBaseDirectories("BattlenetPrefill", tempDirVersion: "");

/// <summary>
/// Contains user configuration. Should not be deleted, doing so will reset the app back to defaults.
Expand Down
246 changes: 121 additions & 125 deletions BattleNetPrefill/BattleNetPrefill.csproj
Original file line number Diff line number Diff line change
@@ -1,131 +1,127 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<RuntimeIdentifiers>win-x64;linux-x64;linux-arm64;osx-x64</RuntimeIdentifiers>
<OutputType>Exe</OutputType>

<AssemblyName>BattleNetPrefill</AssemblyName>
<RootNamespace>BattleNetPrefill</RootNamespace>
<VersionPrefix>2.0.0</VersionPrefix>
<Authors>tpill90</Authors>

<AllowUnsafeBlocks>True</AllowUnsafeBlocks>

<!-- Code analysis settings -->
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<Features>strict</Features>
<AnalysisLevel>latest</AnalysisLevel>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
</PropertyGroup>

<!-- Publish Settings -->
<PropertyGroup>
<PublishTrimmed>true</PublishTrimmed>
<EnableTrimAnalyzer>true</EnableTrimAnalyzer>
<TrimmerSingleWarn>false</TrimmerSingleWarn>
<!-- Reverts back to the default trim mode used by dotnet 6, otherwise CliFx breaks without reflection -->
<TrimMode>partial</TrimMode>

<PublishSingleFile>true</PublishSingleFile>

<!-- Required to be enabled in order to run this application on Ubuntu Docker images. -->
<InvariantGlobalization>true</InvariantGlobalization>

<!-- Removes the git commit hash being appended to the version number when publishing.. Ex: v2.3.0+5afde434cfe8472ba36138c4912e7aa08a7a22d0 -->
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
</PropertyGroup>

<!--TODO is this needed?-->
<ItemGroup>
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleToAttribute">
<_Parameter1>BattleNetPrefill.Test</_Parameter1>
</AssemblyAttribute>
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleToAttribute">
<_Parameter1>BattleNetPrefill.Integration.Test</_Parameter1>
</AssemblyAttribute>
</ItemGroup>

<!-- PDB won't be included in published package -->
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<DebugType>none</DebugType>
<DebugSymbols>false</DebugSymbols>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<RuntimeIdentifiers>win-x64;linux-x64;linux-arm64;osx-x64</RuntimeIdentifiers>
<OutputType>Exe</OutputType>

<AssemblyName>BattleNetPrefill</AssemblyName>
<RootNamespace>BattleNetPrefill</RootNamespace>
<VersionPrefix>2.0.0</VersionPrefix>
<Authors>tpill90</Authors>

<AllowUnsafeBlocks>True</AllowUnsafeBlocks>

<!-- Code analysis settings -->
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<Features>strict</Features>
<AnalysisLevel>latest</AnalysisLevel>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
</PropertyGroup>

<!-- Publish Settings -->
<PropertyGroup>
<PublishTrimmed>true</PublishTrimmed>
<EnableTrimAnalyzer>true</EnableTrimAnalyzer>
<TrimmerSingleWarn>false</TrimmerSingleWarn>
<!-- Reverts back to the default trim mode used by dotnet 6, otherwise CliFx breaks without reflection -->
<TrimMode>partial</TrimMode>

<PublishSingleFile>true</PublishSingleFile>

<!-- Required to be enabled in order to run this application on Ubuntu Docker images. -->
<InvariantGlobalization>true</InvariantGlobalization>

<!-- Removes the git commit hash being appended to the version number when publishing.. Ex: v2.3.0+5afde434cfe8472ba36138c4912e7aa08a7a22d0 -->
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
</PropertyGroup>

<!--TODO is this needed?-->
<ItemGroup>
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleToAttribute">
<_Parameter1>BattleNetPrefill.Test</_Parameter1>
</AssemblyAttribute>
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleToAttribute">
<_Parameter1>BattleNetPrefill.Integration.Test</_Parameter1>
</AssemblyAttribute>
</ItemGroup>

<!-- PDB won't be included in published package -->
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<DebugType>none</DebugType>
<DebugSymbols>false</DebugSymbols>
</PropertyGroup>

<PropertyGroup>
<!-- Removes the full file system path from exception stack traces, only shows the file names now -->
<PathMap>$(MSBuildProjectDirectory)=$(MSBuildProjectName)</PathMap>
</PropertyGroup>

<!-- Includes Linux update script in publish package -->
<ItemGroup Condition="'$(RuntimeIdentifier)'=='linux-x64'">
<Content Include="..\scripts\**\update.sh">
<Link>%(RecursiveDir)%(Filename)%(Extension)</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>

<!-- Includes Windows update script in publish package -->
<ItemGroup Condition="'$(RuntimeIdentifier)'=='win-x64'">
<Content Include="..\scripts\**\update.ps1">
<Link>%(RecursiveDir)%(Filename)%(Extension)</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>

<ItemGroup>
</PropertyGroup>

<!-- Includes Linux update script in publish package -->
<ItemGroup Condition="'$(RuntimeIdentifier)'=='linux-x64'">
<Content Include="..\scripts\**\update.sh">
<Link>%(RecursiveDir)%(Filename)%(Extension)</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>

<!-- Includes Windows update script in publish package -->
<ItemGroup Condition="'$(RuntimeIdentifier)'=='win-x64'">
<Content Include="..\scripts\**\update.ps1">
<Link>%(RecursiveDir)%(Filename)%(Extension)</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>

<ItemGroup>
<!-- External Packages -->
<PackageReference Include="HexMate" Version="0.0.3" />
<PackageReference Include="Microsoft.IO.RecyclableMemoryStream" Version="2.2.0" />
<PackageReference Include="Polly" Version="7.2.3" />
<PackageReference Include="System.Text.Json" Version="6.0.5" />
<PackageReference Include="ThisAssembly.AssemblyInfo" Version="1.4.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>

<!-- Custom CliFx build, allows for top level exception handling in application code, instead of CliFx swallowing all exceptions -->
<Reference Include="CliFx">
<HintPath>..\LancachePrefill.Common\lib\CliFx.dll</HintPath>
</Reference>

<!-- Custom Spectre.Console build, includes changes to display transfer speed in bits -->
<Reference Include="Spectre.Console">
<HintPath>..\LancachePrefill.Common\lib\Spectre.Console.dll</HintPath>
</Reference>

<!-- Debugging Packages -->
<PackageReference Include="JetBrains.Annotations" Version="2022.1.0" />

<!-- Analyzers -->
<PackageReference Include="AsyncFixer" Version="1.6.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<!-- TODO reenable once a way to disable warning EPS05 for generated serialization context is figured out -->
<!--<PackageReference Include="ErrorProne.NET.Structs" Version="0.1.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>-->

<PackageReference Include="Microsoft.CodeAnalysis.BannedApiAnalyzers" Version="3.3.4">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<!-- Required definitions in order for Microsoft.CodeAnalysis.BannedApiAnalyzers to work -->
<AdditionalFiles Include="..\LancachePrefill.Common\BannedSymbols.txt" Link="Properties\BannedSymbols.txt" />

<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" Version="16.9.60">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="Spectre.Console.Analyzer" Version="0.44.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\LancachePrefill.Common\dotnet\LancachePrefill.Common.csproj" />
</ItemGroup>
</Project>
<PackageReference Include="HexMate" Version="0.0.3" />
<PackageReference Include="Microsoft.IO.RecyclableMemoryStream" Version="2.2.0" />
<PackageReference Include="Polly" Version="7.2.3" />
<PackageReference Include="Spectre.Console" Version="0.49.2-preview.0.67" />
<PackageReference Include="System.Text.Json" Version="6.0.5" />
<PackageReference Include="ThisAssembly.AssemblyInfo" Version="1.4.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>

<!-- Custom CliFx build, allows for top level exception handling in application code, instead of CliFx swallowing all exceptions -->
<Reference Include="CliFx">
<HintPath>..\LancachePrefill.Common\lib\CliFx.dll</HintPath>
</Reference>

<!-- Debugging Packages -->
<PackageReference Include="JetBrains.Annotations" Version="2022.1.0" />

<!-- Analyzers -->
<PackageReference Include="AsyncFixer" Version="1.6.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<!-- TODO reenable once a way to disable warning EPS05 for generated serialization context is figured out -->
<!--<PackageReference Include="ErrorProne.NET.Structs" Version="0.1.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>-->

<PackageReference Include="Microsoft.CodeAnalysis.BannedApiAnalyzers" Version="3.3.4">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<!-- Required definitions in order for Microsoft.CodeAnalysis.BannedApiAnalyzers to work -->
<AdditionalFiles Include="..\LancachePrefill.Common\BannedSymbols.txt" Link="Properties\BannedSymbols.txt" />

<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" Version="16.9.60">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="Spectre.Console.Analyzer" Version="1.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\LancachePrefill.Common\dotnet\LancachePrefill.Common.csproj" />
</ItemGroup>
</Project>
Loading

0 comments on commit 1992e44

Please sign in to comment.