mirror of
https://github.com/Sunnyyoung/WeChatTweak-macOS.git
synced 2026-04-20 05:15:09 +08:00
command: patch dylib by default
This commit is contained in:
parent
07d4916880
commit
5325f257fd
|
|
@ -24,7 +24,13 @@ struct Command {
|
|||
}
|
||||
|
||||
static func patch(app: URL, config: Config) async throws {
|
||||
try Patcher.patch(binary: app.appendingPathComponent("Contents/MacOS/WeChat"), config: config)
|
||||
let dylibURL = app.appendingPathComponent("Contents/Frameworks/wechat.dylib")
|
||||
let mainURL = app.appendingPathComponent("Contents/MacOS/WeChat")
|
||||
|
||||
// Check for the newer directory structure first: if wechat.dylib exists, patch it only.
|
||||
// Otherwise, fall back to the main WeChat binary.
|
||||
let targetURL = FileManager.default.fileExists(atPath: dylibURL.path) ? dylibURL : mainURL
|
||||
try Patcher.patch(binary: targetURL, config: config)
|
||||
}
|
||||
|
||||
static func resign(app: URL) async throws {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user