diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a8e8e6de..f0389930 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -21,10 +21,10 @@ jobs: - name: Fetch Submodules Recursively run: git submodule update --init --recursive - - name: .NET 8 Setup + - name: .NET 10 Setup uses: actions/setup-dotnet@v5 with: - dotnet-version: '8.0.x' + dotnet-version: '10.0.x' - name: .NET Restore run: dotnet restore FModel diff --git a/.github/workflows/qa.yml b/.github/workflows/qa.yml index 140f6d92..7f44d434 100644 --- a/.github/workflows/qa.yml +++ b/.github/workflows/qa.yml @@ -14,10 +14,10 @@ jobs: with: submodules: 'recursive' - - name: .NET 8 Setup + - name: .NET 10 Setup uses: actions/setup-dotnet@v5 with: - dotnet-version: '8.0.x' + dotnet-version: '10.0.x' - name: .NET Restore run: dotnet restore "./FModel/FModel.slnx" -r win-x64 diff --git a/CUE4Parse b/CUE4Parse index e16842fa..d807df72 160000 --- a/CUE4Parse +++ b/CUE4Parse @@ -1 +1 @@ -Subproject commit e16842fa0fd94919fcaba5bdcb361ec154be20ed +Subproject commit d807df729bda91706598ef2f4531bd9799dfb8ef diff --git a/FModel/FModel.csproj b/FModel/FModel.csproj index 90c2d391..861a11fe 100644 --- a/FModel/FModel.csproj +++ b/FModel/FModel.csproj @@ -1,8 +1,8 @@ - + WinExe - net8.0-windows + net10.0-windows true FModel.ico 4.4.4.0 @@ -152,27 +152,26 @@ - - + + - - + + - - - + + - + diff --git a/FModel/FModel.sln b/FModel/FModel.sln deleted file mode 100644 index 238d1b59..00000000 --- a/FModel/FModel.sln +++ /dev/null @@ -1,37 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.0.31912.275 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FModel", "FModel.csproj", "{B1F494EA-90A6-4C24-800E-2F724A1884CA}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CUE4Parse", "..\CUE4Parse\CUE4Parse\CUE4Parse.csproj", "{C4620341-BBB7-4384-AC7D-5082D3E0386E}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CUE4Parse-Conversion", "..\CUE4Parse\CUE4Parse-Conversion\CUE4Parse-Conversion.csproj", "{D0E1E8F7-F56D-469A-8E24-C2439B9FFD83}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {B1F494EA-90A6-4C24-800E-2F724A1884CA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B1F494EA-90A6-4C24-800E-2F724A1884CA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B1F494EA-90A6-4C24-800E-2F724A1884CA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B1F494EA-90A6-4C24-800E-2F724A1884CA}.Release|Any CPU.Build.0 = Release|Any CPU - {C4620341-BBB7-4384-AC7D-5082D3E0386E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C4620341-BBB7-4384-AC7D-5082D3E0386E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C4620341-BBB7-4384-AC7D-5082D3E0386E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C4620341-BBB7-4384-AC7D-5082D3E0386E}.Release|Any CPU.Build.0 = Release|Any CPU - {D0E1E8F7-F56D-469A-8E24-C2439B9FFD83}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D0E1E8F7-F56D-469A-8E24-C2439B9FFD83}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D0E1E8F7-F56D-469A-8E24-C2439B9FFD83}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D0E1E8F7-F56D-469A-8E24-C2439B9FFD83}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {53DB7A15-4E15-4575-9402-0110BDF2794E} - EndGlobalSection -EndGlobal diff --git a/FModel/ViewModels/ApiEndpoints/ValorantApiEndpoint.cs b/FModel/ViewModels/ApiEndpoints/ValorantApiEndpoint.cs index fc0713c8..2a450517 100644 --- a/FModel/ViewModels/ApiEndpoints/ValorantApiEndpoint.cs +++ b/FModel/ViewModels/ApiEndpoints/ValorantApiEndpoint.cs @@ -53,7 +53,7 @@ private VManifest(FArchive Ar) Header = new VHeader(Ar); var compressedBuffer = Ar.ReadBytes((int) Header.CompressedSize); var uncompressedBuffer = new byte[(int)Header.UncompressedSize]; - ZlibHelper.Decompress(compressedBuffer, 0, compressedBuffer.Length, uncompressedBuffer, 0, uncompressedBuffer.Length); + Compression.Decompress(compressedBuffer, 0, compressedBuffer.Length, uncompressedBuffer, 0, uncompressedBuffer.Length, CompressionMethod.Zlib, Ar); var manifestAr = new FByteArchive("UncompressedValorantManifest", uncompressedBuffer); Chunks = manifestAr.ReadArray((int) Header.ChunkCount); diff --git a/FModel/ViewModels/ApplicationViewModel.cs b/FModel/ViewModels/ApplicationViewModel.cs index c16619b0..93f746c0 100644 --- a/FModel/ViewModels/ApplicationViewModel.cs +++ b/FModel/ViewModels/ApplicationViewModel.cs @@ -265,15 +265,8 @@ public static async Task InitVgmStream() { var zipDir = Path.GetDirectoryName(vgmZipFilePath)!; await using var zipFs = File.OpenRead(vgmZipFilePath); - using var zip = new ZipArchive(zipFs, ZipArchiveMode.Read); - - foreach (var entry in zip.Entries) - { - var entryPath = Path.Combine(zipDir, entry.FullName); - await using var entryFs = File.Create(entryPath); - await using var entryStream = entry.Open(); - await entryStream.CopyToAsync(entryFs); - } + await using var zip = await ZipArchive.CreateAsync(zipFs, ZipArchiveMode.Read, true, null); + await zip.ExtractToDirectoryAsync(zipDir, true); } else { @@ -305,9 +298,7 @@ public static async Task InitOodle() oodlePath = Path.Combine(UserSettings.Default.OutputDirectory, ".data", OodleHelper.OODLE_NAME_CURRENT); } - OodleHelper.Initialize(oodlePath); - if (OodleHelper.Instance is null) - FLogger.Append(ELog.Error, () => FLogger.Text("Failed to download Oodle", Constants.WHITE, true)); + await OodleHelper.InitializeAsync(oodlePath); } public static async Task InitZlib() @@ -319,12 +310,12 @@ public static async Task InitZlib() { if (!await ZlibHelper.DownloadDllAsync(zlibPath)) { - FLogger.Append(ELog.Error, () => FLogger.Text("Failed to download Zlib-ng", Constants.WHITE, true)); + zlibFileInfo.Refresh(); if (!zlibFileInfo.Exists) return; } } - ZlibHelper.Initialize(zlibPath); + await ZlibHelper.InitializeAsync(zlibPath); } public static async Task InitDetex()