This commit is contained in:
jxder 2025-10-14 23:03:30 +08:00
commit a906bfaba7
5 changed files with 25 additions and 6 deletions

View File

@ -1015,6 +1015,21 @@ bool db_manager_api::initCompleteProjectExe()
srcList.append(strProductSrcPath); 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); m_pFileOpt->deleteDir(strDataDstPath);
if (!m_pFileOpt->copyFiles(srcList, dstList)) if (!m_pFileOpt->copyFiles(srcList, dstList))
{ {

View File

@ -123,11 +123,15 @@ bool file_opt::copyDirectoryFiles(const QString& fromDir, const QString& toDir,
continue; continue;
} }
/**< 当允许覆盖操作时,将旧文件进行删除操作 */ /**< 当允许覆盖操作时,处理目标文件 */
if ( coverFileIfExist && targetDir.exists( fileInfo.fileName() ) ) if ( coverFileIfExist )
{
// 如果目标文件存在,先删除它
if ( targetDir.exists( fileInfo.fileName() ) )
{ {
targetDir.remove( fileInfo.fileName() ); targetDir.remove( fileInfo.fileName() );
} }
}
/// 进行文件copy /// 进行文件copy
if ( !QFile::copy( fileInfo.filePath(), targetDir.filePath( fileInfo.fileName() ) ) ) if ( !QFile::copy( fileInfo.filePath(), targetDir.filePath( fileInfo.fileName() ) ) )

View File

@ -108,7 +108,7 @@ using namespace std;
const float CN_FesFloatCompare = 0.000001f;//用于浮点型数据的比较 const float CN_FesFloatCompare = 0.000001f;//用于浮点型数据的比较
const int CN_FesMaxProtocolNum = 64; //系统可接入规约数 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_FesMaxChangeMultiple = 5; //变化数据缓冲区为数据个数的倍数
const int CN_FesMaxDzParamSize =800; //定值参数最大长度 const int CN_FesMaxDzParamSize =800; //定值参数最大长度
const int CN_FesMaxDzNum =40; //定值最大个数一帧的定值个数最大40个(KBD104中规定 const int CN_FesMaxDzNum =40; //定值最大个数一帧的定值个数最大40个(KBD104中规定

View File

@ -101,7 +101,7 @@ using namespace std;
const float CN_FesFloatCompare = 0.000001;//用于浮点型数据的比较 const float CN_FesFloatCompare = 0.000001;//用于浮点型数据的比较
const int CN_FesMaxProtocolNum = 64; //系统可接入规约数 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_FesMaxChangeMultiple = 5; //变化数据缓冲区为数据个数的倍数
const int CN_FesMaxDzParamSize =800; //定值参数最大长度 const int CN_FesMaxDzParamSize =800; //定值参数最大长度
const int CN_FesMaxDzNum =40; //定值最大个数一帧的定值个数最大40个(KBD104中规定 const int CN_FesMaxDzNum =40; //定值最大个数一帧的定值个数最大40个(KBD104中规定

View File

@ -101,7 +101,7 @@ using namespace std;
const float CN_FesFloatCompare = 0.000001;//用于浮点型数据的比较 const float CN_FesFloatCompare = 0.000001;//用于浮点型数据的比较
const int CN_FesMaxProtocolNum = 64; //系统可接入规约数 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_FesMaxChangeMultiple = 5; //变化数据缓冲区为数据个数的倍数
const int CN_FesMaxDzParamSize =800; //定值参数最大长度 const int CN_FesMaxDzParamSize =800; //定值参数最大长度
const int CN_FesMaxDzNum =40; //定值最大个数一帧的定值个数最大40个(KBD104中规定 const int CN_FesMaxDzNum =40; //定值最大个数一帧的定值个数最大40个(KBD104中规定