Add offline fallbacks for remote components #9
+8
-20
@@ -77,8 +77,8 @@ _CUSTOM_GLUES_SITES = (
|
|||||||
)
|
)
|
||||||
|
|
||||||
# Numeric fields are intentionally allowed to keep legitimate values already
|
# Numeric fields are intentionally allowed to keep legitimate values already
|
||||||
# selected by Turtle/Octo/community launchers. Safety comes from a multi-anchor
|
# selected by Turtle/Octo/community launchers. Safety comes from validating the
|
||||||
# 1.12.1/5875 identity check plus tight per-field supported ranges; the exact
|
# actual managed patch regions plus tight per-field supported ranges; the exact
|
||||||
# source bytes are then snapshotted so the upstream patcher may only preserve
|
# source bytes are then snapshotted so the upstream patcher may only preserve
|
||||||
# them or replace them with the Tool's requested value.
|
# them or replace them with the Tool's requested value.
|
||||||
_NUMERIC_SITES = (
|
_NUMERIC_SITES = (
|
||||||
@@ -286,9 +286,8 @@ class ModernWowSetupTool(_ModernWowSetupToolCore):
|
|||||||
|
|
||||||
def _vanilla_tweaks_signature(self):
|
def _vanilla_tweaks_signature(self):
|
||||||
signature = super()._vanilla_tweaks_signature()
|
signature = super()._vanilla_tweaks_signature()
|
||||||
# Keep the B-total policy generation stable for old markers/tests, but
|
# Keep the B-total policy generation stable for existing test builds.
|
||||||
# add a second key so every v3 output is repatched once for the stricter
|
# Fixed build/version string anchors are no longer part of preflight.
|
||||||
# source fingerprint policy.
|
|
||||||
signature["selected_patch_normalization"] = 3
|
signature["selected_patch_normalization"] = 3
|
||||||
signature["source_fingerprint_policy"] = 1
|
signature["source_fingerprint_policy"] = 1
|
||||||
return signature
|
return signature
|
||||||
@@ -337,18 +336,9 @@ class ModernWowSetupTool(_ModernWowSetupToolCore):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _validate_client_identity(data):
|
def _validate_client_identity(data):
|
||||||
"""Require immutable Vanilla 1.12.1/5875 anchors before fixed-offset tweaks."""
|
"""Compatibility no-op: Turtle/Octo may move build/version strings."""
|
||||||
build = bytes(
|
del data
|
||||||
data[_CLIENT_BUILD_OFFSET:_CLIENT_BUILD_OFFSET + len(_CLIENT_BUILD)]
|
return None
|
||||||
)
|
|
||||||
version = bytes(
|
|
||||||
data[_CLIENT_VERSION_OFFSET:_CLIENT_VERSION_OFFSET + len(_CLIENT_VERSION)]
|
|
||||||
)
|
|
||||||
if build != _CLIENT_BUILD or version != _CLIENT_VERSION:
|
|
||||||
raise RuntimeError(
|
|
||||||
"WoW.exe is not the expected Vanilla 1.12.1 build 5875; "
|
|
||||||
"refusing to apply fixed-offset executable tweaks."
|
|
||||||
)
|
|
||||||
|
|
||||||
def _capture_source_numeric_states(self, data, desired):
|
def _capture_source_numeric_states(self, data, desired):
|
||||||
"""Validate tight supported ranges and snapshot the exact source bytes."""
|
"""Validate tight supported ranges and snapshot the exact source bytes."""
|
||||||
@@ -505,8 +495,6 @@ class ModernWowSetupTool(_ModernWowSetupToolCore):
|
|||||||
) from exc
|
) from exc
|
||||||
|
|
||||||
desired = self._desired_normalized_values()
|
desired = self._desired_normalized_values()
|
||||||
# Validate patch-region signatures first so a changed code site reports
|
|
||||||
# the most useful failure even before the build fingerprint is checked.
|
|
||||||
preserved = self._validate_vanilla_tweaks_state(
|
preserved = self._validate_vanilla_tweaks_state(
|
||||||
data,
|
data,
|
||||||
allow_foreign_custom_glues=True,
|
allow_foreign_custom_glues=True,
|
||||||
@@ -711,4 +699,4 @@ sys.modules[__name__].__class__ = _DynamicModuleProxy
|
|||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
root = tk.Tk()
|
root = tk.Tk()
|
||||||
app = ModernWowSetupTool(root)
|
app = ModernWowSetupTool(root)
|
||||||
root.mainloop()
|
root.mainloop()
|
||||||
|
|||||||
Reference in New Issue
Block a user