Commit Graph

3 Commits

Author SHA1 Message Date
Shirona1337 91fb65c22f feat(build): randomized build-time class-name obfuscation + pin Qt 6.10.2
Rename every shit.zen.* / asm.patchify.* class to a fresh random 16-char name in one random 16-char package on each build, via an ASM ClassRemapper pass (build.gradle ext.obfuscateJar, run after ForgeGradle reobfJar). Class names only; methods/fields preserved. Manifest Premain/Agent-Class, the DllBootstrap Class.forName string, and the native bridge name (generated_names.h OZ_BRIDGE_FQCN) are wired to the generated names. Residual original-name strings (loggers, log text, the asm.patchify.* property keys) scrubbed. Emits build/rename-mapping.txt.

Pin Qt to 6.10.2 (vcpkg builtin-baseline + CI tag 2026.04.27): MSVC 14.44 crashes building Qt 6.11.0. Build Qt single-threaded locally (VCPKG_MAX_CONCURRENCY=1, loader --parallel 1, gated off GitHub Actions) to dodge parallel-compilation compiler crashes on that toolset.

CI uploads rename-mapping.txt as an artifact and attaches it to the Release; the Release body warns that prebuilt artifacts share one fixed (blacklist-able) mapping and users should self-compile. README documents the obfuscation + the self-compile warning.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 14:09:28 +08:00
Shirona1337 3263b0b4cb ci(loader): pin vcpkg baseline so the Qt cache stops missing
The vcpkg install was cloned at a floating HEAD while native/vcpkg.json
carried no builtin-baseline, so every run resolved the qtbase port afresh.
Its package ABI drifted whenever upstream vcpkg moved, the restored
actions/cache entry no longer matched, and qtbase was rebuilt from source
(~31 min) on every push. Because the cache key is static (hash of
vcpkg.json, unchanged since 05-23) the rebuilt tree was never saved back
either, so the miss repeated forever.

Pin both sides to vcpkg tag 2026.05.25
(d015e31e90838a4c9dfa3eed45979bc70d9357fc, qtbase 6.11.0):
  - native/vcpkg.json: add "builtin-baseline"
  - workflow: clone --branch 2026.05.25

Adding the baseline also changes the vcpkg.json hash, so this run gets a
fresh cache key, cold-builds Qt once, and saves it; subsequent runs match
the now-deterministic ABI and skip the qtbase build entirely.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 00:55:19 +08:00
Shirona1337 9a72330c85 feat(loader): Qt6 GUI + strict wrap matcher + scaffold tweaks
Loader UI
  - Replace the Win32 ListView loader window with a Qt6 Widgets
    one. main.cpp + new MainWindow.h/cpp: QTableWidget showing
    PID / Window Title / Window Class, QTimer auto-refresh every
    1 s, double-click a row to inject. Title filter is built in
    (startsWith "Minecraft" and not containing "Launcher"), so
    HMCL / MultiMC / generic Java apps never show up.
  - Dark Fusion theme + inline QSS so the single EXE looks the
    same on any Windows version.
  - native/vcpkg.json declares qtbase[widgets] and build.gradle's
    new findVcpkg() detects VCPKG_ROOT / C:/vcpkg / D:/vcpkg /
    ~/vcpkg / D:/vcpkg-<version> and passes
    -DCMAKE_TOOLCHAIN_FILE + -DVCPKG_TARGET_TRIPLET=
    x64-windows-static so Qt is fully statically linked. Final
    OpenZenLoader.exe stays single-file (~30 MB) with no Qt6*.dll
    or vcruntime/msvcp DLL imports beyond Windows system DLLs.
  - Drop the old ui.cpp and the now-unused run_ui() entry on
    loader.h.

Patch transformer
  - asm.patchify.loader.PatchTransformer.wrapInvoke now tries a
    strict owner+name+desc match first, falling back to the
    historical (owner || name) matcher only if strict turns up
    nothing. The old loose matcher counted every Mth.*(FFF)F call
    against a wrap aimed at Mth.lerp(FFF)F, so a same-method
    sibling wrap that deleted its own site shifted later slice
    indices and made onRenderPitchLerp miss.

LivingEntityRendererPatch
  - With the strict matcher in place, onRenderPitchLerp's slice
    drops from (4,4) to (1,1) - there is exactly one
    Mth.lerp(FFF)F call site in LivingEntityRenderer.render
    (pitch lerp), as verified via javap on the runtime srg jar.
    onRenderHeadYawLerp keeps slice (2,2) (2nd of three
    Mth.rotLerp calls = head yaw). No more "no call site of
    m_14179_" warning at boot.

Scaffold
  - Rename the BooleanSetting field from advancedBlockSearch to
    sneak so the Java name matches the user-facing label ("Sneak").

README
  - Add the vcpkg / Qt prerequisites and update the injector
    usage section to describe the auto-refreshing UI + double-
    click flow.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-23 21:59:01 +08:00