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

Merge V3.9.0.1001 #39

Merged
merged 30 commits into from
Feb 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
d449c5f
update:depend library
xengine-qyt Jan 2, 2025
34f3a58
fixed:build warn
xengine-qyt Jan 10, 2025
dc6f59e
fixed:ubuntu 22.04 build failure
xengine-qyt Jan 13, 2025
6840ecf
fixed:build error when use v9.11
xengine-qyt Jan 20, 2025
2f8396c
added:ci code check
xengine-qyt Jan 21, 2025
8fcd482
update:ci workflows
xengine-qyt Jan 22, 2025
7dd17c1
modify:reply time count when send report for machine protocol
xengine-qyt Jan 22, 2025
62f6c2f
modify:get report count when send report
xengine-qyt Jan 22, 2025
01f5a19
update:depend library
xengine-qyt Feb 12, 2025
7f4f383
modify:x86 windows build support
xengine-qyt Feb 17, 2025
524d598
update:vscopy
xengine-qyt Feb 17, 2025
e3147fc
update:db depend library
xengine-qyt Feb 17, 2025
61277e3
update:db depend library
xengine-qyt Feb 18, 2025
c18df09
update:make file g++ version
xengine-qyt Feb 19, 2025
ba32f97
modify:new parameter re-number support for deamon
xengine-qyt Feb 19, 2025
58e8a92
delete:not retry when start process failed
xengine-qyt Feb 19, 2025
83bd253
fixed:enable or disable handle failed for image
xengine-qyt Feb 19, 2025
2aa5a18
update:configure file
xengine-qyt Feb 19, 2025
0e3b403
fixed:lib module password not work
xengine-qyt Feb 19, 2025
ae1a45a
modify:ci save day
xengine-qyt Feb 20, 2025
fe2e068
fixed:weather query is incorrect
xengine-qyt Feb 20, 2025
738b5c4
example:delete language and add weather and region and api query example
xengine-qyt Feb 20, 2025
5032477
fixed:enable process incorrect for image
xengine-qyt Feb 20, 2025
05c389a
update:configure file and add model file
xengine-qyt Feb 20, 2025
472bd64
added:set log type support
xengine-qyt Feb 20, 2025
338bd62
update:configure
xengine-qyt Feb 21, 2025
b103bbb
update:document
xengine-qyt Feb 21, 2025
b654cf2
modify:imp oil price query thought http api
xengine-qyt Feb 21, 2025
f9e9298
update:configure file
xengine-qyt Feb 21, 2025
ecb5a6b
update:other info
xengine-qyt Feb 24, 2025
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
68 changes: 68 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: CodeQL Advanced

on:
push:
branches:
- 'develop'
paths:
- 'XEngine_Source/**'
- 'XEngine_Release/**'
- '.github/**'

jobs:
analyze:
runs-on: ubuntu-24.04
permissions:
security-events: write
packages: read
actions: read
contents: read

strategy:
fail-fast: false
matrix:
include:
- language: c-cpp
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: 'develop'

- name: Checkout dependency repository (xengine)
uses: actions/checkout@v4
with:
repository: libxengine/libxengine
path: libxengine

- name: sub module checkout (opensource)
run: |
git submodule init
git submodule update

- name: install library
run: |
sudo apt update -y
sudo apt upgrade -y
sudo apt install liblua5.4-dev libopencv-dev libopencv-contrib-dev libqrencode-dev libleptonica-dev libtesseract-dev -y

- name: Set up Dependency Environment
run: |
cd libxengine
chmod +x ./XEngine_LINEnv.sh
sudo ./XEngine_LINEnv.sh -i 3

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}

- name: make
run: |
cd XEngine_Source
make

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{ matrix.language }}"
35 changes: 35 additions & 0 deletions .github/workflows/cppcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: cpp check workflows

on:
push:
branches:
- 'develop'
paths:
- 'XEngine_Source/**'
- 'XEngine_Release/**'
- '.github/**'

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout main repository code
uses: actions/checkout@v4
with:
ref: 'develop'

- name: Create static_analysis directory
run: mkdir -p static_analysis

- name: Run Cppcheck
run: |
sudo apt-get install -y cppcheck
cppcheck --enable=all --language=c++ --std=c++20 ./XEngine_Source/ --output-file=static_analysis/log.xml --xml
continue-on-error: true

- name: Upload Cppcheck Results
uses: actions/upload-artifact@v4
with:
name: cppcheck_results
path: static_analysis/log.xml
10 changes: 5 additions & 5 deletions .github/workflows/macbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@ name: macos build workflows

on:
push:
branches: [ "develop" ]
branches:
- 'develop'
paths:
- 'XEngine_Source/**'
- 'XEngine_Release/**'
- '.github/**'

permissions:
contents: read

