Skip to content

Commit

Permalink
feat: 戳一戳支持
Browse files Browse the repository at this point in the history
  • Loading branch information
msojocs committed Nov 13, 2024
1 parent 4946535 commit 91bb133
Show file tree
Hide file tree
Showing 26 changed files with 1,514 additions and 70 deletions.
File renamed without changes.
38 changes: 38 additions & 0 deletions docs/dev-manual.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# 手动安装环境

## 2. 获取QQ

1. 进入官网:https://im.qq.com/index/
2. 下载对应平台的安装包
3. 使用7z打开安装包
4. ***解压*** `/Files/versions/x.x.xx-xxxxx` 目录中的文件到 **项目**`program`目录下(注意,**不能**将文件夹下的文件加入git版本控制)
5. 解压 `QQ.exe` 文件到**项目**`program`目录下。

大致结构如下:
```
Yui
├─program
│ ├─locales
│ ├─resources
│ ├─versions
│ ├─....
│ └─QQ.exe
├─src
├─tools
....
```

双击 QQ.exe,能启动,说明此步骤成功。

## 3. 跳过启动验证

1. 打开地址: https://github.com/project-yui/Yui-patch
2. 下载 release 中的 `dbghelp.dll` 文件,放置于 pragram 文件夹下。
3. 复制 `program\resources\app\package.json`, `program\resources\app\package.patch.json`;
4. 修改 `package.patch.json` 内容,`main` 字段的值修改为 `./app_launcher/index.js`

## 4. 启动

1. pnpm run dev
2. pnpm run nodestart
3. 看到输出中包含:`Hi Yui bot!!`
39 changes: 14 additions & 25 deletions docs/dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,19 @@

1. 命令行执行:`https://github.com/project-yui/Yui.git`
2. 进入项目:`cd Yui`
3. 安装包:`pnpm install`

## 2. 获取QQ

1. 进入官网:https://im.qq.com/index/
2. 下载对应平台的安装包
3. ***解压*** 到任意文件夹,移动其中的Files目录中的文件到 **项目**`program`目录下(注意,**不能**将文件夹下的文件加入git版本控制)

大致结构如下:
```
Yui
├─program
│ ├─lib
│ ├─locales
│ ├─obj
│ └─resources
├─src
├─tools
....
```
## 3. 跳过启动验证

1. 打开地址: https://github.com/project-yui/Yui-patch
2. 下载 release 中的 `dbghelp.dll` 文件,放置于 pragram 文件夹下。
3. 安装npm包:`pnpm install`

## 2 安装环境

### 2.1 使用脚本安装

1. 执行 `pnpm run install-ntqq`
2. pnpm run dev
3. pnpm run nodestart

### 2.2 手动安装

[参考此处](./dev-manual.md)

# 二、开发介绍

Expand All @@ -40,6 +28,7 @@
2. 生成的文件在 `program/resources/app/app_launcher/index.js`
3. 启动无UI界面的Yui,执行`pnpm nodestart`
4. 启动有UI界面的Yui,执行`pnpm start`
5. 启动有UI界面保存Log的Yui,执行`pnpm start-log-file` (分析接口行为使用)

## 2. 关于后续开发

