Quellcode durchsuchen

#IQRV #comment [Merge] 健康冲突合并

gifur vor 2 Jahren
Ursprung
Commit
3817579b65

+ 11 - 0
CMakeLists.txt

@@ -73,6 +73,7 @@ if($ENV{PIPELINE_BUILD_ID})
 	message(STATUS "DEVOPS_ARTIFACTID: $ENV{DEVOPS_ARTIFACTID}")
 	message(STATUS "PIPELINE_NUMBER: $ENV{PIPELINE_NUMBER}")
 	message(STATUS "PIPELINE_BRANCH: $ENV{PIPELINE_BRANCH}")
+	message(STATUS "RVC_TAG_ID: $ENV{RVC_TAG_ID}")
 	set(DEVOPS_ON TRUE)
 else()
 	set(GIT_HASH "unknown")
@@ -162,6 +163,7 @@ if(DEVOPS_ON)
 	if(DEFINED ENV{BUILD_AS_INSTALLER})
 		if($ENV{BUILD_AS_INSTALLER})
 			set(PACK_AS_DEB_PKG ON)
+			set(WITH_ADDITIONAL_RES ON)
 			message(STATUS "built as debian installer $ENV{BUILD_AS_INSTALLER}")
 		endif($ENV{BUILD_AS_INSTALLER})
 	endif(DEFINED ENV{BUILD_AS_INSTALLER})
@@ -175,6 +177,15 @@ if(DEVOPS_ON)
 	else()
 		set(RVC_VERSION_SUFFIX "$ENV{DEVOPS_ENV}_$ENV{PIPELINE_NAME}")
 	endif(DEVOPS_ON_CMAKE_PRD)
+
+	if(DEFINED ENV{RVC_TAG_ID})
+		set(ENV_RVC_TAG_ID_STR $ENV{RVC_TAG_ID})
+		string(LENGTH ${ENV_RVC_TAG_ID_STR} ENV_RVC_TAG_ID_STR_var)
+		if(${ENV_RVC_TAG_ID_STR_var})
+			set(RVC_VERSION_SUFFIX "${RVC_VERSION_SUFFIX}_${ENV_RVC_TAG_ID_STR}")
+		endif(${ENV_RVC_TAG_ID_STR_var})
+	endif(DEFINED ENV{RVC_TAG_ID})
+
 	if(NOT FORMAT_WITH_SUFFIX)
 		unset(RVC_VERSION_SUFFIX)
 	endif(NOT FORMAT_WITH_SUFFIX)

+ 1 - 0
DevAdapter/Note.md

@@ -5,6 +5,7 @@
 
 `conan export-pkg . LR04.02_MediaRes/testing -s arch=armv8 -s os=Linux -s compiler=gcc -s compiler.libcxx=libstdc++11 -s compiler.version=8 -s build_type=Debug`
 `conan upload Audio/2023.0509.01@LR04.02_MediaRes/testing --all -r=conan-cmb`
+`conan upload  sogouime/2.6.4.593@LR04.02_MediaRes/testing --all -r=conan-cmb`
 # 注意事项
 
 * 科堡适配器依赖:`sudo apt-get install libasound2-dev` (廖桂发,2021年2月5日)

+ 10 - 4
Module/mod_ResourceWatcher/ResourceWatcher.xml

@@ -229,16 +229,22 @@
     </twoway>
     <twoway  name="GetThirdPartyInstallState" overlap="true">
       <req>
-        <!---1: 搜狗输入法-->
+        <!---1: 表示获取搜狗输入法的安装信息,3,自定义检测程序安装情况-->
         <param name="mode" type="int" />
-		<param name="reserved1" type="int" />
-		<param name="reserved2" type="int" />
+        <param name="reserved1" type="int" />
+        <param name="reserved2" type="int" />
+        <!--新增两个字段,该接口确认为内部使用,TODO: SpGen更新-->
+        <param name="reserverd3" type="string"/>
+        <param name="reserverd4" type="string"/>
       </req>
       <res>
-        <!--1:已安装-->
+        <!--1:已安装,0:未安装-->
         <param name="status" type="int" />
+		<!-- 安装版本信息 -->
         <param name="version" type="string"/>
+		<!-- 安装路径 -->
         <param name="path" type="string"/>
+		<!-- 对于搜狗输入法,储存安装时间 -->
         <param name="reserverd1" type="string"/>
         <param name="reserverd2" type="string"/>
         <param name="reserverd3" type="int"/>

+ 82 - 240
Module/mod_ResourceWatcher/ResourceWatcherFSM.cpp

