Skip to content

Commit 94d68d8

Browse files
xengine-qytgitee-org
authored andcommitted
!10 V3.0.0.1001 Merge
Merge pull request !10 from qyt/develop
2 parents 50b824f + fbc7646 commit 94d68d8

File tree

110 files changed

+9790
-681
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+9790
-681
lines changed

.gitee/ISSUE_TEMPLATE.zh-CN.md

Lines changed: 0 additions & 13 deletions
This file was deleted.

.gitee/PULL_REQUEST_TEMPLATE.zh-CN.md

Lines changed: 0 additions & 14 deletions
This file was deleted.

README.en.md

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -28,35 +28,22 @@ this software support following features
2828
13. get order and start serial pos setting
2929
14. Unlimited load message types
3030
15. data distribution service(DDS),Support WAN and LAN
31+
16. Access control(planning)
3132

3233
## install
3334

3435
#### Requirements
3536
support system above windows 7sp1 and linux(ubuntu20.04,centos8)
3637
XEngine need V7.23 or above
37-
vcpkg need 2021.05.11 or above
3838

3939
#### Windows
40-
use vs2019 x86(debug or release) x64(only release) open and complie
40+
use vs open and complie
4141
You need to configure the environment in the following way, otherwise you may need to set the library directory in the project yourself
4242

43-
##### install Dependent library
44-
vcpkg:https://github.com/microsoft/vcpkg
45-
vcpkg.exe install jsoncpp
46-
vcpkg integrate install
47-
you can not use vcpkg and config jsoncpp development for youself
48-
4943
#### Linux
5044
Linux use Makefile to complie
5145
supproted ubuntu x64 or centos x64
5246

53-
##### install Dependent library
54-
install jsoncpp to your system
55-
ubuntu20.04
56-
sudo apt install libjsoncpp-devel
57-
Centos8.x
58-
sudo dnf install jsoncpp-devel
59-
6047
##### XEngine Install
6148
you can install xengine env to your system by shell
6249
like this:sudo XEngine_RunEnv.sh -i 3
@@ -84,14 +71,14 @@ GITHUB:https://github.com/libxengine/xengine
8471
- XEngine_Docment docment directory
8572
- XEngine_Release install directory
8673
- XEngine_Source code directory
87-
- XEngine_Apps Client code directory
74+
- XEngine_Apps Client code directory
75+
- XEngine_SQLFile database file back dir
8876

8977
## other problems
9078
You can refer to the document under the docment directory. It contains API protocol and service description.
9179

9280
## Test Server Address
93-
Address:app.xyry.org or 159.75.200.173
94-
Port:TCP 5200,HTTP 5201,WEBSOCKET 5202
81+
Address:app.xyry.org Port:TCP 5200,HTTP 5201,WEBSOCKET 5202
9582

9683
## Participate in contribution
9784

README.md

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ c c++Message Service
1313
## 软件特性
1414
此软件支持以下特性
1515
1. 消息序列
16-
2. 永久消息(planning)
16+
2. 永久消息
1717
3. 消息超时
1818
4. 主题分区
1919
5. 消息回溯(planning)
@@ -27,34 +27,22 @@ c c++Message Service
2727
13. 获取顺序与开始序列号设置
2828
14. 不限制负载的消息类型
2929
15. 消息分发服务(DDS),支持广域网和局域网
30+
16. 权限控制(planning)
3031

3132
## 安装教程
3233

3334
#### 版本需求
3435
支持WINDOWS 7SP1和LINUX(UBUNT20.04,CENTOS8)以上系统
35-
XEngine版本需要V7.23或者以上版本
36-
vcpkg 需要2021.05.11以上版本
36+
XEngine版本需要V7.30或者以上版本
3737

3838
#### Windows
39-
使用VS2019 x86(debug release) x64(release)打开并且编译
39+
使用VS打开并且编译
4040
你需要按照下面的方式配置环境,不然你可能需要自己在项目中设置库目录
41-
##### 三方库环境
42-
需要使用VCPKG安装环境.代码地址:https://github.com/microsoft/vcpkg
43-
安装好后你可能需要把它集成到你的VS中
44-
然后命令安装环境: vcpkg.exe install jsoncpp
45-
集成VS环境: vcpkg integrate install
46-
vcpkg 主要为了方便安装jsoncpp,如果你想自己配置jsoncpp的环境,可以不使用vcpkg...
4741