jobs:
build:
strategy:
Expand Down Expand Up @@ -89,9 +87,11 @@ jobs:
with:
name: XEngine_APIServiceApp-x86_64-Mac
path: XEngine_Release/
retention-days: 1
- name: Upload folder as artifact with mac arm
if: matrix.os == 'macos-14'
uses: actions/upload-artifact@v4
with:
name: XEngine_APIServiceApp-Arm64-Mac
path: XEngine_Release/
path: XEngine_Release/
retention-days: 1
7 changes: 4 additions & 3 deletions .github/workflows/msbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@ name: windows build workflows

on:
push:
branches: [ "develop" ]
branches:
- 'develop'
paths:
- 'XEngine_Source/**'
- 'XEngine_Release/**'
- '.github/**'

permissions:
contents: read

jobs:
build:
Expand Down Expand Up @@ -121,10 +120,12 @@ jobs:
with:
name: XEngine_APIServiceApp-x86_32-Windows
path: XEngine_Release/
retention-days: 1

- name: Upload folder as artifact with x64
if: matrix.configuration == 'Release' && matrix.platform == 'x64'
uses: actions/upload-artifact@v4
with:
name: XEngine_APIServiceApp-x86_64-Windows
path: XEngine_Release/
retention-days: 1
10 changes: 6 additions & 4 deletions .github/workflows/ubuntubuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@ name: ubuntu build workflows

on:
push:
branches: [ "develop" ]
branches:
- 'develop'
paths:
- 'XEngine_Source/**'
- 'XEngine_Release/**'
- '.github/**'

permissions:
contents: read

jobs:
build:
Expand Down Expand Up @@ -92,9 +91,12 @@ jobs:
with:
name: XEngine_APIServiceApp-x86_64-Ubuntu-22.04
path: XEngine_Release/
retention-days: 1

- name: Upload folder as artifact with ubuntu24.04
if: matrix.os == 'ubuntu-24.04'
uses: actions/upload-artifact@v4
with:
name: XEngine_APIServiceApp-x86_64-Ubuntu-24.04
path: XEngine_Release/
path: XEngine_Release/
retention-days: 1
30 changes: 30 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,33 @@
XEngine_APIService V3.9.0.1001

增加:设置日志类型配置支持
更新:依赖库
更新:makefile的g++
更新:配置增加模型文件
修改:报告次数现在直接在发送的时候获取了
修改:守护进程新的重试次数参数支持
修改:支持其他语言系统
修改:油价查询实现通过http api了
修正:编译问题
修正:启用和禁用图像处理不正确的问题
修正:密码插件不工作的问题
修正:天气查询问题
删除:守护功能启动程序失败不在重试

added:set log type support
update:depend library
update:make file g++ version
update:configure file and add model file
modify:reply time count when send report for machine protocol
modify:new parameter re-number support for deamon
modify:other language system supported
modify:imp oil price query thought http api
fixed:build problem
fixed:enable or disable handle failed for image
fixed:lib module password not work
fixed:weather query is incorrect
delete:not retry when start process failed
======================================================================================
XEngine_APIService V3.8.0.1001

增加:OCR图片文本支持
Expand Down
4 changes: 2 additions & 2 deletions README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,13 @@ git submodule init
git submodule update

#### Linux
ubuntu:sudo apt install sudo apt install liblua5.4-dev libopencv-dev libopencv-contrib-dev libqrencode-dev
ubuntu:sudo apt install sudo apt install liblua5.4-dev libopencv-dev libopencv-contrib-dev libqrencode-dev libleptonica-dev libtesseract-dev
centos:compile by self
use makefile compile,UBUNTU24.04 x64 or RockyLinux 9 x64
Run it on the terminal

#### Macos
install opencc:brew install lua opencv qrencode
install environment:brew install lua opencv qrencode leptonica tesseract
use makefile compile,mac 13 and above
Run it on the terminal

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,13 @@ git clone https://gitee.com/xengine/XEngine_PhoneData.git XEngine_Source/XEngine
直接运行即可

#### Linux
ubuntu:sudo apt install liblua5.4-dev libopencv-dev libopencv-contrib-dev libqrencode-dev
ubuntu:sudo apt install liblua5.4-dev libopencv-dev libopencv-contrib-dev libqrencode-dev libleptonica-dev libtesseract-dev
centos:需要自己编译
Linux使用Makefile编译,UBUNTU24.04 x64或者RockyLinux 9 x64
在控制台运行

