sunnyyoung / WeChatTweak-macOS

A dynamic library tweak for WeChat macOS - 首款微信 macOS 客户端撤回拦截与多开 🔨
https://tweaks.app
Apache License 2.0
11.21k stars 1.38k forks source link

Mac M1芯片,安装成功后,微信启动不了 #393

Closed YouZhengChuan closed 2 years ago

YouZhengChuan commented 2 years ago

系统版本 12.0.1 (21A559) MacBook Air (M1, 2020) 芯片:Apple M1

To re-install wechattweak-cli, run:


- 执行
```sh
 » sudo wechattweak-cli --install
------ Backup ------
WeChat.bak exists, skip it...
------ Download ------
------ Unzip ------
Execute command: rm -rf /Applications/WeChat.app/Contents/MacOS/WeChatTweak.framework; unzip /tmp/WeChatTweak.zip -d /Applications/WeChat.app/Contents/MacOS
------ Insert Dylib ------
Binary is a fat binary with 2 archs.
LC_CODE_SIGNATURE load command found. Remove it.
LC_CODE_SIGNATURE load command found. Remove it.
Added LC_LOAD_DYLIB to all archs in /Applications/WeChat.app/Contents/MacOS/WeChat
------ Codesign ------
Execute command: cp /Applications/WeChat.app/Contents/MacOS/WeChat /tmp/WeChat
Execute command: codesign --force --deep --sign - /tmp/WeChat
Execute command: cp /tmp/WeChat /Applications/WeChat.app/Contents/MacOS/WeChat
Install success!

点击桌面微信图标,提示无法打开。

然后就可以打开微信了。

YouZhengChuan commented 2 years ago

安装之后,用file查看,应用程序是支持ARM64的

» file /Applications/WeChat.app/Contents/MacOS/WeChat
/Applications/WeChat.app/Contents/MacOS/WeChat: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64] [arm64]
/Applications/WeChat.app/Contents/MacOS/WeChat (for architecture x86_64):   Mach-O 64-bit executable x86_64
/Applications/WeChat.app/Contents/MacOS/WeChat (for architecture arm64):    Mach-O 64-bit executable arm64

直接点击图标打不开,但是用arch命令可以打开:

» arch -x86_64 /Applications/WeChat.app/Contents/MacOS/WeChat
objc[42407]: Class MarsReachability is implemented in both /Applications/WeChat.app/Contents/Frameworks/matrixreport.framework/Versions/A/matrixreport (0x11404c740) and /Applications/WeChat.app/Contents/MacOS/WeChat (0x105b4cf08). One of the two will be used. Which one is undefined.
[INFO] GCDWebServer started on port 48065 and reachable at http://localhost:48065/
2021-12-14 17:11:24.523 WeChat[42407:21861171] Event: kMMLoginEventUseOneClickLogin, from state: stateStart to state: stateShowingOneClick
2021-12-14 17:12:44.794 WeChat[42407:21861171] Alive 5
sunnyyoung commented 2 years ago
  1. 看 FAQ
  2. 重启电脑
JustIsDK commented 2 years ago

实测,同样的问题,重启即可解决

YouZhengChuan commented 2 years ago

实测,同样的问题,重启即可解决

是什么原理,为啥重启就好了。。

sunnyyoung commented 2 years ago

@YouZhengChuan 苹果的 Bug,至今没搞懂……