@@ -2584,33 +2584,44 @@ int ResourceWatcherFSM::ProcessFileDelete(LPCTSTR lpszPath, int& nDelSucCnt, int
 
 BOOL ResourceWatcherFSM::DeleteVersionPackage()
 {
-#ifdef RVC_OS_LINUX
     BOOL bRet = FALSE;
     ErrorCodeEnum erroCode = Error_Succeed;
     CSmartPointer<IEntityFunction> pFunc = GetEntityBase()->GetFunction();
     CSmartPointer<IConfigInfo> spConfigRun;
+    CSmartPointer<IConfigInfo> spConfig;
     CSystemStaticInfo info;
     if (pFunc->GetSystemStaticInfo(info) != Error_Succeed) {
         LogError(Severity_Middle, erroCode, 0, "Get system static info error");
         return FALSE;
     }
-    Dbg("Current version: %s", (LPCTSTR)info.InstallVersion.ToString());
+    DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("Current version: %s", (LPCTSTR)info.InstallVersion.ToString());
 
+    //判断是否需要被清理
     int nLastTaskTime = 0;
     int nLstFlag = 0;
+    int nDelCount = 0;
     UINT64 utVersion = 0;
+
+    int verSaved = DEFAULT_VERSION_SAVED_COUNT;
+    int tmpSaved = 0;
+    pFunc->OpenConfig(Config_CenterSetting, spConfig);
+    spConfig->ReadConfigValueInt("VersionSaved", "default", tmpSaved);
+    if (tmpSaved > DEFAULT_VERSION_SAVED_COUNT) {
+        verSaved = tmpSaved;
+    }
+
     pFunc->OpenConfig(Config_Run, spConfigRun);
     spConfigRun->ReadConfigValueHexInt("VersionClear", "OptVer", utVersion);
-    spConfigRun->ReadConfigValueInt("VersionClear", "LastCondi", nLstFlag); //last times is failed or not? failed:true
+    spConfigRun->ReadConfigValueInt("VersionClear", "DelVerCnt", nDelCount);
+    spConfigRun->ReadConfigValueInt("VersionClear", "LastCondi", nLstFlag);
     spConfigRun->ReadConfigValueInt("VersionClear", "LastTime", nLastTaskTime);
 
     CVersion optVer(utVersion);
     SYSTEMTIME stTaskTime = CSmallDateTime(nLastTaskTime).ToSystemTime();
-    Dbg("LastTime<%04d-%02d-%02d %02d:%02d:%02d>: OptVer: %s, LastCondi: %d",
-        stTaskTime.wYear, stTaskTime.wMonth, stTaskTime.wDay,
-        stTaskTime.wHour, stTaskTime.wMinute, stTaskTime.wSecond,
-        (LPCTSTR)optVer.ToString(), nLstFlag);
-
+    DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("LastTime<%04d-%02d-%02d %02d:%02d:%02d>: OptVer: %s, LastCondi: %d",
+                                                  stTaskTime.wYear, stTaskTime.wMonth, stTaskTime.wDay,
+                                                  stTaskTime.wHour, stTaskTime.wMinute, stTaskTime.wSecond,
+                                                  (LPCTSTR)optVer.ToString(), nLstFlag);
     //判断是否需要被清理
     if (optVer.IsValid() && optVer == info.InstallVersion && !nLstFlag) {
         Dbg("VersionPackage cleaning has been done before.");
@@ -2619,17 +2630,15 @@ BOOL ResourceWatcherFSM::DeleteVersionPackage()
 
     CSimpleStringA strRunInfo, strStartTime;
     if (m_pEntity->GetFunction()->GetPath("RunInfo", strRunInfo) == Error_Succeed) {
-        strStartTime = strRunInfo + "/runcfg/starttime.dat";
+        strStartTime = strRunInfo + SPLIT_SLASH_STR + "runcfg" + SPLIT_SLASH_STR + "starttime.dat";
         if (!ExistsFileA(strStartTime.GetData())) {
-            Dbg("upgrade porcess done, try to delete version files.");//完成升级过程,通过
-        }
-        else {
-            Dbg("upgrade process is not end ,should not delete version files.");
+            DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("upgrade prpcess done, try to delete version files.");//完成升级过程,通过
+        } else {
+            DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("upgrade process is not end ,should not delete version files.");
             return FALSE;//升级未完成,不进行删除
         }
-    }
-    else {
-        Dbg("upgrade process is not end ,get runinfo path is error, should not delete version files.");
+    } else {
+        DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("upgrade process is not end ,get runinfo path is error, should not delete version files.");
         return FALSE;//失败,继续等待
     }
 
@@ -2637,25 +2646,28 @@ BOOL ResourceWatcherFSM::DeleteVersionPackage()
     CSimpleStringA csPath;
     ErrorCodeEnum Error = m_pEntity->GetFunction()->GetPath("RootVer", csPath);   //获取当前版本路劲 例如:C:\Run
     if (Error_Succeed == Error) {
-        if (csPath.IsNullOrEmpty())
-        {
-            Dbg("get currVer path is null");
+        if (csPath.IsNullOrEmpty()) {
+            DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("get currVer path is null");
             return FALSE;
+        } else {
+            DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("CUR VERSION PATH = %s.", csPath.GetData());
         }
-        else
-        {
-            /*csPath.Append("/version");*/
-            Dbg("CUR VERSION PATH = %s.", csPath.GetData());
-        }
-    }
-    else {
-        Dbg("get upgradeVer path is error");
+    } else {
+        DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("get Ver path error");
         return FALSE;
     }
 
-    //vector<CInstallInfoEx> intallInfoVects;
     vector<CVersion> intallInfoVects;
     vector<string> files;
+
+    CSimpleStringA upPath;
+    ErrorCodeEnum upError = pFunc->GetPath("Upgraded", upPath);
+    if (Error_Succeed != upError) {
+        DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("get Upgraded path error");
+        return FALSE;
+    }
+
+#ifdef RVC_OS_LINUX
     DIR* dp;
     struct dirent* dirp;
 
@@ -2667,31 +2679,24 @@ BOOL ResourceWatcherFSM::DeleteVersionPackage()
             int n = sscanf(dirp->d_name, "%d.%d.%d.%d", &dwMajor, &dwMinor, &dwRevision, &dwBuild);
             if (n != 4)
             {
-                Dbg("Not version file.[%s]", dirp->d_name);
+                DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("Not version file.[%s]", dirp->d_name);
                 continue;
             }
             else {
                 CVersion verName(dwMajor, dwMinor, dwRevision, dwBuild);
                 if (verName.IsValid() && verName < info.InstallVersion)   //对高于自身版本的文件不予删除
                 {
-                    //verInfo.InstallVersion = verName;
                     intallInfoVects.push_back(verName);
                 }
                 else {
-                    Dbg("Not version file.[%s]", dirp->d_name);
+                    DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("Not version file.[%s]", dirp->d_name);
                 }
             }
         }
         closedir(dp);
     }
 
-    CSimpleStringA upPath;
-    ErrorCodeEnum upError = m_pEntity->GetFunction()->GetPath("Upgraded", upPath);
-    if (Error_Succeed != upError) {
-        Dbg("get Upgraded path error");
-        return FALSE;
-    }
-
+    //删除rvc/Upgraded目录下的文件
     DIR* updp;
     struct dirent* updirp;
     if ((updp = opendir(upPath.GetData())) != NULL) {
@@ -2699,156 +2704,19 @@ BOOL ResourceWatcherFSM::DeleteVersionPackage()
             char szPath[MAX_VERSION_PATH] = { 0 };
             strcat(szPath, upPath.GetData());
             CSimpleStringA tmpDirPath = szPath;
-            strcat(szPath, "/");
+            strcat(szPath, SPLIT_SLASH_STR);
             strcat(szPath, updirp->d_name);
-            Dbg("operating Upgrade path: [%s][%s]", (LPCTSTR)tmpDirPath, szPath);
+            DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("operating Upgrade path: [%s][%s]", (LPCTSTR)tmpDirPath, szPath);
             RemoveFileA(szPath);
         }
         closedir(updp);
     }
 
-    int verSaved = DEFAULT_VERSION_SAVED_COUNT;
-    int tmpSaved = 0;
-    CSmartPointer<IEntityFunction> spFunction = this->GetEntityBase()->GetFunction();
-    CSmartPointer<IConfigInfo> spConfig;
-    spFunction->OpenConfig(Config_Software, spConfig);
-    spConfig->ReadConfigValueInt("VersionSaved", "default", tmpSaved);
-    if (tmpSaved > DEFAULT_VERSION_SAVED_COUNT)
-    {
-        verSaved = tmpSaved;
-    }
-
-    int nPackCount = intallInfoVects.size();
-    Dbg("Install Package's count: %d", nPackCount);
-    bool bFailFlag = false;
-    int nDelVersionCnt = 0;
-    if (nPackCount != 0) {
-        int nSavedCount = 0;
-        sort(intallInfoVects.begin(), intallInfoVects.end());
-        //vector<CInstallInfoEx>::iterator iter = intallInfoVects.begin();
-        vector<CVersion>::reverse_iterator riter = intallInfoVects.rbegin();
-        while (riter != intallInfoVects.rend()) {
-            //Dbg("InstallPackage Info: %s, SwithOverDate: %s", (LPCTSTR)iter->InstallVersion.ToString(), (LPCTSTR)iter->tmSwithOverDate.ToTimeString());
-            Dbg("InstallPackage Info: %s", (LPCTSTR)(*riter).ToString());
-            if (++nSavedCount <= verSaved) {
-                Dbg("Save above version");
-                riter++;
-                continue;
-            }
-            //if (!DeleteSpecificeVersionDir(iter->InstallVersion))
-            if (!DeleteSpecificeVersionDir(*riter))
-                bFailFlag = true;
-            else
-                nDelVersionCnt++;
-
-            riter++;
-        }
-    }
-
-    nLstFlag = bFailFlag ? 1 : 0;
-    spConfigRun->WriteConfigValueHexInt("VersionClear", "OptVer", info.InstallVersion.GetVersion64());
-    spConfigRun->WriteConfigValueInt("VersionClear", "LastCondi", nLstFlag);
-    spConfigRun->WriteConfigValue("VersionClear", "LastTime",
-        (LPCTSTR)CSimpleStringA::Format("0x%08X", (DWORD)CSmallDateTime::GetNow()));
-
-    string warn = "Delete Version files count : " + to_string(nDelVersionCnt);
-    LogWarn(Severity_Low, Error_Debug, LOG_WARN_VER_DELETE, CSimpleStringA::Format("%s", warn.c_str()));
-
-    return TRUE;
 #else
-    BOOL bRet = FALSE;
-	ErrorCodeEnum erroCode = Error_Succeed;
-	CSmartPointer<IEntityFunction> pFunc = GetEntityBase()->GetFunction();
-	CSmartPointer<IConfigInfo> spConfigRun;
-	CSystemStaticInfo& info = m_RvcSysinfo;
-	erroCode = pFunc->GetSystemStaticInfo(info);
-	if (erroCode != Error_Succeed)
-	{
-		LogWarn(Severity_Middle, erroCode, 0, "Get system static info error");
-		return FALSE;
-	}
-
-	//判断是否需要被清理
-	erroCode = pFunc->OpenConfig(Config_Run, spConfigRun);
-	if (erroCode != Error_Succeed)
-	{
-		LogWarn(Severity_Middle, erroCode, 0, "Open Run Config failed");
-		return FALSE;
-	}
-
-	DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("Current version: %s", (LPCTSTR)info.InstallVersion.ToString());
-
-	int nLastTaskTime = 0;
-	int nLstFlag = 0;
-	int nDelCount = 0;
-	UINT64 utVersion = 0;
-
-	spConfigRun->ReadConfigValueHexInt("VersionClear", "OptVer", utVersion);
-	spConfigRun->ReadConfigValueInt("VersionClear", "DelVerCnt", nDelCount);
-	spConfigRun->ReadConfigValueInt("VersionClear", "LastCondi", nLstFlag);
-	spConfigRun->ReadConfigValueInt("VersionClear", "LastTime", nLastTaskTime);
-
-	CVersion optVer(utVersion);
-	SYSTEMTIME stTaskTime = CSmallDateTime(nLastTaskTime).ToSystemTime();
-	DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("LastTime<%04d-%02d-%02d %02d:%02d:%02d>: OptVer: %s, LastCondi: %d",
-		stTaskTime.wYear, stTaskTime.wMonth, stTaskTime.wDay,
-		stTaskTime.wHour, stTaskTime.wMinute, stTaskTime.wSecond,
-		(LPCTSTR)optVer.ToString(), nLstFlag);
-	SYSTEMTIME stNow = {};
-	GetLocalTime(&stNow);
-	if (optVer.IsValid() && optVer == info.InstallVersion && !nLstFlag)
-	{
-		DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("VersionPackage cleaning has been done before.");
-		return TRUE;
-	}
-
-	CSimpleStringA strRunInfo, strStartTime;
-	if (m_pEntity->GetFunction()->GetPath("RunInfo", strRunInfo) == Error_Succeed) {
-		strStartTime = strRunInfo + "\\runcfg\\starttime.dat";
-		if (!ExistsFileA(strStartTime.GetData())) {
-			DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("upgrade prpcess done, try to delete version files.");//完成升级过程,通过
-		}
-		else {
-			DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("upgrade process is not end ,should not delete version files.");
-			return FALSE;//升级未完成,不进行删除
-		}
-	}
-	else {
-		DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("upgrade process is not end ,get runinfo path is error, should not delete version files.");
-		return FALSE;//失败,继续等待
-	}
-
-	//获取当前目录下的文件夹名称, 将符合命名规则的终端版本名称push_back
-	CSimpleStringA csPath;
-	ErrorCodeEnum Error = m_pEntity->GetFunction()->GetPath("RootVer", csPath);   //获取当前版本路劲 例如:C:\Run
-	if (Error_Succeed == Error) {
-		if (csPath.IsNullOrEmpty())
-		{
-			DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("get currVer path is null");
-			return FALSE;
-		}
-		else
-		{
-			//csPath.Append("\\version");
-			DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("CUR VERSION PATH = %s.", csPath.GetData());
-		}
-	}
-	else {
-		DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("get Ver path error");
-		return FALSE;
-	}
-
-	//vector<CInstallInfoEx> intallInfoVects;
-	vector<CVersion> intallInfoVects;
-	vector<string> files;
 	long hFile = 0;
 	struct _finddata_t fileinfo;//文件信息读取结构
 	string p;
 
-	/*CSimpleStringA uiState;
-	m_pEntity->GetFunction()->GetSysVar("UIState", uiState);*/
-
-
 	if ((hFile = _findfirst(p.assign(string(csPath.GetData())).append("\\*").c_str(), &fileinfo)) != -1) {
 		do {
 			CInstallInfo verInfo = {};
@@ -2863,7 +2731,6 @@ BOOL ResourceWatcherFSM::DeleteVersionPackage()
 				CVersion verName(dwMajor, dwMinor, dwRevision, dwBuild);
 				if (verName.IsValid() && verName < info.InstallVersion)
 				{
-					//verInfo.InstallVersion = verName;
 					intallInfoVects.push_back(verName);
 				}
 				else {
@@ -2874,14 +2741,6 @@ BOOL ResourceWatcherFSM::DeleteVersionPackage()
 		_findclose(hFile);
 	}
 
-
-	CSimpleStringA upPath;
-	ErrorCodeEnum upError = m_pEntity->GetFunction()->GetPath("Upgraded", upPath);
-	if (Error_Succeed != upError) {
-		DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("get Upgraded path error");
-		return FALSE;
-	}
-
 	//删除rvc/Upgraded目录下的文件
 	struct _finddata_t upfileinfo;
 	long upFile = 0;
@@ -2891,7 +2750,7 @@ BOOL ResourceWatcherFSM::DeleteVersionPackage()
 			char szPath[MAX_VERSION_PATH] = { 0 };
 			strcat_s(szPath, upPath.GetData());
 			CSimpleStringA tmpDirPath = szPath;
-			strcat_s(szPath, "\\");
+			strcat_s(szPath, SPLIT_SLASH_STR);
 			strcat_s(szPath, upfileinfo.name);
 			DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("operating Upgrade path: [%s][%s]", (LPCTSTR)tmpDirPath, szPath);
 			RemoveFileA(szPath);
@@ -2899,64 +2758,47 @@ BOOL ResourceWatcherFSM::DeleteVersionPackage()
 		_findclose(upFile);
 	}
 
-	int verSaved = DEFAULT_VERSION_SAVED_COUNT;
-	int tmpSaved = 0;
-	CSmartPointer<IEntityFunction> spFunction = this->GetEntityBase()->GetFunction();
-	CSmartPointer<IConfigInfo> spConfig;
-	spFunction->OpenConfig(Config_CenterSetting, spConfig); //迁移至集中配置下
-	spConfig->ReadConfigValueInt("ResourceWatcher", "VersionSaved", tmpSaved);
-
-	if (tmpSaved > DEFAULT_VERSION_SAVED_COUNT)
-	{
-		verSaved = tmpSaved;
-	}
+#endif // RVC_OS_LINUX
 
-	int nPackCount = intallInfoVects.size();
-	DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("Install Package's count: %d", nPackCount);
-	bool bFailFlag = false;
-	int nDelVersionCnt = 0;
-	std::string tInfo("");
+    int nPackCount = intallInfoVects.size();
+    DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("Install Package's count: %d", nPackCount);
+    bool bFailFlag = false;
+    int nDelVersionCnt = 0;
+    std::string tInfo("");
 
-	if (nPackCount != 0)
-	{
-		int nSavedCount = 0;
-		sort(intallInfoVects.begin(), intallInfoVects.end());
-		//vector<CInstallInfoEx>::iterator iter = intallInfoVects.begin();
-		vector<CVersion>::reverse_iterator riter = intallInfoVects.rbegin();
-		while (riter != intallInfoVects.rend())
-		{
-			DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("InstallPackage Info: %s", (LPCTSTR)(*riter).ToString());
-			if (++nSavedCount <= verSaved)
-			{
-				DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("Save above version");
-				riter++;
-				continue;
-			}
-			if (!DeleteSpecificeVersionDir(*riter)) bFailFlag = true;
-			else
-			{
-				nDelVersionCnt++;
-				tInfo = tInfo + "|" + std::string((*riter).ToString().GetData());
-			}
-			riter++;
-		}
-	}
+    if (nPackCount != 0) {
+        int nSavedCount = 0;
+        sort(intallInfoVects.begin(), intallInfoVects.end());
+        vector<CVersion>::reverse_iterator riter = intallInfoVects.rbegin();
+        while (riter != intallInfoVects.rend()) {
+            DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("InstallPackage Info: %s", (LPCTSTR)(*riter).ToString());
+            if (++nSavedCount <= verSaved) {
+                DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("Save above version");
+                riter++;
+                continue;
+            }
+            if (!DeleteSpecificeVersionDir(*riter)) bFailFlag = true;
+            else {
+                nDelVersionCnt++;
+                tInfo = tInfo + "|" + std::string((*riter).ToString().GetData());
+            }
+            riter++;
+        }
+    }
 
-	nLstFlag = bFailFlag ? 1 : 0;
-	spConfigRun->WriteConfigValueHexInt("VersionClear", "OptVer", info.InstallVersion.GetVersion64());
-	spConfigRun->WriteConfigValueInt("VersionClear", "DelVerCnt", nDelCount + nDelVersionCnt);
-	spConfigRun->WriteConfigValueInt("VersionClear", "LastCondi", nLstFlag);
-	spConfigRun->WriteConfigValue("VersionClear", "LastTime",
-		(LPCTSTR)CSimpleStringA::Format("0x%08X", (DWORD)CSmallDateTime::GetNow()));
+    nLstFlag = bFailFlag ? 1 : 0;
+    spConfigRun->WriteConfigValueHexInt("VersionClear", "OptVer", info.InstallVersion.GetVersion64());
+    spConfigRun->WriteConfigValueInt("VersionClear", "DelVerCnt", nDelCount + nDelVersionCnt);
+    spConfigRun->WriteConfigValueInt("VersionClear", "LastCondi", nLstFlag);
+    spConfigRun->WriteConfigValue("VersionClear", "LastTime",
+                                  (LPCTSTR)CSimpleStringA::Format("0x%08X", (DWORD)CSmallDateTime::GetNow()));
 
-	if (nDelVersionCnt > 0)
-	{
-		std::string warn = "Delete Vesion file count : " + std::to_string((long long)nDelVersionCnt) + ".  ----- " + tInfo + ".";
-		LogWarn(Severity_Low, Error_Debug, LOG_WARN_VER_DELETE, CSimpleStringA::Format("%s", warn.c_str()));
-	}
+    if (nDelVersionCnt > 0) {
+        std::string warn = "Delete Vesion file count : " + std::to_string((long long)nDelVersionCnt) + ".  ----- " + tInfo + ".";
+        LogWarn(Severity_Low, Error_Debug, LOG_WARN_VER_DELETE, CSimpleStringA::Format("%s", warn.c_str()));
+    }
 
-	return TRUE;
-#endif // RVC_OS_LINUX
+    return TRUE;
 }
 
 BOOL ResourceWatcherFSM::DeleteSpecificeVersionDir(CVersion version)

+ 3 - 1
Module/mod_ResourceWatcher/ResourceWatcher_def_g.h

@@ -360,10 +360,12 @@ struct ResourceWatcherService_GetThirdPartyInstallState_Req
 	int mode;
 	int reserved1;
 	int reserved2;
+    CSimpleStringA reserverd3;
+    CSimpleStringA reserverd4;
 
 	void Serialize(SpBuffer &Buf)
 	{
-		auto & buf = Buf & mode & reserved1 & reserved2;
+		auto & buf = Buf & mode & reserved1 & reserved2 & reserverd3 & reserverd4;
 	}
 
 };

