v30.2.4适配java客户端

This commit is contained in:
猜火车 2024-07-10 15:21:19 +08:00
parent 1c1625ad7e
commit 0744cf225d
5 changed files with 7663 additions and 3359 deletions

View File

@ -4,7 +4,7 @@
## 快速开始
* 下载 [最新发布的文件](https://github.com/lich0821/WeChatFerry/releases/latest),解压到 `WeChatFerry\clients\java\wcferry\src\main\resources\win32-x86-64`
* 下载 [最新发布的文件](https://github.com/lich0821/WeChatFerry/releases/latest),解压到 `WeChatFerry\clients\java\wcferry\dll`目录下
* 使用惯用 IDE打开工程编译运行。
@ -68,9 +68,9 @@ cd C:/Projs/WeChatFerry/java/wcferry/src/main/java
protoc.exe --java_out=. --proto_path=C:\Projs\WeChatFerry\WeChatFerry\rpc\proto wcf.proto
```
### 添加 `wcferry` 依赖
### 添加 `dll` 依赖
`wcf.exe` 、 `spy.dll` 、 `spy_debug.dll` 添加到 `WeChatFerry\clients\java\wcferry\src\main\resources\win32-x86-64`。
将 `spy.dll` 、 `spy_debug.dll`、 `spy.dll` 添加到 `WeChatFerry\clients\java\wcferry\dll`。
### 其他问题

File diff suppressed because it is too large Load Diff

View File

@ -11,7 +11,7 @@ public class Main {
// Client client = new Client("127.0.0.1", 10086);
// 本地启动 RPC
Client client = new Client(true); // 默认 10086 端口
Client client = new Client(); // 默认 10086 端口
// Client client = new Client(10088,true); // 也可以指定端口
// 是否已登录
@ -60,3 +60,4 @@ public class Main {
client.keepRunning();
}
}

View File

@ -0,0 +1,30 @@
package com.iamteer;
import com.sun.jna.Library;
import com.sun.jna.Native;
/**
* SDK.dll的接口类
* @Description
* @Author xinggq
* @Date 2024/7/10
*/
public interface SDK extends Library {
// 读取项目根目录下dll文件夹而且只能写绝对路径放在resource下会有问题暂时先不解决
// 打包后dll文件应该放在jar外这样dll更新不需要生成jar包重启下就ok了
SDK INSTANCE = Native.load(System.getProperty("user.dir")+"\\dll\\sdk.dll", SDK.class);
/**
* 初始化SDK
* @param debug
* @param port
* @return
*/
int WxInitSDK(boolean debug, int port);
/**
* 退出SDK
* @return
*/
int WxDestroySDK();
}

File diff suppressed because it is too large Load Diff