Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
deanhannigan committed Oct 14, 2023
2 parents 9030af3 + 2726064 commit 6224869
Show file tree
Hide file tree
Showing 7,086 changed files with 103,740 additions and 27,601 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 1 addition & 1 deletion .github/workflows/draft-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ jobs:
dotnet-version: 7.x

# Pack and upload nugets for Types, Modkit and CLI
- run: dotnet pack .\WolvenKit.RED4.Types\WolvenKit.RED4.csproj
- run: dotnet pack .\WolvenKit.RED4\WolvenKit.RED4.csproj
- run: dotnet nuget push .\WolvenKit.RED4\nupkg\*.nupkg --api-key ${{secrets.NUGET_KEY}} --source "https://api.nuget.org/v3/index.json" --skip-duplicate

- run: dotnet pack .\WolvenKit.Modkit\WolvenKit.Modkit.csproj
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ jobs:
if: ${{ env.HAS_CLI_COMMITS == 'true' }}
run: dotnet pack ./WolvenKit.CLI/WolvenKit.CLI.csproj --version-suffix "nightly.${{env.ISODATE}}"
- name: push nuget
continue-on-error: true
if: ${{ env.HAS_CLI_COMMITS == 'true' }}
run: dotnet nuget push .\WolvenKit.CLI\nupkg\*.nupkg --api-key ${{secrets.NUGET_KEY}} --source "https://api.nuget.org/v3/index.json" --skip-duplicate

Expand Down Expand Up @@ -150,4 +151,4 @@ jobs:
token: ${{ secrets.RELEASE_TOKEN }}
body: "This is a beta release so you may encounter bugs. Please report them.\n${{ steps.tag_version.outputs.changelog }}"



14 changes: 10 additions & 4 deletions .github/workflows/publish-nugets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,17 @@ jobs:
dotnet-version: 7.x

# Pack and upload nugets for Types, Modkit and CLI
- run: dotnet pack .\WolvenKit.RED4.Types\WolvenKit.RED4.Types.csproj
- run: dotnet nuget push .\WolvenKit.RED4.Types\nupkg\*.nupkg --api-key ${{secrets.NUGET_KEY}} --source "https://api.nuget.org/v3/index.json" --skip-duplicate
- run: dotnet pack .\WolvenKit.RED4\WolvenKit.RED4.csproj
- name: RED4
continue-on-error: true
run: dotnet nuget push .\WolvenKit.RED4\nupkg\*.nupkg --api-key ${{secrets.NUGET_KEY}} --source "https://api.nuget.org/v3/index.json" --skip-duplicate

- run: dotnet pack .\WolvenKit.Modkit\WolvenKit.Modkit.csproj
- run: dotnet nuget push .\WolvenKit.Modkit\nupkg\*.nupkg --api-key ${{secrets.NUGET_KEY}} --source "https://api.nuget.org/v3/index.json" --skip-duplicate
- name: Modkit
continue-on-error: true
run: dotnet nuget push .\WolvenKit.Modkit\nupkg\*.nupkg --api-key ${{secrets.NUGET_KEY}} --source "https://api.nuget.org/v3/index.json" --skip-duplicate

- run: dotnet pack .\WolvenKit.CLI\WolvenKit.CLI.csproj
- run: dotnet nuget push .\WolvenKit.CLI\nupkg\*.nupkg --api-key ${{secrets.NUGET_KEY}} --source "https://api.nuget.org/v3/index.json" --skip-duplicate
- name: CLI
continue-on-error: true
run: dotnet nuget push .\WolvenKit.CLI\nupkg\*.nupkg --api-key ${{secrets.NUGET_KEY}} --source "https://api.nuget.org/v3/index.json" --skip-duplicate
22 changes: 22 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,28 @@



WolvenKit 8.11.0 - 2023/09/26
-----------------


Features


Bug Fixes



WolvenKit 8.10.0 - 2023/09/20
-----------------


Features


Bug Fixes



WolvenKit 8.9.0 - 2023/03/20
-----------------

Expand Down
4 changes: 2 additions & 2 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ currently being supported with security updates.

| Version | Supported |
| ------- | ------------------ |
| 8.9.0 | :white_check_mark: |
| < 8.9 | :x: |
| 8.11.0 | :white_check_mark: |
| < 8.11 | :x: |

## Reporting a Vulnerability

Expand Down
21 changes: 10 additions & 11 deletions Tests/WolvenKit.FunctionalTests/Cr2wReadTest.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//#define IS_PARALLEL
#define IS_PARALLEL

using System;
using System.Collections.Concurrent;
Expand All @@ -13,6 +13,7 @@
using WolvenKit.FunctionalTests.Model;
using WolvenKit.RED4.Archive;
using WolvenKit.RED4.Archive.IO;
using WolvenKit.RED4.Types;

