From b559c3b4333bc35603697310d3abe211898ebfbf Mon Sep 17 00:00:00 2001 From: amizing25 Date: Thu, 16 Jul 2026 22:36:42 +0700 Subject: [PATCH] chore: remove `mhypbase` --- Cargo.lock | 8 -------- Cargo.toml | 2 +- README.md | 4 ++-- mhypbase/Cargo.toml | 12 ------------ mhypbase/build.rs | 7 ------- mhypbase/mhypbase.def | 3 --- mhypbase/src/lib.rs | 27 --------------------------- 7 files changed, 3 insertions(+), 60 deletions(-) delete mode 100644 mhypbase/Cargo.toml delete mode 100644 mhypbase/build.rs delete mode 100644 mhypbase/mhypbase.def delete mode 100644 mhypbase/src/lib.rs diff --git a/Cargo.lock b/Cargo.lock index da46ffc..f4079d6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -125,14 +125,6 @@ version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" -[[package]] -name = "mhypbase" -version = "0.1.0" -dependencies = [ - "hkrpg", - "windows", -] - [[package]] name = "once_cell" version = "1.21.3" diff --git a/Cargo.toml b/Cargo.toml index 82a304d..27f0ad0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [workspace] -members = ["hkrpg", "launcher", "mhypbase", "ext"] +members = ["hkrpg", "launcher", "ext"] resolver = "2" diff --git a/README.md b/README.md index 5a4808a..3696fcb 100644 --- a/README.md +++ b/README.md @@ -3,9 +3,9 @@ features: - remove censorship - replace AccountRSAKey into custom public key (by default, compatible with [hoyo-sdk by xeondev](https://git.xeondev.com/reversedrooms/hoyo-sdk)) -currently, this has only been tested on CNBETAWin3.1.53 and may require an update for future versions. +currently, this has only been tested on CNBETAWin4.4.51 and may require an update for future versions. -note: if you plan to use `mhypbase.dll`, please make a copy of the original first in case something breaks. Otherwise, simply copy `hkrpg.dll` and `launcher.exe` into the game folder and run `launcher.exe` as an administrator. +note: simply copy `hkrpg.dll` and `launcher.exe` into the game folder and run `launcher.exe` as an administrator. Sources: diff --git a/mhypbase/Cargo.toml b/mhypbase/Cargo.toml deleted file mode 100644 index 211775c..0000000 --- a/mhypbase/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "mhypbase" -edition = "2024" -version.workspace = true - -[lib] -name = "mhypbase" -crate-type = ["cdylib"] - -[dependencies] -windows.workspace = true -hkrpg.workspace = true diff --git a/mhypbase/build.rs b/mhypbase/build.rs deleted file mode 100644 index a6b1f5b..0000000 --- a/mhypbase/build.rs +++ /dev/null @@ -1,7 +0,0 @@ -fn main() { - println!( - "cargo:rustc-link-search=native={}", - std::env::var("OUT_DIR").unwrap() - ); - println!("cargo:rustc-link-arg=/DEF:mhypbase/mhypbase.def"); -} diff --git a/mhypbase/mhypbase.def b/mhypbase/mhypbase.def deleted file mode 100644 index e60fc26..0000000 --- a/mhypbase/mhypbase.def +++ /dev/null @@ -1,3 +0,0 @@ -LIBRARY MHYPBASE -EXPORTS - Initialize @1 diff --git a/mhypbase/src/lib.rs b/mhypbase/src/lib.rs deleted file mode 100644 index 9ff6077..0000000 --- a/mhypbase/src/lib.rs +++ /dev/null @@ -1,27 +0,0 @@ -use windows::Win32::{ - Foundation::HINSTANCE, - System::{ - SystemServices::DLL_PROCESS_ATTACH, - Threading::{GetCurrentThread, TerminateThread}, - }, -}; - -#[unsafe(no_mangle)] -#[allow(non_snake_case, unused_variables)] -extern "C" fn Initialize() -> bool { - std::thread::sleep(std::time::Duration::from_secs(2)); - - unsafe { - TerminateThread(GetCurrentThread(), 0).unwrap(); - } - - false -} - -#[allow(non_snake_case)] -#[unsafe(no_mangle)] -unsafe extern "system" fn DllMain(_: HINSTANCE, call_reason: u32, _: *mut ()) { - if call_reason == DLL_PROCESS_ATTACH { - std::thread::spawn(hkrpg::main); - } -}