|
@@ -1781,13 +1781,13 @@ bool CVtmLoaderFSM::GetConfig()
|
|
|
DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("[DepBak]%s,%s", SpStrError(ec), csDepPath.GetData());
|
|
|
} while (false);
|
|
|
|
|
|
- do
|
|
|
- {
|
|
|
- //更新适配器版本号文件内容
|
|
|
- CSimpleStringA csVersion("0.0.0.2");
|
|
|
- ec1 = GetEntityBase()->GetFunction()->GetPrivilegeFunction()->RewriteDepVersion(csVersion, true);
|
|
|
- DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("[RewriteDepVersion] %s,%s", SpStrError(ec1), csVersion.GetData());
|
|
|
- } while (false);
|
|
|
+ //do
|
|
|
+ //{
|
|
|
+ // //更新适配器版本号文件内容
|
|
|
+ // CSimpleStringA csVersion("0.0.0.2");
|
|
|
+ // ec1 = GetEntityBase()->GetFunction()->GetPrivilegeFunction()->RewriteDepVersion(csVersion, true);
|
|
|
+ // DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("[RewriteDepVersion] %s,%s", SpStrError(ec1), csVersion.GetData());
|
|
|
+ //} while (false);
|
|
|
|
|
|
|
|
|
do
|
|
@@ -2970,11 +2970,12 @@ bool CVtmLoaderFSM::CheckIfNeedCopyDepFiles()
|
|
|
#else
|
|
|
if (access(csPath.GetData(), F_OK) == 0) {
|
|
|
#endif
|
|
|
+ DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("depver.txt(%s) exist, no need to do dep copy.", csPath.GetData());
|
|
|
return false;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- DbgWithLink(LOG_LEVEL_ERROR, LOG_TYPE_SYSTEM)("depver.txt(%s) is not exist.", csPath.GetData());
|
|
|
+ DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("depver.txt(%s) is not exist.", csPath.GetData());
|
|
|
return true;
|
|
|
}
|
|
|
}
|
|
@@ -3008,15 +3009,23 @@ void CVtmLoaderFSM::CopyDepFilesToNewDepPath()
|
|
|
}
|
|
|
//xcopy C:\sourceDir C:\destDir /E /I /Y
|
|
|
//cp -r /path/to/source /path/to/destination
|
|
|
-#if defined(RVC_OS_WIN)
|
|
|
- CSimpleStringA csCmd;
|
|
|
- csCmd = CSimpleStringA::Format("xcopy %s %s /E /I /Y", csDepBakPath.GetData(), csPath.GetData());
|
|
|
- WinExec((LPCSTR)csCmd, SW_HIDE);
|
|
|
-
|
|
|
-#else
|
|
|
std::string sucContent, failedContent;
|
|
|
CSimpleStringA strCmd;
|
|
|
+#if defined(RVC_OS_WIN)
|
|
|
+ strCmd = CSimpleStringA::Format("xcopy %s %s /E /I /Y", csDepBakPath.GetData(), csPath.GetData());
|
|
|
+#else
|
|
|
strCmd = CSimpleStringA::Format("cp -r %s %s", csDepBakPath.GetData(), csPath.GetData());
|
|
|
- bool ret = SP::Module::Util::ShellExecute(strCmd.GetData(), sucContent, failedContent);
|
|
|
#endif //RVC_OS_WIN
|
|
|
+ DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("to execute:%s", strCmd.GetData());
|
|
|
+ ULONGLONG ullCopyBeginTick = SP::Module::Comm::RVCGetTickCount();
|
|
|
+ bool ret = SP::Module::Util::ShellExecute(strCmd.GetData(), sucContent, failedContent);
|
|
|
+ ULONGLONG ullCopyEndTick = SP::Module::Comm::RVCGetTickCount();
|
|
|
+ DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("ret:%d, sucContent:%s, failedContent:%s, costtime(ms):%d", ret, sucContent.c_str(), failedContent.c_str(), ullCopyEndTick - ullCopyBeginTick);
|
|
|
+ if (ret)
|
|
|
+ {
|
|
|
+ //更新适配器版本号文件内容
|
|
|
+ CSimpleStringA csVersion("0.0.0.1");
|
|
|
+ eErr = GetEntityBase()->GetFunction()->GetPrivilegeFunction()->RewriteDepVersion(csVersion, true);
|
|
|
+ DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("[RewriteDepVersion] %s,%s", SpStrError(eErr), csVersion.GetData());
|
|
|
+ }
|
|
|
}
|