#if IS_PARALLEL
using System.Threading.Tasks;
Expand All @@ -29,7 +30,7 @@ public class Cr2wReadTest : GameUnitTest
public static void SetupClass(TestContext context) => Setup(context);

private const bool TEST_EXISTING = true;
private const bool DECOMPRESS_BUFFERS = false;
private const bool DECOMPRESS_BUFFERS = true;

#endregion Methods

Expand Down Expand Up @@ -116,9 +117,6 @@ public class Cr2wReadTest : GameUnitTest
[TestMethod]
public void Read_cookedanims() => Test_Extension(".cookedanims");

[TestMethod]
public void Read_cookedapp() => Test_Extension(".cookedapp");

[TestMethod]
public void Read_cookedprefab() => Test_Extension(".cookedprefab");

Expand All @@ -143,6 +141,9 @@ public class Cr2wReadTest : GameUnitTest
[TestMethod]
public void Read_devices() => Test_Extension(".devices");

[TestMethod]
public void Read_dlcManifest() => Test_Extension(".dlc_manifest");

[TestMethod]
public void Read_dtex() => Test_Extension(".dtex");

Expand Down Expand Up @@ -320,10 +321,6 @@ public class Cr2wReadTest : GameUnitTest
[TestMethod]
public void Read_mt() => Test_Extension(".mt");

// removed in 1.3
//[TestMethod]
//public void Read_navmesh() => Test_Extension(".navmesh");

[TestMethod]
public void Read_null_areas() => Test_Extension(".null_areas");

Expand Down Expand Up @@ -394,10 +391,10 @@ public class Cr2wReadTest : GameUnitTest
public void Read_spatial_representation() => Test_Extension(".spatial_representation");

[TestMethod]
public void Read_streamingquerydata() => Test_Extension(".streamingquerydata");
public void Read_streamingblock() => Test_Extension(".streamingblock");

[TestMethod]
public void Read_streamingblock() => Test_Extension(".streamingblock");
public void Read_streamingquerydata() => Test_Extension(".streamingquerydata");

[TestMethod]
public void Read_streamingsector() => Test_Extension(".streamingsector");
Expand Down Expand Up @@ -484,6 +481,8 @@ private static IEnumerable<ReadTestResult> Read_Archive_Items(IEnumerable<IGameF
ms.Seek(0, SeekOrigin.Begin);
using var reader = new CR2WReader(ms);
reader.ParsingError += TypeGlobal.OnParsingError;
var readResult = reader.ReadFile(out var c, DECOMPRESS_BUFFERS);
switch (readResult)
Expand Down
17 changes: 10 additions & 7 deletions Tests/WolvenKit.FunctionalTests/Cr2wWriteTest.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//#define IS_PARALLEL
#define IS_PARALLEL

using System;
using System.Collections.Concurrent;
Expand All @@ -13,6 +13,7 @@
using WolvenKit.RED4.Archive;
using WolvenKit.RED4.Archive.IO;
using EFileReadErrorCodes = WolvenKit.RED4.Archive.IO.EFileReadErrorCodes;
using WolvenKit.RED4.Types;

#if IS_PARALLEL
using System.Threading.Tasks;
Expand All @@ -38,6 +39,9 @@ public class Cr2wWriteTest : GameUnitTest
// Test_Extension();
//}

[TestMethod]
public void Write_bin() => Test_Extension(".bin");

[TestMethod]
public void Write_acousticdata() => Test_Extension(".acousticdata");

Expand Down Expand Up @@ -74,9 +78,6 @@ public class Cr2wWriteTest : GameUnitTest
[TestMethod]
public void Write_bikecurveset() => Test_Extension(".bikecurveset");

[TestMethod]
public void Write_bin() => Test_Extension(".bin");

[TestMethod]
public void Write_bk2() => Test_Extension(".bk2");

Expand Down Expand Up @@ -113,9 +114,6 @@ public class Cr2wWriteTest : GameUnitTest
[TestMethod]
public void Write_cookedanims() => Test_Extension(".cookedanims");

[TestMethod]
public void Write_cookedapp() => Test_Extension(".cookedapp");

[TestMethod]
public void Write_cookedprefab() => Test_Extension(".cookedprefab");

Expand All @@ -140,6 +138,9 @@ public class Cr2wWriteTest : GameUnitTest
[TestMethod]
public void Write_devices() => Test_Extension(".devices");

[TestMethod]
public void Write_dlcManifest() => Test_Extension(".dlc_manifest");

[TestMethod]
public void Write_dtex() => Test_Extension(".dtex");

Expand Down Expand Up @@ -542,6 +543,8 @@ private static IEnumerable<WriteTestResult> Write_Archive_Items(IEnumerable<IGam
originalStream.Seek(0, SeekOrigin.Begin);
using var originalReader = new CR2WReader(originalStream, Encoding.UTF8, true);
originalReader.ParsingError += TypeGlobal.OnParsingError;
var readResult = originalReader.ReadFile(out var cr2wFile, DECOMPRESS_BUFFERS);
switch (readResult)
Expand Down
5 changes: 3 additions & 2 deletions Tests/WolvenKit.FunctionalTests/GameUnitTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public class GameUnitTest
.AddScoped<IProgressService<double>, ProgressService<double>>()
.AddSingleton<IHashService, HashService>()
.AddScoped<IHookService, HookService>()
.AddScoped<Red4ParserService>()
.AddScoped<MeshTools>()
.AddSingleton<IArchiveManager, ArchiveManager>()
Expand Down Expand Up @@ -123,8 +124,8 @@ protected static void Setup(TestContext context)
//var hashService = _host.Services.GetRequiredService<IHashService>();
s_bm = _host.Services.GetRequiredService<IArchiveManager>();

var archivedir = new DirectoryInfo(Path.Combine(gameDirectory.FullName, "archive", "pc", "content"));
s_bm.LoadFromFolder(archivedir);
var exePath = new FileInfo(Path.Combine(gameDirectory.FullName, "bin", "x64", "Cyberpunk2077.exe"));
s_bm.LoadGameArchives(exePath, false);
s_groupedFiles = s_bm.GetGroupedFiles();

var keyes = s_groupedFiles.Keys.ToList();
Expand Down
26 changes: 21 additions & 5 deletions Tests/WolvenKit.Utility/DumpInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -364,13 +364,13 @@ private void MergeStrings(bool factOnly)
}
}
});

