Skip to content

Commit 68337bb

Browse files
authored
Merge pull request #37 from libxengine/develop
V3.15.0.1001 Merge
2 parents 918b867 + 3140759 commit 68337bb

File tree

88 files changed

+1199
-8545
lines changed

Some content is hidden

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

88 files changed

+1199
-8545
lines changed

.github/workflows/msbuild.yml

+102
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
name: C++ Build with Dependencies
2+
3+
#on: [push] # 触发条件,推送和拉取请求时,
4+
on:
5+
workflow_dispatch: # 添加这行来启用手动触发
6+
7+
permissions:
8+
contents: write
9+
10+
jobs:
11+
build:
12+
strategy:
13+
matrix:
14+
configuration: [Release]
15+
platform: [x86]
16+
17+
runs-on: windows-latest # 最新的 Windows 环境
18+
19+
steps:
20+
# 检出您的主仓库代码
21+
- name: Checkout main repository code
22+
uses: actions/checkout@v3
23+
24+
# 检出依赖的xengine仓库到指定的xengine目录
25+
- name: Checkout dependency repository (xengine)
26+
uses: actions/checkout@v3
27+
with:
28+
repository: libxengine/xengine
29+
path: xengine
30+
31+
# 设置依赖库的环境变量
32+
- name: Set up Dependency Environment Variables
33+
run: |
34+
echo "XENGINE_INCLUDE=${{ github.workspace }}/xengine" | Out-File -FilePath $env:GITHUB_ENV -Append
35+
echo "XENGINE_LIB32=${{ github.workspace }}/xengine/XEngine_Windows/x86" | Out-File -FilePath $env:GITHUB_ENV -Append
36+
echo "XENGINE_LIB64=${{ github.workspace }}/xengine/XEngine_Windows/x64" | Out-File -FilePath $env:GITHUB_ENV -Append
37+
shell: pwsh
38+
39+
# 配置 MSBuild 的路径,准备构建 VC++ 项目
40+
- name: Setup MSBuild
41+
uses: microsoft/[email protected]
42+
#编译
43+
- name: Build Solution
44+
run: msbuild XEngine_Source/XEngine_StorageApp.sln /p:Configuration=${{ matrix.configuration }} /p:Platform=${{ matrix.platform }}
45+
46+
# 打包
47+
- name: Copy Build binaries for x86
48+
run: |
49+
mkdir -p "x86/XEngine_StorageApp"
50+
cp -r ./XEngine_Release/* x86/XEngine_StorageApp/
51+
cp -r ./XEngine_Source/Release/*.dll x86/XEngine_StorageApp/
52+
cp -r ./XEngine_Source/Release/*.exe x86/XEngine_StorageApp/
53+
cp -r ./XEngine_Source/VSCopy_x86.bat x86/XEngine_StorageApp/
54+
cd x86/XEngine_StorageApp && ./VSCopy_x86.bat
55+
cd ..
56+
cd ..
57+
7z a XEngine_StorageApp-x86-Windows.zip ./x86/XEngine_StorageApp/*
58+
shell: pwsh
59+
60+
- name: Calculate new tag
61+
id: newtag
62+
shell: bash
63+
run: |
64+
git fetch --tags
65+
TAG=$(git tag --sort=-v:refname | head -n 1)
66+
MAJOR=$(echo $TAG | cut -d '.' -f 1)
67+
MINOR=$(echo $TAG | cut -d '.' -f 2)
68+
PATCH=$(echo $TAG | cut -d '.' -f 3)
69+
BUILD=$(echo $TAG | cut -d '.' -f 4)
70+
MINOR_BUMP=$((MINOR + 1))
71+
NEW_TAG="${MAJOR}.${MINOR_BUMP}.0.${BUILD}"
72+
echo "NEW_TAG=$NEW_TAG" >> $GITHUB_ENV
73+
git config --local user.email "[email protected]"
74+
git config --local user.name "GitHub Action"
75+
git tag $NEW_TAG
76+
git push origin $NEW_TAG
77+
78+
# 创建GitHub Release
79+
- name: Create Release
80+
id: create_release
81+
uses: softprops/action-gh-release@v1
82+
with:
83+
tag_name: ${{ env.NEW_TAG }}
84+
name: Release ${{ env.NEW_TAG }}
85+
body: |
86+
[${{ github.sha }}](https://github.com/libxengine/XEngine_Storage/commit/${{ github.sha }})
87+
${{ github.event.head_commit.message }}
88+
draft: false
89+
prerelease: false
90+
env:
91+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
92+
93+
# 上传x86的zip包作为发布的artifacts
94+
- name: Upload x86 Release Asset
95+
uses: actions/upload-release-asset@v1
96+
env:
97+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
98+
with:
99+
upload_url: ${{ steps.create_release.outputs.upload_url }}
100+
asset_path: ./XEngine_StorageApp-x86-Windows.zip
101+
asset_name: XEngine_StorageApp-x86-Windows.zip
102+
asset_content_type: application/zip

.gitmodules

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "XEngine_Source/XEngine_Depend"]
2+
path = XEngine_Source/XEngine_Depend
3+
url = https://github.com/libxengine/XEngine_OPenSource.git

CHANGELOG

+14
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
XEngine_Storage V3.15.0.1001
2+
3+
增加:用户上传下载动作支持
4+
更新:获取信息报告次数统计
5+
修改:信息报告和jsoncpp模块使用git submodule模式加载
6+
修改:分离了版本配置文件从主配置中
7+
修改:调整子方法名称位置
8+
9+
added:upload and download action support
10+
update:get time count for report
11+
modify:info report and jsoncpp module depend git sub module
12+
modify:detach version configure from main configure
13+
modify:adjust sub method name location
14+
======================================================================================
115
XEngine_Storage V3.14.0.1001
216

317
增加:默认SSL的KEY文件

README.en.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ feature list:
3232
15. support full speed and limit speed
3333
16. permission control
3434
17. upload file rewrite
35-
18. support convert record(Active download)
35+
18. support convert record(service upload and download)
3636

3737
## install
3838

@@ -47,6 +47,11 @@ window Exection XEngine_WINEnv.bat
4747
Linux Exection:sudo ./XEngine_LINEnv.sh -i 3
4848
Macos Exection:./XEngine_LINEnv.sh -i 3
4949

50+
#### sub module
51+
Due to the dependent sub-modules, after you checkout the warehouse, execute the following command in the warehouse directory to pull the sub-modules
52+
git submodule init
53+
git submodule update
54+
5055
#### Windows
5156
use vs open and compile,suport windows 7sp1 and above
5257
Just Run it,use XEngine_AuthorizeApp

README.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ c c++ file storage service
3131
15. 支持全速模式和限速模式
3232
16. 权限控制
3333
17. 上传文件覆写
34-
18. 支持转录(主动下载)
34+
18. 支持转录(服务器上传下载)
3535

3636
## 安装教程
3737

@@ -46,6 +46,11 @@ window执行XEngine_WINEnv.bat 脚本.
4646
Linux执行:sudo ./XEngine_LINEnv.sh -i 3
4747
macos执行:./XEngine_LINEnv.sh -i 3
4848

49+
#### sub module
50+
由于依赖的子模块,在你checkout仓库后,在仓库目录下执行下面的命令拉取子模块
51+
git submodule init
52+
git submodule update
53+
4954
#### Windows
5055
使用VS打开并且编译,支持WINDOWS 7SP1以上系统
5156
直接运行即可,使用XEngine_AuthorizeApp

SECURITY.md

+3-7
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,9 @@ currently being supported with security updates.
77

88
| Version | Supported |
99
| ------- | ------------------ |
10-
| 2.6.x | :white_check_mark: |
11-
| < 2.6 | :x: |
10+
| >= 3.x | :white_check_mark: |
11+
| <= 2.x | :x: |
1212

1313
## Reporting a Vulnerability
1414

15-
Use this section to tell people how to report a vulnerability.
16-
17-
Tell them where to go, how often they can expect to get an update on a
18-
reported vulnerability, what to expect if the vulnerability is accepted or
19-
declined, etc.
15+
www.xyry.org or [email protected]

XEngine_Docment/Docment_en.docx

922 Bytes
Binary file not shown.

XEngine_Docment/Docment_zh.docx

1.17 KB
Binary file not shown.

XEngine_Release/XEngine_Config/XEngine_Config.json

+6-34
Original file line numberDiff line numberDiff line change
@@ -73,40 +73,12 @@
7373
},
7474
"XReport":{
7575
"bEnable":true,
76+
"tszServiceName":"XEngine_Storage",
7677
"tszAPIUrl":"http://app.xyry.org:5501/api?function=machine"
7778
},
78-
"XVer":[
79-
"3.14.0.1001 Build20240418",
80-
"3.13.0.1001 Build20240301",
81-
"3.12.1.1001 Build20240104",
82-
"3.12.0.1001 Build20231025",
83-
"3.11.1.1001 Build20230804",
84-
"3.11.0.1001 Build20230421",
85-
"3.10.0.1001 Build20230210",
86-
"3.9.1.1001 Build20221227",
87-
"3.9.0.1001 Build20221028",
88-
"3.8.0.1001 Build20220727",
89-
"3.7.0.1001 Build20220624",
90-
"3.6.0.1001 Build20220402",
91-
"3.5.1.1001 Build20220314",
92-
"3.5.0.1001 Build20220228",
93-
"3.4.1.1001 Build20220126",
94-
"3.4.0.1001 Build20220121",
95-
"3.3.0.1001 Build20220106",
96-
"3.2.0.1001 Build20211211",
97-
"3.1.0.1001 Build20211109",
98-
"3.0.0.1001 Build20211029",
99-
"2.5.0.1001 Build20210930",
100-
"2.4.0.1001 Build20210918",
101-
"2.3.0.1001 Build20210903",
102-
"2.2.0.1001 Build20210820",
103-
"2.1.0.1001 Build20210805",
104-
"2.0.0.1001 Build20210723",
105-
"1.5.0.1001 Build20210716",
106-
"1.4.0.1001 Build20210702",
107-
"1.3.0.1001 Build20210625",
108-
"1.2.0.1001 Build20210618",
109-
"1.1.0.1001 Build20210611",
110-
"1.0.0.1001 Build20210501"
111-
]
79+
"XAction":{
80+
"bEnable":true,
81+
"nSDMax":1024000,
82+
"nRVMax":1024000
83+
}
11284
}

XEngine_Release/XEngine_Config/XEngine_LBConfig.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@
1818
],
1919
"StorageAddr":[
2020
{
21-
"bEnable":false,
21+
"bEnable":true,
2222
"nLevel":1,
2323
"Size":"1024MB",
2424
"XEngine_Key":"storagekey1",
2525
"XEngine_Path":"./XEngine_File",
2626
"PermissionFlags":{
2727
"CreateDir":false,
2828
"Rewrite":false,
29-
"UPLimit": false
29+
"UPLimit":false
3030
}
3131
},
3232
{
@@ -38,7 +38,7 @@
3838
"PermissionFlags":{
3939
"CreateDir":false,
4040
"Rewrite":false,
41-
"UPLimit": false
41+
"UPLimit":false
4242
}
4343
}
4444
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"XVer":[
3+
"3.15.0.1001 Build20240511",
4+
"3.14.0.1001 Build20240418",
5+
"3.13.0.1001 Build20240301",
6+
"3.12.1.1001 Build20240104",
7+
"3.12.0.1001 Build20231025",
8+
"3.11.1.1001 Build20230804",
9+
"3.11.0.1001 Build20230421",
10+
"3.10.0.1001 Build20230210",
11+
"3.9.1.1001 Build20221227",
12+
"3.9.0.1001 Build20221028",
13+
"3.8.0.1001 Build20220727",
14+
"3.7.0.1001 Build20220624",
15+
"3.6.0.1001 Build20220402",
16+
"3.5.1.1001 Build20220314",
17+
"3.5.0.1001 Build20220228",
18+
"3.4.1.1001 Build20220126",
19+
"3.4.0.1001 Build20220121",
20+
"3.3.0.1001 Build20220106",
21+
"3.2.0.1001 Build20211211",
22+
"3.1.0.1001 Build20211109",
23+
"3.0.0.1001 Build20211029",
24+
"2.5.0.1001 Build20210930",
25+
"2.4.0.1001 Build20210918",
26+
"2.3.0.1001 Build20210903",
27+
"2.2.0.1001 Build20210820",
28+
"2.1.0.1001 Build20210805",
29+
"2.0.0.1001 Build20210723",
30+
"1.5.0.1001 Build20210716",
31+
"1.4.0.1001 Build20210702",
32+
"1.3.0.1001 Build20210625",
33+
"1.2.0.1001 Build20210618",
34+
"1.1.0.1001 Build20210611",
35+
"1.0.0.1001 Build20210501"
36+
]
37+
}

XEngine_Source/Makefile

+6-6
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,29 @@ UNICODE = 0
33
PLATFORM=linux
44
FLAGS=
55

6-
THIRD_JSONCPP_PATH = ./XEngine_ThirdPart/jsoncpp
6+
THIRD_JSONCPP_PATH = ./XEngine_Depend/XEngine_Module/jsoncpp
7+
THIRD_REPORT_PATH = ./XEngine_Depend/XEngine_Module/XEngine_InfoReport
78

89
BASE_SQL_PATH = ./StorageModule_Database
910
BASE_CONFIG_PATH = ./StorageModule_Config
1011
BASE_SESSION_PATH = ./StorageModule_Session
1112
BASE_APIHELP_PATH = ./StorageModule_APIHelp
1213
BASE_PROTOCOL_PATH = ./StorageModule_Protocol
1314
BASE_BTORRENT_PATH = ./StorageModule_BTorrent
14-
BASE_INFOREPORT_PATH = ./StorageModule_InfoReport
1515

1616
APPSERVICE_STORAGE_PATH = ./XEngine_StorageApp
1717

18-
XENGINE_MODULES = libjsoncpp.so \
19-
libStorageModule_Database.so libStorageModule_Config.so libStorageModule_Session.so libStorageModule_APIHelp.so libStorageModule_Protocol.so libStorageModule_BTorrent.so libStorageModule_InfoReport.so \
18+
XENGINE_MODULES = libjsoncpp.so libXEngine_InfoReport.so \
19+
libStorageModule_Database.so libStorageModule_Config.so libStorageModule_Session.so libStorageModule_APIHelp.so libStorageModule_Protocol.so libStorageModule_BTorrent.so \
2020
XEngine_StorageApp.exe
2121

2222
.PHONY:MakeAll
2323
MakeAll:$(XENGINE_MODULES)
2424

2525
libjsoncpp.so:
2626
make -C $(THIRD_JSONCPP_PATH) PLATFORM=$(PLATFORM) $(FLAGS)
27+
libXEngine_InfoReport.so:
28+
make -C $(THIRD_REPORT_PATH) PLATFORM=$(PLATFORM) $(FLAGS)
2729

2830
libStorageModule_Database.so:
2931
make -C $(BASE_SQL_PATH) PLATFORM=$(PLATFORM) $(FLAGS)
@@ -37,8 +39,6 @@ libStorageModule_Protocol.so:
3739
make -C $(BASE_PROTOCOL_PATH) PLATFORM=$(PLATFORM) $(FLAGS)
3840
libStorageModule_BTorrent.so:
3941
make -C $(BASE_BTORRENT_PATH) PLATFORM=$(PLATFORM) $(FLAGS)
40-
libStorageModule_InfoReport.so:
41-
make -C $(BASE_INFOREPORT_PATH) PLATFORM=$(PLATFORM) $(FLAGS)
4242

4343
XEngine_StorageApp.exe:
4444
make -C $(APPSERVICE_STORAGE_PATH) PLATFORM=$(PLATFORM) $(FLAGS)

XEngine_Source/StorageModule_APIHelp/APIHelp_Define.h

+24
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,30 @@ extern "C" bool APIHelp_Distributed_FileList(list<APIHELP_LBFILEINFO>* pStl_List
9595
*********************************************************************/
9696
extern "C" bool APIHelp_Distributed_DLStorage(LPCXSTR lpszMsgBuffer, list<XENGINE_STORAGEBUCKET>* pStl_ListBucket, XENGINE_STORAGEBUCKET* pSt_StorageBucket);
9797
/********************************************************************
98+
函数名称:APIHelp_Distributed_GetPathKey
99+
函数功能:通过BUCKET名称查找对应路径
100+
参数.一:pStl_ListBucket
101+
In/Out:In
102+
类型:STL容器指针
103+
可空:N
104+
意思:输入要操作的BUCKET容器
105+
参数.二:lpszBuckKey
106+
In/Out:In
107+
类型:常量字符指针
108+
可空:N
109+
意思:输入要匹配的BUCKET名称
110+
参数.三:ptszFilePath
111+
In/Out:Out
112+
类型:字符指针
113+
可空:N
114+
意思:输出找到的路径
115+
返回值
116+
类型:逻辑型
117+
意思:是否成功
118+
备注:
119+
*********************************************************************/
120+
extern "C" bool APIHelp_Distributed_CTStorage(LPCXSTR lpszMsgBuffer, list<XENGINE_STORAGEBUCKET>* pStl_ListBucket, XENGINE_STORAGEBUCKET* pSt_StorageBucket);
121+
/********************************************************************
98122
函数名称:APIHelp_Distributed_UPStorage
99123
函数功能:通过分布式存储列表获得一个存储地址
100124
参数.一:pStl_ListBucket

0 commit comments

Comments
 (0)