Datei-Diff unterdrückt, da er zu groß ist
+ 530 - 407
Module/mod_ResourceWatcher/mod_ResourceWatcher.cpp


+ 35 - 0
Module/mod_ResourceWatcher/mod_ResourceWatcher.h

@@ -295,6 +295,11 @@ public:
 
 	void ManipulateVersion(SpReqAnsContext<ResourceWatcherService_ManipulateVersion_Req, ResourceWatcherService_ManipulateVersion_Ans>::Pointer ctx);
 
+	void InstallSogou(SpReqAnsContext<ResourceWatcherService_InstallThirdPartyProgram_Req,
+		ResourceWatcherService_InstallThirdPartyProgram_Ans>::Pointer ctx);
+
+    void UninstallSogou(SpReqAnsContext<ResourceWatcherService_UninstallThirdPartyProgram_Req,
+					  ResourceWatcherService_UninstallThirdPartyProgram_Ans>::Pointer ctx);
 
 	virtual void OnSysVarEvent(const char* pszKey, const char* pszValue, const char* pszOldValue, const char* pszEntityName);
 
@@ -364,6 +369,10 @@ private:
 		ErrorCodeEnum ConfigMonitorSetting(const UOS::MonitorInfo& config);
 		std::vector<std::string> GetUserNameList(bool bExcludeRoot = false);
 		ErrorCodeEnum RunShellScript(LPCTSTR cmdline);
