Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修复多开 #608

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

![platform](https://img.shields.io/badge/platform-macos-lightgrey.svg) [![release](https://img.shields.io/badge/release-v1.7.5-brightgreen.svg)](https://github.com/TKkk-iOSer/WeChatPlugin-MacOS/releases) ![support](https://img.shields.io/badge/support-wechat%202.3.22-blue.svg) [![Readme](https://img.shields.io/badge/readme-english-yellow.svg)](./README_EN.md) [![GitHub license](https://img.shields.io/github/license/TKkk-iOSer/WeChatPlugin-MacOS.svg)](./LICENSE)

# 微信小助手 v2.0
# 微信小助手 v2.0.1

**[English](./README_EN.md) | 中文**

Expand Down Expand Up @@ -44,7 +44,7 @@
* 新增禁止微信检测更新开关(非App Store版本)
* ~~新增小助手.app安装方式~~
* 支持退群监控,撤回消息定位
* 支持微信 3.7.0
* 支持微信 3.7.1

**若无使用 alfred,则不必打开 alfred 开关**

Expand All @@ -63,6 +63,7 @@

## 更新日志

* [修复多开(2023-04-18)](https://github.com/warkcod/WeChatPlugin-MacOS/releases/tag/v2.0.1)
* [适配3.7.0(2023-03-12)](https://github.com/TKkk-iOSer/WeChatPlugin-MacOS/releases/tag/v2.0)
* [适配2.3.22 & 新增禁止微信检测更新开关(2019-01-13)](https://github.com/TKkk-iOSer/WeChatPlugin-MacOS/releases/tag/v1.7.5)
* [适配2.3.19 & 修复安全漏洞(2018-10-23)](https://github.com/TKkk-iOSer/WeChatPlugin-MacOS/releases/tag/v1.7.3)
Expand Down
2 changes: 1 addition & 1 deletion README_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

![platform](https://img.shields.io/badge/platform-macos-lightgrey.svg) [![release](https://img.shields.io/badge/release-v1.7-brightgreen.svg)](https://github.com/TKkk-iOSer/WeChatPlugin-MacOS/releases) ![support](https://img.shields.io/badge/support-wechat%202.3.10-blue.svg) [![Readme](https://img.shields.io/badge/readme-中文-yellow.svg)](./README.md) [![GitHub license](https://img.shields.io/github/license/TKkk-iOSer/WeChatPlugin-MacOS.svg)](https://github.com/TKkk-iOSer/WeChatPlugin-MacOS/blob/master/LICENSE)

# WeChatPlugin-macOS v1.7
# WeChatPlugin-macOS v2.0.1

**English | [中文](./README.md)**

Expand Down
22 changes: 3 additions & 19 deletions WeChatPlugin.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,6 @@
528B4F8F1EA7383800BC6A89 /* Headers */,
528B4F901EA7383800BC6A89 /* Resources */,
528B4FB51EA738B100BC6A89 /* ShellScript */,
165746E0A28B760DEA538E0D /* [CP] Copy Pods Resources */,
);
buildRules = (
);
Expand Down Expand Up @@ -622,21 +621,6 @@
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
165746E0A28B760DEA538E0D /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Copy Pods Resources";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-WeChatPlugin/Pods-WeChatPlugin-resources.sh\"\n";
showEnvVarsInLog = 0;
};
528B4FB51EA738B100BC6A89 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
Expand Down Expand Up @@ -665,7 +649,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
Expand Down Expand Up @@ -887,7 +871,7 @@
INFOPLIST_FILE = WeChatPlugin/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
MARKETING_VERSION = 1.7.5;
MARKETING_VERSION = 2.0.1;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = tk.WeChatPlugin;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -911,7 +895,7 @@
INFOPLIST_FILE = WeChatPlugin/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
MARKETING_VERSION = 1.7.5;
MARKETING_VERSION = 2.0.1;
ONLY_ACTIVE_ARCH = NO;
PRODUCT_BUNDLE_IDENTIFIER = tk.WeChatPlugin;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down
2 changes: 1 addition & 1 deletion WeChatPlugin/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@
<key>showUpdateWindow</key>
<true/>
<key>versionInfo</key>
<string>v1.7.5(2019-01-13):\n👉🏻 适配微信 Version. 2.3.22\n👉🏼 菜单栏新增是否允许微信启动时检测更新(非AppStore版本)\n👉🏽 优化 XML 解析\n\n\n\nv1.7.3 (2018-10-22):\n👉🏻 适配微信 Version. 2.3.19\n👉🏼 修复安全漏洞(请务必更新,若有安装QQ插件也需要更新)\n👉🏽 菜单栏-关于小助手-新增 alfred 开关(若不使用 aflred 可关闭) \n\nv1.7.1 (2018-07-24):\n👉🏻 适配微信 Version. 2.3.17\n👉🏼 新增 alfred 搜索最近聊天列表\n👉🏽 新增 alfred 查看用户聊天记录\n (需更新wechat-alfred-workflow)\n\nv1.7 (2018-05-12):\n👉🏻 新增不同账户设置不同的自动回复&amp;远程控制\n👉🏼 自动回复新增总开关&amp;指定联系人\n👉🏽 远程控制新增控制小助手配置\n👉🏾 新增一键已读\n👉 新增一键清除空回话\n👉🏻 新增国际化(支持英、简、繁)\n👉🏼 新增关于小助手\n👉🏽 新增在线更新小助手 \n👉🏾 去除微信url转链处理(从此直接打开抖音链接🌝 \n👉🏿 修复无法免认证登录&amp;多开等bug \n</string>
<string>v2.0.1(2023-04-18):\n👉🏻 适配微信 Version. 3.7.1\n👉🏼 菜单栏新增是否允许微信启动时检测更新(非AppStore版本)\n👉🏽 优化 XML 解析\n\n\n\nv1.7.3 (2018-10-22):\n👉🏻 适配微信 Version. 2.3.19\n👉🏼 修复安全漏洞(请务必更新,若有安装QQ插件也需要更新)\n👉🏽 菜单栏-关于小助手-新增 alfred 开关(若不使用 aflred 可关闭) \n\nv1.7.1 (2018-07-24):\n👉🏻 适配微信 Version. 2.3.17\n👉🏼 新增 alfred 搜索最近聊天列表\n👉🏽 新增 alfred 查看用户聊天记录\n (需更新wechat-alfred-workflow)\n\nv1.7 (2018-05-12):\n👉🏻 新增不同账户设置不同的自动回复&amp;远程控制\n👉🏼 自动回复新增总开关&amp;指定联系人\n👉🏽 远程控制新增控制小助手配置\n👉🏾 新增一键已读\n👉 新增一键清除空回话\n👉🏻 新增国际化(支持英、简、繁)\n👉🏼 新增关于小助手\n👉🏽 新增在线更新小助手 \n👉🏾 去除微信url转链处理(从此直接打开抖音链接🌝 \n👉🏿 修复无法免认证登录&amp;多开等bug \n</string>
</dict>
</plist>
16 changes: 16 additions & 0 deletions WeChatPlugin/Sources/Managers/TKAssistantMenuManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ - (void)initAssistantMenuItems {
target:self
keyEquivalent:@"k"
state:[[TKWeChatPluginConfig sharedConfig] autoReplyEnable]];
// 登录新微信
NSMenuItem *newWeChatItem = [NSMenuItem menuItemWithTitle:TKLocalizedString(@"assistant.menu.newWeChat")
action:@selector(onNewWechatInstance:)
target:self
keyEquivalent:@"N"
state:0];
// 远程控制
NSMenuItem *commandItem = [NSMenuItem menuItemWithTitle:TKLocalizedString(@"assistant.menu.remoteControl")
action:@selector(onRemoteControl:)
Expand Down Expand Up @@ -127,6 +133,7 @@ - (void)initAssistantMenuItems {
[subMenu addItems:@[preventRevokeItem,
autoReplyItem,
commandItem,
newWeChatItem,
onTopItem,
enableSystemBrowserItem,
memberExitMonitoringItem,
Expand Down Expand Up @@ -231,6 +238,15 @@ - (void)onAutoReply:(NSMenuItem *)item {
[autoReplyWC show];
}

/**
打开新的微信

@param item 登录新微信的item
*/
- (void)onNewWechatInstance:(NSMenuItem *)item {
[TKRemoteControlManager executeShellCommand:@"nohup /Applications/WeChat.app/Contents/MacOS/WeChat > /dev/null 2>&1 &"];
}

/**
菜单栏-帮助-远程控制 MAC OS 设置

Expand Down