if (factOnly)
{
var nDict = dict.OrderBy(x => x.Key).ToDictionary(x => x.Key, x => x.Value);
File.WriteAllText(Path.Join(resultDir, "facts.json"), JsonSerializer.Serialize(nDict, new JsonSerializerOptions {WriteIndented = true}));
File.WriteAllText(Path.Join(resultDir, "facts.json"), JsonSerializer.Serialize(nDict, new JsonSerializerOptions { WriteIndented = true }));
}
else
{
Expand Down Expand Up @@ -451,7 +451,7 @@ public void DumpStrings()
Directory.CreateDirectory(resultDir);

var existingFiles = new ConcurrentDictionary<string, byte>();
foreach (var file in Directory.GetFiles(resultDir))
foreach (var file in Directory.GetFiles(resultDir, "*.json", SearchOption.AllDirectories))
{
existingFiles.TryAdd(file, 0);
}
Expand All @@ -466,7 +466,23 @@ public void DumpStrings()
continue;
}

var dirPath = Path.Combine(resultDir, archive.Name);
string? dirPath = null;
if (archive.ArchiveAbsolutePath.Contains(@"archive\pc\content"))
{
dirPath = Path.Combine(resultDir, "content");
}

if (archive.ArchiveAbsolutePath.Contains(@"archive\pc\ep1"))
{
dirPath = Path.Combine(resultDir, "ep1");
}

if (string.IsNullOrEmpty(dirPath))
{
throw new Exception();
}

dirPath = Path.Combine(dirPath, archive.Name);
Directory.CreateDirectory(dirPath);

Parallel.ForEach(archive.Files, pair =>
Expand Down Expand Up @@ -735,4 +751,4 @@ public void DumpTextureInfo()
File.WriteAllText(Path.Combine(resultDir, "texinfo.csv"), sw.ToString());
}
}
}
}
5 changes: 3 additions & 2 deletions Tests/WolvenKit.Utility/GameUnitTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public class GameUnitTest
.AddSingleton<IHashService, HashService>()
.AddSingleton<ITweakDBService, TweakDBService>()
.AddScoped<IHookService, HookService>()
.AddScoped<Red4ParserService>()
.AddScoped<MeshTools>()
.AddSingleton<IArchiveManager, ArchiveManager>()
Expand Down Expand Up @@ -131,8 +132,8 @@ protected static void Setup(TestContext context)

s_bm = _host.Services.GetRequiredService<IArchiveManager>();

var archivedir = new DirectoryInfo(Path.Combine(gameDirectory.FullName, "archive", "pc", "content"));
s_bm.LoadFromFolder(archivedir);
var exePath = new FileInfo(Path.Combine(gameDirectory.FullName, "bin", "x64", "Cyberpunk2077.exe"));
s_bm.LoadGameArchives(exePath, false);
s_groupedFiles = s_bm.GetGroupedFiles();

var keyes = s_groupedFiles.Keys.ToList();
Expand Down
Loading

0 comments on commit 6224869

Please sign in to comment.