+
+		/// <summary>
+		/// 通过集中配置检测指定进程是否存在
+		/// </summary>
 		void CheckProcessStatus();
 
 
@@ -371,4 +380,30 @@ private:
 	ResourceWatcherFSM m_fsm;
 	CUUID m_uiCardSwiperStatusListener;
 	BOOL m_bInitMode;
+};
+
+struct InstallSogouTask : public ITaskSp
+{
+	SpReqAnsContext<ResourceWatcherService_InstallThirdPartyProgram_Req,
+		ResourceWatcherService_InstallThirdPartyProgram_Ans>::Pointer ctx;
+
+	ResourceWatcherEntity* m_pEntity;
+	InstallSogouTask(ResourceWatcherEntity* entity) :m_pEntity(entity) {}
+	void Process()
+	{
+		m_pEntity->InstallSogou(ctx);
+	}
+};
+
+struct UninstallSogouTask : public ITaskSp
+{
+    SpReqAnsContext<ResourceWatcherService_UninstallThirdPartyProgram_Req,
+        ResourceWatcherService_UninstallThirdPartyProgram_Ans>::Pointer ctx;
+
+    ResourceWatcherEntity* m_pEntity;
+	UninstallSogouTask(ResourceWatcherEntity* entity) :m_pEntity(entity) {}
+    void Process()
+    {
+        m_pEntity->UninstallSogou(ctx);
+    }
 };