#### Macos
安装opencc,执行命令:brew install lua opencv qrencode
安装环境,执行命令:brew install lua opencv qrencode leptonica tesseract
使用makefile编译,控制台运行,需要mac 13以及以上版本
在控制台运行

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
#ifdef _MSC_BUILD
#include <Windows.h>
#include <tchar.h>
#pragma comment(lib,"Ws2_32")
#pragma comment(lib,"jsoncpp")
#pragma comment(lib,"XEngine_BaseLib/XEngine_BaseLib")
#pragma comment(lib,"XEngine_Client/XClient_APIHelp")
#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
#include <json/json.h>
#include <XEngine_Include/XEngine_CommHdr.h>
#include <XEngine_Include/XEngine_ProtocolHdr.h>
#include <XEngine_Include/XEngine_BaseLib/BaseLib_Define.h>
#include <XEngine_Include/XEngine_BaseLib/BaseLib_Error.h>
#include <XEngine_Include/XEngine_Client/APIClient_Define.h>
#include <XEngine_Include/XEngine_Client/APIClient_Error.h>

//需要优先配置XEngine
//WINDOWS支持VS2022 x64 debug 编译调试
//g++ -std=c++17 -Wall -g APPClient_APIQueryExample.cpp -o APPClient_APIQueryExample.exe -I ../../XEngine_Source/XEngine_Depend/XEngine_Module/jsoncpp -L ../../XEngine_Release -lXEngine_BaseLib -lXClient_APIHelp -ljsoncpp -Wl,-rpath=../../XEngine_Release

int main()
{
#ifdef _MSC_BUILD
WSADATA st_WSAData;
WSAStartup(MAKEWORD(2, 2), &st_WSAData);
#endif
int nLen = 0;
int nCode = 0;
XCHAR tszMsgBuffer[1024];
LPCXSTR lpszTypeOne = _X("http://127.0.0.1:5501/api?function=ip&param=117.172.221.14");
memset(tszMsgBuffer, '\0', sizeof(tszMsgBuffer));
XCHAR* ptszMsgBuffer = NULL;
if (!APIClient_Http_Request(_X("GET"), lpszTypeOne, NULL, &nCode, &ptszMsgBuffer, &nLen))
{
printf("发送投递失败!\n");
return 0;
}
#ifdef _MSC_BUILD
BaseLib_Charset_UTFToAnsi(ptszMsgBuffer, tszMsgBuffer, &nLen);
printf("接受到数据,大小:%d,内容:%s\n", nLen, tszMsgBuffer);
#else
printf("接受到数据,大小:%d,内容:%s\n", nLen, ptszMsgBuffer);
#endif
BaseLib_Memory_FreeCStyle((XPPMEM)&ptszMsgBuffer);
//////////////////////////////////////////////////////////////////////////
nLen = 0;
nCode = 0;
LPCXSTR lpszTypeZ = _X("http://127.0.0.1:5501/api?function=mac&param=00:00:0C");
memset(tszMsgBuffer, '\0', sizeof(tszMsgBuffer));
if (!APIClient_Http_Request(_X("GET"), lpszTypeZ, NULL, &nCode, &ptszMsgBuffer, &nLen))
{
printf("发送投递失败!\n");
return 0;
}
#ifdef _MSC_BUILD
BaseLib_Charset_UTFToAnsi(ptszMsgBuffer, tszMsgBuffer, &nLen);
printf("接受到数据,大小:%d,内容:%s\n", nLen, tszMsgBuffer);
#else
printf("接受到数据,大小:%d,内容:%s\n", nLen, ptszMsgBuffer);
#endif
BaseLib_Memory_FreeCStyle((XPPMEM)&ptszMsgBuffer);
#ifdef _MSC_BUILD
WSACleanup();
#endif
return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>16.0</VCProjectVersion>
<VCProjectVersion>17.0</VCProjectVersion>
<Keyword>Win32Proj</Keyword>
<ProjectGuid>{1b028466-937d-4d6c-a7ed-a0bd5c312878}</ProjectGuid>
<RootNamespace>APPClientLanguageExample</RootNamespace>
<ProjectGuid>{58ebbc6b-e384-4f7a-ae1c-99f5fbfd63ac}</ProjectGuid>
<RootNamespace>APPClientAPIQueryExample</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
Expand All @@ -43,7 +43,7 @@
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
Expand Down Expand Up @@ -71,18 +71,12 @@
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<IncludePath>$(XEngine_Include);../../XEngine_Source/XEngine_Depend/XEngine_Module/jsoncpp;$(IncludePath)</IncludePath>
<LibraryPath>$(XEngine_Lib32);../../XEngine_Source/Debug;$(LibraryPath)</LibraryPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
<IncludePath>$(XEngine_Include);$(IncludePath)</IncludePath>
<LibraryPath>$(XEngine_Lib64);$(LibraryPath)</LibraryPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<IncludePath>$(XEngine_Include);../../XEngine_Source/XEngine_Depend/XEngine_Module/jsoncpp;$(IncludePath)</IncludePath>
<LibraryPath>$(XEngine_Lib64);../../XEngine_Source/x64/Debug;$(LibraryPath)</LibraryPath>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
Expand Down Expand Up @@ -141,7 +135,7 @@
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="APPClient_LanguageExample.cpp" />
<ClCompile Include="APPClient_APIQueryExample.cpp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
Expand Down
Loading
Loading