mirror of
https://github.com/Thealexbarney/LibHac.git
synced 2024-11-14 10:49:41 +01:00
Target .NET 8
This commit is contained in:
parent
f28e7a7dbb
commit
48e7651291
8 changed files with 28 additions and 31 deletions
|
@ -1 +1 @@
|
|||
7.0.402
|
||||
8.0.100
|
|
@ -43,7 +43,7 @@ partial class Build : NukeBuild
|
|||
AbsolutePath ArtifactsDirectory => RootDirectory / "artifacts";
|
||||
AbsolutePath SignedArtifactsDirectory => ArtifactsDirectory / "signed";
|
||||
AbsolutePath TempDirectory => RootDirectory / ".nuke" / "temp";
|
||||
AbsolutePath CliCoreDir => TempDirectory / "hactoolnet_net7.0";
|
||||
AbsolutePath CliCoreDir => TempDirectory / "hactoolnet_net8.0";
|
||||
AbsolutePath CliNativeDir => TempDirectory / $"hactoolnet_{HostOsName}";
|
||||
AbsolutePath CliNativeExe => CliNativeDir / $"hactoolnet{NativeProgramExtension}";
|
||||
AbsolutePath CliCoreZip => ArtifactsDirectory / $"hactoolnet-{VersionString}-netcore.zip";
|
||||
|
@ -226,7 +226,7 @@ partial class Build : NukeBuild
|
|||
|
||||
DotNetPublish(s => publishSettings
|
||||
.SetProject(HactoolnetProject)
|
||||
.SetFramework("net7.0")
|
||||
.SetFramework("net8.0")
|
||||
.SetOutput(CliCoreDir)
|
||||
.SetNoBuild(true)
|
||||
.SetProperties(VersionProps));
|
||||
|
@ -276,7 +276,7 @@ partial class Build : NukeBuild
|
|||
.EnableNoBuild()
|
||||
.SetConfiguration(Configuration);
|
||||
|
||||
if (EnvironmentInfo.IsUnix) settings = settings.SetProperty("TargetFramework", "net7.0");
|
||||
if (EnvironmentInfo.IsUnix) settings = settings.SetProperty("TargetFramework", "net8.0");
|
||||
|
||||
DotNetTest(s => settings);
|
||||
});
|
||||
|
@ -593,7 +593,7 @@ partial class Build : NukeBuild
|
|||
SignAssemblies(password, toSign.Select(x => x.ToString()).ToArray());
|
||||
|
||||
// Avoid having multiple signed versions of the same file
|
||||
File.Copy(nupkgDir / "lib" / "net7.0" / "LibHac.dll", coreFxDir / "LibHac.dll", true);
|
||||
File.Copy(nupkgDir / "lib" / "net8.0" / "LibHac.dll", coreFxDir / "LibHac.dll", true);
|
||||
|
||||
ZipDirectory(SignedArtifactsDirectory / Path.GetFileName(nupkgFile), nupkgDir, pkgFileList, CommitTime);
|
||||
ZipDirectory(SignedArtifactsDirectory / Path.GetFileName(CliCoreZip), coreFxDir, CommitTime);
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
|
||||
<RootNamespace>LibHacBuild.CodeGen</RootNamespace>
|
||||
<IsPackable>False</IsPackable>
|
||||
|
|
|
@ -2,20 +2,21 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
|
||||
<RootNamespace>LibHacBuild</RootNamespace>
|
||||
<IsPackable>False</IsPackable>
|
||||
<NoWarn>CS0649;CS0169</NoWarn>
|
||||
<NukeRootDirectory>..</NukeRootDirectory>
|
||||
<NukeScriptDirectory>..</NukeScriptDirectory>
|
||||
<NukeRootDirectory>..</NukeRootDirectory>
|
||||
<NukeScriptDirectory>..</NukeScriptDirectory>
|
||||
<NukeTelemetryVersion>1</NukeTelemetryVersion>
|
||||
<EnableUnsafeBinaryFormatterSerialization>true</EnableUnsafeBinaryFormatterSerialization>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageDownload Include="GitVersion.Tool" Version="[5.12.0]" />
|
||||
<PackageReference Include="CsvHelper" Version="30.0.1" />
|
||||
<PackageReference Include="NuGet.CommandLine" Version="6.7.0">
|
||||
<PackageReference Include="NuGet.CommandLine" Version="6.8.0">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<PropertyGroup>
|
||||
<OutputType>Library</OutputType>
|
||||
<VersionPrefix>0.19.0</VersionPrefix>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
</PropertyGroup>
|
||||
|
||||
|
@ -37,10 +37,6 @@
|
|||
<Compile Condition="Exists('Common\Keys\DefaultKeySet.Generated.cs')" Remove="Common\Keys\DefaultKeySet.Empty.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
|
||||
<_Parameter1>LibHac.Tests</_Parameter1>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
|
@ -24,8 +24,8 @@
|
|||
</ItemGroup>
|
||||
|
||||
<PropertyGroup Condition=" $(BuildType.StartsWith('native')) ">
|
||||
<PublishAot>true</PublishAot>
|
||||
<DefineConstants>NATIVEAOT;$(DefineConstants)</DefineConstants>
|
||||
<PublishAot>true</PublishAot>
|
||||
<DefineConstants>NATIVEAOT;$(DefineConstants)</DefineConstants>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition=" $(BuildType.StartsWith('native')) and '$(BuildType)' != 'native-untrimmed' ">
|
||||
|
|
|
@ -215,7 +215,7 @@ public class PathFormatterTests
|
|||
Assert.Equal(expectedNormalized, StringUtils.Utf8ZToString(buffer));
|
||||
}
|
||||
|
||||
public static TheoryData<string, string, bool, int, Result> TestData_IsNormalized_EmptyPath => new()
|
||||
public static TheoryData<string, string, bool, long, Result> TestData_IsNormalized_EmptyPath => new()
|
||||
{
|
||||
{ @"", "", false, 0, ResultFs.InvalidPathFormat.Value },
|
||||
{ @"", "E", true, 0, Result.Success },
|
||||
|
@ -229,7 +229,7 @@ public class PathFormatterTests
|
|||
IsNormalizedImpl(path, pathFlags, expectedIsNormalized, expectedLength, expectedResult);
|
||||
}
|
||||
|
||||
public static TheoryData<string, string, bool, int, Result> TestData_IsNormalized_MountName => new()
|
||||
public static TheoryData<string, string, bool, long, Result> TestData_IsNormalized_MountName => new()
|
||||
{
|
||||
{ @"mount:/aa/bb", "", false, 0, ResultFs.InvalidPathFormat.Value },
|
||||
{ @"mount:/aa/bb", "W", false, 0, ResultFs.InvalidPathFormat.Value },
|
||||
|
@ -251,7 +251,7 @@ public class PathFormatterTests
|
|||
IsNormalizedImpl(path, pathFlags, expectedIsNormalized, expectedLength, expectedResult);
|
||||
}
|
||||
|
||||
public static TheoryData<string, string, bool, int, Result> TestData_IsNormalized_WindowsPath => new()
|
||||
public static TheoryData<string, string, bool, long, Result> TestData_IsNormalized_WindowsPath => new()
|
||||
{
|
||||
{ @"c:/aa/bb", "", false, 0, ResultFs.InvalidPathFormat.Value },
|
||||
{ @"c:\aa\bb", "", false, 0, ResultFs.InvalidPathFormat.Value },
|
||||
|
@ -298,7 +298,7 @@ public class PathFormatterTests
|
|||
IsNormalizedImpl(path, pathFlags, expectedIsNormalized, expectedLength, expectedResult);
|
||||
}
|
||||
|
||||
public static TheoryData<string, string, bool, int, Result> TestData_IsNormalized_RelativePath => new()
|
||||
public static TheoryData<string, string, bool, long, Result> TestData_IsNormalized_RelativePath => new()
|
||||
{
|
||||
{ @"./aa/bb", "", false, 0, ResultFs.InvalidPathFormat.Value },
|
||||
{ @"./aa/bb/../cc", "R", false, 1, Result.Success },
|
||||
|
@ -318,7 +318,7 @@ public class PathFormatterTests
|
|||
IsNormalizedImpl(path, pathFlags, expectedIsNormalized, expectedLength, expectedResult);
|
||||
}
|
||||
|
||||
public static TheoryData<string, string, bool, int, Result> TestData_IsNormalized_Backslash => new()
|
||||
public static TheoryData<string, string, bool, long, Result> TestData_IsNormalized_Backslash => new()
|
||||
{
|
||||
{ @"\aa\bb\..\cc", "", false, 0, ResultFs.InvalidPathFormat.Value },
|
||||
{ @"\aa\bb\..\cc", "B", false, 0, ResultFs.InvalidPathFormat.Value },
|
||||
|
@ -339,7 +339,7 @@ public class PathFormatterTests
|
|||
IsNormalizedImpl(path, pathFlags, expectedIsNormalized, expectedLength, expectedResult);
|
||||
}
|
||||
|
||||
public static TheoryData<string, string, bool, int, Result> TestData_IsNormalized_AllowAllChars => new()
|
||||
public static TheoryData<string, string, bool, long, Result> TestData_IsNormalized_AllowAllChars => new()
|
||||
{
|
||||
{ @"/aa/b:b/cc", "", false, 0, ResultFs.InvalidCharacter.Value },
|
||||
{ @"/aa/b*b/cc", "", false, 0, ResultFs.InvalidCharacter.Value },
|
||||
|
@ -372,7 +372,7 @@ public class PathFormatterTests
|
|||
IsNormalizedImpl(path, pathFlags, expectedIsNormalized, expectedLength, expectedResult);
|
||||
}
|
||||
|
||||
public static TheoryData<string, string, bool, int, Result> TestData_IsNormalized_All => new()
|
||||
public static TheoryData<string, string, bool, long, Result> TestData_IsNormalized_All => new()
|
||||
{
|
||||
{ @"mount:./aa/bb", "WRM", true, 13, Result.Success },
|
||||
{ @"mount:./aa/bb\cc/dd", "WRM", false, 0, Result.Success },
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
|
||||
|
||||
|
@ -9,11 +9,11 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
|
||||
<PackageReference Include="xunit.core" Version="2.5.1" />
|
||||
<PackageReference Include="xunit.analyzers" Version="1.3.0" />
|
||||
<PackageReference Include="xunit.assert.source" Version="2.5.1" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.1">
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
|
||||
<PackageReference Include="xunit.core" Version="2.6.2" />
|
||||
<PackageReference Include="xunit.analyzers" Version="1.6.0" />
|
||||
<PackageReference Include="xunit.assert.source" Version="2.6.2" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.4">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
|
|
Loading…
Reference in a new issue