+ 3 - 30
Module/mod_healthmanager/HealthManagerFSM.cpp

@@ -2749,7 +2749,6 @@ void CHealthManagerFSM::QueryHardwareInfo(SpReqAnsContext<HealthManagerService_Q
 #endif	
 
 	//oilyang@20230518 用来标注支持搜狗输入法新旧模式
-	//0:旧模式 1:新模式(TODO 待搜狗确定如何判断新旧)
 	ctx->Ans.reserved2 = 0;
 	ResourceWatcherService_ClientBase* pClient = new ResourceWatcherService_ClientBase(m_pEntity);
 	ErrorCodeEnum ec  = pClient->Connect();
@@ -2760,40 +2759,14 @@ void CHealthManagerFSM::QueryHardwareInfo(SpReqAnsContext<HealthManagerService_Q
 		req.mode = 1;
 		ec = pClient->GetThirdPartyInstallState(req, ans, 15000);
 		if (IS_SUCCEED(ec)) {
-			DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("Get Sogou version: %s", ans.version.GetData());
-			//搜狗提供的普通调用版本开始的版本号,高于或等于这个版本则为系统调用方式,低于则为SDK方式
-#if defined(_MSC_VER)
-			CVersion sysVersionStart(2, 6, 1, 1967);
-#else
-			CVersion sysVersionStart(2, 6, 4, 355);
-#endif //_MSC_VER
-			WORD nMajor(0), nMinor(0), nRevision(0), nBulid(0);
-			if (!ans.version.IsNullOrEmpty()) {
-				CAutoArray<CSimpleStringA> versionElems = ans.version.Split('.');
-				DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("Elems count: %d", versionElems.GetCount());
-				if (versionElems.GetCount() >= 1) {
-					nMajor = atoi(versionElems[0]);
-				}
-				if (versionElems.GetCount() >= 2) {
-					nMinor = atoi(versionElems[1]);
-				}
-				if (versionElems.GetCount() >= 3) {
-					nRevision = atoi(versionElems[2]);
-				}
-				if (versionElems.GetCount() >= 4) {
-					nBulid = atoi(versionElems[3]);
-				}
-			}
-			CVersion curVersion(nMajor, nMinor, nRevision, nBulid);
-			DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("Get Sogou version r: %s vs %s", curVersion.ToString().GetData(),
-				sysVersionStart.ToString().GetData());
+			DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("Get Sogou version: %s, %d", ans.version.GetData(), ans.reserverd3);
 			DWORD dwUserCode(HealthManager_UserErrorCode_SogouInput_UsingSDK);
-			if (curVersion >= sysVersionStart) {
+			if (ans.reserverd3 == 1) {
 				dwUserCode = HealthManager_UserErrorCode_SogouInput_UsingSys;
 				ctx->Ans.reserved2 = 1;
 			}
 			LogWarn(Severity_Low, Error_Debug, dwUserCode,
-				CSimpleStringA::Format("{\"version\": %s,\"installTime\": %s}", curVersion.ToString().GetData(), ans.reserverd1.GetData()));
+				CSimpleStringA::Format("{\"version\": %s,\"installTime\": %s}", ans.version.GetData(), ans.reserverd1.GetData()));
 		} else {
 			LogWarn(Severity_Low, ec, HealthManager_UserErrorCode_SogouInput_UsingSDK,
 				CSimpleStringA::Format("ResourceWatcher::GetThirdPartyInstallState invoked failed: %s", SpStrError(ec)));

+ 28 - 16
Module/mod_healthmanager/mod_healthmanager.cpp

@@ -3379,6 +3379,9 @@ void CHealthManagerEntity::DeployTerminal(SpReqAnsContext<HealthManagerService_D
 						ctx->Ans.array2[0] = ans.version;
 						ctx->Ans.array2[1] = ans.path;
 						ctx->Ans.array2[2] = ans.reserverd1; //安装时间
+                        ctx->Ans.array1[0] = ctx->Ans.array1[1] = ctx->Ans.array1[2] = 0;
+                        /** 传递是否已经是新版输入法 [Gifur@2023822]*/
+                        ctx->Ans.array1[0] = ans.reserverd3;
 					}
 				}
 
@@ -3391,7 +3394,7 @@ void CHealthManagerEntity::DeployTerminal(SpReqAnsContext<HealthManagerService_D
 			if (tmpResult != 0) {
 				tmpMsg = CSimpleStringA::Format("连接资源管理模块失败: %s", SpStrError((ErrorCodeEnum)tmpResult));
 				pClient->SafeDelete();
-				Dbg(tmpMsg);
+				DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)(tmpMsg);
 			}
 			else {
 				ResourceWatcherService_InstallThirdPartyProgram_Req req = {};
@@ -3400,24 +3403,33 @@ void CHealthManagerEntity::DeployTerminal(SpReqAnsContext<HealthManagerService_D
 				req.reserved1 = req.reserved2 = 0;
 				/** 健康实体过来的调用,1表示不直接重启机器 [Gifur@202275]*/
 				req.reserved1 = 1;
-				Dbg("to install...");
-				tmpResult = pClient->InstallThirdPartyProgram(req, ans, 60000);
-				if (tmpResult != 0) {
-					tmpMsg = CSimpleStringA::Format("调用安装请求返回错误:%s", SpStrError((ErrorCodeEnum)tmpResult));
-					Dbg(tmpMsg);
-				}
-				else {
+                DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("to install...");
+                tmpResult = pClient->InstallThirdPartyProgram(req, ans, 120000);
+                if (tmpResult != 0) {
+                    tmpMsg = CSimpleStringA::Format("调用安装请求返回错误:%s", SpStrError((ErrorCodeEnum)tmpResult));
+                    Dbg(tmpMsg);
+                } else {
 					tmpResult = ans.result;
 					tmpMsg = ans.msg;
 					if (tmpResult == 0) {
 						ctx->Ans.array1.Init(3);
 						ctx->Ans.array2.Init(3);
-						ctx->Ans.array2[0] = ans.reserverd1;
+						ctx->Ans.array2[0] = ans.reserverd1; //版本号
 						ctx->Ans.array2[1] = ans.path;
 						ctx->Ans.array2[2] = ans.reserverd2; //安装时间
+						ctx->Ans.array1[0] = ctx->Ans.array1[1] = ctx->Ans.array1[2] = 0;
+						if(!ans.reserverd1.IsNullOrEmpty())
+						{ /** 缺少字段,只能再查一次输入法状态,以获取新旧版输入法信息 [Gifur@2023825]*/
+                            ResourceWatcherService_GetThirdPartyInstallState_Req req1 = {};
+                            ResourceWatcherService_GetThirdPartyInstallState_Ans ans1 = {};
+                            req1.mode = 1;
+                            ErrorCodeEnum tmp1 = pClient->GetThirdPartyInstallState(req1, ans1, 30000);
+                            if (tmp1 == Error_Succeed && ans1.status == 1) {
+                                ctx->Ans.array1[0] = ans1.reserverd3;
+                            }
+						}
 					}
 				}
-
 				pClient->GetFunction()->CloseSession();
 			}
 
@@ -3435,7 +3447,7 @@ void CHealthManagerEntity::DeployTerminal(SpReqAnsContext<HealthManagerService_D
 			if (tmpResult != 0) {
 				tmpMsg = CSimpleStringA::Format("连接资源管理模块失败: %s", SpStrError((ErrorCodeEnum)tmpResult));
 				pClient->SafeDelete();
-				Dbg(tmpMsg);
+				DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)(tmpMsg);
 			}
 			else {
 				ResourceWatcherService_GetThirdPartyInstallState_Req req = {};
@@ -3445,7 +3457,7 @@ void CHealthManagerEntity::DeployTerminal(SpReqAnsContext<HealthManagerService_D
 				tmpResult = pClient->GetThirdPartyInstallState(req, ans, 30000);
 				if (tmpResult != 0) {
 					tmpMsg = CSimpleStringA::Format("获取安装状态请求失败: %s", SpStrError((ErrorCodeEnum)tmpResult));
-					Dbg(tmpMsg);
+					DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)(tmpMsg);
 				}
 				else {
 					ctx->Ans.param1 = 0;
@@ -3468,14 +3480,14 @@ void CHealthManagerEntity::DeployTerminal(SpReqAnsContext<HealthManagerService_D
 			if (tmpResult != 0) {
 				tmpMsg = CSimpleStringA::Format("连接资源管理模块失败: %s", SpStrError((ErrorCodeEnum)tmpResult));
 				pClient->SafeDelete();
-				Dbg(tmpMsg);
+				DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)(tmpMsg);
 			}
 			else {
 				ResourceWatcherService_InstallThirdPartyProgram_Req req = {};
 				ResourceWatcherService_InstallThirdPartyProgram_Ans ans = {};
 				req.type = 2; //
 				req.reserved1 = req.reserved2 = 0;
-				Dbg("to install font....");
+				DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("to install font....");
 				tmpResult = pClient->InstallThirdPartyProgram(req, ans, 60000);
 				if (tmpResult != 0) {
 					tmpMsg = CSimpleStringA::Format("调用安装请求返回错误:%s", SpStrError((ErrorCodeEnum)tmpResult));
@@ -3504,7 +3516,7 @@ void CHealthManagerEntity::DeployTerminal(SpReqAnsContext<HealthManagerService_D
 		strRootChosenFile = strRootIniFullPath + ".bak";
 		if (ExistsFileA(strRootChosenFile)) {
 			fileutil_delete_file(strRootChosenFile);
-			Dbg("to clear root.ini backup file.");
+			DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("to clear root.ini backup file.");
 		}
 
 		CSystemStaticInfo info;
@@ -3513,7 +3525,7 @@ void CHealthManagerEntity::DeployTerminal(SpReqAnsContext<HealthManagerService_D
 		GetFunction()->OpenConfig(Config_Cache, pConfig);
 		pConfig->WriteConfigValue("TerminalDeploy", "InstallVersion", info.InstallVersion.ToString());
 
-		Dbg("received finish install cmd!");
+		DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("received finish install cmd!");
 		LogWarn(Severity_High, Error_Debug, LOG_WARN_HEALTH_INSTALL_FINISHED, "install finished");
 		result = Error_Succeed;
 	}

+ 2 - 0
addin/cmake/DependencyConanFiles.cmake

@@ -80,6 +80,8 @@ else()
 	endif(PACK_AS_DEB_PKG)
 		
 	if(WITH_ADDITIONAL_RES)
+		#	2.6.4.593 TFS
+		# 2.6.1.1539 SDK
 		list(APPEND CONAN_CURPLATFORM_LIB_NAMES  sogouime/2.6.1.1539@LR04.02_MediaRes/testing)
 		list(APPEND CONAN_CURPLATFORM_LIB_NAMES HYQiHeiTTF/2021.1021.01@LR04.02_MediaRes/stable)
 		if(NOT PACK_AS_DEB_PKG)

+ 43 - 7
addin/res/ManagerDesktop/js/guide.js

@@ -93,6 +93,7 @@ var adapterTestFailedCount = 0;
 var apdaterTestAllBefore = 0;
 
 var globalSogouNewInstall = false;
+var globalSogouNewVesion = false;
 
 
 function clearAdapterSelectedValue()
@@ -1541,27 +1542,31 @@ $(function () {
         req.additional = 0;
         req.restartApp = false;
         req.restartPC = false;
-        req.timeout = 65000;
-
-        utilStartSubmitDialog();
+        req.timeout = 125000;
+        globalSogouNewVesion = false;
+        utilStartSubmitDialog("输入法安装可能会花比较长时间,请耐心等候...");
         RVC.HealthmanagerEntityCtrl.DeployTerminal(req, function(ret) {
             utilStopSubmitDialog();
             if(ret.errorCode === 0) {
                 let result = JSON.parse(ret[RVC.EntityController.sigResponseUUID])
                 if(result.result == 0) {
-                    
                     var tip = '安装成功!';
                     var sogouversion = '';
                     var sogouinstalltm = '';
+                    var sogouNewVersion = 0;
                     if(result.array2.length === 3) {
                         sogouversion = result.array2[0];
                         sogouinstalltm = result.array2[2];
+                        sogouNewVersion = result.array1[0];
                     }
                     if(sogouversion !== '') {
                         tip += '<br><br>版本:<strong>' + sogouversion + '</strong>';
                         tip += '<br>安装时间:<strong>' + sogouinstalltm + '</strong>';
                         $('#guide_sogou_install_finished_content').html(tip);
                         SogouInstallStateSwitch(2);
+                        if(sogouNewVersion === 1) {
+                            globalSogouNewVesion = true;
+                        }
                     } else if(sogouinstalltm != '') {
                         tip += '<br><br>版本:<strong style="color:#FF0000;">' + '无法获取版本信息' + '</strong>';
                         tip += '<br>安装时间:<strong>' + sogouinstalltm + '</strong>';
@@ -1595,14 +1600,15 @@ $(function () {
         req.type = 1; //搜狗输入法
         req.reserved1 = 0;
         req.reserved2 = 0;
-        req.timeout = 65000;
+        req.timeout = 125000;
 
-        utilStartSubmitDialog();
+        utilStartSubmitDialog("输入法卸载可能会花比较长时间,请耐心等候...");
         RVC.ResourceWatcherEntity.UninstallThirdPartyProgram(req, function(ret) {
             utilStopSubmitDialog();
             if(ret.errorCode === 0) {
                 let result = JSON.parse(ret[RVC.EntityController.sigResponseUUID])
                 if(result.result == 0) {
+                    globalSogouNewVesion = false;
                     utilStartAlertDialog('卸载成功!', function() {
                         globalSogouNewInstall = false;
                         DisplaySogouInstallState();
@@ -1670,6 +1676,7 @@ $(function () {
         req.restartApp = false;
         req.restartPC = false;
         req.timeout = 35000;
+        globalSogouNewVesion = false;
         utilStartSubmitDialog();
         RVC.HealthmanagerEntityCtrl.DeployTerminal(req, function(ret) {
             utilStopSubmitDialog();
@@ -1680,15 +1687,21 @@ $(function () {
                         var tip = '检测到输入法已安装!';
                         var sogouversion = '';
                         var sogouinstalltm = '';
+                        var sogouNewVersion = 0;
                         if(result.array2.length === 3) {
                             sogouversion = result.array2[0];
                             sogouinstalltm = result.array2[2];
+                            sogouNewVersion = result.array1[0];
                         }
                         if(sogouversion !== '') {
                             tip += '<br><br>版本:<strong>' + sogouversion + '</strong>';
                             tip += '<br>安装时间:<strong>' + sogouinstalltm + '</strong>';
                             SogouInstallStateSwitch(1);
                             $('#guide_sogou_installed_content').html(tip);
+                            if(sogouNewVersion === 1) {
+                                globalSogouNewVesion = true;
+                            }
+
                         } else if(sogouinstalltm != ''){
                             tip = '检测到输入法已安装!但相关服务进程未启动或异常,请优先重启设备,如果重启后仍出现问题,请点击下方<strong>卸载</strong>菜单后重装!'
                             tip += '<br><br>版本:<strong style="color:#FF0000;">' + '无法获取版本信息' + '</strong>';
@@ -2138,7 +2151,30 @@ $(function () {
                     RVC.GuideController.gotoPage(DEPLOY.DeployStep_GetTerminalInfo);
                 });
             } else {
-                RVC.GuideController.gotoPage(DEPLOY.DeployStep_GetTerminalInfo);
+                if(globalSogouNewVesion) {
+                    let req1 = new Request();
+                    req1.mode = 3;
+                    req1.reserved1 = 0;
+                    req1.reserved2 = 0;
+                    req1.reserverd3 = 'libdde-file-manager';
+                    req1.reserverd4 = '5.2.11.2-1';
+                    RVC.ResourceWatcherEntity.GetThirdPartyInstallState(req1, function(ret) {
+                        if(ret.errorCode === 0) {
+                            let result = JSON.parse(ret[RVC.EntityController.sigResponseUUID])
+                            if(result.status == 0 || result.status == 2) {
+                                utilStartAlertDialog("检测到安装的是新版的输入法!请先到下载站点<br/>(http://rvcterminalmonitor.paas.cmbchina.cn/#/downloads)<br/>完成UOS补丁包的下载和安装!否则影响应用外使用输入法");
+                            } else if(result.status == 1) {
+                                RVC.GuideController.gotoPage(DEPLOY.DeployStep_GetTerminalInfo);
+                            }
+                        } else {
+                            utilShowToast("检测UOS补丁包安装状态失败:" + ErrorCodeStringfy(ret.errorCode), 3000, function(){
+                                RVC.GuideController.gotoPage(DEPLOY.DeployStep_GetTerminalInfo);
+                            });
+                        }
+                    });
+                } else {
+                    RVC.GuideController.gotoPage(DEPLOY.DeployStep_GetTerminalInfo);
+                }
             }
         }
     });

+ 7 - 1
addin/res/ManagerDesktop/js/public.js

@@ -2075,18 +2075,24 @@ $(function () {
         entityName: 'HealthManager',
         className: 'HealthManagerService',
         methodID: {
+            QueryHardwareInfo: 5,
             ControlTerminalLife: 8,
             DeployTerminal : 9,
             ControlEntityLife : 10,
             Gateway : 11
         },
         methodSignature: {
+            QueryHardwareInfo: 1308469188,
             ControlTerminalLife: 397251033,
             DeployTerminal : -1435088905,
             ControlEntityLife:1220598826,
             Gateway : -1816595817
         },
-
+        QueryHardwareInfo: function (req, callback) {
+            this.webSocketInvokeEx(req, 
+                ({id:this.methodID.QueryHardwareInfo, sig:this.methodSignature.QueryHardwareInfo}),
+                 callback);
+        },
         ControlTerminalLife: function (req, callback) {
             req.entity = this.entityName;
             req.class = this.className;

+ 51 - 0
addin/res/RunScript/uninstall_tfs_sogouimebs.sh

@@ -0,0 +1,51 @@
+#/bin/bash
+
+CURRENT_PATH="`dirname \"$0\"`"              # relative
+ABS_CURRENT_PATH="`( cd \"$CURRENT_PATH\" && pwd )`"  # absolutized and normalized
+
+UOS_PKG_NAME=*.deb
+UOS_BROSWER="sogouimebs"
+UOS_VERSION=""
+currentInstallVersion=""
+
+check_dream_pkg_installed_or_not() {
+	currentInstallVersion=""
+	if [ "`dpkg -l | grep $UOS_BROSWER`" != "" ]; then
+		currentInstallVersion=$(dpkg -l | grep $UOS_BROSWER | awk '{print $3}')
+		echo "[UOS] Current Installed version: $currentInstallVersion"
+		if [ "$currentInstallVersion" = "$UOS_VERSION" ]; then
+			return 1
+		else
+			return 2
+		fi
+	fi
+	return 0
+}
+
+echo "[UOS] === Install Start === "
+echo "result=-1&msg=install begin"
+
+check_dream_pkg_installed_or_not
+res=$?
+
+if [ $res -eq 0 ]; then
+	echo "[UOS] === expected deb not installed before ===="
+	echo "result=0&msg=expected deb not installed before"
+	exit 0
+else
+	echo "result=-1&msg=pre installed verson: $currentInstallVersion"
+	sudo apt remove $UOS_BROSWER -y
+	sudo apt purge $UOS_BROSWER -y
+	sleep 1s
+	check_dream_pkg_installed_or_not
+	res=$?
+	if [ $res -eq 0 ]; then
+		sudo rm -rf /opt/sogouimebs
+		echo "result=0&msg=uninstall ok"
+		exit 0
+	else
+		echo "result=-2&msg=uninstall failed"
+		exit 1
+	fi
+fi
+

Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden.