|
@@ -186,7 +186,9 @@ namespace GLOBAL
|
|
|
StringCchPrintf(szIniPath, MAX_PATH, _T("%sSATService.ini"), g_szCurModuleDir);
|
|
|
|
|
|
HANDLE hFile = CreateFile(szIniPath, 0/*GENERIC_READ*/, 0, NULL, OPEN_EXISTING, 0, NULL);
|
|
|
-
|
|
|
+
|
|
|
+ // resoucre_run.cfg;
|
|
|
+ _stprintf_s(g_szPython27ResourceConfig, _T("%s%s"), g_szPython27Dir, "Lib\\site-packages\\ssat_sdk\\config\\resource_run.cfg");
|
|
|
if (ERROR_FILE_NOT_FOUND == GetLastError())
|
|
|
{
|
|
|
return -1;
|
|
@@ -199,6 +201,8 @@ namespace GLOBAL
|
|
|
_tcscat_s(g_stSATConfig.szScriptDir, MAX_PATH, "\\");
|
|
|
WritePrivateProfileString(_T("SATService"), _T("ScriptDir"), g_stSATConfig.szScriptDir, szIniPath);
|
|
|
}
|
|
|
+ // 同时将该目录写入resouce_run.cfg中;
|
|
|
+ WritePrivateProfileString(_T("SATService"), _T("ScriptDir"), g_stSATConfig.szScriptDir, g_szPython27ResourceConfig);
|
|
|
|
|
|
g_stSATConfig.dwAdbKillTime = GetPrivateProfileInt(_T("SATService"), _T("AdbKillTime"), 9000, szIniPath);
|
|
|
g_stSATConfig.dwAdbTimeout = GetPrivateProfileInt(_T("SATService"), _T("AdbTimeout"), 120000, szIniPath);
|
|
@@ -226,7 +230,6 @@ namespace GLOBAL
|
|
|
GetPrivateProfileString(_T("LinuxDevice"), _T("model"), _T(""), g_stSATConfig.stLinuxDevice.szModel, MAX_PATH, szIniPath);
|
|
|
|
|
|
// 读取其他目录的配置文件;sat_result_dir
|
|
|
- _stprintf_s(g_szPython27ResourceConfig, _T("%s%s"), g_szPython27Dir, "Lib\\site-packages\\ssat_sdk\\config\\resource_run.cfg");
|
|
|
GetPrivateProfileString(_T("COMM"), _T("serial_communicator_port"), _T(""), g_stSATConfig.szTVPort, MAX_PATH, g_szPython27ResourceConfig);
|
|
|
GetPrivateProfileString(_T("Abnormal"), _T("reboot"), NULL, g_stSATConfig.szTVReboot, MAX_PATH, g_szPython27ResourceConfig);
|
|
|
GetPrivateProfileString(_T("Abnormal"), _T("shutdown"), NULL, g_stSATConfig.szTVShutdown, MAX_PATH, g_szPython27ResourceConfig);
|