Expand Down
16 changes: 16 additions & 0 deletions docs/function.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@
|-------|-----|
| getVoiceChannelMaxPeopleCount | 0 |
| loadSideBarConfig | 0 |
| addKernelConfigMgrListener | 1 |
| getConfigMgrInfo | 1 |
| removeKernelConfigMgrListener | 1 |
| saveSideBarConfig | 1 |
| getConfigMgrInfoTaskId | 2 |
| updateConfigMgrInfoTaskId | 2 |
Expand Down Expand Up @@ -139,6 +141,7 @@
| downloadFile | 1 |
| getFileAssistantList | 1 |
| getMoreFileAssistantList | 1 |
| modifyFileInfo | 1 |
| removeKernelFileAssistantListener | 1 |
| retryFileAction | 1 |
| searchMoreFile | 1 |
Expand Down Expand Up @@ -902,9 +905,11 @@
| getLoginMiscData | 1 |
| initConfig | 1 |
| isHasLoginInfo | 1 |
| loadNoLoginUnitedConfig | 1 |
| loginUnusualDevice | 1 |
| passwordLogin | 1 |
| quickLoginWithUin | 1 |
| registerUnitedConfigPushGroupList | 1 |
| removeKernelLoginListener | 1 |
| resetLoginInfo | 1 |
| setLoginMiscData | 2 |
Expand Down Expand Up @@ -1267,6 +1272,7 @@
| checkIsSupportAutoDetect | 0 |
| cleanWindowsInfo | 0 |
| delAutoRun | 0 |
| endScreenCapture | 0 |
| getDisplayInfo | 0 |
| getGetFullScreenInfo | 0 |
| getMiniAppPath | 0 |
Expand All @@ -1277,18 +1283,21 @@
| getUserDataDir | 0 |
| getWindowsInfo | 0 |
| initScreenShotPlugin | 0 |
| isDwmCompositionEnabled | 0 |
| isMiniAppAlreadyExist | 0 |
| isMiniAppExist | 0 |
| isMiniGameAlreadyExist | 0 |
| isMiniGameExist | 0 |
| isScreenCaptureOrRecording | 0 |
| listenMouseMoveOnDisplays | 0 |
| mainWindowInitComplete | 0 |
| notifyGuildHasHiddenDock | 0 |
| queryAutoRun | 0 |
| setAutoRun | 0 |
| setScreenShotSetting | 0 |
| startNewAppInstance | 0 |
| startScreenShotInstance | 0 |
| unlistenMouseMoveOnDisplays | 0 |
| wantParseClipboard | 0 |
| wantScreenRecording | 0 |
| wantScreenShot | 0 |
Expand All @@ -1300,6 +1309,7 @@
| downloadMiniApp | 1 |
| downloadMiniGame | 1 |
| getCurWindowInfo | 1 |
| getGroupOpenID | 1 |
| getMiniGameV2EngineConfig | 1 |
| isAppInstalled | 1 |
| isOldQQRunning | 1 |
Expand All @@ -1312,6 +1322,7 @@
| registerScreenCaptureShortcutWithKeycode | 1 |
| registerScreenRecordShortcutWithKeycode | 1 |
| removeKernelNodeMiscListener | 1 |
| scanQBar | 1 |
| sendRequestToApiGateway | 1 |
| setCurWindowsStatus | 1 |
| setMiniAppVersion | 1 |
Expand All @@ -1331,11 +1342,15 @@
| getAppInfoByLink | 2 |
| getOpenAuth | 2 |
| installApp | 2 |
| setBackgroudWindowLevel | 2 |
| setCurActiveGuildAndChannel | 2 |
| setWindowLevelNT | 2 |
| startNewMiniApp | 2 |
| startScreenCapture | 2 |
| writeClipboard | 2 |
| getGroupMemberOpenID | 3 |
| getOpenAuthDelegateCode | 3 |
| getRelationUinToOpenID | 3 |
| sendLog | 3 |
| sendMiniAppMsg | 3 |
| startScreenCaptureDetectByBuf | 3 |
Expand Down Expand Up @@ -1584,6 +1599,7 @@
| getSettingForNum | 1 |
| getSettingForStr | 1 |
| modifyAccount | 1 |
| openUrlInIM | 1 |
| openUrlWithQQBrowser | 1 |
| removeKernelSettingListener | 1 |
| setAutoLoginSwitch | 1 |
Expand Down
18 changes: 17 additions & 1 deletion docs/functions/func.log
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ assertion (argc == 0) failed: NodeIKernelNodeMiscService::cancelOCRImage needs 0
assertion (argc == 0) failed: NodeIKernelNodeMiscService::checkIsSupportAutoDetect needs 0 arguments
assertion (argc == 0) failed: NodeIKernelNodeMiscService::cleanWindowsInfo needs 0 arguments
assertion (argc == 0) failed: NodeIKernelNodeMiscService::delAutoRun needs 0 arguments
assertion (argc == 0) failed: NodeIKernelNodeMiscService::endScreenCapture needs 0 arguments
assertion (argc == 0) failed: NodeIKernelNodeMiscService::getDisplayInfo needs 0 arguments
assertion (argc == 0) failed: NodeIKernelNodeMiscService::getGetFullScreenInfo needs 0 arguments
assertion (argc == 0) failed: NodeIKernelNodeMiscService::getMiniAppPath needs 0 arguments
Expand All @@ -152,18 +153,21 @@ assertion (argc == 0) failed: NodeIKernelNodeMiscService::getSendKey needs 0 arg
assertion (argc == 0) failed: NodeIKernelNodeMiscService::getUserDataDir needs 0 arguments
assertion (argc == 0) failed: NodeIKernelNodeMiscService::getWindowsInfo needs 0 arguments
assertion (argc == 0) failed: NodeIKernelNodeMiscService::initScreenShotPlugin needs 0 arguments
assertion (argc == 0) failed: NodeIKernelNodeMiscService::isDwmCompositionEnabled needs 0 arguments
assertion (argc == 0) failed: NodeIKernelNodeMiscService::isMiniAppAlreadyExist needs 0 arguments
assertion (argc == 0) failed: NodeIKernelNodeMiscService::isMiniAppExist needs 0 arguments
assertion (argc == 0) failed: NodeIKernelNodeMiscService::isMiniGameAlreadyExist needs 0 arguments
assertion (argc == 0) failed: NodeIKernelNodeMiscService::isMiniGameExist needs 0 arguments
assertion (argc == 0) failed: NodeIKernelNodeMiscService::isScreenCaptureOrRecording needs 0 arguments
assertion (argc == 0) failed: NodeIKernelNodeMiscService::listenMouseMoveOnDisplays needs 0 arguments
assertion (argc == 0) failed: NodeIKernelNodeMiscService::mainWindowInitComplete needs 0 arguments
assertion (argc == 0) failed: NodeIKernelNodeMiscService::notifyGuildHasHiddenDock needs 0 arguments
assertion (argc == 0) failed: NodeIKernelNodeMiscService::queryAutoRun needs 0 arguments
assertion (argc == 0) failed: NodeIKernelNodeMiscService::setAutoRun needs 0 arguments
assertion (argc == 0) failed: NodeIKernelNodeMiscService::setScreenShotSetting needs 0 arguments
assertion (argc == 0) failed: NodeIKernelNodeMiscService::startNewAppInstance needs 0 arguments
assertion (argc == 0) failed: NodeIKernelNodeMiscService::startScreenShotInstance needs 0 arguments
assertion (argc == 0) failed: NodeIKernelNodeMiscService::unlistenMouseMoveOnDisplays needs 0 arguments
assertion (argc == 0) failed: NodeIKernelNodeMiscService::wantParseClipboard needs 0 arguments
assertion (argc == 0) failed: NodeIKernelNodeMiscService::wantScreenRecording needs 0 arguments
assertion (argc == 0) failed: NodeIKernelNodeMiscService::wantScreenShot needs 0 arguments
Expand Down Expand Up @@ -372,7 +376,9 @@ assertion (argc == 1) failed: NodeIKernelCollectionService::deleteCollectionItem
assertion (argc == 1) failed: NodeIKernelCollectionService::getCollectionItemList needs 1 arguments
assertion (argc == 1) failed: NodeIKernelCollectionService::getEditPicInfoByPath needs 1 arguments
assertion (argc == 1) failed: NodeIKernelCollectionService::removeKernelCollectionListener needs 1 arguments
assertion (argc == 1) failed: NodeIKernelConfigMgrService::addKernelConfigMgrListener needs 1 arguments
assertion (argc == 1) failed: NodeIKernelConfigMgrService::getConfigMgrInfo needs 1 arguments
assertion (argc == 1) failed: NodeIKernelConfigMgrService::removeKernelConfigMgrListener needs 1 arguments
assertion (argc == 1) failed: NodeIKernelConfigMgrService::saveSideBarConfig needs 1 arguments
assertion (argc == 1) failed: NodeIKernelDbToolsService::backupDatabase needs 1 arguments
assertion (argc == 1) failed: NodeIKernelDbToolsService::depositDatabase needs 1 arguments
Expand Down Expand Up @@ -404,6 +410,7 @@ assertion (argc == 1) failed: NodeIKernelFileAssistantService::deleteFile needs
assertion (argc == 1) failed: NodeIKernelFileAssistantService::downloadFile needs 1 arguments
assertion (argc == 1) failed: NodeIKernelFileAssistantService::getFileAssistantList needs 1 arguments
assertion (argc == 1) failed: NodeIKernelFileAssistantService::getMoreFileAssistantList needs 1 arguments
assertion (argc == 1) failed: NodeIKernelFileAssistantService::modifyFileInfo needs 1 arguments
assertion (argc == 1) failed: NodeIKernelFileAssistantService::removeKernelFileAssistantListener needs 1 arguments
assertion (argc == 1) failed: NodeIKernelFileAssistantService::retryFileAction needs 1 arguments
assertion (argc == 1) failed: NodeIKernelFileAssistantService::searchMoreFile needs 1 arguments
Expand Down Expand Up @@ -729,9 +736,11 @@ assertion (argc == 1) failed: NodeIKernelLoginService::deleteLoginInfo needs 1 a
assertion (argc == 1) failed: NodeIKernelLoginService::getLoginMiscData needs 1 arguments
assertion (argc == 1) failed: NodeIKernelLoginService::initConfig needs 1 arguments
assertion (argc == 1) failed: NodeIKernelLoginService::isHasLoginInfo needs 1 arguments
assertion (argc == 1) failed: NodeIKernelLoginService::loadNoLoginUnitedConfig needs 1 arguments
assertion (argc == 1) failed: NodeIKernelLoginService::loginUnusualDevice needs 1 arguments
assertion (argc == 1) failed: NodeIKernelLoginService::passwordLogin needs 1 arguments
assertion (argc == 1) failed: NodeIKernelLoginService::quickLoginWithUin needs 1 arguments
assertion (argc == 1) failed: NodeIKernelLoginService::registerUnitedConfigPushGroupList needs 1 arguments
assertion (argc == 1) failed: NodeIKernelLoginService::removeKernelLoginListener needs 1 arguments
assertion (argc == 1) failed: NodeIKernelLoginService::resetLoginInfo needs 1 arguments
assertion (argc == 1) failed: NodeIKernelMSFService::getBrowserAndSetLocalProxy needs 1 arguments
Expand Down Expand Up @@ -917,6 +926,7 @@ assertion (argc == 1) failed: NodeIKernelNodeMiscService::deleteShareFile needs
assertion (argc == 1) failed: NodeIKernelNodeMiscService::downloadMiniApp needs 1 arguments
assertion (argc == 1) failed: NodeIKernelNodeMiscService::downloadMiniGame needs 1 arguments
assertion (argc == 1) failed: NodeIKernelNodeMiscService::getCurWindowInfo needs 1 arguments
assertion (argc == 1) failed: NodeIKernelNodeMiscService::getGroupOpenID needs 1 arguments
assertion (argc == 1) failed: NodeIKernelNodeMiscService::getMiniGameV2EngineConfig needs 1 arguments
assertion (argc == 1) failed: NodeIKernelNodeMiscService::isAppInstalled needs 1 arguments
assertion (argc == 1) failed: NodeIKernelNodeMiscService::isOldQQRunning needs 1 arguments
Expand All @@ -929,6 +939,7 @@ assertion (argc == 1) failed: NodeIKernelNodeMiscService::registerSchemes needs
assertion (argc == 1) failed: NodeIKernelNodeMiscService::registerScreenCaptureShortcutWithKeycode needs 1 arguments
assertion (argc == 1) failed: NodeIKernelNodeMiscService::registerScreenRecordShortcutWithKeycode needs 1 arguments
assertion (argc == 1) failed: NodeIKernelNodeMiscService::removeKernelNodeMiscListener needs 1 arguments
assertion (argc == 1) failed: NodeIKernelNodeMiscService::scanQBar needs 1 arguments
assertion (argc == 1) failed: NodeIKernelNodeMiscService::sendRequestToApiGateway needs 1 arguments
assertion (argc == 1) failed: NodeIKernelNodeMiscService::setCurWindowsStatus needs 1 arguments
assertion (argc == 1) failed: NodeIKernelNodeMiscService::setMiniAppVersion needs 1 arguments
Expand Down Expand Up @@ -1093,6 +1104,7 @@ assertion (argc == 1) failed: NodeIKernelSettingService::getSettingForBuffer nee
assertion (argc == 1) failed: NodeIKernelSettingService::getSettingForNum needs 1 arguments
assertion (argc == 1) failed: NodeIKernelSettingService::getSettingForStr needs 1 arguments
assertion (argc == 1) failed: NodeIKernelSettingService::modifyAccount needs 1 arguments
assertion (argc == 1) failed: NodeIKernelSettingService::openUrlInIM needs 1 arguments
assertion (argc == 1) failed: NodeIKernelSettingService::openUrlWithQQBrowser needs 1 arguments
assertion (argc == 1) failed: NodeIKernelSettingService::removeKernelSettingListener needs 1 arguments
assertion (argc == 1) failed: NodeIKernelSettingService::setAutoLoginSwitch needs 1 arguments
Expand Down Expand Up @@ -1479,9 +1491,11 @@ assertion (argc == 2) failed: NodeIKernelNodeMiscService::flashWindowInTaskbar n
assertion (argc == 2) failed: NodeIKernelNodeMiscService::getAppInfoByLink needs 2 arguments
assertion (argc == 2) failed: NodeIKernelNodeMiscService::getOpenAuth needs 2 arguments
assertion (argc == 2) failed: NodeIKernelNodeMiscService::installApp needs 2 arguments
assertion (argc == 2) failed: NodeIKernelNodeMiscService::setBackgroudWindowLevel needs 2 arguments
assertion (argc == 2) failed: NodeIKernelNodeMiscService::setCurActiveGuildAndChannel needs 2 arguments
assertion (argc == 2) failed: NodeIKernelNodeMiscService::setWindowLevelNT needs 2 arguments
assertion (argc == 2) failed: NodeIKernelNodeMiscService::startNewMiniApp needs 2 arguments
assertion (argc == 2) failed: NodeIKernelNodeMiscService::startScreenCapture needs 2 arguments
assertion (argc == 2) failed: NodeIKernelNodeMiscService::writeClipboard needs 2 arguments
assertion (argc == 2) failed: NodeIKernelProfileService::enumCityOptions needs 2 arguments
assertion (argc == 2) failed: NodeIKernelProfileService::getCoreAndBaseInfo needs 2 arguments
Expand Down Expand Up @@ -1721,7 +1735,9 @@ assertion (argc == 3) failed: NodeIKernelMsgService::unregisterSysMsgNotificatio
assertion (argc == 3) failed: NodeIKernelMsgService::updateMsgRecordExtPbBufForUI needs 3 arguments
assertion (argc == 3) failed: NodeIKernelNearbyProService::fetchNearbyProUserInfo needs 3 arguments
assertion (argc == 3) failed: NodeIKernelNewFeedService::setChannelDraft needs 3 arguments
assertion (argc == 3) failed: NodeIKernelNodeMiscService::getGroupMemberOpenID needs 3 arguments
assertion (argc == 3) failed: NodeIKernelNodeMiscService::getOpenAuthDelegateCode needs 3 arguments
assertion (argc == 3) failed: NodeIKernelNodeMiscService::getRelationUinToOpenID needs 3 arguments
assertion (argc == 3) failed: NodeIKernelNodeMiscService::sendLog needs 3 arguments
assertion (argc == 3) failed: NodeIKernelNodeMiscService::sendMiniAppMsg needs 3 arguments
assertion (argc == 3) failed: NodeIKernelNodeMiscService::startScreenCaptureDetectByBuf needs 3 arguments
Expand Down Expand Up @@ -1934,4 +1950,4 @@ assertion (argc == 7) failed: NodeIKernelGuildService::searchUnion needs 7 argum
assertion (argc == 7) failed: NodeIKernelMsgService::getMsgEmojiLikesList needs 7 arguments
assertion (argc == 7) failed: NodeIKernelMsgService::getMsgsWithMsgTimeAndClientSeqForC2C needs 7 arguments
assertion (argc == 8) failed: NodeIKernelMsgService::setMsgEmojiLikesForRole needs 8 arguments
assertion (argc == 9) failed: NodeIKernelGuildService::sendScheduleArkMessage needs 9 arguments
assertion (argc == 9) failed: NodeIKernelGuildService::sendScheduleArkMessage needs 9 arguments
8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,15 @@
"type": "module",
"main": "index.js",
"scripts": {
"install-ntqq": "node tools/dev.cjs install",
"dev": "node tools/dev.cjs dev",
"build": "node tools/dev.cjs build",
"start": "node tools/dev.cjs start",
"start-log-file": "node tools/dev.cjs start-log-file",
"nodestart": "node tools/dev.cjs nodestart",
"compile-jsc": "node tools/dev.cjs compile-jsc"
"compile-jsc": "node tools/dev.cjs compile-jsc",
"proto:generate": "protoc --ts_proto_out=. ./src/ntqq/protobuf/*.proto --ts_proto_opt=esModuleInterop=true",
"proto:watch": "chokidar \"./src/**/*.proto\" -c \"npm run proto:generate\""
},
"keywords": [],
"author": "",
Expand All @@ -28,15 +31,18 @@
"@types/uuid": "^9.0.6",
"@types/ws": "^8.5.8",
"bytenode": "^1.5.3",
"chokidar-cli": "^3.0.0",
"electron": "25.8.1",
"javascript-obfuscator": "^4.1.0",
"nodejs-file-downloader": "^4.13.0",
"rollup": "^4.13.2",
"rollup-plugin-obfuscator": "^1.1.0",
"ts-proto": "^2.2.5",
"tslib": "^2.6.2",
"typescript": "^5.2.2"
},
"dependencies": {
"@bufbuild/protobuf": "^2.2.2",
"body-parser": "^1.20.2",
"express": "^4.19.2",
"express-fileupload": "^1.5.0",
Expand Down
Loading

0 comments on commit 91bb133

Please sign in to comment.