4842
#### Linux
4943
Linux使用Makefile编译
5044
UBUNTU20.04 x64或者CENTOS8 x64均可
5145

52-
##### 三方库环境
53-
基于不同系统,可能命令不同,比如在Ubuntu下面
54-
sudo apt install libjsoncpp-devel
55-
Centos8.x
56-
sudo dnf install jsoncpp-devel
57-
5846
##### 编译命令
5947
在XEngine_Source目录下执行命令
6048
make 编译
@@ -80,13 +68,13 @@ GITHUB:https://github.com/libxengine/xengine
8068
- XEngine_Release 安装目录结构
8169
- XEngine_Source 源代目录结构
8270
- XEngine_Apps 演示客户端目录
71+
- XEngine_SQLFile 数据库文件备份目录
8372

8473
## 其他问题
8574
你可以参考docment目录下的文档.里面包含了API协议和服务说明.
8675

8776
## 测试服务器
88-
地址:app.xyry.org 或者 159.75.200.173
89-
端口:TCP 5200,HTTP 5201,WEBSOCKET 5202
77+
地址:app.xyry.org 端口:TCP 5200,HTTP 5201,WEBSOCKET 5202
9078

9179
## 参与贡献
9280

XEngine_Apps/MQCore_DDSPublish/MQCore_DDSPublish.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#pragma comment(lib,"Ws2_32")
66
#pragma comment(lib,"XEngine_Core/XEngine_Core")
77
#pragma comment(lib,"../../XEngine_Source/Debug/MQCore_ProtocolModule")
8+
#pragma comment(lib,"../../XEngine_Source/Debug/jsoncpp")
89
#endif
910
#include <stdio.h>
1011
#include <stdlib.h>
@@ -18,7 +19,7 @@
1819
#include "../../XEngine_Source/MQCore_ProtocolModule/Protocol_Define.h"
1920
#include "../../XEngine_Source/MQCore_ProtocolModule/Protocol_Error.h"
2021

21-
//g++ -std=c++17 -Wall -g MQCore_DDSPublish.cpp -o MQCore_DDSPublish.exe -L /usr/local/lib/XEngine_Release/XEngine_BaseLib -L /usr/local/lib/XEngine_Release/XEngine_Core -L ../../XEngine_Source/MQCore_ProtocolModule -lXEngine_BaseLib -lXEngine_Core -lMQCore_ProtocolModule -ljsoncpp
22+
//g++ -std=c++17 -Wall -g MQCore_DDSPublish.cpp -o MQCore_DDSPublish.exe -I ../../XEngine_Source/XEngine_ThirdPart/jsoncpp -L /usr/local/lib/XEngine_Release/XEngine_BaseLib -L /usr/local/lib/XEngine_Release/XEngine_Core -L ../../XEngine_Source/MQCore_ProtocolModule -L ../../XEngine_Source/XEngine_ThirdPart/jsoncpp -lXEngine_BaseLib -lXEngine_Core -lMQCore_ProtocolModule -ljsoncpp
2223

2324
SOCKET m_Socket;
2425
LPCTSTR lpszKey = _T("XEngine_Notify"); //主题
@@ -44,11 +45,11 @@ int main()
4445
st_DDSProtocol.bCreater = TRUE;
4546
st_DDSProtocol.bTcp = FALSE;
4647
st_DDSProtocol.nPort = 10000;
47-
_tcscpy(st_DDSProtocol.tszTopic, lpszKey);
48+
strcpy(st_DDSProtocol.tszTopic, lpszKey);
4849

