mirror of
https://github.com/Sunnyyoung/WeChatTweak-macOS.git
synced 2025-07-07 16:16:07 +08:00
Some minor issue fixed
1. Update README 2. Update makefile 3. Update screenshot
This commit is contained in:
parent
d2a215865a
commit
62e8fa8bd9
14
Makefile
14
Makefile
|
@ -22,11 +22,15 @@ install::
|
|||
echo "Can not find the dylib file, please build first.";\
|
||||
exit 1;\
|
||||
fi
|
||||
|
||||
@cp ${WECHATPATH}/WeChat ${WECHATPATH}/WeChat.bak;
|
||||
@cp ./${DYLIBFILE} ${WECHATPATH}/${DYLIBFILE};
|
||||
@./insert_dylib @executable_path/${DYLIBFILE} ${WECHATPATH}/WeChat ${WECHATPATH}/WeChat --all-yes;
|
||||
@echo "Install successed!";
|
||||
@if [ -f "${WECHATPATH}/${DYLIBFILE}" ]; then\
|
||||
cp ./${DYLIBFILE} ${WECHATPATH}/${DYLIBFILE};\
|
||||
echo "Tweak file found! Replace with new tweak file successed!";\
|
||||
else \
|
||||
cp ${WECHATPATH}/WeChat ${WECHATPATH}/WeChat.bak;\
|
||||
cp ./${DYLIBFILE} ${WECHATPATH}/${DYLIBFILE};\
|
||||
./insert_dylib @executable_path/${DYLIBFILE} ${WECHATPATH}/WeChat ${WECHATPATH}/WeChat --all-yes;\
|
||||
echo "Install successed!";\
|
||||
fi
|
||||
|
||||
uninstall::
|
||||
@if ! [[ $EUID -eq 0 ]]; then\
|
||||
|
|
|
@ -9,8 +9,6 @@
|
|||
## 截图
|
||||
|
||||

|
||||

|
||||

