diff --git a/.github/workflows/RockyArm64_build.yml b/.github/workflows/RockyArm64_build.yml new file mode 100644 index 00000000..2c52119c --- /dev/null +++ b/.github/workflows/RockyArm64_build.yml @@ -0,0 +1,82 @@ +name: rocky Arm64 build workflows + +on: + push: + branches: + - 'develop' + paths: + - 'XEngine_Source/**' + - 'XEngine_Release/**' + - '.github/**' + +permissions: + contents: read + +jobs: + build: + runs-on: ubuntu-24.04 + env: + IMAGE_NAME: rockylinux/rockylinux:9.5 + + strategy: + fail-fast: false + matrix: + arch: [linux/arm64] + + steps: + # 检出您的主仓库代码 + - name: Checkout main repository code + uses: actions/checkout@v4 + with: + ref: 'develop' + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Build ${{ matrix.arch }} + run: | + docker run --platform ${{ matrix.arch }} --rm \ + -v ${{ github.workspace }}:/workspace \ + -w /workspace ${{ env.IMAGE_NAME }} /bin/sh -c ' + set -e + dnf update -y + dnf install --allowerasing git make g++ wget curl jq unzip -y + + git config --global --add safe.directory /workspace + git submodule init + git submodule update + + latest_tag=$(curl -s https://api.github.com/repos/libxengine/libxengine/releases/latest | jq -r .tag_name) + wget https://github.com/libxengine/libxengine/releases/download/$latest_tag/XEngine_RockyLinux_9_Arm64.zip + unzip ./XEngine_RockyLinux_9_Arm64.zip -d ./XEngine_RockyLinux_9_Arm64 + cd XEngine_RockyLinux_9_Arm64 + + chmod 777 ./XEngine_LINEnv.sh + ./XEngine_LINEnv.sh -i 0 + + dnf install lua-devel opencv-devel qrencode-devel leptonica-devel tesseract-devel -y + + cp -rf ./XEngine_Include /usr/local/include + find ./XEngine_Linux -name "*.so" -exec cp {} /usr/lib64 \; + ldconfig + cd .. + + cd XEngine_Source + make ARCH=Arm64 RELEASE=1 + make FLAGS=InstallAll + make FLAGS=CleanAll + cd .. + + cd XEngine_Release + chmod 777 copydb.sh + ./copydb.sh + ./XEngine_APIServiceApp -t + chown -R $(id -u):$(id -g) . + chmod -R a+r . ' + + - name: Upload folder as artifact with RockyLinux + uses: actions/upload-artifact@v4 + with: + name: XEngine_APIServiceApp-RockyLinux_9_Arm64 + path: XEngine_Release/ + retention-days: 1 diff --git a/.github/workflows/RockyX86_64_build.yml b/.github/workflows/RockyX86_64_build.yml new file mode 100644 index 00000000..b856786c --- /dev/null +++ b/.github/workflows/RockyX86_64_build.yml @@ -0,0 +1,99 @@ +name: rocky x86_64 build workflows + +on: + push: + branches: + - 'develop' + paths: + - 'XEngine_Source/**' + - 'XEngine_Release/**' + - '.github/**' + +permissions: + contents: read + +jobs: + build: + runs-on: ubuntu-latest + container: + image: rockylinux/rockylinux:9.5 + + steps: + # 检出您的主仓库代码 + - name: Checkout main repository code + uses: actions/checkout@v4 + with: + ref: 'develop' + + # 检出依赖的xengine仓库到指定的xengine目录 + - name: Checkout dependency repository (xengine) + uses: actions/checkout@v4 + with: + repository: libxengine/libxengine + path: libxengine + + - name: sub module checkout (XEngine_OPenSource) + uses: actions/checkout@v4 + with: + repository: libxengine/XEngine_OPenSource + path: XEngine_Source/XEngine_Depend + - name: sub module checkout (XEngine_PhoneData) + uses: actions/checkout@v4 + with: + repository: libxengine/XEngine_PhoneData + path: XEngine_Source/XEngine_DBDepend/XEngine_PhoneData + - name: sub module checkout (XEngine_IPMacData) + uses: actions/checkout@v4 + with: + repository: libxengine/XEngine_IPMacData + path: XEngine_Source/XEngine_DBDepend/XEngine_IPMacData + + - name: install system package + run: | + dnf update -y + ls -al ./XEngine_Source/XEngine_DBDepend/ + ls -al ./XEngine_Source/XEngine_DBDepend/XEngine_IPMacData/XEngine_Source + dnf install gcc g++ make git jq unzip -y + # 设置依赖库的环境变量 + - name: Set up Dependency rocky linux Environment + run: | + cd libxengine + chmod 777 * + ./XEngine_LINEnv.sh -i 0 + dnf install lua-devel opencv-devel qrencode-devel leptonica-devel tesseract-devel -y + + - name: install xengine library + run: | + latest_tag=$(curl -s https://api.github.com/repos/libxengine/libxengine/releases/latest | jq -r .tag_name) + wget https://github.com/libxengine/libxengine/releases/download/$latest_tag/XEngine_RockyLinux_9_x86-64.zip + unzip ./XEngine_RockyLinux_9_x86-64.zip -d ./XEngine_RockyLinux_9_x86-64 + cd XEngine_RockyLinux_9_x86-64 + + cp -rf ./XEngine_Include /usr/local/include + find ./XEngine_Linux -name "*.so" -exec cp {} /usr/lib64 \; + ldconfig + + - name: make + run: | + cd XEngine_Source + make + make FLAGS=InstallAll + make FLAGS=CleanAll + + make RELEASE=1 + make FLAGS=InstallAll + make FLAGS=CleanAll + + - name: test + run: | + cd XEngine_Release + chmod 777 copydb.sh + ./copydb.sh + ./XEngine_APIServiceApp -t + + - name: Upload folder as artifact with RockyLinux + uses: actions/upload-artifact@v4 + with: + name: XEngine_APIServiceApp-RockyLinux_9_x86_64 + path: XEngine_Release/ + retention-days: 1 diff --git a/.github/workflows/UbuntuArm64_build.yml b/.github/workflows/UbuntuArm64_build.yml new file mode 100644 index 00000000..85007501 --- /dev/null +++ b/.github/workflows/UbuntuArm64_build.yml @@ -0,0 +1,77 @@ +name: ubuntu Arm64 build workflows + +on: + push: + branches: + - 'develop' + paths: + - 'XEngine_Source/**' + - 'XEngine_Release/**' + - '.github/**' + +jobs: + build: + runs-on: ubuntu-24.04 + env: + IMAGE_NAME: ubuntu:24.04 + + strategy: + fail-fast: false + matrix: + arch: [linux/arm64] + + steps: + - name: Checkout main repository code + uses: actions/checkout@v4 + with: + ref: 'develop' + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Build ${{ matrix.arch }} + run: | + docker run --platform ${{ matrix.arch }} --rm \ + -v ${{ github.workspace }}:/workspace \ + -w /workspace ${{ env.IMAGE_NAME }} /bin/sh -c ' + set -e + apt update -y + apt install git make g++ wget curl jq unzip -y + apt install liblua5.4-dev libopencv-dev libopencv-contrib-dev libqrencode-dev libleptonica-dev libtesseract-dev -y + + git config --global --add safe.directory /workspace + git submodule init + git submodule update + + latest_tag=$(curl -s https://api.github.com/repos/libxengine/libxengine/releases/latest | jq -r .tag_name) + wget https://github.com/libxengine/libxengine/releases/download/$latest_tag/XEngine_UBuntu_24.04_Arm64.zip + unzip ./XEngine_UBuntu_24.04_Arm64.zip -d ./XEngine_UBuntu_24.04_Arm64 + cd XEngine_UBuntu_24.04_Arm64 + + chmod 777 ./XEngine_LINEnv.sh + ./XEngine_LINEnv.sh -i 0 + + cp -rf ./XEngine_Include /usr/local/include + find ./XEngine_Linux -name "*.so" -exec cp {} /usr/local/lib \; + ldconfig + cd .. + + cd XEngine_Source + make ARCH=Arm64 RELEASE=1 + make FLAGS=InstallAll + make FLAGS=CleanAll + cd .. + + cd XEngine_Release + chmod 777 copydb.sh + ./copydb.sh + ./XEngine_APIServiceApp -t + chown -R $(id -u):$(id -g) . + chmod -R a+r . ' + + - name: Upload folder as artifact with ubuntu Arm64 + uses: actions/upload-artifact@v4 + with: + name: XEngine_APIServiceApp-Ubuntu_24.04_Arm64 + path: XEngine_Release/ + retention-days: 1 \ No newline at end of file diff --git a/.github/workflows/ubuntubuild.yml b/.github/workflows/Ubuntux86_64_build.yml similarity index 93% rename from .github/workflows/ubuntubuild.yml rename to .github/workflows/Ubuntux86_64_build.yml index 773a770d..54c494ff 100644 --- a/.github/workflows/ubuntubuild.yml +++ b/.github/workflows/Ubuntux86_64_build.yml @@ -1,4 +1,4 @@ -name: ubuntu build workflows +name: ubuntu x86_64 build workflows on: push: @@ -83,13 +83,15 @@ jobs: - name: test run: | cd XEngine_Release + chmod 777 copydb.sh + ./copydb.sh ./XEngine_APIServiceApp -t - name: Upload folder as artifact with ubuntu22.04 if: matrix.os == 'ubuntu-22.04' uses: actions/upload-artifact@v4 with: - name: XEngine_APIServiceApp-x86_64-Ubuntu-22.04 + name: XEngine_APIServiceApp-Ubuntu_22.04_x86_64 path: XEngine_Release/ retention-days: 1 @@ -97,6 +99,6 @@ jobs: if: matrix.os == 'ubuntu-24.04' uses: actions/upload-artifact@v4 with: - name: XEngine_APIServiceApp-x86_64-Ubuntu-24.04 + name: XEngine_APIServiceApp-Ubuntu_24.04_x86_64 path: XEngine_Release/ retention-days: 1 \ No newline at end of file diff --git a/.github/workflows/macbuild.yml b/.github/workflows/macbuild.yml index aec8b173..5e494df3 100644 --- a/.github/workflows/macbuild.yml +++ b/.github/workflows/macbuild.yml @@ -79,19 +79,21 @@ jobs: - name: test run: | cd XEngine_Release + chmod 777 copydb.sh + ./copydb.sh ./XEngine_APIServiceApp -t - name: Upload folder as artifact with mac x64 if: matrix.os == 'macos-13' uses: actions/upload-artifact@v4 with: - name: XEngine_APIServiceApp-x86_64-Mac + name: XEngine_APIServiceApp-Mac_x86_64 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 + name: XEngine_APIServiceApp-Mac_Arm64 path: XEngine_Release/ retention-days: 1 \ No newline at end of file diff --git a/.github/workflows/msbuild.yml b/.github/workflows/msbuild.yml index e4e6e425..eb027b21 100644 --- a/.github/workflows/msbuild.yml +++ b/.github/workflows/msbuild.yml @@ -17,11 +17,9 @@ jobs: fail-fast: false matrix: configuration: [Debug ,Release] - platform: [x86 ,x64] + platform: [x86 ,x64 ,ARM64] runs-on: windows-latest # 最新的 Windows 环境 - env: - ACTIONS_STEP_DEBUG: true steps: # 检出您的主仓库代码 - name: Checkout main repository code @@ -64,6 +62,20 @@ jobs: ./vcpkg.exe install lua:x64-windows opencv[contrib]:x64-windows libqrencode:x64-windows ./vcpkg.exe integrate install shell: pwsh + - name: vcpkg install (ARM64) + if: matrix.platform == 'ARM64' + run: | + cd vcpkg + ./bootstrap-vcpkg.bat + ./vcpkg.exe install lua:Arm64-windows + ./vcpkg.exe integrate install + # ./vcpkg.exe install lua:Arm64-windows opencv[contrib]:Arm64-windows libqrencode:Arm64-windows Windows的opencv 有问题 + + cd .. + $filePath = "XEngine_Source/XEngine_BuildSwitch.h" + (Get-Content $filePath) -replace '#define _XENGINE_BUILD_SWITCH_OPENCV 1', '#define _XENGINE_BUILD_SWITCH_OPENCV 0' | Set-Content $filePath + (Get-Content $filePath) -replace '#define _XENGINE_BUILD_SWITCH_QRDECODEC 1', '#define _XENGINE_BUILD_SWITCH_QRDECODEC 0' | Set-Content $filePath + shell: pwsh - name: Set up Dependency x86_64 Environment if: matrix.platform == 'x64' @@ -85,7 +97,21 @@ jobs: echo "XENGINE_INCLUDE=${{ github.workspace }}/XEngine_Windows" | Out-File -FilePath $env:GITHUB_ENV -Append echo "XENGINE_LIB32=${{ github.workspace }}/XEngine_Windows/XEngine_Windows" | Out-File -FilePath $env:GITHUB_ENV -Append shell: pwsh - + - name: Set up Dependency ARM64 Environment + if: matrix.platform == 'ARM64' + run: | + $response = Invoke-RestMethod -Uri "https://api.github.com/repos/libxengine/libxengine/releases/latest" -Headers @{"Accept"="application/vnd.github.v3+json"} + $latest_tag = $response.tag_name + Write-Host "Latest Tag: $latest_tag" + + $url = "https://github.com/libxengine/libxengine/releases/download/$latest_tag/XEngine_Windows_Arm64.zip" + Invoke-WebRequest -Uri $url -OutFile "XEngine_Windows_Arm64.zip" + Expand-Archive -Path ./XEngine_Windows_Arm64.zip -DestinationPath ./XEngine_Windows -Force + + echo "XENGINE_INCLUDE=${{ github.workspace }}/XEngine_Windows" | Out-File -FilePath $env:GITHUB_ENV -Append + echo "XENGINE_LIBARM64=${{ github.workspace }}/XEngine_Windows/XEngine_Windows" | Out-File -FilePath $env:GITHUB_ENV -Append + shell: pwsh + # 配置 MSBuild 的路径,准备构建 VC++ 项目 - name: Setup MSBuild uses: microsoft/setup-msbuild@v2 @@ -102,8 +128,9 @@ jobs: cp -r XEngine_Source/Release/*.exe XEngine_Release/ cp -r XEngine_Source/VSCopy_x86.bat XEngine_Release/ cd XEngine_Release + ./copydb.bat ./VSCopy_x86.bat - ./XEngine_HttpApp.exe -t + # ./XEngine_HttpApp.exe -t - name: Conditional Step for x64 Release if: matrix.configuration == 'Release' && matrix.platform == 'x64' run: | @@ -111,14 +138,25 @@ jobs: cp -r XEngine_Source/x64/Release/*.exe XEngine_Release/ cp -r XEngine_Source/VSCopy_x64.bat XEngine_Release/ cd XEngine_Release + ./copydb.bat ./VSCopy_x64.bat shell: pwsh + - name: Conditional Step for ARM64 Release + if: matrix.configuration == 'Release' && matrix.platform == 'ARM64' + run: | + cp -r XEngine_Source/ARM64/Release/*.dll XEngine_Release/ + cp -r XEngine_Source/ARM64/Release/*.exe XEngine_Release/ + cp -r XEngine_Source/VSCopy_Arm64.bat XEngine_Release/ + cd XEngine_Release + ./copydb.bat + ./VSCopy_Arm64.bat + shell: pwsh - name: Upload folder as artifact with x86 if: matrix.configuration == 'Release' && matrix.platform == 'x64' uses: actions/upload-artifact@v4 with: - name: XEngine_APIServiceApp-x86_32-Windows + name: XEngine_APIServiceApp-Windows_x86_32 path: XEngine_Release/ retention-days: 1 @@ -126,6 +164,13 @@ jobs: if: matrix.configuration == 'Release' && matrix.platform == 'x64' uses: actions/upload-artifact@v4 with: - name: XEngine_APIServiceApp-x86_64-Windows + name: XEngine_APIServiceApp-Windows_x86_64 + path: XEngine_Release/ + retention-days: 1 + - name: Upload folder as artifact with ARM64 + if: matrix.configuration == 'Release' && matrix.platform == 'ARM64' + uses: actions/upload-artifact@v4 + with: + name: XEngine_APIServiceApp-Windows_Arm64 path: XEngine_Release/ retention-days: 1 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 408025fa..eb8898bd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,15 +16,42 @@ jobs: with: fetch-depth: 0 - - name: Download ubuntubuild + - name: Download ubuntu x86_64 build uses: dawidd6/action-download-artifact@v6 with: - workflow: ubuntubuild.yml + workflow: Ubuntux86_64_build.yml workflow_conclusion: success check_artifacts: false skip_unpack: true if_no_artifact_found: fail path: ./XRelease/ + - name: Download ubuntu Arm64 build + uses: dawidd6/action-download-artifact@v6 + with: + workflow: UbuntuArm64_build.yml + workflow_conclusion: success + check_artifacts: false + skip_unpack: true + if_no_artifact_found: fail + path: ./XRelease/ + - name: Download rocky x86_64 build + uses: dawidd6/action-download-artifact@v6 + with: + workflow: RockyX86_64_build.yml + workflow_conclusion: success + check_artifacts: false + skip_unpack: true + if_no_artifact_found: fail + path: ./XRelease/ + - name: Download rocky Arm64 build + uses: dawidd6/action-download-artifact@v6 + with: + workflow: RockyArm64_build.yml + workflow_conclusion: success + check_artifacts: false + skip_unpack: true + if_no_artifact_found: fail + path: ./XRelease/ - name: Download macbuild uses: dawidd6/action-download-artifact@v6 with: diff --git a/CHANGELOG b/CHANGELOG index 5af41fdf..23c6123b 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,39 @@ +XEngine_APIService V3.10.0.1001 + +增加:windows服务支持 +增加:更新系统发布支持 +增加:windows arm64和rockylinux支持 +更新:依赖库 +更新:vscopy 文件和重载类型 +更新:ip和电话数据库 +优化:启动参数 +修改:当debug模式的时候不发送信息报告 +修改:合并qr配置到主配置中 +修改:合并Lua和lib配置到一个文件 +修改:ip查询支持设置回复语言 +修改:匹配窗口显示配置 +修改:合并翻译配置 +修正:当加载数据库失败没有退出的问题 +删除:删除了自动启动支持 +删除:油价数据库 + +added:windows service app +added:more release system release support +added:windows arm64 and rockylinux build +update:depend library +update:vs copy file and reload type +update:ip and phone database +improved:start parameter +modify:does not report info with debug build +modify:merge qr configure to main configure +modify:merge lua and lib configure +modify:ip query to set language reply support +modify:match show windows type on windows +modify:merge translation configure +fixed:not exist when load db failed +delete:auto start for http app +delete:oil sql file +====================================================================================== XEngine_APIService V3.9.0.1001 增加:设置日志类型配置支持 diff --git a/README.en.md b/README.en.md index eae15b9d..7bacf8ff 100644 --- a/README.en.md +++ b/README.en.md @@ -72,6 +72,10 @@ window Exection XEngine_WINEnv.bat Linux Exection:sudo ./XEngine_LINEnv.sh -i 3 Macos Exection:./XEngine_LINEnv.sh -i 3 +####### Development environment +It is recommended to use github to pull the code, and use the VS2022+COPILOG combination. Copilot will automatically help you analyze and modify the code +In order to save resources, now the IP and phone and mac databases need to be copied by themselves. Execute the XEngine_Release/copydb.bat(copydb.sh) script. Otherwise, an error will be reported + #### Database Env MYSQL database version 8.0 or above is required. Create a table through CreateDatabase.sql, and then import other sql table Modify the database configuration in XSQL in the configuration file to your @@ -87,9 +91,9 @@ git submodule init git submodule update #### Linux -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 +ubuntu:sudo apt install sudo apt install liblua5.4-dev libopencv-dev libopencv-contrib-dev libqrencode-dev libleptonica-dev libtesseract-dev -y +centos:sudo dnf install lua-devel opencv-devel qrencode-devel leptonica-devel tesseract-devel -y +use makefile compile,UBUNTU24.04 x64 or RockyLinux 9 x64 Run it on the terminal #### Macos diff --git a/README.md b/README.md index 8d6aed83..8016713d 100644 --- a/README.md +++ b/README.md @@ -75,6 +75,10 @@ window执行XEngine_WINEnv.bat 脚本. Linux执行:sudo ./XEngine_LINEnv.sh -i 3 macos执行:./XEngine_LINEnv.sh -i 3 +###### 开发环境搭建 +建议使用github拉取代码,在使用VS2022+COPILOG组合.Copilot会自动帮你分析和修改代码 +为了节约资源,现在ip和phone,mac数据库需要自己拷贝.执行XEngine_Release/copydb.bat(copydb.sh)脚本即可.否则会报错 + #### 数据库环境 需要MYSQL数据库8.0以上版本.通过CreateDatabase.sql创建表,然后导入剩余的表 修改配置文件里面XSQL里面的数据库配置为你的 @@ -94,9 +98,9 @@ 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 libleptonica-dev libtesseract-dev -centos:需要自己编译 -Linux使用Makefile编译,UBUNTU24.04 x64或者RockyLinux 9 x64 +ubuntu:sudo apt install liblua5.4-dev libopencv-dev libopencv-contrib-dev libqrencode-dev libleptonica-dev libtesseract-dev -y +centos:sudo dnf install lua-devel opencv-devel qrencode-devel leptonica-devel tesseract-devel -y +Linux使用Makefile编译,UBUNTU24.04 x64或者RockyLinux 9 x64 在控制台运行 #### Macos diff --git a/XEngine_APPClient/VSCopy-x32.bat b/XEngine_APPClient/VSCopy-x32.bat index 91dabfe3..0ece4837 100644 --- a/XEngine_APPClient/VSCopy-x32.bat +++ b/XEngine_APPClient/VSCopy-x32.bat @@ -2,4 +2,5 @@ copy /y "%XEngine_Lib32%\XEngine_BaseLib\XEngine_BaseLib.dll" "./" copy /y "%XEngine_Lib32%\XEngine_BaseLib\XEngine_BaseSafe.dll" "./" copy /y "%XEngine_Lib32%\XEngine_Client\XClient_APIHelp.dll" "./" copy /y "%XEngine_Lib32%\XEngine_NetHelp\NetHelp_XSocket.dll" "./" -copy /y "%XEngine_Lib32%\XEngine_SystemSdk\XEngine_SystemApi.dll" "./" \ No newline at end of file +copy /y "%XEngine_Lib32%\XEngine_SystemSdk\XEngine_SystemApi.dll" "./" +copy /y "%XEngine_Lib32%\XEngine_SystemSdk\XEngine_SystemConfig.dll" "./" \ No newline at end of file diff --git a/XEngine_APPClient/VSCopy-x64.bat b/XEngine_APPClient/VSCopy-x64.bat index cf2762d1..0310e109 100644 --- a/XEngine_APPClient/VSCopy-x64.bat +++ b/XEngine_APPClient/VSCopy-x64.bat @@ -2,4 +2,5 @@ copy /y "%XEngine_Lib64%\XEngine_BaseLib\XEngine_BaseLib.dll" "./" copy /y "%XEngine_Lib64%\XEngine_BaseLib\XEngine_BaseSafe.dll" "./" copy /y "%XEngine_Lib64%\XEngine_Client\XClient_APIHelp.dll" "./" copy /y "%XEngine_Lib64%\XEngine_NetHelp\NetHelp_XSocket.dll" "./" -copy /y "%XEngine_Lib64%\XEngine_SystemSdk\XEngine_SystemApi.dll" "./" \ No newline at end of file +copy /y "%XEngine_Lib64%\XEngine_SystemSdk\XEngine_SystemApi.dll" "./" +copy /y "%XEngine_Lib64%\XEngine_SystemSdk\XEngine_SystemConfig.dll" "./" \ No newline at end of file diff --git a/XEngine_Docment/Docment_en.docx b/XEngine_Docment/Docment_en.docx index 672f913a..aae412cf 100644 Binary files a/XEngine_Docment/Docment_en.docx and b/XEngine_Docment/Docment_en.docx differ diff --git a/XEngine_Docment/Docment_zh.docx b/XEngine_Docment/Docment_zh.docx index 769e4566..2d744698 100644 Binary files a/XEngine_Docment/Docment_zh.docx and b/XEngine_Docment/Docment_zh.docx differ diff --git a/XEngine_Release/XEngine_Config/XEngine_Config.json b/XEngine_Release/XEngine_Config/XEngine_Config.json index 6b55fb8a..f6fdc0e6 100644 --- a/XEngine_Release/XEngine_Config/XEngine_Config.json +++ b/XEngine_Release/XEngine_Config/XEngine_Config.json @@ -1,8 +1,7 @@ { "tszIPAddr":"192.168.1.8", "bDeamon":false, - "bAutoStart":false, - "bHideWnd":false, + "bShowWnd":true, "nHttpPort":5501, "nRFCPort":5502, "XMax":{ @@ -17,7 +16,8 @@ "nP2PTimeOut":60 }, "XLog":{ - "tszLogFile":"./XEngine_Log/XEngine_HttpApp.Log", + "tszAPIFile":"./XEngine_Log/XEngine_HttpApp.Log", + "tszServiceFile":"./XEngine_Log/XEngine_ServiceApp.Log", "MaxSize":1024000, "MaxCount":10, "LogLeave":17, @@ -34,28 +34,27 @@ "tszWeatherUrl":"https://restapi.amap.com/v3/weather/weatherInfo?city=%s&key=3239fc302d6480ce49973f4d1c59e5d8", "tszBankUrl":"https://ccdcapi.alipay.com/validateAndCacheCardInfo.json?cardNo=%s&cardBinCheck=true", "tszOilUrl":"https://www.iamwawa.cn/oilprice/api?area=%s", - "tszTranslationUrl":"https://fanyi-api.baidu.com/api/trans/vip/translate", "st_TranslationInfo":{ + "url":"https://fanyi-api.baidu.com/api/trans/vip/translate", "appid":"20231228001924304", "key":"udXGjpmNVeQHml1FjT8E" } }, "XPlugin":{ "bEnable":true, - "tszPluginLib":"./XEngine_Config/XEngine_PluginLib.json", - "tszPluginLua":"./XEngine_Config/XEngine_PluginLua.json" + "tszPlugin":"./XEngine_Config/XEngine_Plugin.json" }, "XConfig":{ - "tszConfigQRCode":"./XEngine_Config/XEngine_QRCode.json", + "st_ConfigQRCode":{ + "tszModelDetect":"./XEngine_Config/qrmodel/detect.caffemodel", + "tszModelSr":"./XEngine_Config/qrmodel/sr.caffemodel", + "tszProtoDetect":"./XEngine_Config/qrmodel/detect.prototxt", + "tszProtoSr":"./XEngine_Config/qrmodel/sr.prototxt" + }, "tszConfigDeamon":"./XEngine_Config/XEngine_DeamonConfig.json", "tszConfigHTTPMime":"./XEngine_Config/HttpMime.types", "tszConfigHTTPCode":"./XEngine_Config/HttpCode.types" }, - "XImageText":{ - "bEnable":true, - "tszImagePath":"./XEngine_Config/tessdata", - "tszImageLanguage":"chi_sim+eng" - }, "XShortLink":{ "tszHostUrl":"url.xyry.org", "nHTTPCode":301 @@ -68,15 +67,21 @@ "bDeamon":false } }, - "XAPIModule": { - "bEnable": true, - "tszDBPhone": "./XEngine_DBFile/phone.xdb", - "tszDBMac": "./XEngine_DBFile/macaddr.xdb", - "tszDBIPAddr": "./XEngine_DBFile/ip2region.xdb" - }, "XReport":{ "bEnable":true, "tszAPIUrl":"http://app.xyry.org:5501/api?function=machine", "tszServiceName":"XEngine_APIService" + }, + "XImageText":{ + "bEnable":true, + "tszImagePath":"./XEngine_Config/tessdata", + "tszImageLanguage":"chi_sim+eng" + }, + "XAPIModule": { + "bEnable": true, + "tszDBPhone": "./XEngine_DBFile/phone.xdb", + "tszDBMac": "./XEngine_DBFile/macaddr.xdb", + "tszDBIPAddr": "./XEngine_DBFile/GeoLite2-City.mmdb", + "tszDBISPAddr": "./XEngine_DBFile/GeoLite2-ASN.mmdb" } } \ No newline at end of file diff --git a/XEngine_Release/XEngine_Config/XEngine_PluginLib.json b/XEngine_Release/XEngine_Config/XEngine_Plugin.json similarity index 60% rename from XEngine_Release/XEngine_Config/XEngine_PluginLib.json rename to XEngine_Release/XEngine_Config/XEngine_Plugin.json index 5bc54ecc..4298369d 100644 --- a/XEngine_Release/XEngine_Config/XEngine_PluginLib.json +++ b/XEngine_Release/XEngine_Config/XEngine_Plugin.json @@ -1,5 +1,5 @@ { - "PluginArray":[ + "PluginModule":[ { "PluginEnable":true, "PluginMethod":"zodiac", @@ -25,5 +25,22 @@ "PluginMethod":"meter", "PluginFile":"./XEngine_LibPlugin/libModulePlugin_Meter" } + ], + "PluginLua":[ + { + "PluginEnable":true, + "PluginMethod":"cal", + "PluginFile":"./XEngine_LuaPlugin/ModulePlugin_Calculation.lua" + }, + { + "PluginEnable":true, + "PluginMethod":"time", + "PluginFile":"./XEngine_LuaPlugin/ModulePlugin_OSTime.lua" + }, + { + "PluginEnable":true, + "PluginMethod":"heart", + "PluginFile":"./XEngine_LuaPlugin/ModulePlugin_Heart.lua" + } ] } \ No newline at end of file diff --git a/XEngine_Release/XEngine_Config/XEngine_PluginLua.json b/XEngine_Release/XEngine_Config/XEngine_PluginLua.json deleted file mode 100644 index 9c3dcccc..00000000 --- a/XEngine_Release/XEngine_Config/XEngine_PluginLua.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "PluginArray":[ - { - "PluginEnable":true, - "PluginMethod":"cal", - "PluginFile":"./XEngine_LuaPlugin/ModulePlugin_Calculation.lua" - }, - { - "PluginEnable":true, - "PluginMethod":"time", - "PluginFile":"./XEngine_LuaPlugin/ModulePlugin_OSTime.lua" - }, - { - "PluginEnable":true, - "PluginMethod":"heart", - "PluginFile":"./XEngine_LuaPlugin/ModulePlugin_Heart.lua" - } - ] -} \ No newline at end of file diff --git a/XEngine_Release/XEngine_Config/XEngine_QRCode.json b/XEngine_Release/XEngine_Config/XEngine_QRCode.json deleted file mode 100644 index 3592c863..00000000 --- a/XEngine_Release/XEngine_Config/XEngine_QRCode.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "tszModelDetect":"./XEngine_Config/qrmodel/detect.caffemodel", - "tszModelSr":"./XEngine_Config/qrmodel/sr.caffemodel", - "tszProtoDetect":"./XEngine_Config/qrmodel/detect.prototxt", - "tszProtoSr":"./XEngine_Config/qrmodel/sr.prototxt" -} \ No newline at end of file diff --git a/XEngine_Release/XEngine_Config/XEngine_VersionConfig.json b/XEngine_Release/XEngine_Config/XEngine_VersionConfig.json index ba716eb5..111c858e 100644 --- a/XEngine_Release/XEngine_Config/XEngine_VersionConfig.json +++ b/XEngine_Release/XEngine_Config/XEngine_VersionConfig.json @@ -1,5 +1,6 @@ { "XVer":[ + "3.10.0.1001 Build20250416", "3.9.0.1001 Build20250224", "3.8.0.1001 Build20241227", "3.7.0.1001 Build20240927", diff --git a/XEngine_Release/XEngine_DBFile/ip2region.xdb b/XEngine_Release/XEngine_DBFile/ip2region.xdb deleted file mode 100644 index 7052c057..00000000 Binary files a/XEngine_Release/XEngine_DBFile/ip2region.xdb and /dev/null differ diff --git a/XEngine_Release/XEngine_DBFile/keepfile b/XEngine_Release/XEngine_DBFile/keepfile new file mode 100644 index 00000000..34d1f899 --- /dev/null +++ b/XEngine_Release/XEngine_DBFile/keepfile @@ -0,0 +1 @@ +keepfile \ No newline at end of file diff --git a/XEngine_Release/XEngine_DBFile/macaddr.xdb b/XEngine_Release/XEngine_DBFile/macaddr.xdb deleted file mode 100644 index 3d7a2173..00000000 Binary files a/XEngine_Release/XEngine_DBFile/macaddr.xdb and /dev/null differ diff --git a/XEngine_Release/XEngine_DBFile/phone.xdb b/XEngine_Release/XEngine_DBFile/phone.xdb deleted file mode 100644 index 406dd996..00000000 Binary files a/XEngine_Release/XEngine_DBFile/phone.xdb and /dev/null differ diff --git a/XEngine_Release/copydb.bat b/XEngine_Release/copydb.bat new file mode 100644 index 00000000..67c94c7f --- /dev/null +++ b/XEngine_Release/copydb.bat @@ -0,0 +1,4 @@ +copy /y "..\XEngine_Source\XEngine_DBDepend\XEngine_IPMacData\XEngine_DBFile\GeoLite2-ASN.mmdb" "./XEngine_DBFile" +copy /y "..\XEngine_Source\XEngine_DBDepend\XEngine_IPMacData\XEngine_DBFile\GeoLite2-City.mmdb" "./XEngine_DBFile" +copy /y "..\XEngine_Source\XEngine_DBDepend\XEngine_IPMacData\XEngine_DBFile\macaddr.xdb" "./XEngine_DBFile" +copy /y "..\XEngine_Source\XEngine_DBDepend\XEngine_PhoneData\Data\phone_utf.dat" "./XEngine_DBFile/phone.xdb" \ No newline at end of file diff --git a/XEngine_Release/copydb.sh b/XEngine_Release/copydb.sh new file mode 100644 index 00000000..7cb76d67 --- /dev/null +++ b/XEngine_Release/copydb.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +cp -f ../XEngine_Source/XEngine_DBDepend/XEngine_IPMacData/XEngine_DBFile/GeoLite2-ASN.mmdb ./XEngine_DBFile/ +cp -f ../XEngine_Source/XEngine_DBDepend/XEngine_IPMacData/XEngine_DBFile/GeoLite2-City.mmdb ./XEngine_DBFile/ +cp -f ../XEngine_Source/XEngine_DBDepend/XEngine_IPMacData/XEngine_DBFile/macaddr.xdb ./XEngine_DBFile/ +cp -f ../XEngine_Source/XEngine_DBDepend/XEngine_PhoneData/Data/phone_utf.dat ./XEngine_DBFile/phone.xdb \ No newline at end of file diff --git a/XEngine_SQL/OilUPDate.sql b/XEngine_SQL/OilUPDate.sql deleted file mode 100644 index 29644212..00000000 --- a/XEngine_SQL/OilUPDate.sql +++ /dev/null @@ -1,31 +0,0 @@ -UPDATE `OilPrice` SET `98` = 10.02, `95` = 8.52, `92` = 8.00, `0` = 7.72, `-10` = 8.18, `-20` = 8.57, `-35` = 8.88 WHERE `tszRegion` = '北京'; -UPDATE `OilPrice` SET `98` = 9.97, `95` = 8.47, `92` = 7.96, `0` = 7.65, `-10` = 8.11, `-20` = 0, `-35` = 0 WHERE `tszRegion` = '上海'; -UPDATE `OilPrice` SET `98` = 10.28, `95` = 8.48, `92` = 7.97, `0` = 7.63, `-10` = 8.09, `-20` = 0, `-35` = 0 WHERE `tszRegion` = '江苏'; -UPDATE `OilPrice` SET `98` = 9.95, `95` = 8.45, `92` = 7.99, `0` = 7.67, `-10` = 8.14, `-20` = 8.52, `-35` = 0 WHERE `tszRegion` = '天津'; -UPDATE `OilPrice` SET `98` = 10.28, `95` = 8.52, `92` = 8.06, `0` = 7.73, `-10` = 8.20, `-20` = 0, `-35` = 0 WHERE `tszRegion` = '重庆'; -UPDATE `OilPrice` SET `98` = 10.04, `95` = 8.54, `92` = 7.96, `0` = 7.72, `-10` = 8.25, `-20` = 0, `-35` = 0 WHERE `tszRegion` = '江西'; -UPDATE `OilPrice` SET `98` = 9.45, `95` = 8.67, `92` = 8.15, `0` = 7.57, `-10` = 0, `-20` = 0, `-35` = 8.68 WHERE `tszRegion` = '辽宁'; -UPDATE `OilPrice` SET `98` = 9.71, `95` = 8.51, `92` = 7.95, `0` = 7.71, `-10` = 8.17, `-20` = 0, `-35` = 0 WHERE `tszRegion` = '安徽'; -UPDATE `OilPrice` SET `98` = 9.29, `95` = 8.47, `92` = 7.93, `0` = 7.54, `-10` = 8.01, `-20` = 8.37, `-35` = 8.61 WHERE `tszRegion` = '内蒙古'; -UPDATE `OilPrice` SET `98` = 10.00, `95` = 8.50, `92` = 7.96, `0` = 7.66, `-10` = 8.12, `-20` = 0, `-35` = 0 WHERE `tszRegion` = '福建'; -UPDATE `OilPrice` SET `98` = 9.51, `95` = 8.35, `92` = 7.90, `0` = 7.55, `-10` = 8.01, `-20` = 8.38, `-35` = 8.69 WHERE `tszRegion` = '宁夏'; -UPDATE `OilPrice` SET `98` = 9.11, `95` = 8.54, `92` = 8.00, `0` = 7.57, `-10` = 8.03, `-20` = 8.46, `-35` = 8.72 WHERE `tszRegion` = '甘肃'; -UPDATE `OilPrice` SET `98` = 9.29, `95` = 8.53, `92` = 7.96, `0` = 7.59, `-10` = 8.05, `-20` = 8.43, `-35` = 8.73 WHERE `tszRegion` = '青海'; -UPDATE `OilPrice` SET `98` = 10.69, `95` = 8.69, `92` = 8.02, `0` = 7.68, `-10` = 0, `-20` = 0, `-35` = 0 WHERE `tszRegion` = '广东'; -UPDATE `OilPrice` SET `98` = 9.26, `95` = 8.54, `92` = 7.96, `0` = 7.58, `-10` = 8.02, `-20` = 8.37, `-35` = 8.67 WHERE `tszRegion` = '山东'; -UPDATE `OilPrice` SET `98` = 9.84, `95` = 8.71, `92` = 8.06, `0` = 7.73, `-10` = 0, `-20` = 0, `-35` = 0 WHERE `tszRegion` = '广西'; -UPDATE `OilPrice` SET `98` = 9.78, `95` = 8.58, `92` = 7.95, `0` = 7.74, `-10` = 8.21, `-20` = 8.59, `-35` = 8.90 WHERE `tszRegion` = '山西'; -UPDATE `OilPrice` SET `98` = 9.49, `95` = 8.59, `92` = 8.13, `0` = 7.77, `-10` = 8.24, `-20` = 0, `-35` = 0 WHERE `tszRegion` = '贵州'; -UPDATE `OilPrice` SET `98` = 10.94, `95` = 8.33, `92` = 7.88, `0` = 7.56, `-10` = 8.01, `-20` = 8.39, `-35` = 8.69 WHERE `tszRegion` = '陕西'; -UPDATE `OilPrice` SET `98` = 10.97, `95` = 9.68, `92` = 9.11, `0` = 7.76, `-10` = 0, `-20` = 0, `-35` = 0 WHERE `tszRegion` = '海南'; -UPDATE `OilPrice` SET `98` = 9.40, `95` = 8.65, `92` = 8.10, `0` = 7.72, `-10` = 8.18, `-20` = 8.48, `-35` = 0 WHERE `tszRegion` = '四川'; -UPDATE `OilPrice` SET `98` = 9.27, `95` = 8.45, `92` = 7.99, `0` = 7.67, `-10` = 8.14, `-20` = 8.52, `-35` = 8.83 WHERE `tszRegion` = '河北'; -UPDATE `OilPrice` SET `98` = 10.47, `95` = 9.39, `92` = 8.88, `0` = 8.21, `-10` = 8.72, `-20` = 9.15, `-35` = 9.44 WHERE `tszRegion` = '西藏'; -UPDATE `OilPrice` SET `98` = 9.44, `95` = 8.55, `92` = 8.01, `0` = 7.66, `-10` = 8.12, `-20` = 0, `-35` = 0 WHERE `tszRegion` = '河南'; -UPDATE `OilPrice` SET `98` = 9.32, `95` = 8.34, `92` = 7.80, `0` = 7.44, `-10` = 0, `-20` = 7.95, `-35` = 8.33 WHERE `tszRegion` = '新疆'; -UPDATE `OilPrice` SET `98` = 9.67, `95` = 8.53, `92` = 7.96, `0` = 7.47, `-10` = 0, `-20` = 0, `-35` = 8.59 WHERE `tszRegion` = '黑龙江'; -UPDATE `OilPrice` SET `98` = 9.36, `95` = 8.59, `92` = 7.96, `0` = 7.59, `-10` = 8.00, `-20` = 8.41, `-35` = 8.65 WHERE `tszRegion` = '吉林'; -UPDATE `OilPrice` SET `98` = 9.42, `95` = 8.74, `92` = 8.15, `0` = 7.74, `-10` = 0, `-20` = 0, `-35` = 0 WHERE `tszRegion` = '云南'; -UPDATE `OilPrice` SET `98` = 9.96, `95` = 8.58, `92` = 8.01, `0` = 7.66, `-10` = 0, `-20` = 0, `-35` = 0 WHERE `tszRegion` = '湖北'; -UPDATE `OilPrice` SET `98` = 9.29, `95` = 8.48, `92` = 7.97, `0` = 7.65, `-10` = 8.11, `-20` = 0, `-35` = 0 WHERE `tszRegion` = '浙江'; -UPDATE `OilPrice` SET `98` = 9.45, `95` = 8.45, `92` = 7.95, `0` = 7.74, `-10` = 0, `-20` = 0, `-35` = 0 WHERE `tszRegion` = '湖南'; \ No newline at end of file diff --git a/XEngine_SQL/XEngine_APIInfo.sql b/XEngine_SQL/XEngine_APIInfo.sql index 40498a74..5a261f75 100644 --- a/XEngine_SQL/XEngine_APIInfo.sql +++ b/XEngine_SQL/XEngine_APIInfo.sql @@ -3972,57 +3972,6 @@ INSERT INTO `BankList` VALUES (166, 'ZRCBANK', '张家港农村商业银行'); INSERT INTO `BankList` VALUES (167, 'ZYCBANK', '遵义市商业银行'); INSERT INTO `BankList` VALUES (168, 'ZZBANK', '郑州银行'); --- ---------------------------- --- Table structure for OilPrice --- ---------------------------- -DROP TABLE IF EXISTS `OilPrice`; -CREATE TABLE `OilPrice` ( - `tszRegion` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '地区', - `98` float(4, 2) NULL DEFAULT NULL COMMENT '98号汽油', - `95` float(4, 2) NULL DEFAULT NULL COMMENT '95号汽油', - `92` float(4, 2) NULL DEFAULT NULL COMMENT '92号汽油', - `0` float(4, 2) NULL DEFAULT NULL COMMENT '0号柴油', - `-10` float(4, 2) NULL DEFAULT NULL COMMENT '-10号柴油', - `-20` float(4, 2) NULL DEFAULT NULL COMMENT '-20号柴油', - `-35` float(4, 2) NULL DEFAULT NULL COMMENT '-30号柴油', - `tszUPTime` datetime NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间' -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of OilPrice --- ---------------------------- -INSERT INTO `OilPrice` VALUES ('北京', 10.22, 8.72, 8.19, 7.91, 8.39, 8.79, 9.11, '2024-05-08 14:39:53'); -INSERT INTO `OilPrice` VALUES ('上海', 10.01, 8.67, 8.15, 7.84, 8.31, 0.00, 0.00, '2024-05-08 14:39:53'); -INSERT INTO `OilPrice` VALUES ('江苏', 10.48, 8.68, 8.16, 7.82, 8.29, 0.00, 0.00, '2024-05-08 14:39:53'); -INSERT INTO `OilPrice` VALUES ('天津', 10.15, 8.65, 8.18, 7.87, 8.34, 8.73, 0.00, '2024-05-08 14:39:53'); -INSERT INTO `OilPrice` VALUES ('重庆', 10.53, 8.71, 8.25, 7.93, 8.40, 0.00, 0.00, '2024-05-08 14:39:53'); -INSERT INTO `OilPrice` VALUES ('江西', 10.25, 8.75, 8.15, 7.91, 8.46, 0.00, 0.00, '2024-05-08 14:39:53'); -INSERT INTO `OilPrice` VALUES ('辽宁', 9.67, 8.87, 8.34, 7.76, 0.00, 0.00, 8.90, '2024-05-08 14:39:53'); -INSERT INTO `OilPrice` VALUES ('安徽', 9.90, 8.70, 8.14, 7.90, 8.38, 0.00, 0.00, '2024-05-08 14:39:53'); -INSERT INTO `OilPrice` VALUES ('内蒙古', 9.51, 8.67, 8.12, 7.73, 8.21, 8.58, 8.83, '2024-05-08 14:39:53'); -INSERT INTO `OilPrice` VALUES ('福建', 10.20, 8.70, 8.15, 7.86, 8.33, 0.00, 0.00, '2024-05-08 14:39:53'); -INSERT INTO `OilPrice` VALUES ('宁夏', 9.74, 8.54, 8.09, 7.74, 8.21, 8.60, 8.91, '2024-05-08 14:39:53'); -INSERT INTO `OilPrice` VALUES ('甘肃', 10.22, 8.74, 8.19, 7.76, 8.24, 8.67, 8.94, '2024-05-08 14:39:53'); -INSERT INTO `OilPrice` VALUES ('青海', 9.51, 8.73, 8.15, 7.78, 8.25, 8.64, 8.95, '2024-05-08 14:39:53'); -INSERT INTO `OilPrice` VALUES ('广东', 10.89, 8.89, 8.21, 7.87, 0.00, 0.00, 0.00, '2024-05-08 14:39:53'); -INSERT INTO `OilPrice` VALUES ('山东', 9.47, 8.75, 8.15, 7.77, 8.22, 8.58, 8.89, '2024-05-08 14:39:53'); -INSERT INTO `OilPrice` VALUES ('广西', 10.04, 8.91, 8.25, 7.92, 0.00, 0.00, 0.00, '2024-05-08 14:39:53'); -INSERT INTO `OilPrice` VALUES ('山西', 9.98, 8.78, 8.13, 7.94, 8.41, 8.81, 9.13, '2024-05-08 14:39:53'); -INSERT INTO `OilPrice` VALUES ('贵州', 9.69, 8.79, 8.32, 7.97, 8.44, 0.00, 0.00, '2024-05-08 14:39:53'); -INSERT INTO `OilPrice` VALUES ('陕西', 11.19, 8.53, 8.07, 7.75, 8.22, 8.60, 8.91, '2024-05-08 14:39:53'); -INSERT INTO `OilPrice` VALUES ('海南', 11.20, 9.88, 9.30, 7.95, 0.00, 0.00, 0.00, '2024-05-08 14:39:53'); -INSERT INTO `OilPrice` VALUES ('四川', 9.62, 8.85, 8.28, 7.91, 8.38, 8.69, 0.00, '2024-05-08 14:39:53'); -INSERT INTO `OilPrice` VALUES ('河北', 9.47, 8.65, 8.18, 7.87, 8.34, 8.73, 9.05, '2024-05-08 14:39:53'); -INSERT INTO `OilPrice` VALUES ('西藏', 10.68, 9.58, 9.06, 8.40, 8.92, 9.37, 9.66, '2024-05-08 14:39:53'); -INSERT INTO `OilPrice` VALUES ('河南', 9.41, 8.75, 8.20, 7.85, 8.32, 0.00, 0.00, '2024-05-08 14:39:53'); -INSERT INTO `OilPrice` VALUES ('新疆', 9.55, 8.55, 7.99, 7.63, 0.00, 8.15, 8.55, '2024-05-08 14:39:53'); -INSERT INTO `OilPrice` VALUES ('黑龙江', 9.90, 8.73, 8.15, 7.65, 0.00, 0.00, 8.81, '2024-05-08 14:39:53'); -INSERT INTO `OilPrice` VALUES ('吉林', 9.58, 8.79, 8.15, 7.78, 8.20, 8.63, 8.87, '2024-05-08 14:39:53'); -INSERT INTO `OilPrice` VALUES ('云南', 9.63, 8.95, 8.34, 7.93, 0.00, 0.00, 0.00, '2024-05-08 14:39:53'); -INSERT INTO `OilPrice` VALUES ('湖北', 10.15, 8.78, 8.20, 7.85, 0.00, 0.00, 0.00, '2024-05-08 14:39:53'); -INSERT INTO `OilPrice` VALUES ('浙江', 9.50, 8.68, 8.16, 7.85, 8.32, 0.00, 0.00, '2024-05-08 14:39:53'); -INSERT INTO `OilPrice` VALUES ('湖南', 9.65, 8.65, 8.13, 7.93, 0.00, 0.00, 0.00, '2024-05-08 14:39:53'); - -- ---------------------------- -- Table structure for RegionID -- ---------------------------- diff --git a/XEngine_Source/VSCopy_Arm64.bat b/XEngine_Source/VSCopy_Arm64.bat new file mode 100644 index 00000000..ef407e92 --- /dev/null +++ b/XEngine_Source/VSCopy_Arm64.bat @@ -0,0 +1,36 @@ +copy /y "%XEngine_LibArm64%\XEngine_BaseLib\XEngine_BaseLib.dll" "./" +copy /y "%XEngine_LibArm64%\XEngine_BaseLib\XEngine_BaseSafe.dll" "./" +copy /y "%XEngine_LibArm64%\XEngine_BaseLib\XEngine_Algorithm.dll" "./" +copy /y "%XEngine_LibArm64%\XEngine_Core\XEngine_Core.dll" "./" +copy /y "%XEngine_LibArm64%\XEngine_Core\XEngine_ManagePool.dll" "./" +copy /y "%XEngine_LibArm64%\XEngine_Core\XEngine_Cryption.dll" "./" + +copy /y "%XEngine_LibArm64%\XEngine_Client\XClient_APIHelp.dll" "./" +copy /y "%XEngine_LibArm64%\XEngine_Client\XClient_Stream.dll" "./" +copy /y "%XEngine_LibArm64%\XEngine_Client\XClient_Socket.dll" "./" + +copy /y "%XEngine_LibArm64%\XEngine_NetHelp\NetHelp_XSocket.dll" "./" +copy /y "%XEngine_LibArm64%\XEngine_NetHelp\NetHelp_APIAddr.dll" "./" +copy /y "%XEngine_LibArm64%\XEngine_NetHelp\NetHelp_APIHelp.dll" "./" +copy /y "%XEngine_LibArm64%\XEngine_SystemSdk\XEngine_SystemApi.dll" "./" +copy /y "%XEngine_LibArm64%\XEngine_SystemSdk\XEngine_SystemConfig.dll" "./ + +copy /y "%XEngine_LibArm64%\XEngine_HelpComponents\HelpComponents_DataBase.dll" "./" +copy /y "%XEngine_LibArm64%\XEngine_HelpComponents\HelpComponents_XLog.dll" "./" +copy /y "%XEngine_LibArm64%\XEngine_RfcComponents\RfcComponents_HttpProtocol.dll" "./" +copy /y "%XEngine_LibArm64%\XEngine_RfcComponents\RfcComponents_NatProtocol.dll" "./" +copy /y "%XEngine_LibArm64%\XEngine_RfcComponents\RfcComponents_NTPProtocol.dll" "./" + +copy /y "%XEngine_LibArm64%\XEngine_AVCodec\XEngine_AVHelp.dll" "./" +copy /y "%XEngine_LibArm64%\XEngine_AVCodec\XEngine_VideoCodec.dll" "./" +copy /y "%XEngine_LibArm64%\XEngine_AVCodec\XEngine_AudioCodec.dll" "./" +copy /y "%XEngine_LibArm64%\XEngine_AVCodec\XEngine_AVCollect.dll" "./" + +copy /y "%XEngine_LibArm64%\XEngine_AVCodec\avcodec-61.dll" "./" +copy /y "%XEngine_LibArm64%\XEngine_AVCodec\avdevice-61.dll" "./" +copy /y "%XEngine_LibArm64%\XEngine_AVCodec\avfilter-10.dll" "./" +copy /y "%XEngine_LibArm64%\XEngine_AVCodec\avformat-61.dll" "./" +copy /y "%XEngine_LibArm64%\XEngine_AVCodec\avutil-59.dll" "./" +copy /y "%XEngine_LibArm64%\XEngine_AVCodec\swresample-5.dll" "./" +copy /y "%XEngine_LibArm64%\XEngine_AVCodec\swscale-8.dll" "./" +copy /y "%XEngine_LibArm64%\XEngine_AVCodec\postproc-58.dll" "./" \ No newline at end of file diff --git a/XEngine_Source/VSCopy_Debug.bat b/XEngine_Source/VSCopy_Debug.bat index 6418e1af..46f05134 100644 --- a/XEngine_Source/VSCopy_Debug.bat +++ b/XEngine_Source/VSCopy_Debug.bat @@ -3,7 +3,7 @@ copy /y "D:\XEngine\XEngine_SourceCode\Debug\XEngine_BaseSafe.dll" "./" copy /y "D:\XEngine\XEngine_SourceCode\Debug\XEngine_Algorithm.dll" "./" copy /y "D:\XEngine\XEngine_SourceCode\Debug\XEngine_Core.dll" "./" copy /y "D:\XEngine\XEngine_SourceCode\Debug\XEngine_ManagePool.dll" "./" -copy /y "D:\XEngine\XEngine_SourceCode\Debug\Cryption.dll" "./" +copy /y "D:\XEngine\XEngine_SourceCode\Debug\XEngine_Cryption.dll" "./" copy /y "D:\XEngine\XEngine_SourceCode\Debug\XClient_APIHelp.dll" "./" copy /y "D:\XEngine\XEngine_SourceCode\Debug\XClient_Stream.dll" "./" @@ -13,6 +13,7 @@ copy /y "D:\XEngine\XEngine_SourceCode\Debug\NetHelp_XSocket.dll" "./" copy /y "D:\XEngine\XEngine_SourceCode\Debug\NetHelp_APIAddr.dll" "./" copy /y "D:\XEngine\XEngine_SourceCode\Debug\NetHelp_APIHelp.dll" "./" copy /y "D:\XEngine\XEngine_SourceCode\Debug\XEngine_SystemApi.dll" "./" +copy /y "D:\XEngine\XEngine_SourceCode\Debug\XEngine_SystemConfig.dll" "./" copy /y "D:\XEngine\XEngine_SourceCode\Debug\HelpComponents_DataBase.dll" "./" copy /y "D:\XEngine\XEngine_SourceCode\Debug\HelpComponents_XLog.dll" "./" @@ -25,11 +26,11 @@ copy /y "D:\XEngine\XEngine_SourceCode\Debug\XEngine_VideoCodec.dll" "./" copy /y "D:\XEngine\XEngine_SourceCode\Debug\XEngine_AudioCodec.dll" "./" copy /y "D:\XEngine\XEngine_SourceCode\Debug\XEngine_AVCollect.dll" "./" -copy /y "%XEngine_Lib32%\XEngine_AVCodec\avcodec-60.dll" "./" -copy /y "%XEngine_Lib32%\XEngine_AVCodec\avdevice-60.dll" "./" -copy /y "%XEngine_Lib32%\XEngine_AVCodec\avfilter-9.dll" "./" -copy /y "%XEngine_Lib32%\XEngine_AVCodec\avformat-60.dll" "./" -copy /y "%XEngine_Lib32%\XEngine_AVCodec\avutil-58.dll" "./" -copy /y "%XEngine_Lib32%\XEngine_AVCodec\swresample-4.dll" "./" -copy /y "%XEngine_Lib32%\XEngine_AVCodec\swscale-7.dll" "./" -copy /y "%XEngine_Lib32%\XEngine_AVCodec\postproc-57.dll" "./" \ No newline at end of file +copy /y "%XEngine_Lib32%\XEngine_AVCodec\avcodec-61.dll" "./" +copy /y "%XEngine_Lib32%\XEngine_AVCodec\avdevice-61.dll" "./" +copy /y "%XEngine_Lib32%\XEngine_AVCodec\avfilter-10.dll" "./" +copy /y "%XEngine_Lib32%\XEngine_AVCodec\avformat-61.dll" "./" +copy /y "%XEngine_Lib32%\XEngine_AVCodec\avutil-59.dll" "./" +copy /y "%XEngine_Lib32%\XEngine_AVCodec\swresample-5.dll" "./" +copy /y "%XEngine_Lib32%\XEngine_AVCodec\swscale-8.dll" "./" +copy /y "%XEngine_Lib32%\XEngine_AVCodec\postproc-58.dll" "./" \ No newline at end of file diff --git a/XEngine_Source/VSCopy_x64.bat b/XEngine_Source/VSCopy_x64.bat index 013bd93a..c792bd70 100644 --- a/XEngine_Source/VSCopy_x64.bat +++ b/XEngine_Source/VSCopy_x64.bat @@ -13,6 +13,7 @@ copy /y "%XEngine_Lib64%\XEngine_NetHelp\NetHelp_XSocket.dll" "./" copy /y "%XEngine_Lib64%\XEngine_NetHelp\NetHelp_APIAddr.dll" "./" copy /y "%XEngine_Lib64%\XEngine_NetHelp\NetHelp_APIHelp.dll" "./" copy /y "%XEngine_Lib64%\XEngine_SystemSdk\XEngine_SystemApi.dll" "./" +copy /y "%XEngine_Lib64%\XEngine_SystemSdk\XEngine_SystemConfig.dll" "./ copy /y "%XEngine_Lib64%\XEngine_HelpComponents\HelpComponents_DataBase.dll" "./" copy /y "%XEngine_Lib64%\XEngine_HelpComponents\HelpComponents_XLog.dll" "./" @@ -25,11 +26,11 @@ copy /y "%XEngine_Lib64%\XEngine_AVCodec\XEngine_VideoCodec.dll" "./" copy /y "%XEngine_Lib64%\XEngine_AVCodec\XEngine_AudioCodec.dll" "./" copy /y "%XEngine_Lib64%\XEngine_AVCodec\XEngine_AVCollect.dll" "./" -copy /y "%XEngine_Lib64%\XEngine_AVCodec\avcodec-60.dll" "./" -copy /y "%XEngine_Lib64%\XEngine_AVCodec\avdevice-60.dll" "./" -copy /y "%XEngine_Lib64%\XEngine_AVCodec\avfilter-9.dll" "./" -copy /y "%XEngine_Lib64%\XEngine_AVCodec\avformat-60.dll" "./" -copy /y "%XEngine_Lib64%\XEngine_AVCodec\avutil-58.dll" "./" -copy /y "%XEngine_Lib64%\XEngine_AVCodec\swresample-4.dll" "./" -copy /y "%XEngine_Lib64%\XEngine_AVCodec\swscale-7.dll" "./" -copy /y "%XEngine_Lib64%\XEngine_AVCodec\postproc-57.dll" "./" \ No newline at end of file +copy /y "%XEngine_Lib64%\XEngine_AVCodec\avcodec-61.dll" "./" +copy /y "%XEngine_Lib64%\XEngine_AVCodec\avdevice-61.dll" "./" +copy /y "%XEngine_Lib64%\XEngine_AVCodec\avfilter-10.dll" "./" +copy /y "%XEngine_Lib64%\XEngine_AVCodec\avformat-61.dll" "./" +copy /y "%XEngine_Lib64%\XEngine_AVCodec\avutil-59.dll" "./" +copy /y "%XEngine_Lib64%\XEngine_AVCodec\swresample-5.dll" "./" +copy /y "%XEngine_Lib64%\XEngine_AVCodec\swscale-8.dll" "./" +copy /y "%XEngine_Lib64%\XEngine_AVCodec\postproc-58.dll" "./" \ No newline at end of file diff --git a/XEngine_Source/VSCopy_x86.bat b/XEngine_Source/VSCopy_x86.bat index 5434dcc3..0c058628 100644 --- a/XEngine_Source/VSCopy_x86.bat +++ b/XEngine_Source/VSCopy_x86.bat @@ -13,6 +13,7 @@ copy /y "%XEngine_Lib32%\XEngine_NetHelp\NetHelp_XSocket.dll" "./" copy /y "%XEngine_Lib32%\XEngine_NetHelp\NetHelp_APIAddr.dll" "./" copy /y "%XEngine_Lib32%\XEngine_NetHelp\NetHelp_APIHelp.dll" "./" copy /y "%XEngine_Lib32%\XEngine_SystemSdk\XEngine_SystemApi.dll" "./" +copy /y "%XEngine_Lib32%\XEngine_SystemSdk\XEngine_SystemConfig.dll" "./ copy /y "%XEngine_Lib32%\XEngine_HelpComponents\HelpComponents_DataBase.dll" "./" copy /y "%XEngine_Lib32%\XEngine_HelpComponents\HelpComponents_XLog.dll" "./" @@ -25,11 +26,11 @@ copy /y "%XEngine_Lib32%\XEngine_AVCodec\XEngine_VideoCodec.dll" "./" copy /y "%XEngine_Lib32%\XEngine_AVCodec\XEngine_AudioCodec.dll" "./" copy /y "%XEngine_Lib32%\XEngine_AVCodec\XEngine_AVCollect.dll" "./" -copy /y "%XEngine_Lib32%\XEngine_AVCodec\avcodec-60.dll" "./" -copy /y "%XEngine_Lib32%\XEngine_AVCodec\avdevice-60.dll" "./" -copy /y "%XEngine_Lib32%\XEngine_AVCodec\avfilter-9.dll" "./" -copy /y "%XEngine_Lib32%\XEngine_AVCodec\avformat-60.dll" "./" -copy /y "%XEngine_Lib32%\XEngine_AVCodec\avutil-58.dll" "./" -copy /y "%XEngine_Lib32%\XEngine_AVCodec\swresample-4.dll" "./" -copy /y "%XEngine_Lib32%\XEngine_AVCodec\swscale-7.dll" "./" -copy /y "%XEngine_Lib32%\XEngine_AVCodec\postproc-57.dll" "./" \ No newline at end of file +copy /y "%XEngine_Lib32%\XEngine_AVCodec\avcodec-61.dll" "./" +copy /y "%XEngine_Lib32%\XEngine_AVCodec\avdevice-61.dll" "./" +copy /y "%XEngine_Lib32%\XEngine_AVCodec\avfilter-10.dll" "./" +copy /y "%XEngine_Lib32%\XEngine_AVCodec\avformat-61.dll" "./" +copy /y "%XEngine_Lib32%\XEngine_AVCodec\avutil-59.dll" "./" +copy /y "%XEngine_Lib32%\XEngine_AVCodec\swresample-5.dll" "./" +copy /y "%XEngine_Lib32%\XEngine_AVCodec\swscale-8.dll" "./" +copy /y "%XEngine_Lib32%\XEngine_AVCodec\postproc-58.dll" "./" \ No newline at end of file diff --git a/XEngine_Source/XEngine.sln b/XEngine_Source/XEngine.sln index 5bc5b27f..fbfa80aa 100644 --- a/XEngine_Source/XEngine.sln +++ b/XEngine_Source/XEngine.sln @@ -90,142 +90,226 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "XEngine_APIModuleIPMac", "X EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "XEngine_APIModulePhone", "XEngine_DBDepend\XEngine_PhoneData\Source\C\XEngine_APIModulePhone\XEngine_APIModulePhone.vcxproj", "{A13B72E7-FC40-4A27-81C3-26DF3C8F4C0A}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "XEngine_APIServiceApp", "XEngine_ServiceApp\XEngine_APIServiceApp\XEngine_APIServiceApp.vcxproj", "{096BEF37-4AF6-490D-868B-6306D3E251E7}" + ProjectSection(ProjectDependencies) = postProject + {F1736B3F-03A2-4FC7-B045-A12BA8D724FB} = {F1736B3F-03A2-4FC7-B045-A12BA8D724FB} + {F54F152C-594F-4465-A44E-2DB915B39760} = {F54F152C-594F-4465-A44E-2DB915B39760} + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|ARM64 = Debug|ARM64 Debug|x64 = Debug|x64 Debug|x86 = Debug|x86 + Release|ARM64 = Release|ARM64 Release|x64 = Release|x64 Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F54F152C-594F-4465-A44E-2DB915B39760}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {F54F152C-594F-4465-A44E-2DB915B39760}.Debug|ARM64.Build.0 = Debug|ARM64 {F54F152C-594F-4465-A44E-2DB915B39760}.Debug|x64.ActiveCfg = Debug|x64 {F54F152C-594F-4465-A44E-2DB915B39760}.Debug|x64.Build.0 = Debug|x64 {F54F152C-594F-4465-A44E-2DB915B39760}.Debug|x86.ActiveCfg = Debug|Win32 {F54F152C-594F-4465-A44E-2DB915B39760}.Debug|x86.Build.0 = Debug|Win32 + {F54F152C-594F-4465-A44E-2DB915B39760}.Release|ARM64.ActiveCfg = Release|ARM64 + {F54F152C-594F-4465-A44E-2DB915B39760}.Release|ARM64.Build.0 = Release|ARM64 {F54F152C-594F-4465-A44E-2DB915B39760}.Release|x64.ActiveCfg = Release|x64 {F54F152C-594F-4465-A44E-2DB915B39760}.Release|x64.Build.0 = Release|x64 {F54F152C-594F-4465-A44E-2DB915B39760}.Release|x86.ActiveCfg = Release|Win32 {F54F152C-594F-4465-A44E-2DB915B39760}.Release|x86.Build.0 = Release|Win32 + {E756B7D2-D40D-4106-9C14-1D90F20A712E}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {E756B7D2-D40D-4106-9C14-1D90F20A712E}.Debug|ARM64.Build.0 = Debug|ARM64 {E756B7D2-D40D-4106-9C14-1D90F20A712E}.Debug|x64.ActiveCfg = Debug|x64 {E756B7D2-D40D-4106-9C14-1D90F20A712E}.Debug|x64.Build.0 = Debug|x64 {E756B7D2-D40D-4106-9C14-1D90F20A712E}.Debug|x86.ActiveCfg = Debug|Win32 {E756B7D2-D40D-4106-9C14-1D90F20A712E}.Debug|x86.Build.0 = Debug|Win32 + {E756B7D2-D40D-4106-9C14-1D90F20A712E}.Release|ARM64.ActiveCfg = Release|ARM64 + {E756B7D2-D40D-4106-9C14-1D90F20A712E}.Release|ARM64.Build.0 = Release|ARM64 {E756B7D2-D40D-4106-9C14-1D90F20A712E}.Release|x64.ActiveCfg = Release|x64 {E756B7D2-D40D-4106-9C14-1D90F20A712E}.Release|x64.Build.0 = Release|x64 {E756B7D2-D40D-4106-9C14-1D90F20A712E}.Release|x86.ActiveCfg = Release|Win32 {E756B7D2-D40D-4106-9C14-1D90F20A712E}.Release|x86.Build.0 = Release|Win32 + {140AD4A9-4918-4345-B352-507C345AEBE0}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {140AD4A9-4918-4345-B352-507C345AEBE0}.Debug|ARM64.Build.0 = Debug|ARM64 {140AD4A9-4918-4345-B352-507C345AEBE0}.Debug|x64.ActiveCfg = Debug|x64 {140AD4A9-4918-4345-B352-507C345AEBE0}.Debug|x64.Build.0 = Debug|x64 {140AD4A9-4918-4345-B352-507C345AEBE0}.Debug|x86.ActiveCfg = Debug|Win32 {140AD4A9-4918-4345-B352-507C345AEBE0}.Debug|x86.Build.0 = Debug|Win32 + {140AD4A9-4918-4345-B352-507C345AEBE0}.Release|ARM64.ActiveCfg = Release|ARM64 + {140AD4A9-4918-4345-B352-507C345AEBE0}.Release|ARM64.Build.0 = Release|ARM64 {140AD4A9-4918-4345-B352-507C345AEBE0}.Release|x64.ActiveCfg = Release|x64 {140AD4A9-4918-4345-B352-507C345AEBE0}.Release|x64.Build.0 = Release|x64 {140AD4A9-4918-4345-B352-507C345AEBE0}.Release|x86.ActiveCfg = Release|Win32 {140AD4A9-4918-4345-B352-507C345AEBE0}.Release|x86.Build.0 = Release|Win32 + {6C935BE1-77E3-4719-A7A6-C76ABAFEE010}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {6C935BE1-77E3-4719-A7A6-C76ABAFEE010}.Debug|ARM64.Build.0 = Debug|ARM64 {6C935BE1-77E3-4719-A7A6-C76ABAFEE010}.Debug|x64.ActiveCfg = Debug|x64 {6C935BE1-77E3-4719-A7A6-C76ABAFEE010}.Debug|x64.Build.0 = Debug|x64 {6C935BE1-77E3-4719-A7A6-C76ABAFEE010}.Debug|x86.ActiveCfg = Debug|Win32 {6C935BE1-77E3-4719-A7A6-C76ABAFEE010}.Debug|x86.Build.0 = Debug|Win32 + {6C935BE1-77E3-4719-A7A6-C76ABAFEE010}.Release|ARM64.ActiveCfg = Release|ARM64 + {6C935BE1-77E3-4719-A7A6-C76ABAFEE010}.Release|ARM64.Build.0 = Release|ARM64 {6C935BE1-77E3-4719-A7A6-C76ABAFEE010}.Release|x64.ActiveCfg = Release|x64 {6C935BE1-77E3-4719-A7A6-C76ABAFEE010}.Release|x64.Build.0 = Release|x64 {6C935BE1-77E3-4719-A7A6-C76ABAFEE010}.Release|x86.ActiveCfg = Release|Win32 {6C935BE1-77E3-4719-A7A6-C76ABAFEE010}.Release|x86.Build.0 = Release|Win32 + {6D0FCB40-D544-4AB2-A239-2FEBC4B98F6D}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {6D0FCB40-D544-4AB2-A239-2FEBC4B98F6D}.Debug|ARM64.Build.0 = Debug|ARM64 {6D0FCB40-D544-4AB2-A239-2FEBC4B98F6D}.Debug|x64.ActiveCfg = Debug|x64 {6D0FCB40-D544-4AB2-A239-2FEBC4B98F6D}.Debug|x64.Build.0 = Debug|x64 {6D0FCB40-D544-4AB2-A239-2FEBC4B98F6D}.Debug|x86.ActiveCfg = Debug|Win32 {6D0FCB40-D544-4AB2-A239-2FEBC4B98F6D}.Debug|x86.Build.0 = Debug|Win32 + {6D0FCB40-D544-4AB2-A239-2FEBC4B98F6D}.Release|ARM64.ActiveCfg = Release|ARM64 + {6D0FCB40-D544-4AB2-A239-2FEBC4B98F6D}.Release|ARM64.Build.0 = Release|ARM64 {6D0FCB40-D544-4AB2-A239-2FEBC4B98F6D}.Release|x64.ActiveCfg = Release|x64 {6D0FCB40-D544-4AB2-A239-2FEBC4B98F6D}.Release|x64.Build.0 = Release|x64 {6D0FCB40-D544-4AB2-A239-2FEBC4B98F6D}.Release|x86.ActiveCfg = Release|Win32 {6D0FCB40-D544-4AB2-A239-2FEBC4B98F6D}.Release|x86.Build.0 = Release|Win32 + {CB443280-E283-44CD-B956-52C404A51DB6}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {CB443280-E283-44CD-B956-52C404A51DB6}.Debug|ARM64.Build.0 = Debug|ARM64 {CB443280-E283-44CD-B956-52C404A51DB6}.Debug|x64.ActiveCfg = Debug|x64 {CB443280-E283-44CD-B956-52C404A51DB6}.Debug|x64.Build.0 = Debug|x64 {CB443280-E283-44CD-B956-52C404A51DB6}.Debug|x86.ActiveCfg = Debug|Win32 {CB443280-E283-44CD-B956-52C404A51DB6}.Debug|x86.Build.0 = Debug|Win32 + {CB443280-E283-44CD-B956-52C404A51DB6}.Release|ARM64.ActiveCfg = Release|ARM64 + {CB443280-E283-44CD-B956-52C404A51DB6}.Release|ARM64.Build.0 = Release|ARM64 {CB443280-E283-44CD-B956-52C404A51DB6}.Release|x64.ActiveCfg = Release|x64 {CB443280-E283-44CD-B956-52C404A51DB6}.Release|x64.Build.0 = Release|x64 {CB443280-E283-44CD-B956-52C404A51DB6}.Release|x86.ActiveCfg = Release|Win32 {CB443280-E283-44CD-B956-52C404A51DB6}.Release|x86.Build.0 = Release|Win32 + {32BB166A-3D3D-45EF-8BED-2E0471274159}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {32BB166A-3D3D-45EF-8BED-2E0471274159}.Debug|ARM64.Build.0 = Debug|ARM64 {32BB166A-3D3D-45EF-8BED-2E0471274159}.Debug|x64.ActiveCfg = Debug|x64 {32BB166A-3D3D-45EF-8BED-2E0471274159}.Debug|x64.Build.0 = Debug|x64 {32BB166A-3D3D-45EF-8BED-2E0471274159}.Debug|x86.ActiveCfg = Debug|Win32 {32BB166A-3D3D-45EF-8BED-2E0471274159}.Debug|x86.Build.0 = Debug|Win32 + {32BB166A-3D3D-45EF-8BED-2E0471274159}.Release|ARM64.ActiveCfg = Release|ARM64 + {32BB166A-3D3D-45EF-8BED-2E0471274159}.Release|ARM64.Build.0 = Release|ARM64 {32BB166A-3D3D-45EF-8BED-2E0471274159}.Release|x64.ActiveCfg = Release|x64 {32BB166A-3D3D-45EF-8BED-2E0471274159}.Release|x64.Build.0 = Release|x64 {32BB166A-3D3D-45EF-8BED-2E0471274159}.Release|x86.ActiveCfg = Release|Win32 {32BB166A-3D3D-45EF-8BED-2E0471274159}.Release|x86.Build.0 = Release|Win32 + {201B6D13-82A7-49E9-9736-D6B3BFE05B30}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {201B6D13-82A7-49E9-9736-D6B3BFE05B30}.Debug|ARM64.Build.0 = Debug|ARM64 {201B6D13-82A7-49E9-9736-D6B3BFE05B30}.Debug|x64.ActiveCfg = Debug|x64 {201B6D13-82A7-49E9-9736-D6B3BFE05B30}.Debug|x64.Build.0 = Debug|x64 {201B6D13-82A7-49E9-9736-D6B3BFE05B30}.Debug|x86.ActiveCfg = Debug|Win32 {201B6D13-82A7-49E9-9736-D6B3BFE05B30}.Debug|x86.Build.0 = Debug|Win32 + {201B6D13-82A7-49E9-9736-D6B3BFE05B30}.Release|ARM64.ActiveCfg = Release|ARM64 + {201B6D13-82A7-49E9-9736-D6B3BFE05B30}.Release|ARM64.Build.0 = Release|ARM64 {201B6D13-82A7-49E9-9736-D6B3BFE05B30}.Release|x64.ActiveCfg = Release|x64 {201B6D13-82A7-49E9-9736-D6B3BFE05B30}.Release|x64.Build.0 = Release|x64 {201B6D13-82A7-49E9-9736-D6B3BFE05B30}.Release|x86.ActiveCfg = Release|Win32 {201B6D13-82A7-49E9-9736-D6B3BFE05B30}.Release|x86.Build.0 = Release|Win32 + {37B8E91F-EC52-41F0-B21D-441D4270C05F}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {37B8E91F-EC52-41F0-B21D-441D4270C05F}.Debug|ARM64.Build.0 = Debug|ARM64 {37B8E91F-EC52-41F0-B21D-441D4270C05F}.Debug|x64.ActiveCfg = Debug|x64 {37B8E91F-EC52-41F0-B21D-441D4270C05F}.Debug|x64.Build.0 = Debug|x64 {37B8E91F-EC52-41F0-B21D-441D4270C05F}.Debug|x86.ActiveCfg = Debug|Win32 {37B8E91F-EC52-41F0-B21D-441D4270C05F}.Debug|x86.Build.0 = Debug|Win32 + {37B8E91F-EC52-41F0-B21D-441D4270C05F}.Release|ARM64.ActiveCfg = Release|ARM64 + {37B8E91F-EC52-41F0-B21D-441D4270C05F}.Release|ARM64.Build.0 = Release|ARM64 {37B8E91F-EC52-41F0-B21D-441D4270C05F}.Release|x64.ActiveCfg = Release|x64 {37B8E91F-EC52-41F0-B21D-441D4270C05F}.Release|x64.Build.0 = Release|x64 {37B8E91F-EC52-41F0-B21D-441D4270C05F}.Release|x86.ActiveCfg = Release|Win32 {37B8E91F-EC52-41F0-B21D-441D4270C05F}.Release|x86.Build.0 = Release|Win32 + {BBC4B2B4-1143-45DF-8890-47CE26A61D0E}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {BBC4B2B4-1143-45DF-8890-47CE26A61D0E}.Debug|ARM64.Build.0 = Debug|ARM64 {BBC4B2B4-1143-45DF-8890-47CE26A61D0E}.Debug|x64.ActiveCfg = Debug|x64 {BBC4B2B4-1143-45DF-8890-47CE26A61D0E}.Debug|x64.Build.0 = Debug|x64 {BBC4B2B4-1143-45DF-8890-47CE26A61D0E}.Debug|x86.ActiveCfg = Debug|Win32 {BBC4B2B4-1143-45DF-8890-47CE26A61D0E}.Debug|x86.Build.0 = Debug|Win32 + {BBC4B2B4-1143-45DF-8890-47CE26A61D0E}.Release|ARM64.ActiveCfg = Release|ARM64 + {BBC4B2B4-1143-45DF-8890-47CE26A61D0E}.Release|ARM64.Build.0 = Release|ARM64 {BBC4B2B4-1143-45DF-8890-47CE26A61D0E}.Release|x64.ActiveCfg = Release|x64 {BBC4B2B4-1143-45DF-8890-47CE26A61D0E}.Release|x64.Build.0 = Release|x64 {BBC4B2B4-1143-45DF-8890-47CE26A61D0E}.Release|x86.ActiveCfg = Release|Win32 {BBC4B2B4-1143-45DF-8890-47CE26A61D0E}.Release|x86.Build.0 = Release|Win32 + {6F111577-DAF8-4294-B516-0077C22D7613}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {6F111577-DAF8-4294-B516-0077C22D7613}.Debug|ARM64.Build.0 = Debug|ARM64 {6F111577-DAF8-4294-B516-0077C22D7613}.Debug|x64.ActiveCfg = Debug|x64 {6F111577-DAF8-4294-B516-0077C22D7613}.Debug|x64.Build.0 = Debug|x64 {6F111577-DAF8-4294-B516-0077C22D7613}.Debug|x86.ActiveCfg = Debug|Win32 {6F111577-DAF8-4294-B516-0077C22D7613}.Debug|x86.Build.0 = Debug|Win32 + {6F111577-DAF8-4294-B516-0077C22D7613}.Release|ARM64.ActiveCfg = Release|ARM64 + {6F111577-DAF8-4294-B516-0077C22D7613}.Release|ARM64.Build.0 = Release|ARM64 {6F111577-DAF8-4294-B516-0077C22D7613}.Release|x64.ActiveCfg = Release|x64 {6F111577-DAF8-4294-B516-0077C22D7613}.Release|x64.Build.0 = Release|x64 {6F111577-DAF8-4294-B516-0077C22D7613}.Release|x86.ActiveCfg = Release|Win32 {6F111577-DAF8-4294-B516-0077C22D7613}.Release|x86.Build.0 = Release|Win32 + {92F971AB-CAC9-4D9B-A9CA-AFD9CA17E505}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {92F971AB-CAC9-4D9B-A9CA-AFD9CA17E505}.Debug|ARM64.Build.0 = Debug|ARM64 {92F971AB-CAC9-4D9B-A9CA-AFD9CA17E505}.Debug|x64.ActiveCfg = Debug|x64 {92F971AB-CAC9-4D9B-A9CA-AFD9CA17E505}.Debug|x64.Build.0 = Debug|x64 {92F971AB-CAC9-4D9B-A9CA-AFD9CA17E505}.Debug|x86.ActiveCfg = Debug|Win32 {92F971AB-CAC9-4D9B-A9CA-AFD9CA17E505}.Debug|x86.Build.0 = Debug|Win32 + {92F971AB-CAC9-4D9B-A9CA-AFD9CA17E505}.Release|ARM64.ActiveCfg = Release|ARM64 + {92F971AB-CAC9-4D9B-A9CA-AFD9CA17E505}.Release|ARM64.Build.0 = Release|ARM64 {92F971AB-CAC9-4D9B-A9CA-AFD9CA17E505}.Release|x64.ActiveCfg = Release|x64 {92F971AB-CAC9-4D9B-A9CA-AFD9CA17E505}.Release|x64.Build.0 = Release|x64 {92F971AB-CAC9-4D9B-A9CA-AFD9CA17E505}.Release|x86.ActiveCfg = Release|Win32 {92F971AB-CAC9-4D9B-A9CA-AFD9CA17E505}.Release|x86.Build.0 = Release|Win32 + {F1736B3F-03A2-4FC7-B045-A12BA8D724FB}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {F1736B3F-03A2-4FC7-B045-A12BA8D724FB}.Debug|ARM64.Build.0 = Debug|ARM64 {F1736B3F-03A2-4FC7-B045-A12BA8D724FB}.Debug|x64.ActiveCfg = Debug|x64 {F1736B3F-03A2-4FC7-B045-A12BA8D724FB}.Debug|x64.Build.0 = Debug|x64 {F1736B3F-03A2-4FC7-B045-A12BA8D724FB}.Debug|x86.ActiveCfg = Debug|Win32 {F1736B3F-03A2-4FC7-B045-A12BA8D724FB}.Debug|x86.Build.0 = Debug|Win32 + {F1736B3F-03A2-4FC7-B045-A12BA8D724FB}.Release|ARM64.ActiveCfg = Release|ARM64 + {F1736B3F-03A2-4FC7-B045-A12BA8D724FB}.Release|ARM64.Build.0 = Release|ARM64 {F1736B3F-03A2-4FC7-B045-A12BA8D724FB}.Release|x64.ActiveCfg = Release|x64 {F1736B3F-03A2-4FC7-B045-A12BA8D724FB}.Release|x64.Build.0 = Release|x64 {F1736B3F-03A2-4FC7-B045-A12BA8D724FB}.Release|x86.ActiveCfg = Release|Win32 {F1736B3F-03A2-4FC7-B045-A12BA8D724FB}.Release|x86.Build.0 = Release|Win32 + {F6520D2C-BB8E-45BB-964B-F5D6A4318A89}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {F6520D2C-BB8E-45BB-964B-F5D6A4318A89}.Debug|ARM64.Build.0 = Debug|ARM64 {F6520D2C-BB8E-45BB-964B-F5D6A4318A89}.Debug|x64.ActiveCfg = Debug|x64 {F6520D2C-BB8E-45BB-964B-F5D6A4318A89}.Debug|x64.Build.0 = Debug|x64 {F6520D2C-BB8E-45BB-964B-F5D6A4318A89}.Debug|x86.ActiveCfg = Debug|Win32 {F6520D2C-BB8E-45BB-964B-F5D6A4318A89}.Debug|x86.Build.0 = Debug|Win32 + {F6520D2C-BB8E-45BB-964B-F5D6A4318A89}.Release|ARM64.ActiveCfg = Release|ARM64 + {F6520D2C-BB8E-45BB-964B-F5D6A4318A89}.Release|ARM64.Build.0 = Release|ARM64 {F6520D2C-BB8E-45BB-964B-F5D6A4318A89}.Release|x64.ActiveCfg = Release|x64 {F6520D2C-BB8E-45BB-964B-F5D6A4318A89}.Release|x64.Build.0 = Release|x64 {F6520D2C-BB8E-45BB-964B-F5D6A4318A89}.Release|x86.ActiveCfg = Release|Win32 {F6520D2C-BB8E-45BB-964B-F5D6A4318A89}.Release|x86.Build.0 = Release|Win32 + {FFAC032D-4F8C-4C70-AF36-D79685A6961F}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {FFAC032D-4F8C-4C70-AF36-D79685A6961F}.Debug|ARM64.Build.0 = Debug|ARM64 {FFAC032D-4F8C-4C70-AF36-D79685A6961F}.Debug|x64.ActiveCfg = Debug|x64 {FFAC032D-4F8C-4C70-AF36-D79685A6961F}.Debug|x64.Build.0 = Debug|x64 {FFAC032D-4F8C-4C70-AF36-D79685A6961F}.Debug|x86.ActiveCfg = Debug|Win32 {FFAC032D-4F8C-4C70-AF36-D79685A6961F}.Debug|x86.Build.0 = Debug|Win32 + {FFAC032D-4F8C-4C70-AF36-D79685A6961F}.Release|ARM64.ActiveCfg = Release|ARM64 + {FFAC032D-4F8C-4C70-AF36-D79685A6961F}.Release|ARM64.Build.0 = Release|ARM64 {FFAC032D-4F8C-4C70-AF36-D79685A6961F}.Release|x64.ActiveCfg = Release|x64 {FFAC032D-4F8C-4C70-AF36-D79685A6961F}.Release|x64.Build.0 = Release|x64 {FFAC032D-4F8C-4C70-AF36-D79685A6961F}.Release|x86.ActiveCfg = Release|Win32 {FFAC032D-4F8C-4C70-AF36-D79685A6961F}.Release|x86.Build.0 = Release|Win32 + {A13B72E7-FC40-4A27-81C3-26DF3C8F4C0A}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {A13B72E7-FC40-4A27-81C3-26DF3C8F4C0A}.Debug|ARM64.Build.0 = Debug|ARM64 {A13B72E7-FC40-4A27-81C3-26DF3C8F4C0A}.Debug|x64.ActiveCfg = Debug|x64 {A13B72E7-FC40-4A27-81C3-26DF3C8F4C0A}.Debug|x64.Build.0 = Debug|x64 {A13B72E7-FC40-4A27-81C3-26DF3C8F4C0A}.Debug|x86.ActiveCfg = Debug|Win32 {A13B72E7-FC40-4A27-81C3-26DF3C8F4C0A}.Debug|x86.Build.0 = Debug|Win32 + {A13B72E7-FC40-4A27-81C3-26DF3C8F4C0A}.Release|ARM64.ActiveCfg = Release|ARM64 + {A13B72E7-FC40-4A27-81C3-26DF3C8F4C0A}.Release|ARM64.Build.0 = Release|ARM64 {A13B72E7-FC40-4A27-81C3-26DF3C8F4C0A}.Release|x64.ActiveCfg = Release|x64 {A13B72E7-FC40-4A27-81C3-26DF3C8F4C0A}.Release|x64.Build.0 = Release|x64 {A13B72E7-FC40-4A27-81C3-26DF3C8F4C0A}.Release|x86.ActiveCfg = Release|Win32 {A13B72E7-FC40-4A27-81C3-26DF3C8F4C0A}.Release|x86.Build.0 = Release|Win32 + {096BEF37-4AF6-490D-868B-6306D3E251E7}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {096BEF37-4AF6-490D-868B-6306D3E251E7}.Debug|ARM64.Build.0 = Debug|ARM64 + {096BEF37-4AF6-490D-868B-6306D3E251E7}.Debug|x64.ActiveCfg = Debug|x64 + {096BEF37-4AF6-490D-868B-6306D3E251E7}.Debug|x64.Build.0 = Debug|x64 + {096BEF37-4AF6-490D-868B-6306D3E251E7}.Debug|x86.ActiveCfg = Debug|Win32 + {096BEF37-4AF6-490D-868B-6306D3E251E7}.Debug|x86.Build.0 = Debug|Win32 + {096BEF37-4AF6-490D-868B-6306D3E251E7}.Release|ARM64.ActiveCfg = Release|ARM64 + {096BEF37-4AF6-490D-868B-6306D3E251E7}.Release|ARM64.Build.0 = Release|ARM64 + {096BEF37-4AF6-490D-868B-6306D3E251E7}.Release|x64.ActiveCfg = Release|x64 + {096BEF37-4AF6-490D-868B-6306D3E251E7}.Release|x64.Build.0 = Release|x64 + {096BEF37-4AF6-490D-868B-6306D3E251E7}.Release|x86.ActiveCfg = Release|Win32 + {096BEF37-4AF6-490D-868B-6306D3E251E7}.Release|x86.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -241,6 +325,7 @@ Global {F6520D2C-BB8E-45BB-964B-F5D6A4318A89} = {2B89A3C7-0CC8-4881-B195-61BAA9ACB78B} {FFAC032D-4F8C-4C70-AF36-D79685A6961F} = {91E64672-DF39-4F32-87FA-0F7AADA92D73} {A13B72E7-FC40-4A27-81C3-26DF3C8F4C0A} = {91E64672-DF39-4F32-87FA-0F7AADA92D73} + {096BEF37-4AF6-490D-868B-6306D3E251E7} = {79A9A569-7DA8-4D9D-AD34-D11115199EA1} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {9B202F91-A601-429E-BB0F-880DDEE096FE} diff --git a/XEngine_Source/XEngine_DBDepend/XEngine_IPMacData b/XEngine_Source/XEngine_DBDepend/XEngine_IPMacData index 7a18771f..61db4fbc 160000 --- a/XEngine_Source/XEngine_DBDepend/XEngine_IPMacData +++ b/XEngine_Source/XEngine_DBDepend/XEngine_IPMacData @@ -1 +1 @@ -Subproject commit 7a18771f470eda7f82a65afc360451a0900c3dc6 +Subproject commit 61db4fbc0846a63bda426bcdebea5c9a76350fbe diff --git a/XEngine_Source/XEngine_DBDepend/XEngine_PhoneData b/XEngine_Source/XEngine_DBDepend/XEngine_PhoneData index 130e0949..56dd7962 160000 --- a/XEngine_Source/XEngine_DBDepend/XEngine_PhoneData +++ b/XEngine_Source/XEngine_DBDepend/XEngine_PhoneData @@ -1 +1 @@ -Subproject commit 130e0949ab52913140f8fa78d86df5ac3a987aa4 +Subproject commit 56dd7962c9e7198f3e7ad9b29b32e23e6c62ced8 diff --git a/XEngine_Source/XEngine_Depend b/XEngine_Source/XEngine_Depend index d022f0c7..865c50f5 160000 --- a/XEngine_Source/XEngine_Depend +++ b/XEngine_Source/XEngine_Depend @@ -1 +1 @@ -Subproject commit d022f0c7d2298275d663543afd33e18243c5f25d +Subproject commit 865c50f5199f3330ba8a3df48c6397363993fd36 diff --git a/XEngine_Source/XEngine_ModuleConfigure/ModuleConfig_Define.h b/XEngine_Source/XEngine_ModuleConfigure/ModuleConfig_Define.h index bf8d056a..a08ace6d 100644 --- a/XEngine_Source/XEngine_ModuleConfigure/ModuleConfig_Define.h +++ b/XEngine_Source/XEngine_ModuleConfigure/ModuleConfig_Define.h @@ -17,8 +17,7 @@ typedef struct { XCHAR tszIPAddr[128]; //本机IP地址,根据需要配置 bool bDeamon; //是否以守护进程启动,LINUX有效 - bool bAutoStart; //是否自动启动 - bool bHideWnd; //是否隐藏窗口启动 + bool bShowWnd; //是否显示窗口启动 int nHttpPort; //HTTP服务端口 int nRFCPort; //RFC标准服务端口 struct @@ -36,7 +35,8 @@ typedef struct }st_XTime; //次数*时间=超时 struct { - XCHAR tszLogFile[MAX_PATH]; //日志文件地址 + XCHAR tszAPIFile[MAX_PATH]; //日志文件地址 + XCHAR tszServiceFile[MAX_PATH]; int nMaxSize; //最大日志大小 int nMaxCount; //最大日志个数 int nLogLeave; //日志等级 @@ -56,9 +56,10 @@ typedef struct XCHAR tszWeatherUrl[MAX_PATH]; //天气接口 XCHAR tszBankUrl[MAX_PATH]; //银行卡验证地址 XCHAR tszOilUrl[MAX_PATH]; //油价接口 - XCHAR tszTranslationUrl[MAX_PATH]; //翻译接口 + //翻译接口 struct { + XCHAR tszAPPUrl[MAX_PATH]; XCHAR tszAPPID[MAX_PATH]; XCHAR tszAPPKey[MAX_PATH]; }st_TranslationInfo; @@ -66,12 +67,18 @@ typedef struct struct { bool bEnable; //是否启用 - XCHAR tszPluginLib[MAX_PATH]; //配置文件地址 - XCHAR tszPluginLua[MAX_PATH]; //配置文件地址 + XCHAR tszPlugin[MAX_PATH]; //配置文件地址 }st_XPlugin; struct { - XCHAR tszConfigQRCode[MAX_PATH]; //二维码配置地址 + //二维码模型库 + struct + { + XCHAR tszModelDetect[MAX_PATH]; + XCHAR tszModelSr[MAX_PATH]; + XCHAR tszProtoDetect[MAX_PATH]; + XCHAR tszProtoSr[MAX_PATH]; + }st_ConfigQRCodec; XCHAR tszConfigDeamon[MAX_PATH]; //守护进程配置文件 XCHAR tszConfigHTTPMime[MAX_PATH]; //HTTPMINE配置文件 XCHAR tszConfigHTTPCode[MAX_PATH]; //HTTP状态配置文件 @@ -108,6 +115,7 @@ typedef struct XCHAR tszDBPhone[MAX_PATH]; XCHAR tszDBMac[MAX_PATH]; XCHAR tszDBIPAddr[MAX_PATH]; + XCHAR tszDBISPAddr[MAX_PATH]; }st_XAPIModule; struct { @@ -120,14 +128,6 @@ typedef struct list* pStl_ListVer; }st_XVer; }XENGINE_SERVICECONFIG; -//二维码模型库 -typedef struct -{ - XCHAR tszModelDetect[MAX_PATH]; - XCHAR tszModelSr[MAX_PATH]; - XCHAR tszProtoDetect[MAX_PATH]; - XCHAR tszProtoSr[MAX_PATH]; -}XENGINE_QRCODECONFIG; //插件 typedef struct { @@ -137,7 +137,8 @@ typedef struct }XENGINE_PLUGININFO; typedef struct { - list* pStl_ListPlugin; + list* pStl_ListPluginModule; + list* pStl_ListPluginLua; }XENGINE_PLUGINCONFIG; ////////////////////////////////////////////////////////////////////////// typedef struct @@ -214,25 +215,6 @@ extern "C" bool ModuleConfigure_Json_File(LPCXSTR lpszConfigFile, XENGINE_SERVIC *********************************************************************/ extern "C" bool ModuleConfigure_Json_VersionFile(LPCXSTR lpszConfigFile, XENGINE_SERVICECONFIG* pSt_ServerConfig); /******************************************************************** -函数名称:ModuleConfigure_Json_QRCodeFile -函数功能:读取JSON配置文件 - 参数.一:lpszConfigFile - In/Out:In - 类型:常量字符指针 - 可空:N - 意思:输入要读取的配置文件 - 参数.二:pSt_QRCodeConfig - In/Out:Out - 类型:数据结构指针 - 可空:N - 意思:输出二维码配置信息 -返回值 - 类型:逻辑型 - 意思:是否成功 -备注: -*********************************************************************/ -extern "C" bool ModuleConfigure_Json_QRCodeFile(LPCXSTR lpszConfigFile, XENGINE_QRCODECONFIG* pSt_QRCodeConfig); -/******************************************************************** 函数名称:ModuleConfigure_Json_PluginFile 函数功能:读取JSON配置文件 参数.一:lpszConfigFile diff --git a/XEngine_Source/XEngine_ModuleConfigure/ModuleConfigure_Json/ModuleConfigure_Json.cpp b/XEngine_Source/XEngine_ModuleConfigure/ModuleConfigure_Json/ModuleConfigure_Json.cpp index 7ee93275..a07bacf8 100644 --- a/XEngine_Source/XEngine_ModuleConfigure/ModuleConfigure_Json/ModuleConfigure_Json.cpp +++ b/XEngine_Source/XEngine_ModuleConfigure/ModuleConfigure_Json/ModuleConfigure_Json.cpp @@ -83,8 +83,7 @@ bool CModuleConfigure_Json::ModuleConfigure_Json_File(LPCXSTR lpszConfigFile, XE } _tcsxcpy(pSt_ServerConfig->tszIPAddr, st_JsonRoot["tszIPAddr"].asCString()); pSt_ServerConfig->bDeamon = st_JsonRoot["bDeamon"].asBool(); - pSt_ServerConfig->bAutoStart = st_JsonRoot["bAutoStart"].asBool(); - pSt_ServerConfig->bHideWnd = st_JsonRoot["bHideWnd"].asBool(); + pSt_ServerConfig->bShowWnd = st_JsonRoot["bShowWnd"].asBool(); pSt_ServerConfig->nHttpPort = st_JsonRoot["nHttpPort"].asInt(); pSt_ServerConfig->nRFCPort = st_JsonRoot["nRFCPort"].asInt(); @@ -111,7 +110,7 @@ bool CModuleConfigure_Json::ModuleConfigure_Json_File(LPCXSTR lpszConfigFile, XE pSt_ServerConfig->st_XTime.nHTTPTimeOut = st_JsonXTime["nHttpTimeOut"].asInt(); pSt_ServerConfig->st_XTime.nP2PTimeOut = st_JsonXTime["nP2PTimeOut"].asInt(); - if (st_JsonRoot["XLog"].empty() || (5 != st_JsonRoot["XLog"].size())) + if (st_JsonRoot["XLog"].empty() || (6 != st_JsonRoot["XLog"].size())) { Config_IsErrorOccur = true; Config_dwErrorCode = ERROR_MODULE_CONFIGURE_JSON_XLOG; @@ -122,9 +121,10 @@ bool CModuleConfigure_Json::ModuleConfigure_Json_File(LPCXSTR lpszConfigFile, XE pSt_ServerConfig->st_XLog.nMaxCount = st_JsonXLog["MaxCount"].asInt(); pSt_ServerConfig->st_XLog.nLogLeave = st_JsonXLog["LogLeave"].asInt(); pSt_ServerConfig->st_XLog.nLogType = st_JsonXLog["LogType"].asInt(); - _tcsxcpy(pSt_ServerConfig->st_XLog.tszLogFile, st_JsonXLog["tszLogFile"].asCString()); + _tcsxcpy(pSt_ServerConfig->st_XLog.tszAPIFile, st_JsonXLog["tszAPIFile"].asCString()); + _tcsxcpy(pSt_ServerConfig->st_XLog.tszServiceFile, st_JsonXLog["tszServiceFile"].asCString()); - if (st_JsonRoot["XApi"].empty() || (5 != st_JsonRoot["XApi"].size())) + if (st_JsonRoot["XApi"].empty() || (4 != st_JsonRoot["XApi"].size())) { Config_IsErrorOccur = true; Config_dwErrorCode = ERROR_MODULE_CONFIGURE_JSON_XAPI; @@ -135,8 +135,9 @@ bool CModuleConfigure_Json::ModuleConfigure_Json_File(LPCXSTR lpszConfigFile, XE _tcsxcpy(pSt_ServerConfig->st_XApi.tszWeatherUrl, st_JsonXApi["tszWeatherUrl"].asCString()); _tcsxcpy(pSt_ServerConfig->st_XApi.tszBankUrl, st_JsonXApi["tszBankUrl"].asCString()); _tcsxcpy(pSt_ServerConfig->st_XApi.tszOilUrl, st_JsonXApi["tszOilUrl"].asCString()); - _tcsxcpy(pSt_ServerConfig->st_XApi.tszTranslationUrl, st_JsonXApi["tszTranslationUrl"].asCString()); + Json::Value st_JsonTranslationInfo = st_JsonXApi["st_TranslationInfo"]; + _tcsxcpy(pSt_ServerConfig->st_XApi.st_TranslationInfo.tszAPPUrl, st_JsonTranslationInfo["url"].asCString()); _tcsxcpy(pSt_ServerConfig->st_XApi.st_TranslationInfo.tszAPPID, st_JsonTranslationInfo["appid"].asCString()); _tcsxcpy(pSt_ServerConfig->st_XApi.st_TranslationInfo.tszAPPKey, st_JsonTranslationInfo["key"].asCString()); @@ -154,7 +155,7 @@ bool CModuleConfigure_Json::ModuleConfigure_Json_File(LPCXSTR lpszConfigFile, XE _tcsxcpy(pSt_ServerConfig->st_XSql.tszSQLUser, st_JsonXSql["SQLUser"].asCString()); _tcsxcpy(pSt_ServerConfig->st_XSql.tszSQLPass, st_JsonXSql["SQLPass"].asCString()); - if (st_JsonRoot["XPlugin"].empty() || (3 != st_JsonRoot["XPlugin"].size())) + if (st_JsonRoot["XPlugin"].empty() || (2 != st_JsonRoot["XPlugin"].size())) { Config_IsErrorOccur = true; Config_dwErrorCode = ERROR_MODULE_CONFIGURE_JSON_XPLUGIN; @@ -162,8 +163,7 @@ bool CModuleConfigure_Json::ModuleConfigure_Json_File(LPCXSTR lpszConfigFile, XE } Json::Value st_JsonXPlugin = st_JsonRoot["XPlugin"]; pSt_ServerConfig->st_XPlugin.bEnable = st_JsonXPlugin["bEnable"].asBool(); - _tcsxcpy(pSt_ServerConfig->st_XPlugin.tszPluginLib, st_JsonXPlugin["tszPluginLib"].asCString()); - _tcsxcpy(pSt_ServerConfig->st_XPlugin.tszPluginLua, st_JsonXPlugin["tszPluginLua"].asCString()); + _tcsxcpy(pSt_ServerConfig->st_XPlugin.tszPlugin, st_JsonXPlugin["tszPlugin"].asCString()); if (st_JsonRoot["XConfig"].empty() || (4 != st_JsonRoot["XConfig"].size())) { @@ -172,11 +172,16 @@ bool CModuleConfigure_Json::ModuleConfigure_Json_File(LPCXSTR lpszConfigFile, XE return false; } Json::Value st_JsonXConfig = st_JsonRoot["XConfig"]; - _tcsxcpy(pSt_ServerConfig->st_XConfig.tszConfigQRCode, st_JsonXConfig["tszConfigQRCode"].asCString()); _tcsxcpy(pSt_ServerConfig->st_XConfig.tszConfigDeamon, st_JsonXConfig["tszConfigDeamon"].asCString()); _tcsxcpy(pSt_ServerConfig->st_XConfig.tszConfigHTTPMime, st_JsonXConfig["tszConfigHTTPMime"].asCString()); _tcsxcpy(pSt_ServerConfig->st_XConfig.tszConfigHTTPCode, st_JsonXConfig["tszConfigHTTPCode"].asCString()); + Json::Value st_JsonXConfigQRCode = st_JsonXConfig["st_ConfigQRCode"]; + _tcsxcpy(pSt_ServerConfig->st_XConfig.st_ConfigQRCodec.tszModelDetect, st_JsonXConfigQRCode["tszModelDetect"].asCString()); + _tcsxcpy(pSt_ServerConfig->st_XConfig.st_ConfigQRCodec.tszModelSr, st_JsonXConfigQRCode["tszModelSr"].asCString()); + _tcsxcpy(pSt_ServerConfig->st_XConfig.st_ConfigQRCodec.tszProtoDetect, st_JsonXConfigQRCode["tszProtoDetect"].asCString()); + _tcsxcpy(pSt_ServerConfig->st_XConfig.st_ConfigQRCodec.tszProtoSr, st_JsonXConfigQRCode["tszProtoSr"].asCString()); + if (st_JsonRoot["XShortLink"].empty() || (2 != st_JsonRoot["XShortLink"].size())) { Config_IsErrorOccur = true; @@ -212,7 +217,7 @@ bool CModuleConfigure_Json::ModuleConfigure_Json_File(LPCXSTR lpszConfigFile, XE pSt_ServerConfig->st_XVerifcation.st_VerSwitch.bBackService = st_JsonVerSwitch["bBackService"].asBool(); pSt_ServerConfig->st_XVerifcation.st_VerSwitch.bDeamon = st_JsonVerSwitch["bDeamon"].asBool(); - if (st_JsonRoot["XAPIModule"].empty() || (4 != st_JsonRoot["XAPIModule"].size())) + if (st_JsonRoot["XAPIModule"].empty() || (5 != st_JsonRoot["XAPIModule"].size())) { Config_IsErrorOccur = true; Config_dwErrorCode = ERROR_MODULE_CONFIGURE_JSON_XREPORT; @@ -221,6 +226,7 @@ bool CModuleConfigure_Json::ModuleConfigure_Json_File(LPCXSTR lpszConfigFile, XE Json::Value st_JsonXAPIModule = st_JsonRoot["XAPIModule"]; pSt_ServerConfig->st_XAPIModule.bEnable = st_JsonXAPIModule["bEnable"].asBool(); _tcsxcpy(pSt_ServerConfig->st_XAPIModule.tszDBIPAddr, st_JsonXAPIModule["tszDBIPAddr"].asCString()); + _tcsxcpy(pSt_ServerConfig->st_XAPIModule.tszDBISPAddr, st_JsonXAPIModule["tszDBISPAddr"].asCString()); _tcsxcpy(pSt_ServerConfig->st_XAPIModule.tszDBMac, st_JsonXAPIModule["tszDBMac"].asCString()); _tcsxcpy(pSt_ServerConfig->st_XAPIModule.tszDBPhone, st_JsonXAPIModule["tszDBPhone"].asCString()); @@ -318,71 +324,6 @@ bool CModuleConfigure_Json::ModuleConfigure_Json_VersionFile(LPCXSTR lpszConfigF return true; } /******************************************************************** -函数名称:ModuleConfigure_Json_QRCodeFile -函数功能:读取JSON配置文件 - 参数.一:lpszConfigFile - In/Out:In - 类型:常量字符指针 - 可空:N - 意思:输入要读取的配置文件 - 参数.二:pSt_QRCodeConfig - In/Out:Out - 类型:数据结构指针 - 可空:N - 意思:输出二维码配置信息 -返回值 - 类型:逻辑型 - 意思:是否成功 -备注: -*********************************************************************/ -bool CModuleConfigure_Json::ModuleConfigure_Json_QRCodeFile(LPCXSTR lpszConfigFile, XENGINE_QRCODECONFIG* pSt_QRCodeConfig) -{ - Config_IsErrorOccur = false; - - if ((NULL == lpszConfigFile) || (NULL == pSt_QRCodeConfig)) - { - Config_IsErrorOccur = true; - Config_dwErrorCode = ERROR_MODULE_CONFIGURE_JSON_PARAMENT; - return false; - } - Json::Value st_JsonRoot; - JSONCPP_STRING st_JsonError; - Json::CharReaderBuilder st_JsonBuilder; - //读取配置文件所有内容到缓冲区 - FILE* pSt_File = _xtfopen(lpszConfigFile, _X("rb")); - if (NULL == pSt_File) - { - Config_IsErrorOccur = true; - Config_dwErrorCode = ERROR_MODULE_CONFIGURE_JSON_OPENFILE; - return false; - } - size_t nCount = 0; - XCHAR tszMsgBuffer[4096]; - while (1) - { - size_t nRet = fread(tszMsgBuffer + nCount, 1, 2048, pSt_File); - if (nRet <= 0) - { - break; - } - nCount += nRet; - } - fclose(pSt_File); - //开始解析配置文件 - std::unique_ptr const pSt_JsonReader(st_JsonBuilder.newCharReader()); - if (!pSt_JsonReader->parse(tszMsgBuffer, tszMsgBuffer + nCount, &st_JsonRoot, &st_JsonError)) - { - Config_IsErrorOccur = true; - Config_dwErrorCode = ERROR_MODULE_CONFIGURE_JSON_PARSE; - return false; - } - _tcsxcpy(pSt_QRCodeConfig->tszModelDetect, st_JsonRoot["tszModelDetect"].asCString()); - _tcsxcpy(pSt_QRCodeConfig->tszModelSr, st_JsonRoot["tszModelSr"].asCString()); - _tcsxcpy(pSt_QRCodeConfig->tszProtoDetect, st_JsonRoot["tszProtoDetect"].asCString()); - _tcsxcpy(pSt_QRCodeConfig->tszProtoSr, st_JsonRoot["tszProtoSr"].asCString()); - return true; -} -/******************************************************************** 函数名称:ModuleConfigure_Json_PluginFile 函数功能:读取JSON配置文件 参数.一:lpszConfigFile @@ -442,36 +383,46 @@ bool CModuleConfigure_Json::ModuleConfigure_Json_PluginFile(LPCXSTR lpszConfigFi return false; } //申请内存 - pSt_PluginConfig->pStl_ListPlugin = new list; - if (NULL == pSt_PluginConfig->pStl_ListPlugin) + pSt_PluginConfig->pStl_ListPluginLua = new list; + pSt_PluginConfig->pStl_ListPluginModule = new list; + if (NULL == pSt_PluginConfig->pStl_ListPluginLua || NULL == pSt_PluginConfig->pStl_ListPluginModule) { Config_IsErrorOccur = true; Config_dwErrorCode = ERROR_MODULE_CONFIGURE_JSON_MALLOC; return false; } - //解析列表 - Json::Value st_JsonArray = st_JsonRoot["PluginArray"]; - for (unsigned int i = 0; i < st_JsonArray.size(); i++) + //解析module列表 + Json::Value st_JsonModuleArray = st_JsonRoot["PluginModule"]; + for (unsigned int i = 0; i < st_JsonModuleArray.size(); i++) { XENGINE_PLUGININFO st_PluginInfo; memset(&st_PluginInfo, '\0', sizeof(XENGINE_PLUGININFO)); - st_PluginInfo.bEnable = st_JsonArray[i]["PluginEnable"].asBool(); - _tcsxcpy(st_PluginInfo.tszPluginFile, st_JsonArray[i]["PluginFile"].asCString()); - - if (NULL == _tcsxstr(st_PluginInfo.tszPluginFile + 3,_X("."))) - { + st_PluginInfo.bEnable = st_JsonModuleArray[i]["PluginEnable"].asBool(); + _tcsxcpy(st_PluginInfo.tszPluginFile, st_JsonModuleArray[i]["PluginFile"].asCString()); #ifdef _MSC_BUILD - _tcsxcat(st_PluginInfo.tszPluginFile, ".dll"); + _tcsxcat(st_PluginInfo.tszPluginFile, ".dll"); #elif __linux__ - _tcsxcat(st_PluginInfo.tszPluginFile, ".so"); + _tcsxcat(st_PluginInfo.tszPluginFile, ".so"); #else - _tcsxcat(st_PluginInfo.tszPluginFile, ".dylib"); + _tcsxcat(st_PluginInfo.tszPluginFile, ".dylib"); #endif - } + _tcsxcpy(st_PluginInfo.tszPluginMethod, st_JsonModuleArray[i]["PluginMethod"].asCString()); + + pSt_PluginConfig->pStl_ListPluginModule->push_back(st_PluginInfo); + } + //解析lua列表 + Json::Value st_JsonLuaArray = st_JsonRoot["PluginLua"]; + for (unsigned int i = 0; i < st_JsonLuaArray.size(); i++) + { + XENGINE_PLUGININFO st_PluginInfo; + memset(&st_PluginInfo, '\0', sizeof(XENGINE_PLUGININFO)); + + st_PluginInfo.bEnable = st_JsonLuaArray[i]["PluginEnable"].asBool(); + _tcsxcpy(st_PluginInfo.tszPluginFile, st_JsonLuaArray[i]["PluginFile"].asCString()); + _tcsxcpy(st_PluginInfo.tszPluginMethod, st_JsonLuaArray[i]["PluginMethod"].asCString()); - _tcsxcpy(st_PluginInfo.tszPluginMethod, st_JsonArray[i]["PluginMethod"].asCString()); - pSt_PluginConfig->pStl_ListPlugin->push_back(st_PluginInfo); + pSt_PluginConfig->pStl_ListPluginLua->push_back(st_PluginInfo); } return true; } diff --git a/XEngine_Source/XEngine_ModuleConfigure/ModuleConfigure_Json/ModuleConfigure_Json.h b/XEngine_Source/XEngine_ModuleConfigure/ModuleConfigure_Json/ModuleConfigure_Json.h index 3f5a0c84..362e773a 100644 --- a/XEngine_Source/XEngine_ModuleConfigure/ModuleConfigure_Json/ModuleConfigure_Json.h +++ b/XEngine_Source/XEngine_ModuleConfigure/ModuleConfigure_Json/ModuleConfigure_Json.h @@ -19,7 +19,6 @@ class CModuleConfigure_Json public: bool ModuleConfigure_Json_File(LPCXSTR lpszConfigFile, XENGINE_SERVICECONFIG* pSt_ServerConfig); bool ModuleConfigure_Json_VersionFile(LPCXSTR lpszConfigFile, XENGINE_SERVICECONFIG* pSt_ServerConfig); - bool ModuleConfigure_Json_QRCodeFile(LPCXSTR lpszConfigFile, XENGINE_QRCODECONFIG* pSt_QRCodeConfig); bool ModuleConfigure_Json_PluginFile(LPCXSTR lpszConfigFile, XENGINE_PLUGINCONFIG* pSt_PluginConfig); bool ModuleConfigure_Json_DeamonList(LPCXSTR lpszConfigFile, XENGINE_DEAMONAPPLIST* pSt_AppConfig); protected: diff --git a/XEngine_Source/XEngine_ModuleConfigure/XEngine_ModuleConfigure.def b/XEngine_Source/XEngine_ModuleConfigure/XEngine_ModuleConfigure.def index aeb270ea..5fe48fa7 100644 --- a/XEngine_Source/XEngine_ModuleConfigure/XEngine_ModuleConfigure.def +++ b/XEngine_Source/XEngine_ModuleConfigure/XEngine_ModuleConfigure.def @@ -5,6 +5,5 @@ EXPORTS ModuleConfigure_Json_File ModuleConfigure_Json_VersionFile - ModuleConfigure_Json_QRCodeFile ModuleConfigure_Json_PluginFile ModuleConfigure_Json_DeamonList \ No newline at end of file diff --git a/XEngine_Source/XEngine_ModuleConfigure/XEngine_ModuleConfigure.vcxproj b/XEngine_Source/XEngine_ModuleConfigure/XEngine_ModuleConfigure.vcxproj index 954c1307..ce7b7da8 100644 --- a/XEngine_Source/XEngine_ModuleConfigure/XEngine_ModuleConfigure.vcxproj +++ b/XEngine_Source/XEngine_ModuleConfigure/XEngine_ModuleConfigure.vcxproj @@ -1,10 +1,18 @@ + + Debug + ARM64 + Debug Win32 + + Release + ARM64 + Release Win32 @@ -45,6 +53,12 @@ v143 Unicode + + DynamicLibrary + true + v143 + Unicode + DynamicLibrary false @@ -52,6 +66,13 @@ true Unicode + + DynamicLibrary + false + v143 + true + Unicode + @@ -66,9 +87,15 @@ + + + + + + true @@ -84,11 +111,20 @@ true $(XEngine_Include);../XEngine_Depend/XEngine_Module/jsoncpp;$(IncludePath) + + true + $(XEngine_Include);../XEngine_Depend/XEngine_Module/jsoncpp;$(IncludePath) + false $(XEngine_Include);../XEngine_Depend/XEngine_Module/jsoncpp;$(IncludePath) $(XEngine_Lib64);$(LibraryPath) + + false + $(XEngine_Include);../XEngine_Depend/XEngine_Module/jsoncpp;$(IncludePath) + $(XEngine_LibArm64);$(LibraryPath) + Level3 @@ -146,6 +182,23 @@ XEngine_ModuleConfigure.def + + + Level3 + true + _DEBUG;XENGINEMODULECONFIGURE_EXPORTS;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + true + Use + pch.h + 4819 + + + Windows + true + false + XEngine_ModuleConfigure.def + + Level3 @@ -169,6 +222,29 @@ XEngine_ModuleConfigure.def + + + Level3 + true + true + true + NDEBUG;XENGINEMODULECONFIGURE_EXPORTS;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + true + Use + pch.h + MultiThreaded + 4819 + /utf-8 %(AdditionalOptions) + + + Windows + true + true + true + false + XEngine_ModuleConfigure.def + + @@ -182,8 +258,10 @@ Create Create + Create Create Create + Create diff --git a/XEngine_Source/XEngine_ModuleConfigure/pch.cpp b/XEngine_Source/XEngine_ModuleConfigure/pch.cpp index 01f52d85..d903b3c7 100644 --- a/XEngine_Source/XEngine_ModuleConfigure/pch.cpp +++ b/XEngine_Source/XEngine_ModuleConfigure/pch.cpp @@ -37,10 +37,6 @@ extern "C" bool ModuleConfigure_Json_VersionFile(LPCXSTR lpszConfigFile, XENGINE { return m_ConfigJson.ModuleConfigure_Json_VersionFile(lpszConfigFile, pSt_ServerConfig); } -extern "C" bool ModuleConfigure_Json_QRCodeFile(LPCXSTR lpszConfigFile, XENGINE_QRCODECONFIG * pSt_QRCodeConfig) -{ - return m_ConfigJson.ModuleConfigure_Json_QRCodeFile(lpszConfigFile, pSt_QRCodeConfig); -} extern "C" bool ModuleConfigure_Json_PluginFile(LPCXSTR lpszConfigFile, XENGINE_PLUGINCONFIG * pSt_PluginConfig) { return m_ConfigJson.ModuleConfigure_Json_PluginFile(lpszConfigFile, pSt_PluginConfig); diff --git a/XEngine_Source/XEngine_ModuleConfigure/pch.h b/XEngine_Source/XEngine_ModuleConfigure/pch.h index 82a39fd9..afe2d808 100644 --- a/XEngine_Source/XEngine_ModuleConfigure/pch.h +++ b/XEngine_Source/XEngine_ModuleConfigure/pch.h @@ -41,15 +41,19 @@ extern XLONG Config_dwErrorCode; #ifdef _MSC_BUILD #ifdef _DEBUG -#ifdef _WIN64 +#ifdef _M_X64 #pragma comment(lib,"../x64/Debug/jsoncpp") -#else +#elif _M_ARM64 +#pragma comment(lib,"../ARM64/Debug/jsoncpp") +#elif _M_IX86 #pragma comment(lib,"../Debug/jsoncpp") #endif #else -#ifdef _WIN64 +#ifdef _M_X64 #pragma comment(lib,"../x64/Release/jsoncpp") -#else +#elif _M_ARM64 +#pragma comment(lib,"../ARM64/Release/jsoncpp") +#elif _M_IX86 #pragma comment(lib,"../Release/jsoncpp") #endif #endif diff --git a/XEngine_Source/XEngine_ModuleDatabase/XEngine_ModuleDatabase.vcxproj b/XEngine_Source/XEngine_ModuleDatabase/XEngine_ModuleDatabase.vcxproj index a9826f24..95f08843 100644 --- a/XEngine_Source/XEngine_ModuleDatabase/XEngine_ModuleDatabase.vcxproj +++ b/XEngine_Source/XEngine_ModuleDatabase/XEngine_ModuleDatabase.vcxproj @@ -1,10 +1,18 @@ + + Debug + ARM64 + Debug Win32 + + Release + ARM64 + Release Win32 @@ -45,6 +53,12 @@ v143 Unicode + + DynamicLibrary + true + v143 + Unicode + DynamicLibrary false @@ -52,6 +66,13 @@ true Unicode + + DynamicLibrary + false + v143 + true + Unicode + @@ -66,9 +87,15 @@ + + + + + + true @@ -85,11 +112,21 @@ $(XEngine_Include);..\XEngine_ModuleDatabase;$(IncludePath) $(XEngine_Lib64);$(LibraryPath) + + true + $(XEngine_Include);..\XEngine_ModuleDatabase;$(IncludePath) + $(XEngine_LibArm64);$(LibraryPath) + false $(XEngine_Include);$(IncludePath) $(XEngine_Lib64);$(LibraryPath) + + false + $(XEngine_Include);$(IncludePath) + $(XEngine_LibArm64);$(LibraryPath) + Level3 @@ -143,6 +180,22 @@ XEngine_ModuleDatabase.def + + + Level3 + true + _DEBUG;XENGINEMODULEDATABASE_EXPORTS;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + true + Use + pch.h + + + Windows + true + false + XEngine_ModuleDatabase.def + + Level3 @@ -164,6 +217,27 @@ XEngine_ModuleDatabase.def + + + Level3 + true + true + true + NDEBUG;XENGINEMODULEDATABASE_EXPORTS;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + true + Use + pch.h + /utf-8 %(AdditionalOptions) + + + Windows + true + true + true + false + XEngine_ModuleDatabase.def + + @@ -191,8 +265,10 @@ Create Create + Create Create Create + Create diff --git a/XEngine_Source/XEngine_ModuleHelp/XEngine_ModuleHelp.vcxproj b/XEngine_Source/XEngine_ModuleHelp/XEngine_ModuleHelp.vcxproj index 697c52b6..6b15a194 100644 --- a/XEngine_Source/XEngine_ModuleHelp/XEngine_ModuleHelp.vcxproj +++ b/XEngine_Source/XEngine_ModuleHelp/XEngine_ModuleHelp.vcxproj @@ -1,10 +1,18 @@ + + Debug + ARM64 + Debug Win32 + + Release + ARM64 + Release Win32 @@ -45,6 +53,12 @@ v143 Unicode + + DynamicLibrary + true + v143 + Unicode + DynamicLibrary false @@ -52,6 +66,13 @@ true Unicode + + DynamicLibrary + false + v143 + true + Unicode + @@ -66,9 +87,15 @@ + + + + + + true @@ -85,14 +112,27 @@ $(XEngine_Include);..\XEngine_ModuleHelp;$(vcpkgroot)\installed\x64-windows\include\opencv4;$(IncludePath) $(XEngine_Lib64);$(LibraryPath) + + true + $(XEngine_Include);..\XEngine_ModuleHelp;$(vcpkgroot)\installed\x64-windows\include\opencv4;$(IncludePath) + $(XEngine_LibArm64);$(LibraryPath) + false $(XEngine_Include);$(vcpkgroot)\installed\x64-windows\include\opencv4;$(IncludePath) $(XEngine_Lib64);$(LibraryPath) + + false + $(XEngine_Include);$(vcpkgroot)\installed\x64-windows\include\opencv4;$(IncludePath) + $(XEngine_LibArm64);$(LibraryPath) + false + + false + Level3 @@ -146,6 +186,22 @@ XEngine_ModuleHelp.def + + + Level3 + true + _DEBUG;XENGINEMODULEHELP_EXPORTS;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + true + Use + pch.h + + + Windows + true + false + XEngine_ModuleHelp.def + + Level3 @@ -167,6 +223,27 @@ XEngine_ModuleHelp.def + + + Level3 + true + true + true + NDEBUG;XENGINEMODULEHELP_EXPORTS;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + true + Use + pch.h + /utf-8 %(AdditionalOptions) + + + Windows + true + true + true + false + XEngine_ModuleHelp.def + + @@ -194,8 +271,10 @@ Create Create + Create Create Create + Create diff --git a/XEngine_Source/XEngine_ModulePlugin/Makefile b/XEngine_Source/XEngine_ModulePlugin/Makefile index 46a38ccb..8f77d774 100644 --- a/XEngine_Source/XEngine_ModulePlugin/Makefile +++ b/XEngine_Source/XEngine_ModulePlugin/Makefile @@ -37,15 +37,14 @@ ifeq ($(PLATFORM),linux) ifeq (/etc/redhat-release,$(wildcard /etc/redhat-release)) PLATVER = -D __CENTOS__ PLATDIR = XEngine_Linux/Centos + LIB += -llua else PLATVER = -D __UBUNTU__ PLATDIR = XEngine_Linux/Ubuntu + LIB += -llua5.4 endif FILEEXT = so LIBFLAG = -shared - ifeq ($(MACRO_LUA_SUPPORT),1) - LIB += -llua5.4 - endif LIBEX = -lpthread -lrt -ldl LOADBIN = -Wl,-rpath=./,--disable-new-dtags else ifeq ($(PLATFORM),mac) diff --git a/XEngine_Source/XEngine_ModulePlugin/XEngine_ModulePlugin.vcxproj b/XEngine_Source/XEngine_ModulePlugin/XEngine_ModulePlugin.vcxproj index 75efc3fc..25b81ef3 100644 --- a/XEngine_Source/XEngine_ModulePlugin/XEngine_ModulePlugin.vcxproj +++ b/XEngine_Source/XEngine_ModulePlugin/XEngine_ModulePlugin.vcxproj @@ -1,10 +1,18 @@ + + Debug + ARM64 + Debug Win32 + + Release + ARM64 + Release Win32 @@ -45,6 +53,12 @@ v143 Unicode + + DynamicLibrary + true + v143 + Unicode + DynamicLibrary false @@ -52,6 +66,13 @@ true Unicode + + DynamicLibrary + false + v143 + true + Unicode + @@ -66,9 +87,15 @@ + + + + + + true @@ -85,11 +112,21 @@ $(XEngine_Include);../../XEngine_ThirdPart/jsoncpp;..\XEngine_ModulePlugin;$(IncludePath) $(XEngine_Lib64);$(LibraryPath) + + true + $(XEngine_Include);../../XEngine_ThirdPart/jsoncpp;..\XEngine_ModulePlugin;$(IncludePath) + $(XEngine_LibArm64);$(LibraryPath) + false $(XEngine_Include);../../XEngine_ThirdPart/jsoncpp;$(IncludePath) $(XEngine_Lib64);$(LibraryPath) + + false + $(XEngine_Include);../../XEngine_ThirdPart/jsoncpp;$(IncludePath) + $(XEngine_LibArm64);$(LibraryPath) + Level3 @@ -143,6 +180,22 @@ XEngine_ModulePlugin.def + + + Level3 + true + _DEBUG;XENGINEMODULEPLUGIN_EXPORTS;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + true + Use + pch.h + + + Windows + true + false + XEngine_ModulePlugin.def + + Level3 @@ -164,6 +217,27 @@ XEngine_ModulePlugin.def + + + Level3 + true + true + true + NDEBUG;XENGINEMODULEPLUGIN_EXPORTS;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + true + Use + pch.h + /utf-8 %(AdditionalOptions) + + + Windows + true + true + true + false + XEngine_ModulePlugin.def + + @@ -181,8 +255,10 @@ Create Create + Create Create Create + Create diff --git a/XEngine_Source/XEngine_ModuleProtocol/ModuleProtocol_Packet/ModuleProtocol_Packet.cpp b/XEngine_Source/XEngine_ModuleProtocol/ModuleProtocol_Packet/ModuleProtocol_Packet.cpp index 09488a0e..5a5e74fb 100644 --- a/XEngine_Source/XEngine_ModuleProtocol/ModuleProtocol_Packet/ModuleProtocol_Packet.cpp +++ b/XEngine_Source/XEngine_ModuleProtocol/ModuleProtocol_Packet/ModuleProtocol_Packet.cpp @@ -1752,11 +1752,14 @@ bool CModuleProtocol_Packet::ModuleProtocol_Packet_IPAddr(XCHAR* ptszMSGBuffer, Json::StreamWriterBuilder st_JsonBuilder; st_JsonObject["tszIPAddr"] = pSt_IPAddrInfo->tszIPAddr; - st_JsonObject["tszIPCity"] = pSt_IPAddrInfo->tszIPCity; + st_JsonObject["tszIPContinent"] = pSt_IPAddrInfo->tszIPContinent; st_JsonObject["tszIPCountry"] = pSt_IPAddrInfo->tszIPCountry; - st_JsonObject["tszIPCounty"] = pSt_IPAddrInfo->tszIPCounty; - st_JsonObject["tszIPISP"] = pSt_IPAddrInfo->tszIPISP; st_JsonObject["tszIPProvince"] = pSt_IPAddrInfo->tszIPProvince; + st_JsonObject["tszIPCity"] = pSt_IPAddrInfo->tszIPCity; + st_JsonObject["tszIPISP"] = pSt_IPAddrInfo->tszIPISP; + st_JsonObject["tszTimezone"] = pSt_IPAddrInfo->tszTimezone; + st_JsonObject["dlLatitude"] = pSt_IPAddrInfo->dlLatitude; + st_JsonObject["dlLongitude"] = pSt_IPAddrInfo->dlLongitude; st_JsonRoot["code"] = 0; st_JsonRoot["msg"] = "success"; diff --git a/XEngine_Source/XEngine_ModuleProtocol/XEngine_ModuleProtocol.vcxproj b/XEngine_Source/XEngine_ModuleProtocol/XEngine_ModuleProtocol.vcxproj index 240b8759..99c61f33 100644 --- a/XEngine_Source/XEngine_ModuleProtocol/XEngine_ModuleProtocol.vcxproj +++ b/XEngine_Source/XEngine_ModuleProtocol/XEngine_ModuleProtocol.vcxproj @@ -1,10 +1,18 @@ + + Debug + ARM64 + Debug Win32 + + Release + ARM64 + Release Win32 @@ -45,6 +53,12 @@ v143 Unicode + + DynamicLibrary + true + v143 + Unicode + DynamicLibrary false @@ -52,6 +66,13 @@ true Unicode + + DynamicLibrary + false + v143 + true + Unicode + @@ -66,9 +87,15 @@ + + + + + + true @@ -85,11 +112,21 @@ $(XEngine_Include);../XEngine_Depend/XEngine_Module/jsoncpp;$(IncludePath) $(XEngine_Lib64);$(LibraryPath) + + true + $(XEngine_Include);../XEngine_Depend/XEngine_Module/jsoncpp;$(IncludePath) + $(XEngine_LibArm64);$(LibraryPath) + false $(XEngine_Include);../XEngine_Depend/XEngine_Module/jsoncpp;$(IncludePath) $(XEngine_Lib64);$(LibraryPath) + + false + $(XEngine_Include);../XEngine_Depend/XEngine_Module/jsoncpp;$(IncludePath) + $(XEngine_LibArm64);$(LibraryPath) + Level3 @@ -143,6 +180,22 @@ XEngine_ModuleProtocol.def + + + Level3 + true + _DEBUG;XENGINEMODULEPROTOCOL_EXPORTS;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + true + Use + pch.h + + + Windows + true + false + XEngine_ModuleProtocol.def + + Level3 @@ -164,6 +217,27 @@ XEngine_ModuleProtocol.def + + + Level3 + true + true + true + NDEBUG;XENGINEMODULEPROTOCOL_EXPORTS;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + true + Use + pch.h + /utf-8 %(AdditionalOptions) + + + Windows + true + true + true + false + XEngine_ModuleProtocol.def + + @@ -179,8 +253,10 @@ Create Create + Create Create Create + Create diff --git a/XEngine_Source/XEngine_ModuleProtocol/pch.h b/XEngine_Source/XEngine_ModuleProtocol/pch.h index 9766353a..3f30b460 100644 --- a/XEngine_Source/XEngine_ModuleProtocol/pch.h +++ b/XEngine_Source/XEngine_ModuleProtocol/pch.h @@ -57,21 +57,26 @@ using namespace std; extern bool ModuleProtocol_IsErrorOccur; extern XLONG ModuleProtocol_dwErrorCode; + #ifdef _MSC_BUILD #pragma comment(lib,"XEngine_BaseLib/XEngine_BaseLib") #pragma comment(lib,"XEngine_NetHelp/NetHelp_XSocket") #pragma comment(lib,"XEngine_NetHelp/NetHelp_APIAddr") #pragma comment(lib,"XEngine_SystemSdk/XEngine_SystemApi") #ifdef _DEBUG -#ifdef _WIN64 +#ifdef _M_X64 #pragma comment(lib,"../x64/Debug/jsoncpp") -#else +#elif _M_ARM64 +#pragma comment(lib,"../ARM64/Debug/jsoncpp") +#elif _M_IX86 #pragma comment(lib,"../Debug/jsoncpp") #endif #else -#ifdef _WIN64 +#ifdef _M_X64 #pragma comment(lib,"../x64/Release/jsoncpp") -#else +#elif _M_ARM64 +#pragma comment(lib,"../ARM64/Release/jsoncpp") +#elif _M_IX86 #pragma comment(lib,"../Release/jsoncpp") #endif #endif diff --git a/XEngine_Source/XEngine_ModuleSystem/XEngine_ModuleSystem.vcxproj b/XEngine_Source/XEngine_ModuleSystem/XEngine_ModuleSystem.vcxproj index fd83cc3c..65243ef9 100644 --- a/XEngine_Source/XEngine_ModuleSystem/XEngine_ModuleSystem.vcxproj +++ b/XEngine_Source/XEngine_ModuleSystem/XEngine_ModuleSystem.vcxproj @@ -1,10 +1,18 @@ + + Debug + ARM64 + Debug Win32 + + Release + ARM64 + Release Win32 @@ -45,6 +53,12 @@ v143 Unicode + + DynamicLibrary + true + v143 + Unicode + DynamicLibrary false @@ -52,6 +66,13 @@ true Unicode + + DynamicLibrary + false + v143 + true + Unicode + @@ -66,9 +87,15 @@ + + + + + + $(XEngine_Include);$(IncludePath) @@ -82,10 +109,18 @@ $(XEngine_Include);$(IncludePath) $(XEngine_Lib64);$(LibraryPath) + + $(XEngine_Include);$(IncludePath) + $(XEngine_LibArm64);$(LibraryPath) + $(XEngine_Include);$(IncludePath) $(XEngine_Lib64);$(LibraryPath) + + $(XEngine_Include);$(IncludePath) + $(XEngine_LibArm64);$(LibraryPath) + Level3 @@ -139,6 +174,22 @@ XEngine_ModuleSystem.def + + + Level3 + true + _DEBUG;XENGINEMODULESYSTEM_EXPORTS;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + true + Use + pch.h + + + Windows + true + false + XEngine_ModuleSystem.def + + Level3 @@ -160,6 +211,27 @@ XEngine_ModuleSystem.def + + + Level3 + true + true + true + NDEBUG;XENGINEMODULESYSTEM_EXPORTS;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + true + Use + pch.h + /utf-8 %(AdditionalOptions) + + + Windows + true + true + true + false + XEngine_ModuleSystem.def + + @@ -173,8 +245,10 @@ Create Create + Create Create Create + Create diff --git a/XEngine_Source/XEngine_PluginModule/ModulePlugin_BMIndex/ModulePlugin_BMIndex.vcxproj b/XEngine_Source/XEngine_PluginModule/ModulePlugin_BMIndex/ModulePlugin_BMIndex.vcxproj index 8ea8729a..f1168ceb 100644 --- a/XEngine_Source/XEngine_PluginModule/ModulePlugin_BMIndex/ModulePlugin_BMIndex.vcxproj +++ b/XEngine_Source/XEngine_PluginModule/ModulePlugin_BMIndex/ModulePlugin_BMIndex.vcxproj @@ -1,10 +1,18 @@ + + Debug + ARM64 + Debug Win32 + + Release + ARM64 + Release Win32 @@ -46,6 +54,12 @@ v143 Unicode + + DynamicLibrary + true + v143 + Unicode + DynamicLibrary false @@ -53,6 +67,13 @@ true Unicode + + DynamicLibrary + false + v143 + true + Unicode + @@ -67,9 +88,15 @@ + + + + + + $(SolutionDir)$(Configuration)\XEngine_LibPlugin\ @@ -90,12 +117,24 @@ $(SolutionDir)$(Platform)\$(Configuration)\XEngine_LibPlugin\ $(Platform)\$(Configuration)\XEngine_LibPlugin\ + + $(XEngine_Include);../../XEngine_Depend/XEngine_Module/jsoncpp;$(IncludePath) + $(XEngine_LibArm64);$(LibraryPath) + $(SolutionDir)$(Platform)\$(Configuration)\XEngine_LibPlugin\ + $(Platform)\$(Configuration)\XEngine_LibPlugin\ + $(XEngine_Include);../../XEngine_Depend/XEngine_Module/jsoncpp;$(IncludePath) $(XEngine_Lib64);$(LibraryPath) $(SolutionDir)$(Platform)\$(Configuration)\XEngine_LibPlugin\ $(Platform)\$(Configuration)\XEngine_LibPlugin\ + + $(XEngine_Include);../../XEngine_Depend/XEngine_Module/jsoncpp;$(IncludePath) + $(XEngine_LibArm64);$(LibraryPath) + $(SolutionDir)$(Platform)\$(Configuration)\XEngine_LibPlugin\ + $(Platform)\$(Configuration)\XEngine_LibPlugin\ + Level3 @@ -149,6 +188,22 @@ ModulePlugin_BMIndex.def + + + Level3 + true + _DEBUG;MODULEPLUGINBMINDEX_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + true + Use + pch.h + + + Windows + true + false + ModulePlugin_BMIndex.def + + Level3 @@ -170,6 +225,27 @@ ModulePlugin_BMIndex.def + + + Level3 + true + true + true + NDEBUG;MODULEPLUGINBMINDEX_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + true + Use + pch.h + /utf-8 %(AdditionalOptions) + + + Windows + true + true + true + false + ModulePlugin_BMIndex.def + + @@ -182,8 +258,10 @@ Create Create + Create Create Create + Create diff --git a/XEngine_Source/XEngine_PluginModule/ModulePlugin_BMIndex/pch.h b/XEngine_Source/XEngine_PluginModule/ModulePlugin_BMIndex/pch.h index ae71229f..cde822e9 100644 --- a/XEngine_Source/XEngine_PluginModule/ModulePlugin_BMIndex/pch.h +++ b/XEngine_Source/XEngine_PluginModule/ModulePlugin_BMIndex/pch.h @@ -44,15 +44,19 @@ extern XLONG BMIndex_dwErrorCode; #ifdef _MSC_BUILD #pragma comment(lib,"XEngine_BaseLib/XEngine_BaseLib") #ifdef _DEBUG -#ifdef _WIN64 +#ifdef _M_X64 #pragma comment(lib,"../../x64/Debug/jsoncpp") -#else +#elif _M_ARM64 +#pragma comment(lib,"../../ARM64/Debug/jsoncpp") +#elif _M_IX86 #pragma comment(lib,"../../Debug/jsoncpp") #endif #else -#ifdef _WIN64 +#ifdef _M_X64 #pragma comment(lib,"../../x64/Release/jsoncpp") -#else +#elif _M_ARM64 +#pragma comment(lib,"../../ARM64/Release/jsoncpp") +#elif _M_IX86 #pragma comment(lib,"../../Release/jsoncpp") #endif #endif diff --git a/XEngine_Source/XEngine_PluginModule/ModulePlugin_Meter/ModulePlugin_Meter.vcxproj b/XEngine_Source/XEngine_PluginModule/ModulePlugin_Meter/ModulePlugin_Meter.vcxproj index 8d024a24..3ad25621 100644 --- a/XEngine_Source/XEngine_PluginModule/ModulePlugin_Meter/ModulePlugin_Meter.vcxproj +++ b/XEngine_Source/XEngine_PluginModule/ModulePlugin_Meter/ModulePlugin_Meter.vcxproj @@ -1,10 +1,18 @@ + + Debug + ARM64 + Debug Win32 + + Release + ARM64 + Release Win32 @@ -46,6 +54,12 @@ v143 Unicode + + DynamicLibrary + true + v143 + Unicode + DynamicLibrary false @@ -53,6 +67,13 @@ true Unicode + + DynamicLibrary + false + v143 + true + Unicode + @@ -67,9 +88,15 @@ + + + + + + $(SolutionDir)$(Configuration)\XEngine_LibPlugin\ @@ -89,12 +116,24 @@ $(XEngine_Include);../../XEngine_Depend/XEngine_Module/jsoncpp;$(IncludePath) $(XEngine_Lib64);$(LibraryPath) + + $(SolutionDir)$(Platform)\$(Configuration)\XEngine_LibPlugin\ + $(Platform)\$(Configuration)\XEngine_LibPlugin\ + $(XEngine_Include);../../XEngine_Depend/XEngine_Module/jsoncpp;$(IncludePath) + $(XEngine_LibArm64);$(LibraryPath) + $(SolutionDir)$(Platform)\$(Configuration)\XEngine_LibPlugin\ $(Platform)\$(Configuration)\XEngine_LibPlugin\ $(XEngine_Include);../../XEngine_Depend/XEngine_Module/jsoncpp;$(IncludePath) $(XEngine_Lib64);$(LibraryPath) + + $(SolutionDir)$(Platform)\$(Configuration)\XEngine_LibPlugin\ + $(Platform)\$(Configuration)\XEngine_LibPlugin\ + $(XEngine_Include);../../XEngine_Depend/XEngine_Module/jsoncpp;$(IncludePath) + $(XEngine_LibArm64);$(LibraryPath) + Level3 @@ -148,6 +187,22 @@ ModulePlugin_Meter.def + + + Level3 + true + _DEBUG;MODULEPLUGINMETER_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + true + Use + pch.h + + + Windows + true + false + ModulePlugin_Meter.def + + Level3 @@ -169,6 +224,27 @@ ModulePlugin_Meter.def + + + Level3 + true + true + true + NDEBUG;MODULEPLUGINMETER_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + true + Use + pch.h + /utf-8 %(AdditionalOptions) + + + Windows + true + true + true + false + ModulePlugin_Meter.def + + @@ -181,8 +257,10 @@ Create Create + Create Create Create + Create diff --git a/XEngine_Source/XEngine_PluginModule/ModulePlugin_Meter/pch.h b/XEngine_Source/XEngine_PluginModule/ModulePlugin_Meter/pch.h index 1f13d1be..a246de06 100644 --- a/XEngine_Source/XEngine_PluginModule/ModulePlugin_Meter/pch.h +++ b/XEngine_Source/XEngine_PluginModule/ModulePlugin_Meter/pch.h @@ -42,15 +42,19 @@ extern XLONG Meter_dwErrorCode; #ifdef _MSC_BUILD #pragma comment(lib,"XEngine_BaseLib/XEngine_BaseLib") #ifdef _DEBUG -#ifdef _WIN64 +#ifdef _M_X64 #pragma comment(lib,"../../x64/Debug/jsoncpp") -#else +#elif _M_ARM64 +#pragma comment(lib,"../../ARM64/Debug/jsoncpp") +#elif _M_IX86 #pragma comment(lib,"../../Debug/jsoncpp") #endif #else -#ifdef _WIN64 +#ifdef _M_X64 #pragma comment(lib,"../../x64/Release/jsoncpp") -#else +#elif _M_ARM64 +#pragma comment(lib,"../../ARM64/Release/jsoncpp") +#elif _M_IX86 #pragma comment(lib,"../../Release/jsoncpp") #endif #endif diff --git a/XEngine_Source/XEngine_PluginModule/ModulePlugin_Password/ModulePlugin_Password.vcxproj b/XEngine_Source/XEngine_PluginModule/ModulePlugin_Password/ModulePlugin_Password.vcxproj index 75cac6b0..2a318e84 100644 --- a/XEngine_Source/XEngine_PluginModule/ModulePlugin_Password/ModulePlugin_Password.vcxproj +++ b/XEngine_Source/XEngine_PluginModule/ModulePlugin_Password/ModulePlugin_Password.vcxproj @@ -1,10 +1,18 @@ + + Debug + ARM64 + Debug Win32 + + Release + ARM64 + Release Win32 @@ -46,6 +54,12 @@ v143 Unicode + + DynamicLibrary + true + v143 + Unicode + DynamicLibrary false @@ -53,6 +67,13 @@ true Unicode + + DynamicLibrary + false + v143 + true + Unicode + @@ -67,9 +88,15 @@ + + + + + + true @@ -92,6 +119,13 @@ $(SolutionDir)$(Platform)\$(Configuration)\XEngine_LibPlugin\ $(Platform)\$(Configuration)\XEngine_LibPlugin\ + + true + $(XEngine_Include);../../XEngine_Depend/XEngine_Module/jsoncpp;$(IncludePath) + $(XEngine_LibArm64);$(LibraryPath) + $(SolutionDir)$(Platform)\$(Configuration)\XEngine_LibPlugin\ + $(Platform)\$(Configuration)\XEngine_LibPlugin\ + false $(XEngine_Include);../../XEngine_Depend/XEngine_Module/jsoncpp;$(IncludePath) @@ -99,6 +133,13 @@ $(SolutionDir)$(Platform)\$(Configuration)\XEngine_LibPlugin\ $(Platform)\$(Configuration)\XEngine_LibPlugin\ + + false + $(XEngine_Include);../../XEngine_Depend/XEngine_Module/jsoncpp;$(IncludePath) + $(XEngine_LibArm64);$(LibraryPath) + $(SolutionDir)$(Platform)\$(Configuration)\XEngine_LibPlugin\ + $(Platform)\$(Configuration)\XEngine_LibPlugin\ + Level3 @@ -152,6 +193,22 @@ ModulePlugin_Password.def + + + Level3 + true + _DEBUG;MODULEPLUGINPASSWORD_EXPORTS;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + true + Use + pch.h + + + Windows + true + false + ModulePlugin_Password.def + + Level3 @@ -173,6 +230,27 @@ ModulePlugin_Password.def + + + Level3 + true + true + true + NDEBUG;MODULEPLUGINPASSWORD_EXPORTS;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + true + Use + pch.h + /utf-8 %(AdditionalOptions) + + + Windows + true + true + true + false + ModulePlugin_Password.def + + @@ -185,8 +263,10 @@ Create Create + Create Create Create + Create diff --git a/XEngine_Source/XEngine_PluginModule/ModulePlugin_Password/pch.h b/XEngine_Source/XEngine_PluginModule/ModulePlugin_Password/pch.h index b4289352..d1a786e7 100644 --- a/XEngine_Source/XEngine_PluginModule/ModulePlugin_Password/pch.h +++ b/XEngine_Source/XEngine_PluginModule/ModulePlugin_Password/pch.h @@ -40,15 +40,19 @@ extern XLONG Pass_dwErrorCode; #ifdef _MSC_BUILD #pragma comment(lib,"XEngine_BaseLib/XEngine_BaseLib") #ifdef _DEBUG -#ifdef _WIN64 +#ifdef _M_X64 #pragma comment(lib,"../../x64/Debug/jsoncpp") -#else +#elif _M_ARM64 +#pragma comment(lib,"../../ARM64/Debug/jsoncpp") +#elif _M_IX86 #pragma comment(lib,"../../Debug/jsoncpp") #endif #else -#ifdef _WIN64 +#ifdef _M_X64 #pragma comment(lib,"../../x64/Release/jsoncpp") -#else +#elif _M_ARM64 +#pragma comment(lib,"../../ARM64/Release/jsoncpp") +#elif _M_IX86 #pragma comment(lib,"../../Release/jsoncpp") #endif #endif diff --git a/XEngine_Source/XEngine_PluginModule/ModulePlugin_Timezone/ModulePlugin_Timezone.vcxproj b/XEngine_Source/XEngine_PluginModule/ModulePlugin_Timezone/ModulePlugin_Timezone.vcxproj index c00967f4..d0024020 100644 --- a/XEngine_Source/XEngine_PluginModule/ModulePlugin_Timezone/ModulePlugin_Timezone.vcxproj +++ b/XEngine_Source/XEngine_PluginModule/ModulePlugin_Timezone/ModulePlugin_Timezone.vcxproj @@ -1,10 +1,18 @@ + + Debug + ARM64 + Debug Win32 + + Release + ARM64 + Release Win32 @@ -46,6 +54,12 @@ v143 Unicode + + DynamicLibrary + true + v143 + Unicode + DynamicLibrary false @@ -53,6 +67,13 @@ true Unicode + + DynamicLibrary + false + v143 + true + Unicode + @@ -67,9 +88,15 @@ + + + + + + $(XEngine_Include);../../XEngine_Depend/XEngine_Module/jsoncpp;$(IncludePath) @@ -89,12 +116,24 @@ $(SolutionDir)$(Platform)\$(Configuration)\XEngine_LibPlugin\ $(Platform)\$(Configuration)\XEngine_LibPlugin\ + + $(XEngine_Include);../../XEngine_Depend/XEngine_Module/jsoncpp;$(IncludePath) + $(XEngine_LibArm64);$(LibraryPath) + $(SolutionDir)$(Platform)\$(Configuration)\XEngine_LibPlugin\ + $(Platform)\$(Configuration)\XEngine_LibPlugin\ + $(XEngine_Include);../../XEngine_Depend/XEngine_Module/jsoncpp;$(IncludePath) $(XEngine_Lib64);$(LibraryPath) $(SolutionDir)$(Platform)\$(Configuration)\XEngine_LibPlugin\ $(Platform)\$(Configuration)\XEngine_LibPlugin\ + + $(XEngine_Include);../../XEngine_Depend/XEngine_Module/jsoncpp;$(IncludePath) + $(XEngine_LibArm64);$(LibraryPath) + $(SolutionDir)$(Platform)\$(Configuration)\XEngine_LibPlugin\ + $(Platform)\$(Configuration)\XEngine_LibPlugin\ + Level3 @@ -148,6 +187,22 @@ ModulePlugin_Timezone.def + + + Level3 + true + _DEBUG;MODULEPLUGINTIMEZONE_EXPORTS;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + true + Use + pch.h + + + Windows + true + false + ModulePlugin_Timezone.def + + Level3 @@ -169,6 +224,27 @@ ModulePlugin_Timezone.def + + + Level3 + true + true + true + NDEBUG;MODULEPLUGINTIMEZONE_EXPORTS;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + true + Use + pch.h + /utf-8 %(AdditionalOptions) + + + Windows + true + true + true + false + ModulePlugin_Timezone.def + + @@ -181,8 +257,10 @@ Create Create + Create Create Create + Create diff --git a/XEngine_Source/XEngine_PluginModule/ModulePlugin_Timezone/pch.h b/XEngine_Source/XEngine_PluginModule/ModulePlugin_Timezone/pch.h index 5e01bd3f..03bbb200 100644 --- a/XEngine_Source/XEngine_PluginModule/ModulePlugin_Timezone/pch.h +++ b/XEngine_Source/XEngine_PluginModule/ModulePlugin_Timezone/pch.h @@ -44,15 +44,19 @@ extern XLONG Timezone_dwErrorCode; #ifdef _MSC_BUILD #pragma comment(lib,"XEngine_BaseLib/XEngine_BaseLib") #ifdef _DEBUG -#ifdef _WIN64 +#ifdef _M_X64 #pragma comment(lib,"../../x64/Debug/jsoncpp") -#else +#elif _M_ARM64 +#pragma comment(lib,"../../ARM64/Debug/jsoncpp") +#elif _M_IX86 #pragma comment(lib,"../../Debug/jsoncpp") #endif #else -#ifdef _WIN64 +#ifdef _M_X64 #pragma comment(lib,"../../x64/Release/jsoncpp") -#else +#elif _M_ARM64 +#pragma comment(lib,"../../ARM64/Release/jsoncpp") +#elif _M_IX86 #pragma comment(lib,"../../Release/jsoncpp") #endif #endif diff --git a/XEngine_Source/XEngine_PluginModule/ModulePlugin_Zodiac/ModulePlugin_Zodiac.vcxproj b/XEngine_Source/XEngine_PluginModule/ModulePlugin_Zodiac/ModulePlugin_Zodiac.vcxproj index 72bb4491..4f0ffcf6 100644 --- a/XEngine_Source/XEngine_PluginModule/ModulePlugin_Zodiac/ModulePlugin_Zodiac.vcxproj +++ b/XEngine_Source/XEngine_PluginModule/ModulePlugin_Zodiac/ModulePlugin_Zodiac.vcxproj @@ -1,10 +1,18 @@ + + Debug + ARM64 + Debug Win32 + + Release + ARM64 + Release Win32 @@ -46,6 +54,12 @@ v143 Unicode + + DynamicLibrary + true + v143 + Unicode + DynamicLibrary false @@ -53,6 +67,13 @@ true Unicode + + DynamicLibrary + false + v143 + true + Unicode + @@ -67,9 +88,15 @@ + + + + + + true @@ -92,6 +119,13 @@ $(SolutionDir)$(Platform)\$(Configuration)\XEngine_LibPlugin\ $(Platform)\$(Configuration)\XEngine_LibPlugin\ + + true + $(XEngine_Include);../../XEngine_Depend/XEngine_Module/jsoncpp;$(IncludePath) + $(XEngine_LibArm64);$(LibraryPath) + $(SolutionDir)$(Platform)\$(Configuration)\XEngine_LibPlugin\ + $(Platform)\$(Configuration)\XEngine_LibPlugin\ + false $(XEngine_Include);../../XEngine_Depend/XEngine_Module/jsoncpp;$(IncludePath) @@ -99,6 +133,13 @@ $(SolutionDir)$(Platform)\$(Configuration)\XEngine_LibPlugin\ $(Platform)\$(Configuration)\XEngine_LibPlugin\ + + false + $(XEngine_Include);../../XEngine_Depend/XEngine_Module/jsoncpp;$(IncludePath) + $(XEngine_LibArm64);$(LibraryPath) + $(SolutionDir)$(Platform)\$(Configuration)\XEngine_LibPlugin\ + $(Platform)\$(Configuration)\XEngine_LibPlugin\ + Level3 @@ -152,6 +193,22 @@ ModulePlugin_Zodiac.def + + + Level3 + true + _DEBUG;MODULEPLUGINZODIAC_EXPORTS;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + true + Use + pch.h + + + Windows + true + false + ModulePlugin_Zodiac.def + + Level3 @@ -173,6 +230,27 @@ ModulePlugin_Zodiac.def + + + Level3 + true + true + true + NDEBUG;MODULEPLUGINZODIAC_EXPORTS;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + true + Use + pch.h + /utf-8 %(AdditionalOptions) + + + Windows + true + true + true + false + ModulePlugin_Zodiac.def + + @@ -185,8 +263,10 @@ Create Create + Create Create Create + Create diff --git a/XEngine_Source/XEngine_PluginModule/ModulePlugin_Zodiac/pch.h b/XEngine_Source/XEngine_PluginModule/ModulePlugin_Zodiac/pch.h index 30b983f4..cd3943aa 100644 --- a/XEngine_Source/XEngine_PluginModule/ModulePlugin_Zodiac/pch.h +++ b/XEngine_Source/XEngine_PluginModule/ModulePlugin_Zodiac/pch.h @@ -38,20 +38,23 @@ using namespace std; extern bool Zodiac_IsErrorOccur; extern XLONG Zodiac_dwErrorCode; - #ifdef _MSC_BUILD #pragma comment(lib,"XEngine_BaseLib/XEngine_BaseLib") #pragma comment(lib,"XEngine_BaseLib/XEngine_Algorithm") #ifdef _DEBUG -#ifdef _WIN64 +#ifdef _M_X64 #pragma comment(lib,"../../x64/Debug/jsoncpp") -#else +#elif _M_ARM64 +#pragma comment(lib,"../../ARM64/Debug/jsoncpp") +#elif _M_IX86 #pragma comment(lib,"../../Debug/jsoncpp") #endif #else -#ifdef _WIN64 +#ifdef _M_X64 #pragma comment(lib,"../../x64/Release/jsoncpp") -#else +#elif _M_ARM64 +#pragma comment(lib,"../../ARM64/Release/jsoncpp") +#elif _M_IX86 #pragma comment(lib,"../../Release/jsoncpp") #endif #endif diff --git a/XEngine_Source/XEngine_ServiceApp/XEngine_APIServiceApp/XEngine_APIServiceApp.cpp b/XEngine_Source/XEngine_ServiceApp/XEngine_APIServiceApp/XEngine_APIServiceApp.cpp new file mode 100644 index 00000000..8db5645a --- /dev/null +++ b/XEngine_Source/XEngine_ServiceApp/XEngine_APIServiceApp/XEngine_APIServiceApp.cpp @@ -0,0 +1,297 @@ +#include "XEngine_CommHdr.h" +/******************************************************************** +// Created: 2025/04/10 13:57:58 +// File Name: D:\XEngine_APIService\XEngine_Source\XEngine_ServiceApp\XEngine_APIServiceApp\XEngine_APIServiceApp.cpp +// File Path: D:\XEngine_APIService\XEngine_Source\XEngine_ServiceApp\XEngine_APIServiceApp +// File Base: XEngine_APIServiceApp +// File Ext: cpp +// Project: XEngine +// Author: qyt +// Purpose: 服务代码 +// History: +*********************************************************************/ +bool bIsRun = false; +bool bConsole = false; +XHANDLE xhLog = NULL; +XLONG dwProcessID = 0; +XENGINE_SERVICECONFIG st_ServiceConfig = {}; +// 服务名称,使用 constexpr 替代宏定义 +constexpr LPCTSTR XENGINE_SERVICE_NAME = _T("XEngine_APIService"); +constexpr LPCTSTR XENGINE_SERVICE_SHOW = _T("XEngine APIService 管理服务"); +constexpr LPCTSTR XENGINE_SERVICE_DESCRIPTION = _T("XEngine APIService 数据查询与系统管理接口服务程序"); +// 全局变量 +SERVICE_STATUS st_ServiceStatus = { 0 }; +SERVICE_STATUS_HANDLE hServiceStatusHandle = NULL; +// 函数声明 +void WINAPI XEngine_ServiceCtrlHandler(DWORD dwControl); +void WINAPI XEngine_ServiceMain(DWORD dwArgc, LPTSTR* lpszArgv); +void XEngine_InstallService(); +void XEngine_UninstallService(); + +bool XEngine_InitLog() +{ + if (NULL != xhLog) + { + return true; + } + //初始化参数 + if (!XEngine_Configure_Parament()) + { + return false; + } + //初始日志 + HELPCOMPONENTS_XLOG_CONFIGURE st_XLogConfig = {}; + st_XLogConfig.XLog_MaxBackupFile = st_ServiceConfig.st_XLog.nMaxCount; + st_XLogConfig.XLog_MaxSize = st_ServiceConfig.st_XLog.nMaxSize; + _xstrcpy(st_XLogConfig.tszFileName, st_ServiceConfig.st_XLog.tszServiceFile, sizeof(st_XLogConfig.tszFileName)); + xhLog = HelpComponents_XLog_Init(st_ServiceConfig.st_XLog.nLogLeave, &st_XLogConfig); + if (NULL == xhLog) + { + printf("启动服务中,启动日志失败,错误:%lX", XLog_GetLastError()); + return false; + } + //设置日志打印级别 + HelpComponents_XLog_SetLogPriority(xhLog, st_ServiceConfig.st_XLog.nLogType); + XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("启动服务中,初始化日志系统成功")); + return true; +} +// 主函数 +int _tmain(int argc, TCHAR* argv[]) +{ +#ifndef _DEBUG + if (setlocale(LC_ALL, ".UTF8") == NULL) + { + printf("Error setting locale.\n"); + return -1; + } +#endif + XEngine_InitLog(); + if (argc > 1) + { + if (0 == _tcsicmp(argv[1], L"-install")) + { + XEngine_InstallService(); + return 0; + } + else if (0 == _tcsicmp(argv[1], L"-uninstall")) + { + XEngine_UninstallService(); + return 0; + } + else if (0 == _tcsicmp(argv[1], L"-console")) + { + bConsole = true; + } + } + + if (bConsole) + { + XEngine_ServiceMain(0, NULL); + } + else + { + SERVICE_TABLE_ENTRY ServiceTable[] = + { + { const_cast(XENGINE_SERVICE_NAME), (LPSERVICE_MAIN_FUNCTION)XEngine_ServiceMain }, + { NULL, NULL } + }; + if (!StartServiceCtrlDispatcher(ServiceTable)) + { + XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_ERROR, _X("启动服务中,启动服务控制程序失败,错误:%d"), GetLastError()); + return -2; + } + } + return 0; +} + +// 服务主函数 +void WINAPI XEngine_ServiceMain(DWORD dwArgc, LPTSTR* lpszArgv) +{ + XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("启动服务中,开始处理服务程序")); + if (!bConsole) + { + // 初始化服务状态 + st_ServiceStatus.dwServiceType = SERVICE_WIN32_OWN_PROCESS; + st_ServiceStatus.dwCurrentState = SERVICE_START_PENDING; + st_ServiceStatus.dwControlsAccepted = SERVICE_ACCEPT_STOP | SERVICE_ACCEPT_SHUTDOWN; + st_ServiceStatus.dwWin32ExitCode = 0; + st_ServiceStatus.dwServiceSpecificExitCode = 0; + st_ServiceStatus.dwCheckPoint = 0; + st_ServiceStatus.dwWaitHint = 1000; + // 注册服务控制处理程序 + hServiceStatusHandle = RegisterServiceCtrlHandlerW(XENGINE_SERVICE_NAME, XEngine_ServiceCtrlHandler); + if (NULL == hServiceStatusHandle) + { + XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_ERROR, _X("启动服务中,注册服务控制程序失败,错误:%d"), GetLastError()); + return; + } + XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("启动服务中,注册服务控制程序成功")); + // 服务启动完成 + if (!SetServiceStatus(hServiceStatusHandle, &st_ServiceStatus)) + { + XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_ERROR, _X("启动服务中,启动服务设置状态失败,错误:%d"), GetLastError()); + return; + } + XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("启动服务中,设置服务程序状态成功")); + // 服务启动完成 + st_ServiceStatus.dwCheckPoint = 0; + st_ServiceStatus.dwWaitHint = 0; + st_ServiceStatus.dwCurrentState = SERVICE_RUNNING; + st_ServiceStatus.dwControlsAccepted = SERVICE_ACCEPT_STOP | SERVICE_ACCEPT_SHUTDOWN; + if (!SetServiceStatus(hServiceStatusHandle, &st_ServiceStatus)) + { + XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_ERROR, _X("启动服务中,启动服务启动状态失败,错误:%d"), GetLastError()); + return; + } + } + XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("启动服务中,设置服务启动状态成功,服务运行中")); + bIsRun = true; + + XCHAR tszCurrectDir[MAX_PATH] = {}; + XCHAR tszPathBuffer[MAX_PATH] = {}; + GetModuleFileNameA(NULL, tszCurrectDir, MAX_PATH); + BaseLib_String_GetFileAndPathA(tszCurrectDir, tszPathBuffer); + _xstrcat(tszPathBuffer, MAX_PATH, _X("XEngine_HttpApp.exe")); + + if (!SystemApi_Process_CreateProcess(&dwProcessID, tszPathBuffer, "-db 0", false)) + { + XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_ERROR, _X("启动服务中,启动进程失败,错误:%lX"), SystemApi_GetLastError()); + dwProcessID = 999999; //重置 + } + while (bIsRun) + { + SYSTEMAPI_PROCESS_INFOMATION st_ProcessInfo = {}; + if (!SystemApi_Process_GetProcessInfo(&st_ProcessInfo, NULL, dwProcessID)) + { + if (!SystemApi_Process_CreateProcess(&dwProcessID, tszPathBuffer, "-db 0", false)) + { + XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_ERROR, _X("启动服务中,启动进程失败,错误:%lX"), SystemApi_GetLastError()); + return; + } + } + Sleep(5000); + } +} +// 服务控制处理函数 +void WINAPI XEngine_ServiceCtrlHandler(DWORD dwControl) +{ + switch (dwControl) + { + case SERVICE_CONTROL_PAUSE: + break; + case SERVICE_CONTROL_CONTINUE: + st_ServiceStatus.dwCurrentState = SERVICE_RUNNING; + SetServiceStatus(hServiceStatusHandle, &st_ServiceStatus); + XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("服务运行中,收到命令,继续执行")); + break; + case SERVICE_CONTROL_STOP: + bIsRun = false; + SystemApi_Process_Stop(NULL, dwProcessID); + st_ServiceStatus.dwCurrentState = SERVICE_STOPPED; + SetServiceStatus(hServiceStatusHandle, &st_ServiceStatus); + XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("服务运行中,收到命令,停止运行")); + break; + case SERVICE_CONTROL_SHUTDOWN: + bIsRun = false; + SystemApi_Process_Stop(NULL, dwProcessID); + st_ServiceStatus.dwCurrentState = SERVICE_STOPPED; + SetServiceStatus(hServiceStatusHandle, &st_ServiceStatus); + XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("服务运行中,收到命令,关闭程序")); + break; + default: + XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("服务运行中,收到无法处理的命令:%d"), dwControl); + break; + } +} +// 安装服务 +void XEngine_InstallService() +{ + TCHAR tszFilePath[MAX_PATH] = {}; + if (!GetModuleFileName(NULL, tszFilePath, MAX_PATH)) + { + XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_ERROR, _X("启动服务中,安装服务失败,获取文件路径失败,错误码:%d"), GetLastError()); + return; + } + XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("服务运行中,安装服务中,获取本地路径成功:%s"), tszFilePath); + + SC_HANDLE hSCManager = OpenSCManager(NULL, NULL, SC_MANAGER_CREATE_SERVICE); + if (NULL == hSCManager) + { + XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_ERROR, _X("启动服务中,安装服务失败,打开权限错误,错误码:%d"), GetLastError()); + return; + } + XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("服务运行中,安装服务中,打开服务成功")); + + SC_HANDLE hService = CreateService(hSCManager, XENGINE_SERVICE_NAME, XENGINE_SERVICE_SHOW, SERVICE_ALL_ACCESS, SERVICE_WIN32_OWN_PROCESS, SERVICE_AUTO_START, SERVICE_ERROR_NORMAL, tszFilePath, NULL, NULL, NULL, NULL, NULL); + if (NULL == hService) + { + CloseServiceHandle(hSCManager); + XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_ERROR, _X("启动服务中,安装服务失败,创建服务失败,错误码:%d"), GetLastError()); + return; + } + XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("服务运行中,安装服务中,创建服务成功")); + //设置描述 + SERVICE_DESCRIPTION st_ServiceDescpition = { }; + st_ServiceDescpition.lpDescription = const_cast(XENGINE_SERVICE_DESCRIPTION); // 描述内容 + if (!ChangeServiceConfig2(hService, SERVICE_CONFIG_DESCRIPTION, &st_ServiceDescpition)) + { + CloseServiceHandle(hService); + CloseServiceHandle(hSCManager); + XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_ERROR, _X("启动服务中,安装服务失败,设置服务描述失败,错误码:%d"), GetLastError()); + return; + } + XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("启动服务中,安装服务中,设置服务描述内容成功")); + //设置延迟启动 + SERVICE_DELAYED_AUTO_START_INFO st_ServiceDelayedStart = { }; + st_ServiceDelayedStart.fDelayedAutostart = TRUE; // 启用延迟启动 + if (!ChangeServiceConfig2W(hService, SERVICE_CONFIG_DELAYED_AUTO_START_INFO, &st_ServiceDelayedStart)) + { + CloseServiceHandle(hService); + CloseServiceHandle(hSCManager); + XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_ERROR, _X("启动服务中,安装服务失败,设置自动延迟启动失败,错误码:%d"), GetLastError()); + return; + } + XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("启动服务中,安装服务中,设置自动延迟成功")); + // 启动服务 + if (!StartService(hService, 0, NULL)) + { + CloseServiceHandle(hService); + CloseServiceHandle(hSCManager); + XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_ERROR, _X("启动服务中,启动服务失败,错误码:%d"), GetLastError()); + return; + } + XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("启动服务中,服务启动成功")); + + CloseServiceHandle(hService); + CloseServiceHandle(hSCManager); + XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("服务运行中,安装服务成功")); +} +// 卸载服务 +void XEngine_UninstallService() +{ + SC_HANDLE hSCManager = OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS); + if (NULL == hSCManager) + { + XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_ERROR, _X("启动服务中,卸载服务失败,打开权限错误,错误码:%d"), GetLastError()); + return; + } + XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("服务运行中,卸载服务中,打开权限成功")); + + SC_HANDLE hService = OpenService(hSCManager, XENGINE_SERVICE_NAME, DELETE); + if (!hService) + { + CloseServiceHandle(hSCManager); + XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_ERROR, _X("启动服务中,卸载服务失败,获取权限失败,错误码:%d"), GetLastError()); + return; + } + XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("服务运行中,卸载服务中,获取删除权限成功")); + + if (!DeleteService(hService)) + { + CloseServiceHandle(hSCManager); + XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_ERROR, _X("启动服务中,卸载服务失败,删除服务失败,错误码:%d"), GetLastError()); + return; + } + CloseServiceHandle(hSCManager); + XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("服务运行中,卸载服务中,删除服务成功")); +} \ No newline at end of file diff --git a/XEngine_Source/XEngine_ServiceApp/XEngine_APIServiceApp/XEngine_APIServiceApp.vcxproj b/XEngine_Source/XEngine_ServiceApp/XEngine_APIServiceApp/XEngine_APIServiceApp.vcxproj new file mode 100644 index 00000000..da5511d8 --- /dev/null +++ b/XEngine_Source/XEngine_ServiceApp/XEngine_APIServiceApp/XEngine_APIServiceApp.vcxproj @@ -0,0 +1,222 @@ + + + + + Debug + ARM64 + + + Debug + Win32 + + + Release + ARM64 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {096bef37-4af6-490d-868b-6306d3e251e7} + XEngineAPIServiceApp + 10.0 + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + + + + + + + $(XEngine_Include);$(IncludePath) + $(XEngine_Lib32);$(LibraryPath) + + + $(XEngine_Include);$(IncludePath) + $(XEngine_Lib32);$(LibraryPath) + + + $(XEngine_Include);$(IncludePath) + $(XEngine_Lib64);$(LibraryPath) + + + $(XEngine_Include);$(IncludePath) + $(XEngine_LibArm64);$(LibraryPath) + + + $(XEngine_Include);$(IncludePath) + $(XEngine_Lib64);$(LibraryPath) + + + $(XEngine_Include);$(IncludePath) + $(XEngine_LibArm64);$(LibraryPath) + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + /utf-8 %(AdditionalOptions) + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + /utf-8 %(AdditionalOptions) + + + Console + true + true + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + /utf-8 %(AdditionalOptions) + + + Console + true + true + true + + + + + + + + + + + + + + \ No newline at end of file diff --git a/XEngine_Source/XEngine_ServiceApp/XEngine_APIServiceApp/XEngine_APIServiceApp.vcxproj.filters b/XEngine_Source/XEngine_ServiceApp/XEngine_APIServiceApp/XEngine_APIServiceApp.vcxproj.filters new file mode 100644 index 00000000..0aef8276 --- /dev/null +++ b/XEngine_Source/XEngine_ServiceApp/XEngine_APIServiceApp/XEngine_APIServiceApp.vcxproj.filters @@ -0,0 +1,33 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + 源文件 + + + 源文件 + + + + + 头文件 + + + 头文件 + + + \ No newline at end of file diff --git a/XEngine_Source/XEngine_ServiceApp/XEngine_APIServiceApp/XEngine_APIServiceApp.vcxproj.user b/XEngine_Source/XEngine_ServiceApp/XEngine_APIServiceApp/XEngine_APIServiceApp.vcxproj.user new file mode 100644 index 00000000..88a55094 --- /dev/null +++ b/XEngine_Source/XEngine_ServiceApp/XEngine_APIServiceApp/XEngine_APIServiceApp.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/XEngine_Source/XEngine_ServiceApp/XEngine_APIServiceApp/XEngine_CommHdr.h b/XEngine_Source/XEngine_ServiceApp/XEngine_APIServiceApp/XEngine_CommHdr.h new file mode 100644 index 00000000..8d0fca28 --- /dev/null +++ b/XEngine_Source/XEngine_ServiceApp/XEngine_APIServiceApp/XEngine_CommHdr.h @@ -0,0 +1,65 @@ +#pragma once +//加载系统头文件 +#include +#include +#include +#include +#include +#include +using namespace std; +//加载XEngine头文件 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +//加载模块头文件 +#include "../../XEngine_ModuleConfigure/ModuleConfig_Define.h" +#include "../../XEngine_ModuleConfigure/ModuleConfig_Error.h" +//加载自己的头文件 +#include "XEngine_Configure.h" +/******************************************************************** +// Created: 2025/04/10 13:57:08 +// File Name: D:\XEngine_APIService\XEngine_Source\XEngine_ServiceApp\XEngine_APIServiceApp\XEngine_CommHdr.h +// File Path: D:\XEngine_APIService\XEngine_Source\XEngine_ServiceApp\XEngine_APIServiceApp +// File Base: XEngine_CommHdr +// File Ext: h +// Project: XEngine +// Author: qyt +// Purpose: 公用头文件 +// History: +*********************************************************************/ +extern bool bIsRun; +extern XHANDLE xhLog; +//配置文件 +extern XENGINE_SERVICECONFIG st_ServiceConfig; +//连接库 +#ifdef _MSC_BUILD +#pragma comment(lib,"XEngine_BaseLib/XEngine_BaseLib") +#pragma comment(lib,"XEngine_BaseLib/XEngine_BaseSafe") +#pragma comment(lib,"XEngine_HelpComponents/HelpComponents_XLog") +#pragma comment(lib,"XEngine_SystemSdk/XEngine_SystemApi") +#ifdef _DEBUG +#ifdef _M_X64 +#pragma comment(lib,"../../x64/Debug/XEngine_ModuleConfigure.lib") +#elif _M_ARM64 +#pragma comment(lib,"../../ARM64/Debug/XEngine_ModuleConfigure.lib") +#elif _M_IX86 +#pragma comment(lib,"../../Debug/XEngine_ModuleConfigure.lib") +#endif +#else +#ifdef _M_X64 +#pragma comment(lib,"../../x64/Release/XEngine_ModuleConfigure.lib") +#elif _M_ARM64 +#pragma comment(lib,"../../ARM64/Release/XEngine_ModuleConfigure.lib") +#elif _M_IX86 +#pragma comment(lib,"../../Release/XEngine_ModuleConfigure.lib") +#endif +#endif +#endif \ No newline at end of file diff --git a/XEngine_Source/XEngine_ServiceApp/XEngine_APIServiceApp/XEngine_Configure.cpp b/XEngine_Source/XEngine_ServiceApp/XEngine_APIServiceApp/XEngine_Configure.cpp new file mode 100644 index 00000000..820a1637 --- /dev/null +++ b/XEngine_Source/XEngine_ServiceApp/XEngine_APIServiceApp/XEngine_Configure.cpp @@ -0,0 +1,24 @@ +#include "XEngine_CommHdr.h" +/******************************************************************** +// Created: 2022/01/20 14:40:45 +// File Name: D:\XEngine_ServiceApp\XEngine_Source\XEngine_ServiceApp\XEngine_HttpApp\XEngine_Configure.cpp +// File Path: D:\XEngine_ServiceApp\XEngine_Source\XEngine_ServiceApp\XEngine_HttpApp +// File Base: XEngine_Configure +// File Ext: cpp +// Project: XEngine(网络通信引擎) +// Author: qyt +// Purpose: 配置文件操作代码 +// History: +*********************************************************************/ +bool XEngine_Configure_Parament() +{ + LPCXSTR lpszConfigFile = _X("./XEngine_Config/XEngine_Config.json"); + + if (!ModuleConfigure_Json_File(lpszConfigFile, &st_ServiceConfig)) + { + printf("解析配置文件失败,ModuleConfigure_Json_File:%lX\n", ModuleConfigure_GetLastError()); + return false; + } + + return true; +} \ No newline at end of file diff --git a/XEngine_Source/XEngine_ServiceApp/XEngine_APIServiceApp/XEngine_Configure.h b/XEngine_Source/XEngine_ServiceApp/XEngine_APIServiceApp/XEngine_Configure.h new file mode 100644 index 00000000..370d1dcd --- /dev/null +++ b/XEngine_Source/XEngine_ServiceApp/XEngine_APIServiceApp/XEngine_Configure.h @@ -0,0 +1,13 @@ +#pragma once +/******************************************************************** +// Created: 2025/04/10 13:55:49 +// File Name: D:\XEngine_APIService\XEngine_Source\XEngine_ServiceApp\XEngine_APIServiceApp\XEngine_Configure.h +// File Path: D:\XEngine_APIService\XEngine_Source\XEngine_ServiceApp\XEngine_APIServiceApp +// File Base: XEngine_Configure +// File Ext: h +// Project: XEngine +// Author: qyt +// Purpose: 配置文件操作代码 +// History: +*********************************************************************/ +bool XEngine_Configure_Parament(); \ No newline at end of file diff --git a/XEngine_Source/XEngine_ServiceApp/XEngine_HttpApp/Makefile b/XEngine_Source/XEngine_ServiceApp/XEngine_HttpApp/Makefile index 34ec08e8..14239b32 100644 --- a/XEngine_Source/XEngine_ServiceApp/XEngine_HttpApp/Makefile +++ b/XEngine_Source/XEngine_ServiceApp/XEngine_HttpApp/Makefile @@ -26,10 +26,10 @@ DEBUG = else ifeq ($(PLATFORM),mac) FLAGS = -c - DEBUG = -g + DEBUG = -g -D _DEBUG else FLAGS = -c -lc_p - DEBUG = -g -pg + DEBUG = -g -pg -D _DEBUG endif endif diff --git a/XEngine_Source/XEngine_ServiceApp/XEngine_HttpApp/XEngine_Configure.cpp b/XEngine_Source/XEngine_ServiceApp/XEngine_HttpApp/XEngine_Configure.cpp index 1948a8f2..8e89d04e 100644 --- a/XEngine_Source/XEngine_ServiceApp/XEngine_HttpApp/XEngine_Configure.cpp +++ b/XEngine_Source/XEngine_ServiceApp/XEngine_HttpApp/XEngine_Configure.cpp @@ -1,11 +1,11 @@ #include "XEngine_Hdr.h" /******************************************************************** -// Created: 2022/01/20 14:40:45 -// File Name: D:\XEngine_ServiceApp\XEngine_Source\XEngine_ServiceApp\XEngine_HttpApp\XEngine_Configure.cpp -// File Path: D:\XEngine_ServiceApp\XEngine_Source\XEngine_ServiceApp\XEngine_HttpApp +// Created: 2025/04/10 13:56:28 +// File Name: D:\XEngine_APIService\XEngine_Source\XEngine_ServiceApp\XEngine_HttpApp\XEngine_Configure.cpp +// File Path: D:\XEngine_APIService\XEngine_Source\XEngine_ServiceApp\XEngine_HttpApp // File Base: XEngine_Configure // File Ext: cpp -// Project: XEngine(网络通信引擎) +// Project: XEngine // Author: qyt // Purpose: 配置文件操作代码 // History: @@ -43,11 +43,27 @@ bool XEngine_Configure_Parament(int argc, char** argv) { st_ServiceConfig.bDeamon = _ttxoi(argv[++i]); } + else if (0 == _tcsxcmp("-w", argv[i])) + { + st_ServiceConfig.bShowWnd = _ttxoi(argv[++i]); + } + else if (0 == _tcsxcmp("-hp", argv[i])) + { + st_ServiceConfig.nHttpPort = _ttxoi(argv[++i]); + } + else if (0 == _tcsxcmp("-rp", argv[i])) + { + st_ServiceConfig.nRFCPort = _ttxoi(argv[++i]); + } else if (0 == _tcsxcmp("-r", argv[i])) { st_ServiceConfig.st_XReload.bReload = true; st_ServiceConfig.st_XReload.byCode = _ttxoi(argv[++i]); } + else if (0 == _tcsxcmp("-db", argv[i])) + { + st_ServiceConfig.st_XSql.bEnable = _ttxoi(argv[++i]); + } else if (0 == _tcsxcmp("-t", argv[i])) { bIsTest = true; @@ -63,5 +79,6 @@ void XEngine_Configure_Help() printf(_X("网络消息队列服务启动参数:程序 参数 参数值,参数是区分大小写的。如果不指定将会加载默认的ini配置文件里面的参数\n")); printf(_X("-h or -H:启动参数帮助提示信息\n")); printf(_X("-d:1 启用守护进程,2不启用\n")); + printf(_X("-w:1 隐藏窗口,0 显示窗口\n")); printf(_X("--------------------------启动参数帮助结束--------------------------\n")); } diff --git a/XEngine_Source/XEngine_ServiceApp/XEngine_HttpApp/XEngine_HTTPTask.cpp b/XEngine_Source/XEngine_ServiceApp/XEngine_HttpApp/XEngine_HTTPTask.cpp index 5f912f06..11e540de 100644 --- a/XEngine_Source/XEngine_ServiceApp/XEngine_HttpApp/XEngine_HTTPTask.cpp +++ b/XEngine_Source/XEngine_ServiceApp/XEngine_HttpApp/XEngine_HTTPTask.cpp @@ -451,12 +451,21 @@ bool HTTPTask_TastPost_Handle(RFCCOMPONENTS_HTTP_REQPARAM* pSt_HTTPParam, LPCXST else if ((0 == _tcsxnicmp(lpszParamPhone, tszValue, _tcsxlen(lpszParamPhone))) || (0 == _tcsxnicmp(lpszParamIPAddr, tszValue, _tcsxlen(lpszParamIPAddr))) || (0 == _tcsxnicmp(lpszParamMacInfo, tszValue, _tcsxlen(lpszParamMacInfo)))) { //phone:http://127.0.0.1:5501/api?function=phone¶m=1369943 - //ip:http://127.0.0.1:5501/api?function=ip¶m=117.172.221.14 + //ip:http://127.0.0.1:5501/api?function=ip¶m=117.172.221.14&language=en //mac:http://127.0.0.1:5501/api?function=mac¶m=00:00:0C memset(tszMsgBuffer, '\0', sizeof(tszMsgBuffer)); BaseLib_String_GetKeyValue(pptszList[1], "=", tszKey, tszMsgBuffer); - HTTPTask_TaskGet_APIModule(lpszClientAddr, tszValue, tszMsgBuffer); + if (nListCount <= 2) + { + HTTPTask_TaskGet_APIModule(lpszClientAddr, tszValue, tszMsgBuffer, NULL); + } + else + { + XCHAR tszTPStr[128] = {}; + BaseLib_String_GetKeyValue(pptszList[2], "=", tszKey, tszTPStr); + HTTPTask_TaskGet_APIModule(lpszClientAddr, tszValue, tszMsgBuffer, tszTPStr); + } } else { diff --git a/XEngine_Source/XEngine_ServiceApp/XEngine_HttpApp/XEngine_Hdr.h b/XEngine_Source/XEngine_ServiceApp/XEngine_HttpApp/XEngine_Hdr.h index 6ca152b0..90c07fc2 100644 --- a/XEngine_Source/XEngine_ServiceApp/XEngine_HttpApp/XEngine_Hdr.h +++ b/XEngine_Source/XEngine_ServiceApp/XEngine_HttpApp/XEngine_Hdr.h @@ -139,14 +139,31 @@ extern XHANDLE xhHTTPPool; extern unique_ptr pSTDThread_Deamon; //配置文件 extern XENGINE_SERVICECONFIG st_ServiceConfig; -extern XENGINE_QRCODECONFIG st_QRCodeConfig; -extern XENGINE_PLUGINCONFIG st_PluginLibConfig; -extern XENGINE_PLUGINCONFIG st_PluginLuaConfig; +extern XENGINE_PLUGINCONFIG st_PluginConfig; extern XENGINE_DEAMONAPPLIST st_DeamonAppConfig; //连接库 #ifdef _MSC_BUILD -#ifdef _WIN64 +#pragma comment(lib,"XEngine_BaseLib/XEngine_BaseLib.lib") +#pragma comment(lib,"XEngine_BaseLib/XEngine_BaseSafe.lib") +#pragma comment(lib,"XEngine_Core/XEngine_Core.lib") +#pragma comment(lib,"XEngine_Core/XEngine_ManagePool.lib") +#pragma comment(lib,"XEngine_Core/XEngine_Cryption.lib") +#pragma comment(lib,"XEngine_Client/XClient_Stream.lib") +#pragma comment(lib,"XEngine_Client/XClient_APIHelp.lib") +#pragma comment(lib,"XEngine_NetHelp/NetHelp_APIAddr") +#pragma comment(lib,"XEngine_HelpComponents/HelpComponents_XLog.lib") +#pragma comment(lib,"XEngine_RfcComponents/RfcComponents_HttpProtocol.lib") +#pragma comment(lib,"XEngine_RfcComponents/RfcComponents_NatProtocol.lib") +#pragma comment(lib,"XEngine_RfcComponents/RfcComponents_NTPProtocol.lib") +#pragma comment(lib,"XEngine_SystemSdk/XEngine_SystemApi") +#pragma comment(lib,"XEngine_AVCodec/XEngine_AVCollect.lib") +#pragma comment(lib,"XEngine_AVCodec/XEngine_VideoCodec.lib") +#pragma comment(lib,"XEngine_AVCodec/XEngine_AudioCodec.lib") +#pragma comment(lib,"XEngine_AVCodec/XEngine_AVHelp.lib") +#pragma comment(lib,"Ws2_32.lib") +#pragma comment(lib,"Dbghelp.lib") #ifdef _DEBUG +#ifdef _M_X64 #pragma comment(lib,"../../x64/Debug/XEngine_InfoReport.lib") #pragma comment(lib,"../../x64/Debug/XEngine_APIModuleIPMac.lib") #pragma comment(lib,"../../x64/Debug/XEngine_APIModulePhone.lib") @@ -156,19 +173,17 @@ extern XENGINE_DEAMONAPPLIST st_DeamonAppConfig; #pragma comment(lib,"../../x64/Debug/XEngine_ModuleSystem.lib") #pragma comment(lib,"../../x64/Debug/XEngine_ModuleHelp.lib") #pragma comment(lib,"../../x64/Debug/XEngine_ModulePlugin.lib") -#else -#pragma comment(lib,"../../x64/Release/XEngine_InfoReport.lib") -#pragma comment(lib,"../../x64/Release/XEngine_APIModuleIPMac.lib") -#pragma comment(lib,"../../x64/Release/XEngine_APIModulePhone.lib") -#pragma comment(lib,"../../x64/Release/XEngine_ModuleConfigure.lib") -#pragma comment(lib,"../../x64/Release/XEngine_ModuleDatabase.lib") -#pragma comment(lib,"../../x64/Release/XEngine_ModuleProtocol.lib") -#pragma comment(lib,"../../x64/Release/XEngine_ModuleSystem.lib") -#pragma comment(lib,"../../x64/Release/XEngine_ModuleHelp.lib") -#pragma comment(lib,"../../x64/Release/XEngine_ModulePlugin.lib") -#endif -#else -#ifdef _DEBUG +#elif _M_ARM64 +#pragma comment(lib,"../../ARM64/Debug/XEngine_InfoReport.lib") +#pragma comment(lib,"../../ARM64/Debug/XEngine_APIModuleIPMac.lib") +#pragma comment(lib,"../../ARM64/Debug/XEngine_APIModulePhone.lib") +#pragma comment(lib,"../../ARM64/Debug/XEngine_ModuleConfigure.lib") +#pragma comment(lib,"../../ARM64/Debug/XEngine_ModuleDatabase.lib") +#pragma comment(lib,"../../ARM64/Debug/XEngine_ModuleProtocol.lib") +#pragma comment(lib,"../../ARM64/Debug/XEngine_ModuleSystem.lib") +#pragma comment(lib,"../../ARM64/Debug/XEngine_ModuleHelp.lib") +#pragma comment(lib,"../../ARM64/Debug/XEngine_ModulePlugin.lib") +#elif _M_IX86 #pragma comment(lib,"../../Debug/XEngine_InfoReport.lib") #pragma comment(lib,"../../Debug/XEngine_APIModuleIPMac.lib") #pragma comment(lib,"../../Debug/XEngine_APIModulePhone.lib") @@ -178,7 +193,29 @@ extern XENGINE_DEAMONAPPLIST st_DeamonAppConfig; #pragma comment(lib,"../../Debug/XEngine_ModuleSystem.lib") #pragma comment(lib,"../../Debug/XEngine_ModuleHelp.lib") #pragma comment(lib,"../../Debug/XEngine_ModulePlugin.lib") +#endif #else +#ifdef _M_X64 +#pragma comment(lib,"../../x64/Release/XEngine_InfoReport.lib") +#pragma comment(lib,"../../x64/Release/XEngine_APIModuleIPMac.lib") +#pragma comment(lib,"../../x64/Release/XEngine_APIModulePhone.lib") +#pragma comment(lib,"../../x64/Release/XEngine_ModuleConfigure.lib") +#pragma comment(lib,"../../x64/Release/XEngine_ModuleDatabase.lib") +#pragma comment(lib,"../../x64/Release/XEngine_ModuleProtocol.lib") +#pragma comment(lib,"../../x64/Release/XEngine_ModuleSystem.lib") +#pragma comment(lib,"../../x64/Release/XEngine_ModuleHelp.lib") +#pragma comment(lib,"../../x64/Release/XEngine_ModulePlugin.lib") +#elif _M_ARM64 +#pragma comment(lib,"../../ARM64/Release/XEngine_InfoReport.lib") +#pragma comment(lib,"../../ARM64/Release/XEngine_APIModuleIPMac.lib") +#pragma comment(lib,"../../ARM64/Release/XEngine_APIModulePhone.lib") +#pragma comment(lib,"../../ARM64/Release/XEngine_ModuleConfigure.lib") +#pragma comment(lib,"../../ARM64/Release/XEngine_ModuleDatabase.lib") +#pragma comment(lib,"../../ARM64/Release/XEngine_ModuleProtocol.lib") +#pragma comment(lib,"../../ARM64/Release/XEngine_ModuleSystem.lib") +#pragma comment(lib,"../../ARM64/Release/XEngine_ModuleHelp.lib") +#pragma comment(lib,"../../ARM64/Release/XEngine_ModulePlugin.lib") +#elif _M_IX86 #pragma comment(lib,"../../Release/XEngine_InfoReport.lib") #pragma comment(lib,"../../Release/XEngine_APIModuleIPMac.lib") #pragma comment(lib,"../../Release/XEngine_APIModulePhone.lib") @@ -190,23 +227,4 @@ extern XENGINE_DEAMONAPPLIST st_DeamonAppConfig; #pragma comment(lib,"../../Release/XEngine_ModulePlugin.lib") #endif #endif -#pragma comment(lib,"XEngine_BaseLib/XEngine_BaseLib.lib") -#pragma comment(lib,"XEngine_BaseLib/XEngine_BaseSafe.lib") -#pragma comment(lib,"XEngine_Core/XEngine_Core.lib") -#pragma comment(lib,"XEngine_Core/XEngine_ManagePool.lib") -#pragma comment(lib,"XEngine_Core/XEngine_Cryption.lib") -#pragma comment(lib,"XEngine_Client/XClient_Stream.lib") -#pragma comment(lib,"XEngine_Client/XClient_APIHelp.lib") -#pragma comment(lib,"XEngine_NetHelp/NetHelp_APIAddr") -#pragma comment(lib,"XEngine_HelpComponents/HelpComponents_XLog.lib") -#pragma comment(lib,"XEngine_RfcComponents/RfcComponents_HttpProtocol.lib") -#pragma comment(lib,"XEngine_RfcComponents/RfcComponents_NatProtocol.lib") -#pragma comment(lib,"XEngine_RfcComponents/RfcComponents_NTPProtocol.lib") -#pragma comment(lib,"XEngine_SystemSdk/XEngine_SystemApi") -#pragma comment(lib,"XEngine_AVCodec/XEngine_AVCollect.lib") -#pragma comment(lib,"XEngine_AVCodec/XEngine_VideoCodec.lib") -#pragma comment(lib,"XEngine_AVCodec/XEngine_AudioCodec.lib") -#pragma comment(lib,"XEngine_AVCodec/XEngine_AVHelp.lib") -#pragma comment(lib,"Ws2_32.lib") -#pragma comment(lib,"Dbghelp.lib") #endif \ No newline at end of file diff --git a/XEngine_Source/XEngine_ServiceApp/XEngine_HttpApp/XEngine_HttpApp.cpp b/XEngine_Source/XEngine_ServiceApp/XEngine_HttpApp/XEngine_HttpApp.cpp index d78312e1..bbc708b3 100644 --- a/XEngine_Source/XEngine_ServiceApp/XEngine_HttpApp/XEngine_HttpApp.cpp +++ b/XEngine_Source/XEngine_ServiceApp/XEngine_HttpApp/XEngine_HttpApp.cpp @@ -23,9 +23,7 @@ XHANDLE xhHTTPPool = NULL; unique_ptr pSTDThread_Deamon = NULL; //配置文件 XENGINE_SERVICECONFIG st_ServiceConfig; -XENGINE_QRCODECONFIG st_QRCodeConfig; -XENGINE_PLUGINCONFIG st_PluginLibConfig; -XENGINE_PLUGINCONFIG st_PluginLuaConfig; +XENGINE_PLUGINCONFIG st_PluginConfig; XENGINE_DEAMONAPPLIST st_DeamonAppConfig; void ServiceApp_Stop(int signo) @@ -148,9 +146,7 @@ int main(int argc, char** argv) memset(&st_XLogConfig, '\0', sizeof(HELPCOMPONENTS_XLOG_CONFIGURE)); memset(&st_ServiceConfig, '\0', sizeof(XENGINE_SERVICECONFIG)); - memset(&st_QRCodeConfig, '\0', sizeof(XENGINE_QRCODECONFIG)); - memset(&st_PluginLibConfig, '\0', sizeof(XENGINE_PLUGINCONFIG)); - memset(&st_PluginLuaConfig, '\0', sizeof(XENGINE_PLUGINCONFIG)); + memset(&st_PluginConfig, '\0', sizeof(XENGINE_PLUGINCONFIG)); //初始化参数 if (!XEngine_Configure_Parament(argc, argv)) @@ -176,7 +172,7 @@ int main(int argc, char** argv) //初始日志 st_XLogConfig.XLog_MaxBackupFile = st_ServiceConfig.st_XLog.nMaxCount; st_XLogConfig.XLog_MaxSize = st_ServiceConfig.st_XLog.nMaxSize; - _tcsxcpy(st_XLogConfig.tszFileName, st_ServiceConfig.st_XLog.tszLogFile); + _tcsxcpy(st_XLogConfig.tszFileName, st_ServiceConfig.st_XLog.tszAPIFile); xhLog = HelpComponents_XLog_Init(st_ServiceConfig.st_XLog.nLogLeave, &st_XLogConfig); if (NULL == xhLog) { @@ -194,19 +190,14 @@ int main(int argc, char** argv) if (SystemApi_Process_IsAdmin()) { - if (!ModuleSystem_API_AutoStart(st_ServiceConfig.bAutoStart)) - { - XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_ERROR, _X("启动服务中,注册软件开机启动失败!错误:%lX"), ModuleHelp_GetLastError()); - goto XENGINE_SERVICEAPP_EXIT; - } - XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("启动服务中,设置软件开机启动标志成功,标志位:%d"), st_ServiceConfig.bAutoStart); + XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("启动服务中,启动权限设置为管理员")); } else { - XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_WARN, _X("启动服务中,启动权限不足,对于进程和后台服务任务可能会执行失败,请切换管理员权限")); + XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_WARN, _X("启动服务中,启动权限不足,对于进程和后台服务任务可能会执行失败")); } - if (st_ServiceConfig.bHideWnd) + if (!st_ServiceConfig.bShowWnd) { #ifdef _MSC_BUILD HWND hWnd = GetConsoleWindow(); @@ -222,17 +213,6 @@ int main(int argc, char** argv) #endif } -#if (1 == _XENGINE_BUILD_SWITCH_QRDECODEC) - if (!ModuleConfigure_Json_QRCodeFile(st_ServiceConfig.st_XConfig.tszConfigQRCode, &st_QRCodeConfig)) - { - XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_ERROR, _X("启动服务中,初始化二维码配置文件失败,错误:%lX"), ModuleConfigure_GetLastError()); - goto XENGINE_SERVICEAPP_EXIT; - } - XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("启动服务中,初始化二维码配置文件:%s 成功"), st_ServiceConfig.st_XConfig.tszConfigQRCode); -#else - XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_WARN, _X("启动服务中,初始化二维码配置文件:%s 失败,因为QR编译脚本被关闭"), st_ServiceConfig.st_XConfig.tszConfigQRCode); -#endif - if (st_ServiceConfig.st_XImageText.bEnable) { if (!ModuleHelp_ImageGet_TextInit(st_ServiceConfig.st_XImageText.tszImagePath, st_ServiceConfig.st_XImageText.tszImageLanguage)) @@ -421,18 +401,12 @@ int main(int argc, char** argv) //初始化插件配置 if (st_ServiceConfig.st_XPlugin.bEnable) { - if (!ModuleConfigure_Json_PluginFile(st_ServiceConfig.st_XPlugin.tszPluginLib, &st_PluginLibConfig)) + if (!ModuleConfigure_Json_PluginFile(st_ServiceConfig.st_XPlugin.tszPlugin, &st_PluginConfig)) { XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_ERROR, _X("启动服务中,初始化Lib插件配置文件失败,错误:%lX"), ModuleConfigure_GetLastError()); goto XENGINE_SERVICEAPP_EXIT; } - XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("启动服务中,初始化Lib插件配置文件成功")); - if (!ModuleConfigure_Json_PluginFile(st_ServiceConfig.st_XPlugin.tszPluginLua, &st_PluginLuaConfig)) - { - XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_ERROR, _X("启动服务中,初始化Lua插件配置文件失败,错误:%lX"), ModuleConfigure_GetLastError()); - goto XENGINE_SERVICEAPP_EXIT; - } - XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("启动服务中,初始化Lua插件配置文件成功")); + XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("启动服务中,初始化插件配置文件成功")); //启动插件 if (!ModulePlugin_Loader_Init()) { @@ -441,8 +415,8 @@ int main(int argc, char** argv) } XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("启动服务中,初始化插件系统成功,开始加载插件")); //加载插件 - list::const_iterator stl_ListIterator = st_PluginLibConfig.pStl_ListPlugin->begin(); - for (int i = 1; stl_ListIterator != st_PluginLibConfig.pStl_ListPlugin->end(); stl_ListIterator++, i++) + list::const_iterator stl_ListIterator = st_PluginConfig.pStl_ListPluginModule->begin(); + for (int i = 1; stl_ListIterator != st_PluginConfig.pStl_ListPluginModule->end(); stl_ListIterator++, i++) { if (stl_ListIterator->bEnable) { @@ -461,8 +435,8 @@ int main(int argc, char** argv) } } #if (1 == _XENGINE_BUILD_SWITCH_LUA) - stl_ListIterator = st_PluginLuaConfig.pStl_ListPlugin->begin(); - for (int i = 1; stl_ListIterator != st_PluginLuaConfig.pStl_ListPlugin->end(); stl_ListIterator++, i++) + stl_ListIterator = st_PluginConfig.pStl_ListPluginLua->begin(); + for (int i = 1; stl_ListIterator != st_PluginConfig.pStl_ListPluginLua->end(); stl_ListIterator++, i++) { if (stl_ListIterator->bEnable) { @@ -484,7 +458,7 @@ int main(int argc, char** argv) XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_WARN, _X("启动服务中,加载Lua模块插件失败,因为LUA编译被关闭")); #endif //展示能力 - XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("启动服务中,加载的Lib插件:%d 个,Lua插件:%d 个"), st_PluginLibConfig.pStl_ListPlugin->size(), st_PluginLuaConfig.pStl_ListPlugin->size()); + XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("启动服务中,加载的Lib插件:%d 个,Lua插件:%d 个"), st_PluginConfig.pStl_ListPluginModule->size(), st_PluginConfig.pStl_ListPluginLua->size()); } else { @@ -493,21 +467,24 @@ int main(int argc, char** argv) if (st_ServiceConfig.st_XAPIModule.bEnable) { - if (!APIModule_IPAddr_Init(st_ServiceConfig.st_XAPIModule.tszDBIPAddr)) + if (!APIModule_IPAddr_Init(st_ServiceConfig.st_XAPIModule.tszDBIPAddr, st_ServiceConfig.st_XAPIModule.tszDBISPAddr)) { XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_ERROR, _X("启动服务中,启动IP地址数据查询服务:%s 失败,错误:%lX"), st_ServiceConfig.st_XAPIModule.tszDBIPAddr, APIIPMac_GetLastError()); + goto XENGINE_SERVICEAPP_EXIT; } XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("启动服务中,启动IP地址数据查询服务:%s 成功"), st_ServiceConfig.st_XAPIModule.tszDBIPAddr); if (!APIModule_MACInfo_Init(st_ServiceConfig.st_XAPIModule.tszDBMac)) { XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_ERROR, _X("启动服务中,启动MAC地址数据查询服务:%s 失败,错误:%lX"), st_ServiceConfig.st_XAPIModule.tszDBMac, APIIPMac_GetLastError()); + goto XENGINE_SERVICEAPP_EXIT; } XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("启动服务中,启动MAC地址数据查询服务:%s 成功"), st_ServiceConfig.st_XAPIModule.tszDBMac); if (!APIModule_PhoneNumber_Init(st_ServiceConfig.st_XAPIModule.tszDBPhone)) { XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_ERROR, _X("启动服务中,启动电话号码数据查询服务:%s 失败,错误:%lX"), st_ServiceConfig.st_XAPIModule.tszDBPhone, APIPhone_GetLastError()); + goto XENGINE_SERVICEAPP_EXIT; } XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("启动服务中,启动电话号码数据查询服务:%s 成功"), st_ServiceConfig.st_XAPIModule.tszDBPhone); } @@ -515,6 +492,7 @@ int main(int argc, char** argv) { XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_WARN, _X("启动服务中,数据查询服务没有启用")); } +#ifndef _DEBUG //发送信息报告 if (st_ServiceConfig.st_XReport.bEnable && !bIsTest) { @@ -532,7 +510,7 @@ int main(int argc, char** argv) { XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_WARN, _X("启动服务中,信息报告给API服务器没有启用")); } - +#endif XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("所有服务成功启动,服务运行中,XEngine版本:%s%s,发行版本次数:%d,当前版本:%s。。。"), BaseLib_Version_XNumberStr(), BaseLib_Version_XTypeStr(), st_ServiceConfig.st_XVer.pStl_ListVer->size(), st_ServiceConfig.st_XVer.pStl_ListVer->front().c_str()); while (true) { diff --git a/XEngine_Source/XEngine_ServiceApp/XEngine_HttpApp/XEngine_HttpApp.vcxproj b/XEngine_Source/XEngine_ServiceApp/XEngine_HttpApp/XEngine_HttpApp.vcxproj index e23feb9e..ed6cc216 100644 --- a/XEngine_Source/XEngine_ServiceApp/XEngine_HttpApp/XEngine_HttpApp.vcxproj +++ b/XEngine_Source/XEngine_ServiceApp/XEngine_HttpApp/XEngine_HttpApp.vcxproj @@ -1,10 +1,18 @@ + + Debug + ARM64 + Debug Win32 + + Release + ARM64 + Release Win32 @@ -45,6 +53,12 @@ v143 Unicode + + Application + true + v143 + Unicode + Application false @@ -52,6 +66,13 @@ true Unicode + + Application + false + v143 + true + Unicode + @@ -66,9 +87,15 @@ + + + + + + true @@ -85,11 +112,21 @@ $(XEngine_Include);$(IncludePath) $(XEngine_Lib64);$(LibraryPath) + + true + $(XEngine_Include);$(IncludePath) + $(XEngine_LibArm64);$(LibraryPath) + false $(XEngine_Include);$(IncludePath) $(XEngine_Lib64);$(LibraryPath) + + false + $(XEngine_Include);$(IncludePath) + $(XEngine_LibArm64);$(LibraryPath) + Level3 @@ -135,6 +172,19 @@ true + + + Level3 + true + _DEBUG;_CONSOLE;_WINDOWS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + true + 4819 + + + Console + true + + Level3 @@ -154,6 +204,25 @@ true + + + Level3 + true + true + true + NDEBUG;_CONSOLE;_WINDOWS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + true + MultiThreaded + 4819 + /utf-8 %(AdditionalOptions) + + + Console + true + true + true + + diff --git a/XEngine_Source/XEngine_ServiceApp/XEngine_HttpApp/XEngine_TaskGet/TaskGet_APIModule.cpp b/XEngine_Source/XEngine_ServiceApp/XEngine_HttpApp/XEngine_TaskGet/TaskGet_APIModule.cpp index f087ec00..82e46268 100644 --- a/XEngine_Source/XEngine_ServiceApp/XEngine_HttpApp/XEngine_TaskGet/TaskGet_APIModule.cpp +++ b/XEngine_Source/XEngine_ServiceApp/XEngine_HttpApp/XEngine_TaskGet/TaskGet_APIModule.cpp @@ -1,6 +1,6 @@ #include "../XEngine_Hdr.h" -bool HTTPTask_TaskGet_APIModule(LPCXSTR lpszClientAddr, LPCXSTR lpszQueryType, LPCXSTR lpszQueryStr) +bool HTTPTask_TaskGet_APIModule(LPCXSTR lpszClientAddr, LPCXSTR lpszQueryType, LPCXSTR lpszQueryStr, LPCXSTR lpszTPStr) { int nMsgLen = 4096; int nPktLen = 4096; @@ -49,7 +49,7 @@ bool HTTPTask_TaskGet_APIModule(LPCXSTR lpszClientAddr, LPCXSTR lpszQueryType, L _tcsxcpy(st_IPAddr.tszIPAddr, lpszQueryStr); - if (!APIModule_IPAddr_Query(&st_IPAddr)) + if (!APIModule_IPAddr_Query(&st_IPAddr, lpszTPStr)) { ModuleProtocol_Packet_Common(tszPktBuffer, &nPktLen, 404, _X("not found")); HttpProtocol_Server_SendMsgEx(xhHTTPPacket, tszMsgBuffer, &nMsgLen, &st_HDRParam, tszPktBuffer, nPktLen); diff --git a/XEngine_Source/XEngine_ServiceApp/XEngine_HttpApp/XEngine_TaskGet/TaskGet_APIModule.h b/XEngine_Source/XEngine_ServiceApp/XEngine_HttpApp/XEngine_TaskGet/TaskGet_APIModule.h index 5dbab6d9..6c06e10c 100644 --- a/XEngine_Source/XEngine_ServiceApp/XEngine_HttpApp/XEngine_TaskGet/TaskGet_APIModule.h +++ b/XEngine_Source/XEngine_ServiceApp/XEngine_HttpApp/XEngine_TaskGet/TaskGet_APIModule.h @@ -1,3 +1,3 @@ #pragma once -bool HTTPTask_TaskGet_APIModule(LPCXSTR lpszClientAddr, LPCXSTR lpszQueryType, LPCXSTR lpszQueryStr); \ No newline at end of file +bool HTTPTask_TaskGet_APIModule(LPCXSTR lpszClientAddr, LPCXSTR lpszQueryType, LPCXSTR lpszQueryStr, LPCXSTR lpszTPStr); \ No newline at end of file diff --git a/XEngine_Source/XEngine_ServiceApp/XEngine_HttpApp/XEngine_TaskGet/TaskGet_Reload.cpp b/XEngine_Source/XEngine_ServiceApp/XEngine_HttpApp/XEngine_TaskGet/TaskGet_Reload.cpp index a74ed6f1..00adadcc 100644 --- a/XEngine_Source/XEngine_ServiceApp/XEngine_HttpApp/XEngine_TaskGet/TaskGet_Reload.cpp +++ b/XEngine_Source/XEngine_ServiceApp/XEngine_HttpApp/XEngine_TaskGet/TaskGet_Reload.cpp @@ -22,13 +22,13 @@ bool HTTPTask_TaskGet_Reload(LPCXSTR lpszClientAddr, LPCXSTR lpszOPCode) else if (1 == _ttxoi(lpszOPCode)) { ModulePlugin_Loader_Destory(); - delete st_PluginLibConfig.pStl_ListPlugin; - delete st_PluginLuaConfig.pStl_ListPlugin; - st_PluginLibConfig.pStl_ListPlugin = NULL; - st_PluginLuaConfig.pStl_ListPlugin = NULL; + delete st_PluginConfig.pStl_ListPluginLua; + delete st_PluginConfig.pStl_ListPluginModule; + st_PluginConfig.pStl_ListPluginLua = NULL; + st_PluginConfig.pStl_ListPluginModule = NULL; ModulePlugin_Loader_Init(); - if (!ModuleConfigure_Json_PluginFile(st_ServiceConfig.st_XPlugin.tszPluginLib, &st_PluginLibConfig)) + if (!ModuleConfigure_Json_PluginFile(st_ServiceConfig.st_XPlugin.tszPlugin, &st_PluginConfig)) { st_HDRParam.nHttpCode = 500; HttpProtocol_Server_SendMsgEx(xhHTTPPacket, tszMsgBuffer, &nMsgLen, &st_HDRParam); @@ -36,20 +36,11 @@ bool HTTPTask_TaskGet_Reload(LPCXSTR lpszClientAddr, LPCXSTR lpszOPCode) XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_ERROR, _X("HTTP客户端:%s,请求操作配置重载失败,加载Lib插件配置失败,错误:%lX"), lpszClientAddr, ModuleConfigure_GetLastError()); return false; } - XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("HTTP客户端:%s,请求操作配置重载成功,加载Lib插件配置成功"), lpszClientAddr); - if (!ModuleConfigure_Json_PluginFile(st_ServiceConfig.st_XPlugin.tszPluginLua, &st_PluginLuaConfig)) - { - st_HDRParam.nHttpCode = 500; - HttpProtocol_Server_SendMsgEx(xhHTTPPacket, tszMsgBuffer, &nMsgLen, &st_HDRParam); - XEngine_Network_Send(lpszClientAddr, tszMsgBuffer, nMsgLen); - XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_ERROR, _X("HTTP客户端:%s,请求操作配置重载失败,加载Lua插件配置失败,错误:%lX"), lpszClientAddr, ModuleConfigure_GetLastError()); - return false; - } - XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("HTTP客户端:%s,请求操作配置重载成功,加载lua插件配置成功"), lpszClientAddr); + XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("HTTP客户端:%s,请求操作配置重载成功,加载插件配置成功"), lpszClientAddr); { - list::const_iterator stl_ListIterator = st_PluginLibConfig.pStl_ListPlugin->begin(); - for (int i = 1; stl_ListIterator != st_PluginLibConfig.pStl_ListPlugin->end(); stl_ListIterator++, i++) + list::const_iterator stl_ListIterator = st_PluginConfig.pStl_ListPluginModule->begin(); + for (int i = 1; stl_ListIterator != st_PluginConfig.pStl_ListPluginModule->end(); stl_ListIterator++, i++) { if (stl_ListIterator->bEnable) { @@ -69,8 +60,8 @@ bool HTTPTask_TaskGet_Reload(LPCXSTR lpszClientAddr, LPCXSTR lpszOPCode) } } { - list::const_iterator stl_ListIterator = st_PluginLuaConfig.pStl_ListPlugin->begin(); - for (int i = 1; stl_ListIterator != st_PluginLuaConfig.pStl_ListPlugin->end(); stl_ListIterator++, i++) + list::const_iterator stl_ListIterator = st_PluginConfig.pStl_ListPluginLua->begin(); + for (int i = 1; stl_ListIterator != st_PluginConfig.pStl_ListPluginLua->end(); stl_ListIterator++, i++) { if (stl_ListIterator->bEnable) { @@ -91,24 +82,9 @@ bool HTTPTask_TaskGet_Reload(LPCXSTR lpszClientAddr, LPCXSTR lpszOPCode) } HttpProtocol_Server_SendMsgEx(xhHTTPPacket, tszMsgBuffer, &nMsgLen, &st_HDRParam); XEngine_Network_Send(lpszClientAddr, tszMsgBuffer, nMsgLen); - XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("HTTP客户端:%s,请求重载插件成功,Lib插件:%d 个,Lua插件:%d 个"), lpszClientAddr, st_PluginLibConfig.pStl_ListPlugin->size(), st_PluginLuaConfig.pStl_ListPlugin->size()); + XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("HTTP客户端:%s,请求重载插件成功,Lib插件:%d 个,Lua插件:%d 个"), lpszClientAddr, st_PluginConfig.pStl_ListPluginModule->size(), st_PluginConfig.pStl_ListPluginLua->size()); } else if (2 == _ttxoi(lpszOPCode)) - { - memset(&st_QRCodeConfig, '\0', sizeof(XENGINE_QRCODECONFIG)); - if (!ModuleConfigure_Json_QRCodeFile(st_ServiceConfig.st_XConfig.tszConfigQRCode, &st_QRCodeConfig)) - { - st_HDRParam.nHttpCode = 500; - HttpProtocol_Server_SendMsgEx(xhHTTPPacket, tszMsgBuffer, &nMsgLen, &st_HDRParam); - XEngine_Network_Send(lpszClientAddr, tszMsgBuffer, nMsgLen); - XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_ERROR, _X("HTTP客户端:%s,请求重载二维码配置文件失败,错误:%lX"), lpszClientAddr, ModuleConfigure_GetLastError()); - return false; - } - HttpProtocol_Server_SendMsgEx(xhHTTPPacket, tszMsgBuffer, &nMsgLen, &st_HDRParam); - XEngine_Network_Send(lpszClientAddr, tszMsgBuffer, nMsgLen); - XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("HTTP客户端:%s,请求重载二维码配置文件:%s 成功"), lpszClientAddr, st_ServiceConfig.st_XConfig.tszConfigQRCode); - } - else if (3 == _ttxoi(lpszOPCode)) { st_DeamonAppConfig.stl_ListDeamonApp.clear(); if (!ModuleConfigure_Json_DeamonList(st_ServiceConfig.st_XConfig.tszConfigDeamon, &st_DeamonAppConfig)) diff --git a/XEngine_Source/XEngine_ServiceApp/XEngine_HttpApp/XEngine_TaskGet/TaskGet_Translation.cpp b/XEngine_Source/XEngine_ServiceApp/XEngine_HttpApp/XEngine_TaskGet/TaskGet_Translation.cpp index 617ce2cf..e9015e3a 100644 --- a/XEngine_Source/XEngine_ServiceApp/XEngine_HttpApp/XEngine_TaskGet/TaskGet_Translation.cpp +++ b/XEngine_Source/XEngine_ServiceApp/XEngine_HttpApp/XEngine_TaskGet/TaskGet_Translation.cpp @@ -50,7 +50,7 @@ bool HTTPTask_TaskGet_Translation(LPCXSTR lpszClientAddr, LPCXSTR lpszMsgBuffer, ModuleHelp_Translation_Convert((ENUM_XENGINE_APISERVICE_TRANSLATION_TYPE)_ttxoi(lpszSrcStr), tszLanguageSrc); ModuleHelp_Translation_Convert((ENUM_XENGINE_APISERVICE_TRANSLATION_TYPE)_ttxoi(lpszDstStr), tszLanauageDst); - _xstprintf(tszURLStr, _X("%s?appid=%s&q=%s&from=%s&to=%s&salt=%d&sign=%s"), st_ServiceConfig.st_XApi.tszTranslationUrl, st_ServiceConfig.st_XApi.st_TranslationInfo.tszAPPID, tszUTFBuffer, tszLanguageSrc, tszLanauageDst, nRandomNumber, tszMD5Str); + _xstprintf(tszURLStr, _X("%s?appid=%s&q=%s&from=%s&to=%s&salt=%d&sign=%s"), st_ServiceConfig.st_XApi.st_TranslationInfo.tszAPPUrl, st_ServiceConfig.st_XApi.st_TranslationInfo.tszAPPID, tszUTFBuffer, tszLanguageSrc, tszLanauageDst, nRandomNumber, tszMD5Str); APIClient_Http_Request(_X("GET"), tszURLStr, NULL, NULL, &ptszBodyBuffer, &nBLen); //解析数据 diff --git a/XEngine_Source/XEngine_ServiceApp/XEngine_HttpApp/XEngine_TaskPost/TaskPost_BackService.cpp b/XEngine_Source/XEngine_ServiceApp/XEngine_HttpApp/XEngine_TaskPost/TaskPost_BackService.cpp index e49d4c24..b96b2421 100644 --- a/XEngine_Source/XEngine_ServiceApp/XEngine_HttpApp/XEngine_TaskPost/TaskPost_BackService.cpp +++ b/XEngine_Source/XEngine_ServiceApp/XEngine_HttpApp/XEngine_TaskPost/TaskPost_BackService.cpp @@ -309,7 +309,7 @@ bool HTTPTask_TaskPost_BackService(LPCXSTR lpszClientAddr, LPCXSTR lpszMsgBuffer AVCollect_Audio_GetInfo(xhSound, &st_AVInfo); //音频编码参数 st_AVInfo.st_AudioInfo.enAVCodec = ENUM_XENGINE_AVCODEC_AUDIO_TYPE_AAC; - st_AVInfo.st_AudioInfo.nSampleFmt = ENUM_AVCODEC_AUDIO_SAMPLEFMT_FLTP; + st_AVInfo.st_AudioInfo.nSampleFmt = ENUM_AVCODEC_AUDIO_SAMPLEFMT_S16; if (!AudioCodec_Stream_EnInit(&xhAudio, &st_AVInfo.st_AudioInfo)) { st_HDRParam.nHttpCode = 400; @@ -318,15 +318,6 @@ bool HTTPTask_TaskPost_BackService(LPCXSTR lpszClientAddr, LPCXSTR lpszMsgBuffer XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_ERROR, _X("HTTP客户端:%s,初始化音频编码器失败,错误码:%lX"), lpszClientAddr, AudioCodec_GetLastError()); return false; } - int nLen = 0; - if (!AudioCodec_Stream_SetResample(xhAudio, &nLen, st_AVInfo.st_AudioInfo.nSampleRate, st_AVInfo.st_AudioInfo.nSampleRate, (ENUM_AVCODEC_AUDIO_SAMPLEFMT)st_AVInfo.st_AudioInfo.nSampleFmt, ENUM_AVCODEC_AUDIO_SAMPLEFMT_FLTP, st_AVInfo.st_AudioInfo.nChannel, st_AVInfo.st_AudioInfo.nChannel)) - { - st_HDRParam.nHttpCode = 400; - HttpProtocol_Server_SendMsgEx(xhHTTPPacket, ptszSDBuffer, &nSDLen, &st_HDRParam); - XEngine_Network_Send(lpszClientAddr, ptszSDBuffer, nSDLen); - XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_ERROR, _X("HTTP客户端:%s,初始化音频重采样工具失败,错误码:%lX"), lpszClientAddr, AudioCodec_GetLastError()); - return false; - } AVCollect_Audio_Start(xhSound); } //屏幕采集 diff --git a/XEngine_Source/XEngine_ServiceApp/XEngine_HttpApp/XEngine_TaskPost/TaskPost_QRCode.cpp b/XEngine_Source/XEngine_ServiceApp/XEngine_HttpApp/XEngine_TaskPost/TaskPost_QRCode.cpp index 1f46882a..4caddaa8 100644 --- a/XEngine_Source/XEngine_ServiceApp/XEngine_HttpApp/XEngine_TaskPost/TaskPost_QRCode.cpp +++ b/XEngine_Source/XEngine_ServiceApp/XEngine_HttpApp/XEngine_TaskPost/TaskPost_QRCode.cpp @@ -47,7 +47,7 @@ bool HTTPTask_TaskPost_QRCode(LPCXSTR lpszClientAddr, LPCXSTR lpszMsgBuffer, int } else { - if (ModuleHelp_QRCode_QRDecodecMemory(lpszMsgBuffer, nMsgLen, ptszRVBuffer, st_QRCodeConfig.tszProtoDetect, st_QRCodeConfig.tszModelDetect, st_QRCodeConfig.tszProtoSr, st_QRCodeConfig.tszModelSr)) + if (ModuleHelp_QRCode_QRDecodecMemory(lpszMsgBuffer, nMsgLen, ptszRVBuffer, st_ServiceConfig.st_XConfig.st_ConfigQRCodec.tszProtoDetect, st_ServiceConfig.st_XConfig.st_ConfigQRCodec.tszModelDetect, st_ServiceConfig.st_XConfig.st_ConfigQRCodec.tszProtoSr, st_ServiceConfig.st_XConfig.st_ConfigQRCodec.tszModelSr)) { nRVLen = _tcsxlen(ptszRVBuffer); HttpProtocol_Server_SendMsgEx(xhHTTPPacket, ptszSDBuffer, &nSDLen, &st_HDRParam, ptszRVBuffer, nRVLen);