From 00add0228ebfcb5350c597cc5367e02f211953e0 Mon Sep 17 00:00:00 2001 From: shijianquan <992593080@qq.com> Date: Tue, 14 Oct 2025 09:23:42 +0800 Subject: [PATCH 1/2] =?UTF-8?q?[test]=E5=85=B3=E4=BA=8Ertu=E9=99=90?= =?UTF-8?q?=E5=88=B632=E6=95=B0=E9=87=8F=EF=BC=8C=E5=90=8E=E6=94=B9?= =?UTF-8?q?=E6=88=9064=E4=B8=AA=E6=95=B0=E7=9B=AE=E5=85=88=E8=BF=9B?= =?UTF-8?q?=E8=A1=8C=E7=BC=96=E8=AF=91=E6=B5=8B=E8=AF=95=EF=BC=8C=E8=8B=A5?= =?UTF-8?q?=E5=90=8E=E7=BB=AD=E6=9C=89=E9=97=AE=E9=A2=98=E5=BD=93=E6=97=A5?= =?UTF-8?q?=E8=BF=9B=E8=A1=8C=E5=9B=9E=E6=BB=9A=20[fix]debug=5Ftool:?= =?UTF-8?q?=E7=94=B1=E4=BA=8E=E5=9C=A8fes=E4=B8=AD=E6=94=BE=E5=A4=A7?= =?UTF-8?q?=E4=BA=86CN=5FFesMaxRtuNumPerChan=E7=9A=84=E6=95=B0=E7=9B=AE?= =?UTF-8?q?=EF=BC=8C=E6=89=80=E4=BB=A5=E5=B0=86debug=5Ftool=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E5=AE=9A=E4=B9=89=E5=90=8C=E6=AD=A5=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- product/src/fes/include/FesDef.h | 2 +- product/src/tools/debug_tool/FesDef.h | 2 +- product/src/tools/debug_tool_v2/FesDef.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/product/src/fes/include/FesDef.h b/product/src/fes/include/FesDef.h index d837eaec..dfe5594c 100644 --- a/product/src/fes/include/FesDef.h +++ b/product/src/fes/include/FesDef.h @@ -108,7 +108,7 @@ using namespace std; const float CN_FesFloatCompare = 0.000001f;//用于浮点型数据的比较 const int CN_FesMaxProtocolNum = 64; //系统可接入规约数 -const int CN_FesMaxRtuNumPerChan = 32; //每个通道可接设备数(只对通道为polling方式) +const int CN_FesMaxRtuNumPerChan = 64; //每个通道可接设备数(只对通道为polling方式) const int CN_FesMaxChangeMultiple = 5; //变化数据缓冲区为数据个数的倍数 const int CN_FesMaxDzParamSize =800; //定值参数最大长度 const int CN_FesMaxDzNum =40; //定值最大个数一帧的定值个数最大40个(KBD104中规定) diff --git a/product/src/tools/debug_tool/FesDef.h b/product/src/tools/debug_tool/FesDef.h index 9696a067..79a57048 100644 --- a/product/src/tools/debug_tool/FesDef.h +++ b/product/src/tools/debug_tool/FesDef.h @@ -101,7 +101,7 @@ using namespace std; const float CN_FesFloatCompare = 0.000001;//用于浮点型数据的比较 const int CN_FesMaxProtocolNum = 64; //系统可接入规约数 -const int CN_FesMaxRtuNumPerChan = 32; //每个通道可接设备数(只对通道为polling方式) +const int CN_FesMaxRtuNumPerChan = 64; //每个通道可接设备数(只对通道为polling方式) const int CN_FesMaxChangeMultiple = 5; //变化数据缓冲区为数据个数的倍数 const int CN_FesMaxDzParamSize =800; //定值参数最大长度 const int CN_FesMaxDzNum =40; //定值最大个数一帧的定值个数最大40个(KBD104中规定) diff --git a/product/src/tools/debug_tool_v2/FesDef.h b/product/src/tools/debug_tool_v2/FesDef.h index 261d91ff..c8dd9f75 100644 --- a/product/src/tools/debug_tool_v2/FesDef.h +++ b/product/src/tools/debug_tool_v2/FesDef.h @@ -101,7 +101,7 @@ using namespace std; const float CN_FesFloatCompare = 0.000001;//用于浮点型数据的比较 const int CN_FesMaxProtocolNum = 64; //系统可接入规约数 -const int CN_FesMaxRtuNumPerChan = 32; //每个通道可接设备数(只对通道为polling方式) +const int CN_FesMaxRtuNumPerChan = 64; //每个通道可接设备数(只对通道为polling方式) const int CN_FesMaxChangeMultiple = 5; //变化数据缓冲区为数据个数的倍数 const int CN_FesMaxDzParamSize =800; //定值参数最大长度 const int CN_FesMaxDzNum =40; //定值最大个数一帧的定值个数最大40个(KBD104中规定) From d2faf5ba513a46bf4da8dc0b3406014e299431a4 Mon Sep 17 00:00:00 2001 From: shijianquan <992593080@qq.com> Date: Tue, 14 Oct 2025 09:52:04 +0800 Subject: [PATCH 2/2] =?UTF-8?q?add:=E5=9C=A8=E7=BB=8F=E5=85=B8=E5=B7=A5?= =?UTF-8?q?=E7=A8=8B=E6=96=87=E4=BB=B6=E4=B8=ADresouce=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=A4=B9=E5=B0=86=E4=BC=9A=E8=A6=86=E7=9B=96=E5=AE=89=E8=A3=85?= =?UTF-8?q?=E7=9B=AE=E5=BD=95=E7=9A=84resouce?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/dbms/db_manager_api/db_manager_api.cpp | 15 +++++++++++++++ platform/src/dbms/db_manager_api/file_opt.cpp | 10 +++++++--- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/platform/src/dbms/db_manager_api/db_manager_api.cpp b/platform/src/dbms/db_manager_api/db_manager_api.cpp index 2f296d6e..a5b4ecde 100644 --- a/platform/src/dbms/db_manager_api/db_manager_api.cpp +++ b/platform/src/dbms/db_manager_api/db_manager_api.cpp @@ -1015,6 +1015,21 @@ bool db_manager_api::initCompleteProjectExe() srcList.append(strProductSrcPath); } + // 处理resource文件夹:当经典工程的文件夹下有resource文件时,覆盖至程序安装目录的resource文件夹 + QString strResourceDstPath = CFileUtil::getSimplePath(CFileUtil::getCurModuleDir() + "../../resource" ).c_str(); + QString strResourceSrcPath = CFileUtil::getSimplePath(CFileUtil::getCurModuleDir() + "../../products/").c_str(); + strResourceSrcPath += QDir::separator()+m_productName + QDir::separator() + m_projectName + QDir::separator()+ "resource"; + if (dbDir.exists(strResourceSrcPath)) + { + dstList.append(strResourceDstPath); + srcList.append(strResourceSrcPath); + sig_showMsg(tr("复制文件resource...")); + } + else + { + sig_showMsg(tr("不复制文件resource...")); + } + m_pFileOpt->deleteDir(strDataDstPath); if (!m_pFileOpt->copyFiles(srcList, dstList)) { diff --git a/platform/src/dbms/db_manager_api/file_opt.cpp b/platform/src/dbms/db_manager_api/file_opt.cpp index 209a79eb..113e19d7 100644 --- a/platform/src/dbms/db_manager_api/file_opt.cpp +++ b/platform/src/dbms/db_manager_api/file_opt.cpp @@ -123,10 +123,14 @@ bool file_opt::copyDirectoryFiles(const QString& fromDir, const QString& toDir, continue; } - /**< 当允许覆盖操作时,将旧文件进行删除操作 */ - if ( coverFileIfExist && targetDir.exists( fileInfo.fileName() ) ) + /**< 当允许覆盖操作时,处理目标文件 */ + if ( coverFileIfExist ) { - targetDir.remove( fileInfo.fileName() ); + // 如果目标文件存在,先删除它 + if ( targetDir.exists( fileInfo.fileName() ) ) + { + targetDir.remove( fileInfo.fileName() ); + } } /// 进行文件copy