|
||||
|
||||
## 功能
|
||||
|
||||
|
@ -19,13 +17,13 @@
|
|||
- 系统通知
|
||||
- 正常撤回自己发出的消息
|
||||
- 客户端无限多开
|
||||
- 右键 Dock Icon 登录新的微信账号
|
||||
- 右键 dock icon 登录新的微信账号
|
||||
- 命令行执行:`open -n /Applications/WeChat.app`
|
||||
- 重新打开应用无需手机认证
|
||||
|
||||
## 使用
|
||||
|
||||
- `sudo make install` 安装动态库
|
||||
- `sudo make install` 安装或者更新动态库
|
||||
- `sudo make uninstall` 卸载动态库
|
||||
|
||||
## 开发调试
|
||||
|
@ -43,6 +41,11 @@
|
|||
- [JRSwizzle](https://github.com/rentzsch/jrswizzle)
|
||||
- [insert_dylib](https://github.com/Tyilo/insert_dylib)
|
||||
|
||||
## 参考
|
||||
|
||||
- [微信 macOS 客户端无限多开功能实践](https://blog.sunnyyoung.net/wei-xin-macos-ke-hu-duan-wu-xian-duo-kai-gong-neng-shi-jian/)
|
||||
- [微信 macOS 客户端拦截撤回功能实践](https://blog.sunnyyoung.net/wei-xin-macos-ke-hu-duan-lan-jie-che-hui-gong-neng-shi-jian/)
|
||||
|
||||
## License
|
||||
|
||||
The [MIT License](LICENSE).
|
||||
|
|
11
README.md
11
README.md
|
@ -9,8 +9,6 @@ A dynamic library tweak for WeChat macOS.
|
|||
## Screenshot
|
||||
|
||||

|
||||

|
||||

|
||||
|
||||
## Feature
|
||||
|
||||
|
@ -19,13 +17,13 @@ A dynamic library tweak for WeChat macOS.
|
|||
- System notification
|
||||
- Revoke message you sent
|
||||
- Multiple WeChat Instance
|
||||
- Right click on the Dock icon to login another WeChat account
|
||||
- Right click on the dock icon to login another WeChat account
|
||||
- Run command: `open -n /Applications/WeChat.app`
|
||||
- Auto login without authentication
|
||||
|
||||
## Usage
|
||||
|
||||
- `sudo make install` Inject the dylib
|
||||
- `sudo make install` Install or Updrade the dylib
|
||||
- `sudo make uninstall` Uninstall the dylib
|
||||
|
||||
## Development
|
||||
|
@ -43,6 +41,11 @@ Run `xcode-select --install` to install Command Line Tools
|
|||
- [JRSwizzle](https://github.com/rentzsch/jrswizzle)
|
||||
- [insert_dylib](https://github.com/Tyilo/insert_dylib)
|
||||
|
||||
## Reference
|
||||
|
||||
- [微信 macOS 客户端无限多开功能实践](https://blog.sunnyyoung.net/wei-xin-macos-ke-hu-duan-wu-xian-duo-kai-gong-neng-shi-jian/)
|
||||
- [微信 macOS 客户端拦截撤回功能实践](https://blog.sunnyyoung.net/wei-xin-macos-ke-hu-duan-lan-jie-che-hui-gong-neng-shi-jian/)
|
||||
|
||||
## License
|
||||
|
||||
The [MIT License](LICENSE).
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 105 KiB After Width: | Height: | Size: 575 KiB |
Binary file not shown.
Before Width: | Height: | Size: 78 KiB |
Binary file not shown.
Before Width: | Height: | Size: 163 KiB |
Binary file not shown.
|
@ -82,7 +82,7 @@ static void __attribute__((constructor)) tweak(void) {
|
|||
|
||||
// Dispatch notification
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
// Delete message if is revoke from myself
|
||||
// Delete message if it is revoke from myself
|
||||
if ([localMessageData isSendFromSelf]) {
|
||||
[((MessageService *)self) DelMsg:session msgList:@[localMessageData] isDelAll:NO isManual:YES];
|
||||
[((MessageService *)self) AddRevokePromptMsg:session msgData: promptMessageData];
|
||||
|
@ -108,7 +108,7 @@ static void __attribute__((constructor)) tweak(void) {
|
|||
}
|
||||
|
||||
- (void)openNewWeChatInstace:(id)sender {
|
||||
NSString *applicationPath = [[objc_getClass("NSBundle") mainBundle] bundlePath];
|
||||
NSString *applicationPath = [[NSBundle mainBundle] bundlePath];
|
||||
NSTask *task = [[objc_getClass("NSTask") alloc] init];
|
||||
task.launchPath = @"/usr/bin/open";
|
||||
task.arguments = @[@"-n", applicationPath];
|
||||
|
@ -119,19 +119,16 @@ static void __attribute__((constructor)) tweak(void) {
|
|||
|
||||
- (void)tweak_applicationDidFinishLaunching:(NSNotification *)notification {
|
||||
[self tweak_applicationDidFinishLaunching:notification];
|
||||
NSBundle *bundle = [objc_getClass("NSBundle") mainBundle];
|
||||
NSString *bundleIdentifier = [bundle bundleIdentifier];
|
||||
NSString *bundleIdentifier = [[objc_getClass("NSBundle") mainBundle] bundleIdentifier];
|
||||
NSArray *instances = [objc_getClass("NSRunningApplication") runningApplicationsWithBundleIdentifier:bundleIdentifier];
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wobjc-method-access"
|
||||
// Detect multiple instance conflict
|
||||
if (instances.count == 1) {
|
||||
id serviceCenter = [objc_getClass("MMServiceCenter") defaultCenter];
|
||||
id accountService = [serviceCenter getService:objc_getClass("AccountService")];
|
||||
AccountService *accountService = [[objc_getClass("MMServiceCenter") defaultCenter] getService:objc_getClass("AccountService")];
|
||||
if ([accountService canAutoAuth]) {
|
||||
[accountService AutoAuth];
|
||||
}
|
||||
}
|
||||
#pragma clang diagnostic pop
|
||||
|
||||
}
|
||||
|
||||
- (NSApplicationTerminateReply)tweak_applicationShouldTerminate:(NSApplication *)sender {
|
||||
|
|
|
@ -42,3 +42,10 @@
|
|||
- (void)notifyAddMsgOnMainThread:(id)arg1 msgData:(id)arg2;
|
||||
|
||||
@end
|
||||
|
||||
@interface AccountService: NSObject
|
||||
|
||||
- (BOOL)canAutoAuth;
|
||||
- (void)AutoAuth;
|
||||
|
||||
@end
|
Loading…
Reference in New Issue
Block a user