Skip to content

Commit 19fd855

Browse files
committed
chore(release): merge dev into main for v0.4.48
2 parents e0436b5 + a6e77bf commit 19fd855

2 files changed

Lines changed: 28 additions & 9 deletions

File tree

scripts/release_lib/nuget.py

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,11 @@ def snapshot_bundle_variant_after_pack(
6161

6262
manifest_dest = bundle_staging_root / MOD_MANIFEST_NAME
6363
if compat_target == latest_compat or not manifest_dest.is_file():
64-
obj_dir = ritsulib_root / GODOT_MONO_OBJ_PREFIX / configuration
65-
gen = obj_dir / "mod_manifest.generated.json"
64+
gen = generated_manifest_path(
65+
ritsulib_root,
66+
configuration=configuration,
67+
compat_target=compat_target,
68+
)
6669
if gen.is_file():
6770
shutil.copy2(gen, manifest_dest)
6871
copy_viewer_dist_to(bundle_staging_root, ritsulib_root=ritsulib_root)
@@ -503,11 +506,14 @@ def create_github_zip(
503506
) -> Path:
504507
output_dir.mkdir(parents=True, exist_ok=True)
505508
out_bin = ritsulib_root / GODOT_MONO_BIN_PREFIX / configuration
506-
out_obj = ritsulib_root / GODOT_MONO_OBJ_PREFIX / configuration
507509
dll_path = out_bin / ritsulib_built_dll_name()
508510
doc_xml_path = out_bin / ritsulib_built_doc_xml_name()
509511
pdb_path = out_bin / ritsulib_built_pdb_name()
510-
manifest_generated = out_obj / "mod_manifest.generated.json"
512+
manifest_generated = generated_manifest_path(
513+
ritsulib_root,
514+
configuration=configuration,
515+
compat_target=compat_target,
516+
)
511517
manifest_path = manifest_generated if manifest_generated.is_file() else (ritsulib_root / MOD_MANIFEST_NAME)
512518
if not dll_path.is_file():
513519
msg = f"Could not find built DLL for zip packaging: {dll_path}"
@@ -535,6 +541,19 @@ def create_github_zip(
535541
return zip_path
536542

537543

544+
def generated_manifest_path(
545+
ritsulib_root: Path,
546+
*,
547+
configuration: str,
548+
compat_target: str,
549+
) -> Path:
550+
obj_root = ritsulib_root / GODOT_MONO_OBJ_PREFIX / configuration
551+
compat_manifest = obj_root / compat_target / "mod_manifest.generated.json"
552+
if compat_manifest.is_file():
553+
return compat_manifest
554+
return obj_root / "mod_manifest.generated.json"
555+
556+
538557
def run_push(package: Path, *, source: str, api_key: str) -> None:
539558
subprocess.run(
540559
[

src/Diagnostics/Patches/SentryGdExtensionShutdown1071WorkaroundPatch.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
namespace STS2RitsuLib.Diagnostics.Patches
1313
{
1414
/// <summary>
15-
/// Temporary workaround for STS2 0.107.1 native crashes when modded startup shuts down Sentry's
15+
/// Temporary workaround for STS2 0.107.1+ native crashes when modded startup shuts down Sentry's
1616
/// GDExtension before process exit. Remove this patch after the host game fixes the shutdown path.
1717
/// </summary>
1818
internal sealed class SentryGdExtensionShutdown1071WorkaroundPatch : IPatchMethod
1919
{
20-
private static readonly Version AffectedHostVersion = new(0, 107, 1);
20+
private static readonly Version AffectedHostMinVersion = new(0, 107, 1);
2121

2222
private static readonly MethodInfo SkipMethod =
2323
AccessTools.DeclaredMethod(typeof(SentryGdExtensionShutdown1071WorkaroundPatch),
@@ -28,7 +28,7 @@ internal sealed class SentryGdExtensionShutdown1071WorkaroundPatch : IPatchMetho
2828
public static string PatchId => "sentry_gdextension_shutdown_01071_workaround";
2929

3030
public static string Description =>
31-
"Skip STS2 0.107.1 native Sentry GDExtension shutdown while preserving .NET Sentry shutdown";
31+
"Skip STS2 0.107.1+ native Sentry GDExtension shutdown while preserving .NET Sentry shutdown";
3232

3333
public static bool IsCritical => false;
3434

@@ -55,7 +55,7 @@ public static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstructio
5555

5656
private static bool IsAffectedHost()
5757
{
58-
return Sts2HostVersion.Numeric == AffectedHostVersion;
58+
return Sts2HostVersion.Numeric >= AffectedHostMinVersion;
5959
}
6060

6161
private static bool IsGodotObjectCall(MethodInfo method)
@@ -72,7 +72,7 @@ private static Variant SkipNativeGdExtensionShutdown(GodotObject instance, Strin
7272
return default;
7373

7474
PatchLog.For<SentryGdExtensionShutdown1071WorkaroundPatch>().Info(
75-
"[SentryCompat] Skipped native Sentry GDExtension shutdown for STS2 0.107.1 workaround.");
75+
"[SentryCompat] Skipped native Sentry GDExtension shutdown for STS2 0.107.1+ workaround.");
7676
return default;
7777
}
7878
}

0 commit comments

Comments
 (0)