4950
if (st_DDSProtocol.bTcp)
5051
{
51-
_tcscpy(st_DDSProtocol.tszDDSAddr, lpszIPAddr);
52+
strcpy(st_DDSProtocol.tszDDSAddr, lpszIPAddr);
5253
//创建服务器
5354
if (!NetCore_TCPSelect_StartEx(&xhClient, st_DDSProtocol.nPort))
5455
{
@@ -58,7 +59,7 @@ int main()
5859
}
5960
else
6061
{
61-
_tcscpy(st_DDSProtocol.tszDDSAddr, lpszGroupAddr);
62+
strcpy(st_DDSProtocol.tszDDSAddr, lpszGroupAddr);
6263
//初始化组播发送服务
6364
if (!NetCore_GroupCast_SDCreate((SOCKET*)&xhClient, st_DDSProtocol.tszDDSAddr, st_DDSProtocol.nPort))
6465
{

XEngine_Apps/MQCore_DDSPublish/MQCore_DDSPublish.vcxproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,26 +29,26 @@
2929
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
3030
<ConfigurationType>Application</ConfigurationType>
3131
<UseDebugLibraries>true</UseDebugLibraries>
32-
<PlatformToolset>v142</PlatformToolset>
32+
<PlatformToolset>v143</PlatformToolset>
3333
<CharacterSet>MultiByte</CharacterSet>
3434
</PropertyGroup>
3535
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
3636
<ConfigurationType>Application</ConfigurationType>
3737
<UseDebugLibraries>false</UseDebugLibraries>
38-
<PlatformToolset>v142</PlatformToolset>
38+
<PlatformToolset>v143</PlatformToolset>
3939
<WholeProgramOptimization>true</WholeProgramOptimization>
4040
<CharacterSet>Unicode</CharacterSet>
4141
</PropertyGroup>
4242
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
4343
<ConfigurationType>Application</ConfigurationType>
4444
<UseDebugLibraries>true</UseDebugLibraries>
45-
<PlatformToolset>v142</PlatformToolset>
45+
<PlatformToolset>v143</PlatformToolset>
4646
<CharacterSet>Unicode</CharacterSet>
4747
</PropertyGroup>
4848
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
4949
<ConfigurationType>Application</ConfigurationType>
5050
<UseDebugLibraries>false</UseDebugLibraries>
51-
<PlatformToolset>v142</PlatformToolset>
51+
<PlatformToolset>v143</PlatformToolset>
5252
<WholeProgramOptimization>true</WholeProgramOptimization>
5353
<CharacterSet>Unicode</CharacterSet>
5454
</PropertyGroup>
@@ -72,7 +72,7 @@
7272
<PropertyGroup Label="UserMacros" />
7373
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
7474
<LinkIncremental>true</LinkIncremental>
75-
<IncludePath>$(XEngine_Include);$(IncludePath)</IncludePath>
75+
<IncludePath>$(XEngine_Include);../../XEngine_Source/XEngine_ThirdPart/jsoncpp;$(IncludePath)</IncludePath>
7676
<LibraryPath>$(XEngine_Lib32);$(LibraryPath)</LibraryPath>
7777
</PropertyGroup>
7878
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">

XEngine_Apps/MQCore_DDSSubcribe/MQCore_DDSSubcribe.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#pragma comment(lib,"XEngine_Core/XEngine_Core")
77
#pragma comment(lib,"XEngine_Client/XClient_Socket")
88
#pragma comment(lib,"../../XEngine_Source/Debug/MQCore_ProtocolModule")
9+
#pragma comment(lib,"../../XEngine_Source/Debug/jsoncpp")
910
#else
1011
#include <stdio.h>
1112
#include <stdlib.h>
@@ -26,7 +27,7 @@
2627
#include "../../XEngine_Source/MQCore_ProtocolModule/Protocol_Define.h"
2728
#include "../../XEngine_Source/MQCore_ProtocolModule/Protocol_Error.h"
2829

29-
//g++ -std=c++17 -Wall -g MQCore_DDSPublish.cpp -o MQCore_DDSPublish.exe -L /usr/local/lib/XEngine_Release/XEngine_BaseLib -L /usr/local/lib/XEngine_Release/XEngine_Client -L /usr/local/lib/XEngine_Release/XEngine_RfcComponents -lXEngine_BaseLib -lXEngine_Algorithm -lXClient_Socket -lRfcComponents_WSProtocol -ljsoncpp
30+
//g++ -std=c++17 -Wall -g MQCore_DDSPublish.cpp -o MQCore_DDSPublish.exe -I ../../XEngine_Source/XEngine_ThirdPart/jsoncpp -L /usr/local/lib/XEngine_Release/XEngine_BaseLib -L /usr/local/lib/XEngine_Release/XEngine_Client -L /usr/local/lib/XEngine_Release/XEngine_RfcComponents -L ../../XEngine_Source/XEngine_ThirdPart/jsoncpp -lXEngine_BaseLib -lXEngine_Algorithm -lXClient_Socket -lRfcComponents_WSProtocol -ljsoncpp
3031

3132
SOCKET* phSocket;
3233
LPCTSTR lpszKey = _T("XEngine_Notify"); //主题
@@ -55,7 +56,7 @@ int main()
5556
NetCore_BroadCast_SendInit(&hSDSocket, 5210, lpszIPAddr);
5657
NetCore_BroadCast_RecvInit(&hRVSocket, 5211);
5758

58-
_tcscpy(st_DDSProtocol.tszTopic, lpszKey);
59+
strcpy(st_DDSProtocol.tszTopic, lpszKey);
5960
ProtocolModule_Packet_DDSTopic(&st_DDSProtocol, tszMsgBuffer, &nMsgLen, XENGINE_COMMUNICATION_PROTOCOL_OPERATOR_CODE_DDS_REQTOPICQUERY);
6061
NetCore_BroadCast_Send(hSDSocket, tszMsgBuffer, nMsgLen);
6162

XEngine_Apps/MQCore_DDSSubcribe/MQCore_DDSSubcribe.vcxproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,26 +29,26 @@
2929
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
3030
<ConfigurationType>Application</ConfigurationType>
3131
<UseDebugLibraries>true</UseDebugLibraries>
32-
<PlatformToolset>v142</PlatformToolset>
32+
<PlatformToolset>v143</PlatformToolset>
3333
<CharacterSet>MultiByte</CharacterSet>
3434
</PropertyGroup>
3535
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
3636
<ConfigurationType>Application</ConfigurationType>
3737
<UseDebugLibraries>false</UseDebugLibraries>
38-
<PlatformToolset>v142</PlatformToolset>
38+
<PlatformToolset>v143</PlatformToolset>
3939
<WholeProgramOptimization>true</WholeProgramOptimization>
4040
<CharacterSet>Unicode</CharacterSet>
4141
</PropertyGroup>
4242
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
4343
<ConfigurationType>Application</ConfigurationType>
4444
<UseDebugLibraries>true</UseDebugLibraries>
45-
<PlatformToolset>v142</PlatformToolset>
45+
<PlatformToolset>v143</PlatformToolset>
4646
<CharacterSet>Unicode</CharacterSet>
4747
</PropertyGroup>
4848
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
4949
<ConfigurationType>Application</ConfigurationType>
5050
<UseDebugLibraries>false</UseDebugLibraries>
51-
<PlatformToolset>v142</PlatformToolset>
51+
<PlatformToolset>v143</PlatformToolset>
5252
<WholeProgramOptimization>true</WholeProgramOptimization>
5353
<CharacterSet>Unicode</CharacterSet>
5454
</PropertyGroup>
@@ -72,7 +72,7 @@
7272
<PropertyGroup Label="UserMacros" />
7373
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
7474
<LinkIncremental>true</LinkIncremental>
75-
<IncludePath>$(XEngine_Include);$(IncludePath)</IncludePath>
75+
<IncludePath>$(XEngine_Include);../../XEngine_Source/XEngine_ThirdPart/jsoncpp;$(IncludePath)</IncludePath>
7676
<LibraryPath>$(XEngine_Lib32);$(LibraryPath)</LibraryPath>
7777
</PropertyGroup>
7878
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">

XEngine_Apps/MQCore_HTTPApp/MQCore_HTTPApp.cpp

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,13 @@
55
#pragma comment(lib,"Ws2_32")
66
#pragma comment(lib,"x86/XEngine_BaseLib/XEngine_BaseLib")
77
#pragma comment(lib,"x86/XEngine_NetHelp/NetHelp_APIHelp")
8+
#pragma comment(lib,"../../XEngine_Source/Debug/jsoncpp")
89
#else
910
#include <stdio.h>
1011
#include <stdlib.h>
1112
#include <string.h>
12-
#ifdef _CENTOS
13-
#include <json/json.h>
14-
#else
15-
#include <jsoncpp/json/json.h>
16-
#endif
1713
#endif
14+
#include <json/json.h>
1815
#include <XEngine_Include/XEngine_CommHdr.h>
1916
#include <XEngine_Include/XEngine_ProtocolHdr.h>
2017
#include <XEngine_Include/XEngine_BaseLib/BaseLib_Define.h>
@@ -23,7 +20,7 @@
2320
#include <XEngine_Include/XEngine_NetHelp/APIHelp_Error.h>
2421
#include "../../XEngine_Source/XQueue_ProtocolHdr.h"
2522

26-
//g++ -std=c++17 -Wall -g MQCore_HTTPApp.cpp -o MQCore_HTTPApp.exe -L /usr/local/lib/XEngine_Release/XEngine_BaseLib -L /usr/local/lib/XEngine_Release/XEngine_NetHelp -lXEngine_BaseLib -lNetHelp_APIHelp -ljsoncpp
23+
//g++ -std=c++17 -Wall -g MQCore_HTTPApp.cpp -o MQCore_HTTPApp.exe -I ../../XEngine_Source/XEngine_ThirdPart/jsoncpp -L /usr/local/lib/XEngine_Release/XEngine_BaseLib -L /usr/local/lib/XEngine_Release/XEngine_NetHelp -L ../../XEngine_Source/XEngine_ThirdPart/jsoncpp -lXEngine_BaseLib -lNetHelp_APIHelp -ljsoncpp
2724

2825
SOCKET m_Socket;
2926
LPCTSTR lpszKey = _T("XEngine_Notify"); //主题
@@ -38,7 +35,7 @@ void MQ_Authorize()
3835
Json::Value st_JsonRoot;
3936
Json::Value st_JsonAuth;
4037
st_JsonRoot["unOperatorType"] = ENUM_XENGINE_COMMUNICATION_PROTOCOL_TYPE_AUTH;
41-
st_JsonRoot["unOperatorCode"] = XENGINE_COMMUNICATION_PROTOCOL_OPERATOR_CODE_MQ_REPLOGIN;
38+
st_JsonRoot["unOperatorCode"] = XENGINE_COMMUNICATION_PROTOCOL_OPERATOR_CODE_MQ_REQUSERLOG;
4239
st_JsonRoot["byVersion"] = ENUM_XENGINE_PROTOCOLHDR_PAYLOAD_TYPE_JSON;
4340

4441
st_JsonAuth["tszUserName"] = "123123aa";

XEngine_Apps/MQCore_HTTPApp/MQCore_HTTPApp.vcxproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,26 +29,26 @@
2929
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
3030
<ConfigurationType>Application</ConfigurationType>
3131
<UseDebugLibraries>true</UseDebugLibraries>
32-
<PlatformToolset>v142</PlatformToolset>
32+
<PlatformToolset>v143</PlatformToolset>
3333
<CharacterSet>MultiByte</CharacterSet>
3434
</PropertyGroup>
3535
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
3636
<ConfigurationType>Application</ConfigurationType>
3737
<UseDebugLibraries>false</UseDebugLibraries>
38-
<PlatformToolset>v142</PlatformToolset>
38+
<PlatformToolset>v143</PlatformToolset>
3939
<WholeProgramOptimization>true</WholeProgramOptimization>
4040
<CharacterSet>Unicode</CharacterSet>
4141
</PropertyGroup>
4242
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
4343
<ConfigurationType>Application</ConfigurationType>
4444
<UseDebugLibraries>true</UseDebugLibraries>
45-
<PlatformToolset>v142</PlatformToolset>
45+
<PlatformToolset>v143</PlatformToolset>
4646
<CharacterSet>Unicode</CharacterSet>
4747
</PropertyGroup>
4848
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
4949
<ConfigurationType>Application</ConfigurationType>
5050
<UseDebugLibraries>false</UseDebugLibraries>
51-
<PlatformToolset>v142</PlatformToolset>
51+
<PlatformToolset>v143</PlatformToolset>
5252
<WholeProgramOptimization>true</WholeProgramOptimization>
5353
<CharacterSet>Unicode</CharacterSet>
5454
</PropertyGroup>
@@ -72,7 +72,7 @@
7272
<PropertyGroup Label="UserMacros" />
7373
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
7474
<LinkIncremental>true</LinkIncremental>
75-
<IncludePath>$(XEngine_Include);$(IncludePath)</IncludePath>
75+
<IncludePath>$(XEngine_Include);../../XEngine_Source/XEngine_ThirdPart/jsoncpp;$(IncludePath)</IncludePath>
7676
<LibraryPath>$(XEngine_Library);$(LibraryPath)</LibraryPath>
7777
</PropertyGroup>
7878
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">

0 commit comments

Comments
 (0)