Ver Fonte

Merge branch 'compile_upgrade_base230' into compile_upgrade_0402

# Conflicts:
#	Module/mod_sipphone/win/audio_session.cpp
80274480 há 1 ano atrás
pai
commit
393b0bd0c0
51 ficheiros alterados com 1010 adições e 2516 exclusões
  1. 8 3
      CMakeLists.txt
  2. 1 1
      DevAdapter/CMakeLists.txt
  3. 2 2
      DevAdapter/Note.md
  4. 22 20
      DevAdapter/self/cardissuer/VirtualDeviceClass.cpp
  5. 1 1
      DevAdapter/self/contactlesscard/VirtualDeviceClass.cpp
  6. 1 49
      DevAdapter/simulator/FingerPrint.1.1/FingerPrint_impl.cpp
  7. 9 9
      Module/mod_HSPScanner/HSPScannerFSM.h
  8. 1 1
      Module/mod_ResourceWatcher/ResourceWatcherFSM.cpp
  9. 2 2
      Module/mod_assistantchannel/mod_assistantchannel.cpp
  10. 70 25
      Module/mod_counterconnector/ConnectorFSM.cpp
  11. 27 27
      Module/mod_counterconnector/ConnectorFSM.h
  12. 2 2
      Module/mod_counterconnector/http_callrouter.cpp
  13. 84 67
      Module/mod_counterconnector/mod_counterconnector.cpp
  14. 7 8
      Module/mod_counterconnector/mod_counterconnector.h
  15. 1 1
      Module/mod_healthmanager/HealthManagerFSM.h
  16. 17 44
      Module/mod_healthmanager/mod_healthmanager.cpp
  17. 7 16
      Module/mod_healthmanager/mod_healthmanager.h
  18. 15 16
      Module/mod_interactivecontrol/mod_interactivecontrol.cpp
  19. 8 9
      Module/mod_interactivecontrol/mod_interactivecontrol.h
  20. 44 66
      Module/mod_mediacontroller/capture.cpp
  21. 12 4
      Module/mod_pinpad/PinPadFSM.h
  22. 1 1
      Module/mod_recorder/recordinfo.cpp
  23. 0 2
      Module/mod_sipphone/audio_session.h
  24. 41 141
      Module/mod_sipphone/win/audio_session.cpp
  25. 0 31
      Other/unix/libbizchan/bizchan.cpp
  26. 0 1
      Other/unix/libbizchan/bizchan.h
  27. 22 32
      Other/win/libaudioframework/audiomicspk2.c
  28. 2 24
      Other/win/libbizchan/bizchan.c
  29. 0 1
      Other/win/libbizchan/bizchan.h
  30. 6 0
      addin/Readme.txt
  31. 0 25
      addin/Run.ini.in
  32. 2 2
      addin/cfg/UserCodeToMsgTip.ini
  33. 3 0
      addin/hardwarecfg/root-input.ini
  34. 1 151
      addin/hardwarecfg/root.ini.unix
  35. 1 152
      addin/hardwarecfg/root.ini.win32
  36. 0 116
      addin/hardwarecfg/uos/root-RVC.Stand1SPlus-CW-CASH35AG-1201.ini
  37. 0 116
      addin/hardwarecfg/uos/root-RVC.Stand1SPlus-GRG-DT-7000I64A-048.ini
  38. 0 116
      addin/hardwarecfg/uos/root-RVC.Stand1SPlus-GWI-VTM700-A03.ini
  39. 0 116
      addin/hardwarecfg/uos/root-RVC.Stand1SPlus-KEBA-E1090.ini
  40. 0 116
      addin/hardwarecfg/uos/root-RVC.Stand1SPlus-NANTIAN-VTM-6200B15G.ini
  41. 0 116
      addin/hardwarecfg/uos/root-RVC.Stand1SPlus-SZZT-ZT2619.ini
  42. 0 154
      addin/hardwarecfg/uos/root-RVC.Stand2S-CW-CASH35AG-JR10(G).ini
  43. 0 153
      addin/hardwarecfg/uos/root-RVC.Stand2S-GRG-DT-7000I64A.ini
  44. 0 154
      addin/hardwarecfg/uos/root-RVC.Stand2S-KEBA-E1080-L.ini
  45. 99 0
      addin/install.bat
  46. 280 31
      addin/install.sh
  47. 0 335
      addin/installv2.sh
  48. 23 0
      addin/kill.bat
  49. 99 0
      addin/upgrade.bat
  50. 89 0
      addin/upgrade.sh
  51. 0 57
      rvc_test.bat

+ 8 - 3
CMakeLists.txt

@@ -572,7 +572,6 @@ message("Generated env.ini file in ${CMAKE_BINARY_DIR}")
 
 # Configure files
 configure_file("${CMAKE_CURRENT_SOURCE_DIR}/ChangeLog.in" ${CMAKE_BINARY_DIR}/ChangeLog @ONLY)
-configure_file("${CMAKE_CURRENT_SOURCE_DIR}/addin/Run.ini.in" "${CMAKE_BINARY_DIR}/Run.ini" @ONLY NEWLINE_STYLE CRLF)
 
 if(SIMULATE_ON)
 	if(EXISTS "${RVC_INSTALL_PREFIX}${CMAKE_INSTALL_BINDIR}" AND IS_DIRECTORY "${RVC_INSTALL_PREFIX}${CMAKE_INSTALL_BINDIR}")
@@ -716,14 +715,18 @@ install(FILES ${active_txt_file} DESTINATION ${RVC_BASE_PATH} COMPONENT scripts)
 
 if(MSVC)
 	file(GLOB BAT_SCRIPTS "${CMAKE_SOURCE_DIR}/addin/startup_scripts/*.vbs")
-	install(FILES "${CMAKE_SOURCE_DIR}/rvc_test.bat" DESTINATION ${OUTPUT_CUR_DISK_PATH}  COMPONENT scripts)
+	install(PROGRAMS "${CMAKE_SOURCE_DIR}/addin/install.bat" DESTINATION "${PACK_INSTALL_RUN_DIR}/./.." COMPONENT scripts)
+	install(PROGRAMS "${CMAKE_SOURCE_DIR}/addin/upgrade.bat" DESTINATION "${PACK_INSTALL_RUN_DIR}/./.." COMPONENT scripts)
 	install(FILES "${CMAKE_SOURCE_DIR}/addin/hardwarecfg/${ROOT_INI_NAME}" 
 	DESTINATION "${PACK_INSTALL_RUN_DIR}/hardwarecfg" 
 	RENAME "root.ini"
 	COMPONENT scripts)
+	if(NOT DEVOPS_ON_CMAKE_PRD)
+		install(PROGRAMS "${CMAKE_SOURCE_DIR}/addin/kill.bat" DESTINATION ${RVC_BASE_PATH} COMPONENT scripts)
+	endif(NOT DEVOPS_ON_CMAKE_PRD)
 else(MSVC)
 	file(GLOB BAT_SCRIPTS "${CMAKE_SOURCE_DIR}/addin/startup_scripts/*.sh")
-	file(GLOB VENDOR_ROOT_CONFIG_FILES "${CMAKE_SOURCE_DIR}/addin/hardwarecfg/uos/root-*.ini")
+	file(GLOB VENDOR_ROOT_CONFIG_FILES "${CMAKE_SOURCE_DIR}/addin/hardwarecfg/root-*.ini")
 	install(FILES ${VENDOR_ROOT_CONFIG_FILES} DESTINATION "${PACK_INSTALL_RUN_DIR}/hardwarecfg" COMPONENT scripts)
 	install(PROGRAMS ${BAT_SCRIPTS} DESTINATION "${RVC_BASE_PATH}" COMPONENT scripts)
 endif(MSVC)
@@ -731,6 +734,8 @@ endif(MSVC)
 # TODO: rewrite install.sh to match update pacakge.
 if(NOT MSVC AND NOT PACK_AS_DEB_PKG)
 	install(PROGRAMS "${CMAKE_SOURCE_DIR}/addin/install.sh" DESTINATION "${PACK_INSTALL_RUN_DIR}/./.." COMPONENT scripts)
+	install(PROGRAMS "${CMAKE_SOURCE_DIR}/addin/upgrade.sh" DESTINATION "${PACK_INSTALL_RUN_DIR}/./.." COMPONENT scripts)
+	install(FILES "${CMAKE_SOURCE_DIR}/addin/Readme.txt" DESTINATION "${PACK_INSTALL_RUN_DIR}/./.." COMPONENT scripts)
 endif(NOT MSVC AND NOT PACK_AS_DEB_PKG)
 
 list(REMOVE_DUPLICATES RVC_CONAN_DEP_LIBS)

+ 1 - 1
DevAdapter/CMakeLists.txt

@@ -259,7 +259,7 @@ else()
         #合入目前全量包中的DEP文件内容
         conan_cmake_run(REQUIRES VendorDLL/7.3.0@LR04.02_VendorLib/msvc
             BASIC_SETUP CMAKE_TARGETS)
-        set(SELF_CONAN_LIB_NAME self/2024.0314.02@LR04.02_VendorLib/testing)
+        set(SELF_CONAN_LIB_NAME self/2024.0403.01@LR04.02_VendorLib/testing)
         add_subdirectory(self)
     endif(MSVC)
     set(VENDOR_LOG_LIB_NAME log4vendor)

+ 2 - 2
DevAdapter/Note.md

@@ -11,8 +11,8 @@
 `conan export-pkg . LR04.02_ThirdParty/testing -s arch=x86 -s os=Windows -s compiler="Visual Studio" -s compiler.version=16  -s build_type=Release`
 `conan export-pkg . LR04.02_ThirdParty/testing -s arch=x86 -s os=Windows -s compiler="Visual Studio" -s compiler.version=16  -s build_type=Debug`
 
-`conan export-pkg . LR04.02_VendorLib/msvc -s arch=x86 -s os=Windows -s compiler="Visual Studio" -s compiler.version=16  -s build_type=Release`
-`conan export-pkg . LR04.02_VendorLib/msvc -s arch=x86 -s os=Windows -s compiler="Visual Studio" -s compiler.version=16  -s build_type=Debug`
+`conan export-pkg . LR04.02_VendorLib/testing -s arch=x86 -s os=Windows -s compiler="Visual Studio" -s compiler.version=16  -s build_type=Release`
+`conan export-pkg . LR04.02_VendorLib/testing -s arch=x86 -s os=Windows -s compiler="Visual Studio" -s compiler.version=16  -s build_type=Debug`
 
 `conan upload CEFControl/1.0@LR04.02_ThirdParty/testing --all -r=conan-cmb`
 * 科堡适配器依赖:`sudo apt-get install libasound2-dev` (廖桂发,2021年2月5日)

+ 22 - 20
DevAdapter/self/cardissuer/VirtualDeviceClass.cpp

@@ -77,6 +77,7 @@ ErrorCodeEnum VirtualDeviceClassImpl::GetDevStatus(CardIssuerStatus& devStatus)
 	return result;
 }
 
+//未找到引用
 ErrorCodeEnum VirtualDeviceClassImpl::GetDeviceSN(char*& pDevSN)
 {
 	ErrorCodeEnum result = Error_Unexpect;
@@ -109,6 +110,7 @@ ErrorCodeEnum VirtualDeviceClassImpl::MagRead(MagTracks& magTracks)
 {
 	ErrorCodeEnum result = Error_Unexpect;
 	Bridge_MagTracks inner;
+	inner.eRange = magTracks.eRange;
 	result = Bridge_MagRead(&inner);
 	if (result == Error_Succeed) {
 		magTracks.eRange = (TrackRange)inner.eRange;
@@ -271,7 +273,7 @@ ErrorCodeEnum VirtualDeviceClassImpl::ActiveICCardATR(CmdInfo& atrBuf)
 	}
 	return result;
 }
-
+//未找到引用
 ErrorCodeEnum VirtualDeviceClassImpl::Print(BYTE*& data, const int dataSize, const int side)
 {
 	ErrorCodeEnum result = Error_Unexpect;
@@ -287,7 +289,7 @@ ErrorCodeEnum VirtualDeviceClassImpl::Print(BYTE*& data, const int dataSize, con
 
 	return result;
 }
-
+//未找到引用
 ErrorCodeEnum VirtualDeviceClassImpl::QueryPrinterStatus()
 {
 	ErrorCodeEnum result = Error_Unexpect;
@@ -319,7 +321,7 @@ ErrorCodeEnum VirtualDeviceClassImpl::DeactContactlessICCard()
 	result = Bridge_DeactContactlessICCard();
 	return result;
 }
-
+//未找到引用
 ErrorCodeEnum VirtualDeviceClassImpl::MifareCommand(MifareFuctionEnum eFunType, CmdInfo sendBuf, CmdInfo& recvBuf)
 {
 	ErrorCodeEnum result = Error_Unexpect;
@@ -364,7 +366,7 @@ ErrorCodeEnum VirtualDeviceClassImpl::DevOpenEx(DWORD dwPort, DWORD dwBaudRate,
 	}
 	return result;
 }
-
+//未找到引用
 ErrorCodeEnum VirtualDeviceClassImpl::TransferEnInit(int& iStatus, BYTE*& Cr1, int& lenR1, BYTE*& Cr3, int& lenR3, BYTE*& dKey, int& lenKey)
 {
 	ErrorCodeEnum result = Error_Unexpect;
@@ -407,7 +409,7 @@ ErrorCodeEnum VirtualDeviceClassImpl::TransferEnInit(int& iStatus, BYTE*& Cr1, i
 
 	return result;
 }
-
+//未找到引用
 ErrorCodeEnum VirtualDeviceClassImpl::SetR2(int& iStatus, BYTE* pCr2, int lenR2)
 {
 	ErrorCodeEnum result = Error_Unexpect;
@@ -418,14 +420,14 @@ ErrorCodeEnum VirtualDeviceClassImpl::SetR2(int& iStatus, BYTE* pCr2, int lenR2)
 	}
 	return result;
 }
-
+//未找到引用
 ErrorCodeEnum VirtualDeviceClassImpl::SendWorkingKey(const char* pWorkingKey)
 {
 	ErrorCodeEnum result = Error_Unexpect;
 	result = Bridge_SendWorkingKey(pWorkingKey);
 	return result;
 }
-
+//未找到引用
 ErrorCodeEnum VirtualDeviceClassImpl::SLLoadKey(const SCIKeyInfo key)
 {
 	ErrorCodeEnum result = Error_Unexpect;
@@ -435,21 +437,21 @@ ErrorCodeEnum VirtualDeviceClassImpl::SLLoadKey(const SCIKeyInfo key)
 	result = Bridge_SLLoadKey(inner);
 	return result;
 }
-
+//未找到引用
 ErrorCodeEnum VirtualDeviceClassImpl::SLSetParam(SCIParamType eType, int value)
 {
 	ErrorCodeEnum result = Error_Unexpect;
 	result = Bridge_SLSetParam(eType, value);
 	return result;
 }
-
+//未找到引用
 ErrorCodeEnum VirtualDeviceClassImpl::SLLock()
 {
 	ErrorCodeEnum result = Error_Unexpect;
 	result = Bridge_SLLock();
 	return result;
 }
-
+//未找到引用
 ErrorCodeEnum VirtualDeviceClassImpl::SLUnLock(const SCICheckCode checkCode, bool bTemp /*= true*/)
 {
 	ErrorCodeEnum result = Error_Unexpect;
@@ -459,7 +461,7 @@ ErrorCodeEnum VirtualDeviceClassImpl::SLUnLock(const SCICheckCode checkCode, boo
 	result = Bridge_SLUnLock(inner, bTemp ? 1 : 0);
 	return result;
 }
-
+//未找到引用
 ErrorCodeEnum VirtualDeviceClassImpl::SLGetTempData(SCITempData& ksnData, SCITempData& ramData)
 {
 	ErrorCodeEnum result = Error_Unexpect;
@@ -475,7 +477,7 @@ ErrorCodeEnum VirtualDeviceClassImpl::SLGetTempData(SCITempData& ksnData, SCITem
 	}
 	return result;
 }
-
+//未找到引用
 ErrorCodeEnum VirtualDeviceClassImpl::SLOpenDoor(const SCITempData data)
 {
 	ErrorCodeEnum result = Error_Unexpect;
@@ -485,28 +487,28 @@ ErrorCodeEnum VirtualDeviceClassImpl::SLOpenDoor(const SCITempData data)
 	result = Bridge_SLOpenDoor(inner);
 	return result;
 }
-
+//未找到引用
 ErrorCodeEnum VirtualDeviceClassImpl::BluetoothControl(SCIBluetoothCMD eCmd)
 {
 	ErrorCodeEnum result = Error_Unexpect;
 	result = Bridge_BluetoothControl(eCmd);
 	return result;
 }
-
+//未找到引用
 ErrorCodeEnum VirtualDeviceClassImpl::BluetoothModifyKey(unsigned char* key)
 {
 	ErrorCodeEnum result = Error_Unexpect;
 	result = Bridge_BluetoothModifyKey(key);
 	return result;
 }
-
+//未找到引用
 ErrorCodeEnum VirtualDeviceClassImpl::BluetoothModifyName(unsigned char* name)
 {
 	ErrorCodeEnum result = Error_Unexpect;
 	result = Bridge_BluetoothModifyName(name);
 	return result;
 }
-
+//未找到引用
 ErrorCodeEnum VirtualDeviceClassImpl::BluetoothGetVersion(char*& version)
 {
 	ErrorCodeEnum result = Error_Unexpect;
@@ -520,7 +522,7 @@ ErrorCodeEnum VirtualDeviceClassImpl::BluetoothGetVersion(char*& version)
 	delete[] inner;
 	return result;
 }
-
+//未找到引用
 ErrorCodeEnum VirtualDeviceClassImpl::BluetoothGetConnectName(unsigned char*& name)
 {
 	ErrorCodeEnum result = Error_Unexpect;
@@ -534,7 +536,7 @@ ErrorCodeEnum VirtualDeviceClassImpl::BluetoothGetConnectName(unsigned char*& na
 	delete[] inner;
 	return result;
 }
-
+//未找到引用
 ErrorCodeEnum VirtualDeviceClassImpl::BluetoothGetSignalStrength(unsigned char*& signal)
 {
 	ErrorCodeEnum result = Error_Unexpect;
@@ -548,14 +550,14 @@ ErrorCodeEnum VirtualDeviceClassImpl::BluetoothGetSignalStrength(unsigned char*&
 	delete[] inner;
 	return result;
 }
-
+//未找到引用
 ErrorCodeEnum VirtualDeviceClassImpl::LightControl(SCILightType eLight, bool bOnOff)
 {
 	ErrorCodeEnum result = Error_Unexpect;
 	result = Bridge_LightControl(eLight, bOnOff ? 1 : 0);
 	return result;
 }
-
+//未找到引用
 ErrorCodeEnum VirtualDeviceClassImpl::QueryBatteryPower(int& bat)
 {
 	ErrorCodeEnum result = Error_Unexpect;

+ 1 - 1
DevAdapter/self/contactlesscard/VirtualDeviceClass.cpp

@@ -100,7 +100,7 @@ ErrorCodeEnum VirtualDeviceClassImpl::WarmReset()
 	ErrorCodeEnum result = Error_Succeed;
 	return (result = Bridge_WarmReset());
 }
-
+//δÕÒµ½ÒýÓÃ
 ErrorCodeEnum VirtualDeviceClassImpl::MifareCommand(MifareFuctionEnum eFunType, CmdInfo sendBuf, CmdInfo& recvBuf)
 {
 	ErrorCodeEnum result = Error_Unexpect;

+ 1 - 49
DevAdapter/simulator/FingerPrint.1.1/FingerPrint_impl.cpp

@@ -42,53 +42,7 @@ BOOL APIENTRY DllMain( HMODULE hModule,
     return TRUE;
 }
 #endif
-//string GetLocalIP()
-//{
-//#ifdef RVC_OS_WIN
-//	hostent* ent = gethostbyname(NULL);
-//	if (ent && ent->h_addr_list[0] != NULL)
-//	{
-//		int i = 0;
-//		for (; ent->h_addr_list[i] != NULL; ++i)
-//		{
-//			struct in_addr* in = (struct in_addr*)ent->h_addr_list[i];
-//			if (in->S_un.S_un_b.s_b1 == 99 || in->S_un.S_un_b.s_b1 == 10)
-//				break;
-//		}
-//
-//		if (ent->h_addr_list[i] == NULL)
-//			i = 0;
-//
-//		auto in = (struct in_addr*)ent->h_addr_list[i];
-//		char xIP[64] = {};
-//		sprintf(xIP, "%d.%d.%d.%d", in->S_un.S_un_b.s_b1, in->S_un.S_un_b.s_b2, in->S_un.S_un_b.s_b3, in->S_un.S_un_b.s_b4);
-//		LOG4VTM(INFO, ("ip:%s", xIP));
-//
-//		return string(xIP);
-//	}
-//#else
-//	std::string re = "";
-//	int sfd, intr;
-//	struct ifreq buf[16];
-//	struct ifconf ifc;
-//	sfd = socket(AF_INET, SOCK_DGRAM, 0);
-//	if (sfd < 0)
-//		return "wrong 1: get ip socket failed";
-//	ifc.ifc_len = sizeof(buf);
-//	ifc.ifc_buf = (caddr_t)buf;
-//	if (ioctl(sfd, SIOCGIFCONF, (char*)&ifc))
-//		return "wrong 2: get ip ioctl failed";
-//	intr = ifc.ifc_len / sizeof(struct ifreq);
-//	while (intr-- > 0 && ioctl(sfd, SIOCGIFADDR, (char*)&buf[intr]));
-//	close(sfd);
-//	unsigned long ip = ntohl(((struct sockaddr_in*)(&buf[intr].ifr_addr))->sin_addr.s_addr);
-//
-//	char* str = new char[1024];
-//	sprintf(str, "%u.%u.%u.%u", ip >> 24 & 0xFF, ip >> 16 & 0xFF, ip >> 8 & 0xFF, ip >> 0 & 0xFF);
-//	re = str;
-//	return re;
-//#endif
-//}
+
 string get_current_directory() {
 	char buff[256];
 	GetCurrentDir(buff, 256);
@@ -190,7 +144,6 @@ ErrorCodeEnum FingerPrintImpl::DevOpen(DWORD dwPort, DWORD dwBaudRate)
 
 ErrorCodeEnum FingerPrintImpl::Image2Feature(const char* imageName, LPBYTE lpbFeature, int& iLength)
 {
-	return Error_Succeed;
 	//imageName写入的文件,lpbFeature 特征码,iLength特征码长度
 	string imgName(imageName);
 	string imgPath = get_current_directory() + SPLIT_SLASH_STR + "dep" + SPLIT_SLASH_STR + imgName;
@@ -217,7 +170,6 @@ ErrorCodeEnum FingerPrintImpl::Image2Template(const char* imagePath1, const char
 	else {
 		return Error_Exception;
 	}
-	return Error_Succeed;
 }
 
 ErrorCodeEnum FingerPrintImpl::Match(LPBYTE lpbTemplate[], int iTemplateLen[], int templateNum, LPBYTE lbpFeature, int& iFeatureLen, int level /*= 3*/)

+ 9 - 9
Module/mod_HSPScanner/HSPScannerFSM.h

@@ -81,7 +81,7 @@ public:
 	{
 		if(m_ctx != NULL)
 		{
-			DbgWithLink(LOG_LEVEL_ERROR, LOG_TYPE_USER).setAPI(HSPScannerService_LogCode_StartPreview).setResultCode("RTA2N0V")();
+			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setAPI(HSPScannerService_LogCode_StartPreview).setResultCode("RTA2N0V")("Error_InvalidState");
 			m_ctx->Answer(Error_InvalidState, HSPScanner_UserErrorCode_FSM_INVALID);
 		}
 	}
@@ -98,7 +98,7 @@ public:
 	{
 		if(m_ctx != NULL)
 		{
-			DbgWithLink(LOG_LEVEL_ERROR, LOG_TYPE_USER).setAPI(HSPScannerService_LogCode_CancelPreview).setResultCode("RTA2N0V")();
+			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setAPI(HSPScannerService_LogCode_CancelPreview).setResultCode("RTA2N0V")("Error_InvalidState");
 			m_ctx->Answer(Error_InvalidState, HSPScanner_UserErrorCode_FSM_INVALID);
 		}
 	}
@@ -115,7 +115,7 @@ public:
 	{
 		if(m_ctx != NULL)
 		{
-			DbgWithLink(LOG_LEVEL_ERROR, LOG_TYPE_USER).setAPI(HSPScannerService_LogCode_ScanImage).setResultCode("RTA2N0V")();
+			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setAPI(HSPScannerService_LogCode_ScanImage).setResultCode("RTA2N0V")("Error_InvalidState");
 			m_ctx->Answer(Error_InvalidState, HSPScanner_UserErrorCode_FSM_INVALID);
 		}
 	}
@@ -132,7 +132,7 @@ public:
 	{
 		if(m_ctx != NULL)
 		{
-			DbgWithLink(LOG_LEVEL_ERROR, LOG_TYPE_USER).setAPI(HSPScannerService_LogCode_ScanImageEx).setResultCode("RTA2N0V")();
+			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setAPI(HSPScannerService_LogCode_ScanImageEx).setResultCode("RTA2N0V")("Error_InvalidState");
 			m_ctx->Answer(Error_InvalidState, HSPScanner_UserErrorCode_FSM_INVALID);
 		}
 	}
@@ -149,7 +149,7 @@ public:
 	{
 		if(m_ctx != NULL)
 		{
-			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_USER).setAPI(HSPScannerService_LogCode_ShowProperty).setResultCode("RTA2N0V")();
+			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setAPI(HSPScannerService_LogCode_ShowProperty).setResultCode("RTA2N0V")("Error_InvalidState");
 			m_ctx->Answer(Error_InvalidState, HSPScanner_UserErrorCode_FSM_INVALID);
 		}
 	}
@@ -166,7 +166,7 @@ public:
 	{
 		if(m_ctx != NULL)
 		{
-			DbgWithLink(LOG_LEVEL_ERROR, LOG_TYPE_USER).setAPI(HSPScannerService_LogCode_SetProperty).setResultCode("RTA2N0V")();
+			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setAPI(HSPScannerService_LogCode_SetProperty).setResultCode("RTA2N0V")("Error_InvalidState");
 			m_ctx->Answer(Error_InvalidState, HSPScanner_UserErrorCode_FSM_INVALID);
 		}
 	}
@@ -183,7 +183,7 @@ public:
 	{
 		if(m_ctx != NULL)
 		{
-			DbgWithLink(LOG_LEVEL_ERROR, LOG_TYPE_USER).setAPI(HSPScannerService_LogCode_SetWinPos).setResultCode("RTA2N0V")();
+			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setAPI(HSPScannerService_LogCode_SetWinPos).setResultCode("RTA2N0V")("Error_InvalidState");
 			m_ctx->Answer(Error_InvalidState, HSPScanner_UserErrorCode_FSM_INVALID);
 		}
 	}
@@ -200,7 +200,7 @@ public:
 	{
 		if(m_ctx != NULL)
 		{
-			DbgWithLink(LOG_LEVEL_ERROR, LOG_TYPE_USER).setAPI(HSPScannerService_LogCode_GetDevStatus).setResultCode("RTA2N0V")();
+			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setAPI(HSPScannerService_LogCode_GetDevStatus).setResultCode("RTA2N0V")("Error_InvalidState");
 			m_ctx->Answer(Error_InvalidState, HSPScanner_UserErrorCode_FSM_INVALID);
 		}
 	}
@@ -217,7 +217,7 @@ public:
 	{
 		if(m_ctx != NULL)
 		{
-			DbgWithLink(LOG_LEVEL_ERROR, LOG_TYPE_USER).setAPI(HSPScannerService_LogCode_GetDevInfo).setResultCode("RTA2N0V")();
+			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setAPI(HSPScannerService_LogCode_GetDevInfo).setResultCode("RTA2N0V")("Error_InvalidState");
 			m_ctx->Answer(Error_InvalidState, HSPScanner_UserErrorCode_FSM_INVALID);
 		}
 	}

+ 1 - 1
Module/mod_ResourceWatcher/ResourceWatcherFSM.cpp

@@ -3180,7 +3180,7 @@ void ResourceWatcherFSM::CreateLink(const CSimpleStringA& exePath)
         strncpy_s(szVersion, sizeof(szVersion), szTemp, _TRUNCATE);
         fclose(pFile);
 
-        icoPath = icoPath + "\\" + szVersion + "\\bin\\VTM_IL.ico";
+        icoPath = icoPath + "\\" + szVersion + "\\bin\\VTM.ico";
         if (!CreateLinkFile(exePath, "", s, icoPath))
         {
             DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("CreateLinkFile DESKTOP fail");

+ 2 - 2
Module/mod_assistantchannel/mod_assistantchannel.cpp

@@ -467,9 +467,9 @@ void CBizChannelEntity::_on_close()
 void ChannelServiceSession::Handle_Connect( SpReqAnsContext<ChannelService_Connect_Req, ChannelService_Connect_Ans>::Pointer ctx )
 {
 	DbgToBeidou(ctx->link, __FUNCTION__)();
-	//DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("start connect, %s:%d [%s]", (LPCSTR)ctx->Req.ip, ctx->Req.port, (LPCSTR)ctx->Req.callno);
+	DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("start connect, %s:%d [%s]", (LPCSTR)ctx->Req.ip, ctx->Req.port, (LPCSTR)ctx->Req.callno);
 	ErrorCodeEnum Error = m_pEntity->Connect(ctx->Req.ip, ctx->Req.port, ctx->Req.callno, (CallingTypeEnum)ctx->Req.etype);
-	//DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("connect Error = %d", Error);
+	DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("connect Error = %d", Error);
 	ctx->Answer(Error);
 }
 

+ 70 - 25
Module/mod_counterconnector/ConnectorFSM.cpp

@@ -49,7 +49,7 @@ unsigned long GetTickCount()
 class  SyncServiceClient:public SyncService_ClientBase
 {
 public:
-	 SyncServiceClient(CEntityBase *pEntity, ACMCallFSM* fsm) : SyncService_ClientBase(pEntity), m_fsm(fsm) {}
+	SyncServiceClient(CEntityBase *pEntity, ACMCallFSM* fsm) : SyncService_ClientBase(pEntity), m_fsm(fsm) {}
 	ACMCallFSM *m_fsm;
 };
 
@@ -188,10 +188,10 @@ ErrorCodeEnum ACMCallFSM::OnInit()
 		ParseDefaultServer(m_strDefaultServer.GetData());
 	}
 
-	m_bHangup = FALSE;
-	m_bHandFree = TRUE;
-	m_bAgentHandFree = TRUE;
-	m_bIsAgentControl = FALSE;
+	m_bHangup = false;
+	m_bHandFree = true;
+	m_bAgentHandFree = true;
+	m_bIsAgentControl = false;
 	m_nSipErrorNum = 0;
 	m_nLiveDetctionTime = 0;
 	memset(&m_CallingParam,0,sizeof(m_CallingParam));
@@ -209,10 +209,13 @@ on_error:
 	return Error;
 }
 
-BOOL ACMCallFSM::ReConnectionAssistchan()
+bool ACMCallFSM::ReConnectionAssistchan()
 {
 	if (m_pChannelClient != NULL){
 		m_pChannelClient->GetFunction()->CloseSession();
+#ifdef RVC_OS_WIN
+		m_pChannelClient->SafeDelete();
+#endif
 		m_pChannelClient = NULL;
 	}
 
@@ -221,8 +224,11 @@ BOOL ACMCallFSM::ReConnectionAssistchan()
 		ErrorCodeEnum Error = m_pChannelClient->Connect();
 		if (Error != Error_Succeed) {
 			DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("m_channelClient connect fail!");
+#ifdef RVC_OS_WIN
+			m_pChannelClient->SafeDelete();
+#endif
 			m_pChannelClient = NULL;
-			return FALSE;
+			return false;
 		}
 
 		if (Error == Error_Succeed){
@@ -231,18 +237,24 @@ BOOL ACMCallFSM::ReConnectionAssistchan()
 			if (Error != Error_Succeed){
 				DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("BeginState biz channel failed!");
 				m_pChannelClient->GetFunction()->CloseSession();
+#ifdef RVC_OS_WIN
+				m_pChannelClient->SafeDelete();
+#endif
 				m_pChannelClient = NULL;
-				return FALSE;
+				return false;
 			}
 		}
 	}
-	return TRUE;
+	return true;
 }
 
-BOOL ACMCallFSM::ReConnectionSipphone(bool bLog)
+bool ACMCallFSM::ReConnectionSipphone(bool bLog)
 {
 	if (m_pPhoneClient != NULL){
 		m_pPhoneClient->GetFunction()->CloseSession();
+#ifdef RVC_OS_WIN
+		m_pPhoneClient->SafeDelete();
+#endif
 		m_pPhoneClient = NULL;
 	}
 
@@ -253,8 +265,11 @@ BOOL ACMCallFSM::ReConnectionSipphone(bool bLog)
 			if (bLog) {
 				LogWarn(Severity_Low, Error_Debug, EVENT_MOD_CONNECT_SIPPHONE_ERROR, "connect sip phone error");
 			}
+#ifdef RVC_OS_WIN
+			m_pPhoneClient->SafeDelete();
+#endif
 			m_pPhoneClient = NULL;
-			return FALSE;
+			return false;
 		}
 
 		if (Error == Error_Succeed)
@@ -264,19 +279,25 @@ BOOL ACMCallFSM::ReConnectionSipphone(bool bLog)
 			if (Error != Error_Succeed) {
 				DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("BeginState sip failed!");
 				m_pPhoneClient->GetFunction()->CloseSession();
+#ifdef RVC_OS_WIN
+				m_pPhoneClient->SafeDelete();
+#endif			
 				m_pPhoneClient = NULL;
-				return FALSE;
+				return false;
 			}
 		}
 	}
-	return TRUE;
+	return true;
 }
 
 
-BOOL ACMCallFSM::ReConnectionSyncService()
+bool ACMCallFSM::ReConnectionSyncService()
 {
 	if (NULL != m_pSyncServiceClient){
 		m_pSyncServiceClient->GetFunction()->CloseSession();
+#ifdef RVC_OS_WIN
+		m_pSyncServiceClient->SafeDelete();
+#endif	
 		m_pSyncServiceClient = NULL;
 	}
 
@@ -284,11 +305,14 @@ BOOL ACMCallFSM::ReConnectionSyncService()
 	ErrorCodeEnum Error = m_pSyncServiceClient->Connect();
 	if (Error_Succeed != Error){
 		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("Connect SyncService Fail!");
+#ifdef RVC_OS_WIN
+		m_pSyncServiceClient->SafeDelete();
+#endif
 		m_pSyncServiceClient = NULL;
-		return FALSE;
+		return false;
 	}
 
-	return TRUE;
+	return true;
 }
 
 int ACMCallFSM::GetCallRouteList()
@@ -697,31 +721,43 @@ unsigned int ACMCallFSM::s0_on_event(FSMEvent* event)
 	else if (event->iEvt == USER_EVT_ASSISTCHAN_IDEL)
 	{
 		if (ReConnectionAssistchan()) {
-			m_bConAssist = TRUE;
+			m_bConAssist = true;
 		}
 	}
 	else if (event->iEvt == USER_EVT_SIPPHONE_IDEL)
 	{
 		if (ReConnectionSipphone()) {
-			m_bConSipphone = TRUE;
+			m_bConSipphone = true;
 		}
 	}
 	else if (event->iEvt == USER_EVT_STARTVIDEODISPLAY) 
 	{
 		StartVideoDisplayEvent *e = static_cast<StartVideoDisplayEvent *>(event);
+#ifdef RVC_OS_WIN
+		StartVideo((LPCSTR)e->m_param);
+#else
 		StartVideoRender((LPCSTR)e->m_param);
+#endif
 	}
 	else if (event->iEvt == USER_EVT_SHOWLOACALVIDEO)
 	{
 		ShowLocalVideoEvent *e = static_cast<ShowLocalVideoEvent *>(event);
 		SetCallingType(NORMAL_CALLTYPE);
+#ifdef RVC_OS_WIN
+		StartVideo((LPCSTR)e->m_param);
+#else
 		StartVideoRender((LPCSTR)e->m_param);
+#endif
 	}
 	else if (event->iEvt == USER_EVT_SHOWLOACALREMOTEVIDEO)
 	{
 		ShowLocalAndRemoteVideoEvent *e = static_cast<ShowLocalAndRemoteVideoEvent *>(event);
 		SetCallingType(NORMAL_CALLTYPE);
+#ifdef RVC_OS_WIN
+		StartVideo((LPCSTR)e->m_param);
+#else
 		StartVideoRender((LPCSTR)e->m_param);
+#endif
 	}
 	else if (event->iEvt == USER_EVT_DOUBLE_RECORD_CALL)
 	{
@@ -733,8 +769,12 @@ unsigned int ACMCallFSM::s0_on_event(FSMEvent* event)
 	}
 	else if (event->iEvt == USER_EVT_STOPLOACALREMOTEVIDEO) 
 	{
+#ifdef RVC_OS_WIN
+		StopVideo();
+		SetCallingType(NORMAL_CALLTYPE);
+#else
 		DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("%s:%d, stop show local and remote video.", __FUNCTION__, __LINE__);
-
+#endif
 	}
 	return 0;
 }
@@ -1060,12 +1100,13 @@ void ACMCallFSM::s12_on_entry()
 		else
 		{
 			m_LastAssistError = StartChannel((int)m_nCurChanServer,m_CallingParam);
-			//if (DOUBLERECORD_CALLTYPE == m_CallingParam.nCallType){
-			//	if (FALSE == m_bHandFree){
-			//		StopSpeakerAudioCapture();
-			//		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("double record call type, current is pick up mode, stop speaker audio capture.");
-			//	}
-			//}
+#ifdef RVC_OS_WIN
+			if (DOUBLERECORD_CALLTYPE == m_CallingParam.nCallType){
+				if (FALSE == m_bHandFree){
+					StopSpeakerAudioCapture();
+				}
+			}
+#endif
 		}
 
 		if (m_LastAssistError != Error_Succeed) 
@@ -1232,7 +1273,11 @@ unsigned int ACMCallFSM::s14_on_event(FSMEvent* event)
 {
 	if (event->iEvt == USER_EVT_STOPLOACALREMOTEVIDEO) 
 	{
+#ifdef RVC_OS_WIN
+		StopVideo();
+#else
 		StopVideoRender();
+#endif
 	}
 	else if (event->iEvt == USER_EVT_STOP_RECORD_BROADCAST)
 	{

+ 27 - 27
Module/mod_counterconnector/ConnectorFSM.h

@@ -379,14 +379,14 @@ public:
 	void s63_on_exit();
 	unsigned int s63_on_event(FSMEvent* event);
 
-	BOOL m_bHangup;
+	bool m_bHangup;
 	//sip呼叫失败次数,连续10次SIP呼叫失败触发自检重启SIPPHONE
 	unsigned int m_nSipErrorNum;
 	unsigned int m_nLiveDetctionTime;
 
-	BOOL ReConnectionAssistchan();
-	BOOL ReConnectionSipphone(bool bLog = true);
-	BOOL ReConnectionSyncService();
+	bool ReConnectionAssistchan();
+	bool ReConnectionSipphone(bool bLog = true);
+	bool ReConnectionSyncService();
 	
 	int GetCallRouteList();
 
@@ -733,7 +733,7 @@ private:
 	CSimpleStringA MakeCallUri(const char *callnum,const char *serverip,int serverport)
 	{
 			return CSimpleStringA::Format("sip:%s@%s:%d;transport=UDP", 
-				callnum, (LPCSTR)serverip,serverport);
+				callnum, serverip, serverport);
 	}
 
 	CSimpleStringA MakeCallUri(const char *hint_callnum,int nServer)
@@ -741,12 +741,12 @@ private:
 		if (m_iSIPProxyPort[nServer] == 5060) 
 		{
 			return CSimpleStringA::Format("sip:%s@%s;transport=UDP", 
-				hint_callnum, (LPCSTR)m_strSIPProxyIP[nServer]);
+				hint_callnum, m_strSIPProxyIP[nServer].GetData());
 		} 
 		else 
 		{
 			return CSimpleStringA::Format("sip:%s@%s:%d;transport=UDP", 
-				hint_callnum, (LPCSTR)m_strSIPProxyIP[nServer], m_iSIPProxyPort[nServer]);
+				hint_callnum, m_strSIPProxyIP[nServer].GetData(), m_iSIPProxyPort[nServer]);
 		}
 	}
 
@@ -815,9 +815,9 @@ private:
 	ErrorCodeEnum StartRing()
 	{
 	#ifdef _WIN32
-		BOOL bRet = ::PlaySoundA(MAKEINTRESOURCEA(IDR_RINGOUT), ModuleBase::GetModuleBase()->GetInstance(), SND_ASYNC|SND_RESOURCE|SND_LOOP);
+		bool bRet = ::PlaySoundA(MAKEINTRESOURCEA(IDR_RINGOUT), ModuleBase::GetModuleBase()->GetInstance(), SND_ASYNC|SND_RESOURCE|SND_LOOP);
 		if (bRet) {
-			m_bRing = TRUE;
+			m_bRing = true;
 			return Error_Succeed;
 		}
 		else {
@@ -834,37 +834,37 @@ private:
 	{
 	#ifdef _WIN32
 		if (m_bRing) {
-			BOOL bRet = FALSE;
+			bool bRet = false;
 			int tries = 0;
 			do {
 				bRet = ::PlaySoundA(NULL, NULL, SND_ASYNC|SND_LOOP);
-			} while (bRet == FALSE && (Sleep(100), tries < 3));
-			m_bRing = FALSE;
+			} while (bRet == false && (Sleep(100), tries < 3));
+			m_bRing = false;
 		}
 	#else
 		if (m_bRing) {
-			m_bRing = FALSE;
+			m_bRing = false;
 	}
 	#endif
 
 	}
 
-	BOOL CheckBeginRing(int iSrcState, int iDstState)
+	bool CheckBeginRing(int iSrcState, int iDstState)
 	{
 		if (iSrcState == ACMCallFSM::s0 && iDstState == ACMCallFSM::s10)
-			return TRUE;
-		return FALSE;
+			return true;
+		return false;
 	}
 
-	BOOL CheckEndRing(int iSrcState, int iDstState)
+	bool CheckEndRing(int iSrcState, int iDstState)
 	{
 		if (m_bRing) {
 			if (iSrcState == ACMCallFSM::s10 || iSrcState == ACMCallFSM::s12) {
 				if (iDstState != ACMCallFSM::s10 && iDstState != ACMCallFSM::s12)
-					return TRUE;
+					return true;
 			}
 		}
-		return FALSE;
+		return false;
 	}
 
 	int GetDelayTime();
@@ -874,14 +874,14 @@ private:
 	int LogFailedWarns(int iFailedCode, const char* strmsg);
 
 public:
-	BOOL m_bHandFree;
+	bool m_bHandFree;
 	//坐席控制话筒的当前状态
-	BOOL m_bAgentHandFree;
-	BOOL m_bIsAgentControl;
+	bool m_bAgentHandFree;
+	bool m_bIsAgentControl;
 	//流程拨号,带技能号
 	CSimpleStringA m_strHintCallNum;
 
-	BOOL m_bAssistchanIdel;
+	bool m_bAssistchanIdel;
 	CurServerNum m_nCurSipServer;
 	CurServerNum m_nCurChanServer;
 	//呼叫类型,用于区分是分布式呼叫还是常规呼叫,由业务中台设置或者指令模块设置
@@ -889,12 +889,12 @@ public:
 	SessionParam m_SessionParam;
 	int m_nSysCallType;//0:普通模式,1:p2p模式
 	int m_iFailedLastState;
-	BOOL m_bConAssist;
-	BOOL m_bConSipphone;
+	bool m_bConAssist;
+	bool m_bConSipphone;
 	int m_iCallRouteType;
 	CSimpleStringA m_strQueueName;
 	CSimpleStringA m_strAddClientLevel;
-	BOOL m_bNeedQueueName;
+	bool m_bNeedQueueName;
 
 private:
 	DWORD m_nStarttime;
@@ -922,5 +922,5 @@ private:
 	int m_iHttpTimeOut;
 	bool m_bHttpPrinttDbg;
 
-	BOOL m_bRing;
+	bool m_bRing;
 };

+ 2 - 2
Module/mod_counterconnector/http_callrouter.cpp

@@ -3,7 +3,7 @@
 #include "Event.h"
 
 void HttpsLogCallBack(const char* logtxt) {
-	//DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM).setAPI("HttpsLogCallBack")("HttpsLogCallBack: %s.", logtxt);
+	DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM).setAPI("HttpsLogCallBack")("HttpsLogCallBack: %s.", logtxt);
 }
 
 
@@ -93,7 +93,7 @@ node_list_head_t* get_http_callroute_list(http_call_info_t* pinfo, int itimeout,
 		req.terminalNo = pData;
 	}
 
-	//DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("begin http get request, timeout is %d, printdbg flag is %s.", req.m_timeOut, req.m_printDbg ? "true":"false");
+	DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("begin http get request, timeout is %d, printdbg flag is %s.", req.m_timeOut, req.m_printDbg ? "true":"false");
 
 	CallRouteHTTPRet ret;
 	if (client->Get(req, ret)) {

+ 84 - 67
Module/mod_counterconnector/mod_counterconnector.cpp

@@ -53,19 +53,6 @@ ErrorCodeEnum CCounterConnectorEntity ::__OnStart(ErrorCodeEnum preOperationErro
 	CSmartPointer<IEntityFunction> spFunction = GetFunction();
 	CSystemStaticInfo stStaticinfo;
 	spFunction->GetSystemStaticInfo(stStaticinfo);
-	if (_stricmp(stStaticinfo.strMachineType,"RVC.PAD")==0){
-		m_bIsPadType = TRUE;
-	}
-	else{
-		m_bIsPadType = FALSE;
-	}
-
-	m_IsStandType = TRUE;
-
-	DeviceTypeEnum eDeviceType = RvcGetDeviceType();
-	if (eStand1SPlusType != eDeviceType && eStand2sType != eDeviceType) {
-		m_IsStandType = FALSE;
-	}
 
 	m_fsm.Init(this);
 
@@ -107,8 +94,8 @@ void CCounterConnectorEntity::OnStarted()
 	CSimpleStringA uiState;
 	GetFunction()->GetSysVar("UIState", uiState);
 	if (uiState.GetLength() > 0 && uiState[0] == 'M'){
-		if (FALSE == m_bHasLaunched) {
-			m_bHasLaunched = TRUE;
+		if (false == m_bHasLaunched) {
+			m_bHasLaunched = true;
 		}
 	}
 	
@@ -116,14 +103,14 @@ void CCounterConnectorEntity::OnStarted()
 
 	m_pCounterConnectorChannel = new ChannelCounterConnectorClient(this);
 	if (Error_Succeed == ConnectAssistChannel()){
-		m_bConnectAssist = TRUE;
+		m_bConnectAssist = true;
 	}
 	else {
 		GetFunction()->SetTimer(1, this, 3600);
 	}
 
 	if (m_fsm.ReConnectionAssistchan()){
-		m_fsm.m_bConAssist = TRUE;
+		m_fsm.m_bConAssist = true;
 	}
 	else {
 		GetFunction()->SetTimer(2, this, 3900);
@@ -132,7 +119,7 @@ void CCounterConnectorEntity::OnStarted()
 	Sleep(500);
 
 	if (m_fsm.ReConnectionSipphone()){
-		m_fsm.m_bConSipphone = TRUE;
+		m_fsm.m_bConSipphone = true;
 	}
 	else {
 		GetFunction()->SetTimer(3, this, 3700);
@@ -154,6 +141,9 @@ ErrorCodeEnum CCounterConnectorEntity::ConnectAssistChannel()
 	ErrorCodeEnum Error = m_pCounterConnectorChannel->Connect();
 	if (Error != Error_Succeed) {
 		LogWarn(Severity_Low, Error_Debug, EVENT_MOD_CONNECT_ASSIST_ERROR, "connect assistant channel error");
+#ifdef RVC_OS_WIN
+		m_pCounterConnectorChannel->SafeDelete();
+#endif
 		m_pCounterConnectorChannel = NULL;
 		return Error;
 	}
@@ -164,6 +154,9 @@ ErrorCodeEnum CCounterConnectorEntity::ConnectAssistChannel()
 		if (Error != Error_Succeed){
 			DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("BeginState biz channel failed!");
 			m_pCounterConnectorChannel->GetFunction()->CloseSession();
+#ifdef RVC_OS_WIN
+			m_pCounterConnectorChannel->SafeDelete();
+#endif
 			m_pCounterConnectorChannel = NULL;
 			return Error;
 		}
@@ -176,6 +169,9 @@ ErrorCodeEnum CCounterConnectorEntity::ConnectAssistChannel()
 		if (Error != Error_Succeed) {
 			DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("Begin BeginRecv ACM_TYPE_DEVICE failed!");
 			m_pCounterConnectorChannel->GetFunction()->CloseSession();
+#ifdef RVC_OS_WIN
+			m_pCounterConnectorChannel->SafeDelete();
+#endif
 			m_pCounterConnectorChannel = NULL;
 			return Error;
 		}
@@ -188,6 +184,9 @@ ErrorCodeEnum CCounterConnectorEntity::ConnectAssistChannel()
 		if (Error != Error_Succeed){
 			DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("Begin BeginRecv ACM_TYPE_AGENTVIDEOTYPE failed!");
 			m_pCounterConnectorChannel->GetFunction()->CloseSession();
+#ifdef RVC_OS_WIN
+			m_pCounterConnectorChannel->SafeDelete();
+#endif
 			m_pCounterConnectorChannel = NULL;
 			return Error;
 		}
@@ -200,6 +199,9 @@ ErrorCodeEnum CCounterConnectorEntity::ConnectAssistChannel()
 		if (Error != Error_Succeed){
 			DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("Begin BeginRecv ACM_TYPE_CALLTRANS failed!");
 			m_pCounterConnectorChannel->GetFunction()->CloseSession();
+#ifdef RVC_OS_WIN
+			m_pCounterConnectorChannel->SafeDelete();
+#endif
 			m_pCounterConnectorChannel = NULL;
 			return Error;
 		}
@@ -215,8 +217,8 @@ void CCounterConnectorEntity::OnSysVarEvent(const char *pszKey,  const char *psz
 	{
 		if (pszValue[0] == 'M')
 		{
-			if (FALSE == m_bHasLaunched){
-				m_bHasLaunched = TRUE;
+			if (false == m_bHasLaunched){
+				m_bHasLaunched = true;
 			}
 		}		
 	}
@@ -271,7 +273,7 @@ void CCounterConnectorEntity::HandlePickUpCallEvent()
 	}
 	else {
 		m_fsm.PostEventFIFO(new FSMEvent(USER_EVT_PICKUP_CALL));
-		m_fsm.m_bNeedQueueName = FALSE;
+		m_fsm.m_bNeedQueueName = false;
 	}
 }
 
@@ -290,7 +292,7 @@ void CCounterConnectorEntity::HandleGetVideoFailedEvent()
 	char strinfo[MAX_PATH] = { 0 };
 
 	if (pMSClient->Connect() != Error_Succeed){
-		_snprintf(strmsg, MAX_PATH, "%s", "connect mediacontroller entity failed");
+		snprintf(strmsg, MAX_PATH, "%s", "connect mediacontroller entity failed");
 		pMSClient->SafeDelete();
 		pMSClient = NULL;
 		
@@ -342,10 +344,10 @@ void CCounterConnectorEntity ::OnLog(const CAutoArray<CUUID> &SubIDs, const CUUI
 	{
 	case EVENT_MOD_CONNECT_GPIO_PICKUP:
 		{
-			m_fsm.m_bHandFree = FALSE;
+			m_fsm.m_bHandFree = false;
 			if (!m_fsm.m_bIsAgentControl)
 			{
-				m_fsm.m_bAgentHandFree = FALSE;
+				m_fsm.m_bAgentHandFree = false;
 			}
 			CSimpleStringA strValue;
 			GetFunction()->GetSysVar("CallState", strValue);
@@ -355,10 +357,10 @@ void CCounterConnectorEntity ::OnLog(const CAutoArray<CUUID> &SubIDs, const CUUI
 		break;
 	case EVENT_MOD_CONNECT_GPIO_HANDFREE:
 		{
-			m_fsm.m_bHandFree = TRUE;
+			m_fsm.m_bHandFree = true;
 			if (!m_fsm.m_bIsAgentControl)
 			{
-				m_fsm.m_bAgentHandFree = TRUE;
+				m_fsm.m_bAgentHandFree = true;
 			}
 			CSimpleStringA strValue;
 			GetFunction()->GetSysVar("CallState", strValue);
@@ -378,7 +380,7 @@ void CCounterConnectorEntity ::OnLog(const CAutoArray<CUUID> &SubIDs, const CUUI
 		}
 		break;
 	case EVENT_MOD_CONNECT_HANDFREE_CALL: // 免提呼叫
-		m_fsm.m_bNeedQueueName = TRUE;
+		m_fsm.m_bNeedQueueName = true;
 		if (m_fsm.m_bHandFree)
 		{
 			LogEvent(Severity_Middle,EVENT_MOD_CONNECT_SLV_HANDFREECALL,"handfree call");
@@ -430,7 +432,7 @@ void CCounterConnectorEntity ::OnLog(const CAutoArray<CUUID> &SubIDs, const CUUI
 			//DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("免提->提机");
 			m_fsm.PostEventFIFO(new FSMEvent(USER_EVT_TO_PICKUP));
 			if (strcmp(m_fsm.GetCurrStateName(),"HandFree")==0){
-				m_fsm.m_bAgentHandFree = FALSE;
+				m_fsm.m_bAgentHandFree = false;
 			}
 			SendCurAudioDevice();
 		}
@@ -440,7 +442,7 @@ void CCounterConnectorEntity ::OnLog(const CAutoArray<CUUID> &SubIDs, const CUUI
 			//DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("提机->免提");
 			m_fsm.PostEventFIFO(new FSMEvent(USER_EVT_TO_HANDFREE));
 			if (strcmp(m_fsm.GetCurrStateName(),"Pickup")==0){
-				m_fsm.m_bAgentHandFree = TRUE;
+				m_fsm.m_bAgentHandFree = true;
 			}
 			SendCurAudioDevice();
 		}
@@ -458,7 +460,7 @@ void CCounterConnectorEntity ::OnLog(const CAutoArray<CUUID> &SubIDs, const CUUI
 	case EVENT_MOD_CONNECT_BEGAIN_RECORD_CALL:
 		{
 			//DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("开始远程双录呼叫.");
-			m_fsm.m_bNeedQueueName = TRUE;
+			m_fsm.m_bNeedQueueName = true;
 			m_fsm.PostEventFIFO(new FSMEvent(USER_EVT_DOUBLE_RECORD_CALL));
 			if (TRUE == m_fsm.m_bHandFree){
 				LogEvent(Severity_Middle,LOG_EVT_HANDFREE_MODE_REMOTE_CALL,"remote double call start with hand free mode.");
@@ -476,14 +478,14 @@ void CCounterConnectorEntity ::OnLog(const CAutoArray<CUUID> &SubIDs, const CUUI
 		{	
 			//DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("断开呼叫");
 			m_fsm.PostEventFIFO(new FSMEvent(USER_EVT_HANGUP));
-			m_fsm.m_bHangup=TRUE;
+			m_fsm.m_bHangup=true;
 		}
 		break;
 	case EVENT_MOD_CONNECT_HANNUP_BY_CONNECTING: // 话筒未接通时挂机
 		//DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("话筒未接通时断开呼叫");
 		m_fsm.PostEventFIFO(new FSMEvent(USER_EVT_HANGUP));
 		//m_fsm.m_bHandFree = TRUE;
-		m_fsm.m_bHangup=TRUE;
+		m_fsm.m_bHangup=true;
 		break;
 	case EVENT_MOD_CONNECT_HANNUP_BY_AGENT: // 授权操作
 		m_fsm.PostEventFIFO(new FSMEvent(USER_EVT_AGENT_WRITABLE));
@@ -493,21 +495,24 @@ void CCounterConnectorEntity ::OnLog(const CAutoArray<CUUID> &SubIDs, const CUUI
 		//DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("current state name is %s.", m_fsm.GetCurrStateName());
 		Sleep(500);
 		m_fsm.PostEventFIFO(new FSMEvent(USER_EVT_ASSISTCHAN_IDEL));
-		m_fsm.m_bConAssist = FALSE;
+		m_fsm.m_bConAssist = false;
 		GetFunction()->SetTimer(2, this, 3900);
 		if(NULL != m_pCounterConnectorChannel){	
-			m_bConnectAssist = FALSE;
+			m_bConnectAssist = false;
 			m_pCounterConnectorChannel->GetFunction()->CloseSession();
+#ifdef RVC_OS_WIN
+			m_pCounterConnectorChannel->SafeDelete();
+#endif
 			m_pCounterConnectorChannel = NULL;
 			//DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("Close AssistChannel Session.");
 		}
 
 		if(NULL == m_pCounterConnectorChannel){
 			if (Error_Succeed == ConnectAssistChannel()){
-				m_bConnectAssist = TRUE;
+				m_bConnectAssist = true;
 			}
 			else{
-				m_bConnectAssist = FALSE;
+				m_bConnectAssist = false;
 				GetFunction()->SetTimer(1, this, 3600);
 			}
 		}
@@ -517,7 +522,7 @@ void CCounterConnectorEntity ::OnLog(const CAutoArray<CUUID> &SubIDs, const CUUI
 		//DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("recv LOG_EVT_MOD_SIPPHONE_STARTED_SUCCESS");
 		Sleep(890);
 		m_fsm.PostEventFIFO(new FSMEvent(USER_EVT_SIPPHONE_IDEL));
-		m_fsm.m_bConSipphone = FALSE;
+		m_fsm.m_bConSipphone = false;
 		GetFunction()->SetTimer(3, this, 3700);
 		break;
 
@@ -537,13 +542,13 @@ void CCounterConnectorEntity ::OnLog(const CAutoArray<CUUID> &SubIDs, const CUUI
 	case LOG_EVT_UI_STOPRECORD:
 		//DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("begin stop sales record video.");
 		m_fsm.PostEventFIFO(new FSMEvent(USER_EVT_STOPLOCALVIDEO));
-		m_bIsSalesRecord = FALSE;
+		m_bIsSalesRecord = false;
 		break;
 
 	case  LOG_EVT_UI_STOPREMOTERECORD:
 		//DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("begin stop double record video,and cur state name is %s.",m_fsm.GetCurrStateName());
 		m_fsm.PostEventFIFO(new FSMEvent(USER_EVT_STOPLOACALREMOTEVIDEO));
-		m_bIsRemoteRecord = FALSE;
+		m_bIsRemoteRecord = false;
 		break;
 		
 	case LOG_EVT_UI_RETURNMENU:
@@ -551,7 +556,7 @@ void CCounterConnectorEntity ::OnLog(const CAutoArray<CUUID> &SubIDs, const CUUI
 		{
 			//DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("stop sales record video by return menu");
 			m_fsm.PostEventFIFO(new FSMEvent(USER_EVT_STOPLOCALVIDEO));
-			m_bIsSalesRecord = FALSE;
+			m_bIsSalesRecord = false;
 		}
 		if (m_bIsRemoteRecord)
 		{
@@ -562,9 +567,9 @@ void CCounterConnectorEntity ::OnLog(const CAutoArray<CUUID> &SubIDs, const CUUI
 			else{
 				//DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("hangup call by return menu, CurrStateName is %s.", m_fsm.GetCurrStateName());
 				m_fsm.PostEventFIFO(new FSMEvent(USER_EVT_HANGUP));
-				m_fsm.m_bHangup=TRUE;
+				m_fsm.m_bHangup=true;
 			}
-			m_bIsRemoteRecord = FALSE;
+			m_bIsRemoteRecord = false;
 		}
 		break;
 	case LOG_EVT_UI_STARTPHOTOGRAPH:
@@ -598,31 +603,31 @@ bool CCounterConnectorEntity ::IsService() const
 void CCounterConnectorEntity::OnTimeout(DWORD dwTimerID)
 {
 	if (1 == dwTimerID){
-		if (FALSE == m_bConnectAssist) {
+		if (false == m_bConnectAssist) {
 			if (Error_Succeed == ConnectAssistChannel()) {
-				m_bConnectAssist = TRUE;
+				m_bConnectAssist = true;
 			}
 		}
 
-		if (TRUE == m_bConnectAssist) {
+		if (m_bConnectAssist) {
 			GetFunction()->KillTimer(1);
 		}
 	}
 	else if(2 == dwTimerID) {
-		if (FALSE == m_fsm.m_bConAssist) {
+		if (false == m_fsm.m_bConAssist) {
 			if (m_fsm.ReConnectionAssistchan()) {
-				m_fsm.m_bConAssist = TRUE;
+				m_fsm.m_bConAssist = true;
 			}
 		}
 
-		if (TRUE == m_fsm.m_bConAssist) {
+		if (true == m_fsm.m_bConAssist) {
 			GetFunction()->KillTimer(2);
 		}
 	}
 	else if (3 == dwTimerID) {
-		if (FALSE == m_fsm.m_bConSipphone) {
+		if (false == m_fsm.m_bConSipphone) {
 			if (m_fsm.ReConnectionSipphone(false)) {
-				m_fsm.m_bConSipphone = TRUE;
+				m_fsm.m_bConSipphone = true;
 			}
 			else {
 				m_iConSipphoneFaileTimes++;
@@ -630,7 +635,7 @@ void CCounterConnectorEntity::OnTimeout(DWORD dwTimerID)
 			}
 		}
 
-		if (TRUE == m_fsm.m_bConSipphone || m_iConSipphoneFaileTimes >= 5) {
+		if (m_fsm.m_bConSipphone || m_iConSipphoneFaileTimes >= 5) {
 			GetFunction()->KillTimer(3);
 		}
 	}
@@ -640,7 +645,7 @@ void CCounterConnectorEntity::OnTimeout(DWORD dwTimerID)
 void CCounterConnectorEntity ::OnReceivePkt(int type, int sub_type, const char *buffer, int size)
 {
 	//DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("recv pkt  type=%d,subtype=%d",type,sub_type);
-	if ((type == ACM_TYPE_DEVICE)&&!m_bIsPadType)
+	if (type == ACM_TYPE_DEVICE)
 	{
 		switch (sub_type)
 		{
@@ -651,7 +656,7 @@ void CCounterConnectorEntity ::OnReceivePkt(int type, int sub_type, const char *
 			if (!m_fsm.m_bAgentHandFree)
 			{
 				LogEvent(Severity_Middle,EVENT_MOD_CONNECT_AGENT_PICKUP_HANDFREE,"agent change audio device to handfree");
-				m_fsm.m_bAgentHandFree = TRUE;
+				m_fsm.m_bAgentHandFree = true;
 			}
 			else
 			{
@@ -664,7 +669,7 @@ void CCounterConnectorEntity ::OnReceivePkt(int type, int sub_type, const char *
 			if (m_fsm.m_bAgentHandFree)
 			{
 				LogEvent(Severity_Middle,EVENT_MOD_CONNECT_AGENT_HANDFREE_PICKUP,"agent change audio device to pickup");
-				m_fsm.m_bAgentHandFree = FALSE;
+				m_fsm.m_bAgentHandFree = false;
 			}
 			else
 			{
@@ -793,27 +798,35 @@ void CCounterConnectorEntity::Handle_StartRecord(const char* pszMessage)
 	CSimpleStringA strMsg = pszMessage;
 
 	CSimpleStringA strVideo;
-	strVideo = ConstructVideoRenderParam(strMsg, false);						
+#ifdef RVC_OS_WIN
+	strVideo = ConstructVideoParam(strMsg, false);	
+#else
+	strVideo = ConstructVideoRenderParam(strMsg, false);
+#endif					
 	m_fsm.PostEventFIFO(new ShowLocalVideoEvent(strVideo));									// 非连坐席双录
-	m_bIsSalesRecord = TRUE;
+	m_bIsSalesRecord = true;
 }
 
 void CCounterConnectorEntity::Handle_StartRemoteRecord(const char* pszMessage)
 {
 	CSimpleStringA strMsg = pszMessage;
-	CSimpleStringA strVideo = ConstructVideoRenderParam(strMsg, true);
+#ifdef RVC_OS_WIN
+	CSimpleStringA strVideo = ConstructVideoParam(strMsg, true);
+#else
+    CSimpleStringA strVideo = ConstructVideoRenderParam(strMsg, true);
+#endif
 	m_fsm.PostEventFIFO(new ShowLocalAndRemoteVideoEvent(strVideo));						// 连坐席双录
-	m_bIsRemoteRecord = TRUE;
-	m_bIsRemoteRecordStopSpeakerCapture = FALSE;
+	m_bIsRemoteRecord = true;
+	m_bIsRemoteRecordStopSpeakerCapture = false;
 }
 
 void CCounterConnectorEntity::StopRemoteRecordSpeakerAudioCapture()
 {
 	if(DOUBLERECORD_CALLTYPE == m_fsm.m_CallingParam.nCallType){
-		if (TRUE == m_IsStandType){
-			if (FALSE == m_bIsRemoteRecordStopSpeakerCapture){
+		if (m_IsStandType){
+			if (false == m_bIsRemoteRecordStopSpeakerCapture){
 				if (Error_Succeed == m_fsm.StopSpeakerAudioCapture()){
-					m_bIsRemoteRecordStopSpeakerCapture = TRUE;
+					m_bIsRemoteRecordStopSpeakerCapture = true;
 				}
 			}
 		}
@@ -825,9 +838,13 @@ void CCounterConnectorEntity::Handle_StartRecordPreview(const char* pszMessage)
 	CSimpleStringA strMsg = pszMessage;
 
 	CSimpleStringA strVideo;
-	strVideo = ConstructVideoRenderParam(strMsg, false);						
+#ifdef RVC_OS_WIN
+	strVideo = ConstructVideoParam(strMsg, false);
+#else
+	strVideo = ConstructVideoRenderParam(strMsg, false);
+#endif						
 	m_fsm.PostEventFIFO(new ShowLocalVideoEvent(strVideo));									// 非连坐席双录
-	m_bIsSalesRecord = TRUE;
+	m_bIsSalesRecord = true;
 }
 
 //send cur audio device to agent 
@@ -921,7 +938,7 @@ void ChannelCounterConnectorClient::OnMessage(ErrorCodeEnum Error, ChannelServic
 		CCounterConnectorEntity *pEntity = static_cast<CCounterConnectorEntity*>(m_pEntityBase);
 		if (Msg.state == eChannelState_Idle) 
 		{
-			pEntity->m_fsm.m_bIsAgentControl = FALSE;
+			pEntity->m_fsm.m_bIsAgentControl = false;
 			//DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("ChannelState is eChannelState_Idle");
 
 			if (eChannelState_Connected == m_eLastState){
@@ -934,7 +951,7 @@ void ChannelCounterConnectorClient::OnMessage(ErrorCodeEnum Error, ChannelServic
 		} 
 		else if (Msg.state == eChannelState_Connected) 
 		{
-			pEntity->m_fsm.m_bIsAgentControl = TRUE;
+			pEntity->m_fsm.m_bIsAgentControl = true;
 			pEntity->SendCurAudioDevice();
 			//DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("ChannelState is eChannelState_Connected");
 			m_uConnectTime = y2k_time_now();
@@ -973,7 +990,7 @@ void CCounterConnectorSession::Handle_StartCall(SpReqAnsContext<ConnectService_S
 	m_pEntity->m_fsm.m_CallingParam.assistant_port = ctx->Req.assistant_port;
 	m_pEntity->m_fsm.m_CallingParam.subid = ctx->Req.subid;
 	m_pEntity->m_fsm.PostEventFIFO(new FSMEvent(USER_EVT_COMMAND_CALL));
-	m_pEntity->m_fsm.m_bNeedQueueName = TRUE;
+	m_pEntity->m_fsm.m_bNeedQueueName = true;
 	ctx->Answer((ErrorCodeEnum)rc);
 }
 

+ 7 - 8
Module/mod_counterconnector/mod_counterconnector.h

@@ -97,22 +97,21 @@ public:
 	virtual bool IsService()const;
 	virtual void OnTimeout(DWORD dwTimerID);
 	ACMCallFSM m_fsm;
-	BOOL m_bIsSalesRecord;
-	BOOL m_bIsRemoteRecord;						
-	BOOL m_bIsRemoteRecordStopSpeakerCapture;	
-	BOOL m_bHasLaunched;
+	bool m_bIsSalesRecord;
+	bool m_bIsRemoteRecord;
+	bool m_bIsRemoteRecordStopSpeakerCapture;
+	bool m_bHasLaunched;
 	CServerSessionBase *m_pCurrentSession;
 	int m_iRouteType;
 	int m_iPickUpCallType;
 
 private:
-	BOOL m_bIsPadType;
-	BOOL m_IsStandType;
+	bool m_IsStandType;
 	ChannelCounterConnectorClient*m_pCounterConnectorChannel;
 	CAutoArray<CUUID> m_arrListener;
 	CUUID m_uidlivenessListener;
-	BOOL m_bConnectAssist;
-	BOOL m_bConnectSipphone;
+	bool m_bConnectAssist;
+	bool m_bConnectSipphone;
 	int m_iConSipphoneFaileTimes;
 };
 

+ 1 - 1
Module/mod_healthmanager/HealthManagerFSM.h

@@ -235,7 +235,7 @@ private:
 
 private:
 	CSimpleStringA m_SysState,m_checkCode,m_csErrEntity;
-	int m_devCfgNum, m_fsmState, m_stateBeforeMaintain, m_custMngerState, m_preFsmState
+	int m_fsmState, m_stateBeforeMaintain, m_custMngerState, m_preFsmState
 		,m_iAccessAuth/*-1 未准入; 0 准入失败;1 准入成功*/, m_iDoNotUpdateWKDaily, m_wkUpdatePeriod/*if exceed the period time,we should update key*/;
 	AccessAuthService_ClientBase *m_pACClient;
 	bool m_bIdleToMaintain, m_bHasAuthEver, m_bFirstAccessAuth

+ 17 - 44
Module/mod_healthmanager/mod_healthmanager.cpp

@@ -427,23 +427,8 @@ void CHealthManagerEntity::OnCheckTimeTimeout()
 	SYSTEMTIME localTime;
 	GetLocalTimeRVC(localTime);
 	ErrorCodeEnum eErr = Error_Unexpect;
-	if (m_bInMainPage)
-	{
-		//not work time
-		CSmartPointer<IConfigInfo> spCerConfig;
-		eErr = GetFunction()->OpenConfig(Config_CenterSetting, spCerConfig);
-		int xTmpWorktime = 0;
-		spCerConfig->ReadConfigValueInt(GetEntityName(), "WorkTimeStart", xTmpWorktime);
-		if (xTmpWorktime >= 0 && xTmpWorktime <= 24)
-			m_worktimeStart = xTmpWorktime;
-		spCerConfig->ReadConfigValueInt(GetEntityName(), "WorkTimeEnd", xTmpWorktime);
-		if (xTmpWorktime >= 0 && xTmpWorktime <= 24)
-			m_worktimeEnd = xTmpWorktime;
-	}
 
 	//99 is initial value of m_preDay
-	if (m_preDay != 99 && m_preDay != localTime.wDayOfWeek && m_bNeedToRestartPAD == false)
-		m_bNeedToRestartPAD = true;
 	m_preDay = localTime.wDayOfWeek;
 	CSmartPointer<IConfigInfo> spConfigRun;
 	eErr = GetFunction()->OpenConfig(Config_Run, spConfigRun);
@@ -813,8 +798,8 @@ bool CHealthManagerEntity::StartGuardian()
 bool CHealthManagerEntity::DoRestart()
 {
 	LOG_FUNCTION();
-	CSmartPointer<IConfigInfo> spConfig;
-	ErrorCodeEnum err = GetFunction()->OpenConfig(Config_CenterSetting, spConfig);
+	CSmartPointer<IConfigInfo> spCerConfig;
+	ErrorCodeEnum err = GetFunction()->OpenConfig(Config_CenterSetting, spCerConfig);
 	if (err != Error_Succeed) {
 		DbgWithLink(LOG_LEVEL_ERROR,LOG_TYPE_SYSTEM)("open cfg file failed!");
 		return false;
@@ -836,14 +821,14 @@ bool CHealthManagerEntity::DoRestart()
 	do 
 	{
 		int value(0);
-		spConfig->ReadConfigValueInt(GetEntityName(), "RestartHourBegin", value);
+		spCerConfig->ReadConfigValueInt(GetEntityName(), "RestartHourBegin", value);
 		if (value > 0) {
 			tmpHourBegin = value;
 		}
 	} while (false);
 	do {
 		int value(0);
-		spConfig->ReadConfigValueInt(GetEntityName(), "RestartHourEnd", value);
+		spCerConfig->ReadConfigValueInt(GetEntityName(), "RestartHourEnd", value);
 		if (value > 0) {
 			tmpHourEnd = value;
 		}
@@ -854,14 +839,20 @@ bool CHealthManagerEntity::DoRestart()
 	do {
 		m_maxLostTimes = 10;
 		int value(0);
-		spConfig->ReadConfigValueInt(GetEntityName(), "MaxLostTimes", value);
+		spCerConfig->ReadConfigValueInt(GetEntityName(), "MaxLostTimes", value);
 		if (value > 0) {
 			m_maxLostTimes = value;
 		}
 	} while (false);
 
 	DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("MaxLostTimes:%d", m_maxLostTimes);
-
+	do {
+		int value(0);
+		spCerConfig->ReadConfigValueInt(GetEntityName(), "StopSelfCheck", value);
+		if (value == 1) {
+			m_stopSelfCheck = 1;
+		}
+	} while (false);
 
 	DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM)("m_restartHour:m_restartMinute=%d:%d",m_restartHour,m_restartMinute);
 	CSmartPointer<IConfigInfo> spConfigRun;
@@ -871,8 +862,6 @@ bool CHealthManagerEntity::DoRestart()
 	if(m_versionEx.IsNullOrEmpty()){
 		DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("get VersionEx is null");
 	}
-	CSmartPointer<IConfigInfo> spCerConfig;
-	eErr = GetFunction()->OpenConfig(Config_CenterSetting, spCerConfig);
 	spCerConfig->ReadConfigValueInt(GetEntityName(), "MaxTimeWaitMainPageMS", m_maxWaitMainpageTime);
 	if (m_maxWaitMainpageTime < 5000)
 		m_maxWaitMainpageTime = HEALTHMANAGER_WAIT_MAINPAGE_OPEN_TIMER_INTERVAL;
@@ -1004,27 +993,6 @@ bool CHealthManagerEntity::DoRestart()
 
 	return true;
 }
-void CHealthManagerEntity::SplitModuleNames(CSimpleStringA csLine, ModuleReMode eMode)
-{
-	string str((const char*)csLine);
-	size_t pos = 0,nameEnd = 0;
-	size_t len = str.length();
-	while(1)
-	{
-		nameEnd = str.find(',',pos);
-		if (nameEnd != string::npos)
-		{
-			m_modCfgInfo[str.substr(pos,nameEnd-pos).c_str()] = eMode;
-			pos = nameEnd + 1;
-		}
-		else
-		{
-			if (pos < len)
-				m_modCfgInfo[str.substr(pos,nameEnd-pos).c_str()] = eMode;
-			break;
-		}
-	}
-}
 
 bool CHealthManagerEntity::SaveCurrentVersion()
 {
@@ -1916,6 +1884,11 @@ ErrorCodeEnum CHealthManagerEntity::CheckEntity(const char* pszEntityName, Entit
 }
 void CHealthManagerEntity::OnSelfCheckTimeout()
 {
+	if (m_stopSelfCheck == 1)
+	{
+		DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("have stop self check");
+		return;
+	}
 	CSmartPointer<IEntityFunction> pFunc = GetFunction();
 	CSmartPointer<IEntityFunctionPrivilege> pFuncPrivilege = pFunc.ConvertCase<IEntityFunctionPrivilege>();
 	CSmartPointer<IAsynWaitSp> spWait;

+ 7 - 16
Module/mod_healthmanager/mod_healthmanager.h

@@ -30,12 +30,6 @@ typedef ErrorCodeEnum (*pfFrameworkQuit)(RebootTriggerEnum eReason);
 #define DEPLOYSTATE_DONE 1
 #define DEPLOYSTATE_FAILED 2
 
-enum ModuleReMode
-{
-	RESTART_MODE_DEFAULT,
-	RESTART_MODE_LOW,
-	RESTART_MODE_HIGH,
-};
 enum DealType
 {
     Deal_Start = 1,
@@ -92,15 +86,15 @@ class CHealthManagerEntity : public CEntityBase, public ILogListener, public IEn
 {
 public:
 	CHealthManagerEntity() :m_bInit(true)
-		, xxx(0), m_bWaitRestartPC(false)
+		, m_bWaitRestartPC(false)
 		, m_bScreenLock(false)
 		, m_bSayIdle(false), m_bGuardianRun(false), m_guardianCount(1), m_pUpgMgr(NULL)
 		, m_bVerRollback(false), m_eRebootTrigger(RebootTrigger_Resource), m_eRebootWay(RebootWay_Unknown)
 		, m_menuChoice(""), m_menuPre(""), m_netState("N"), m_bBrowserIdleFirst(true)
-		, m_bNeedToRestartPAD(false), m_preDay(99), m_bInMainPage(false)
-		, m_bEnterMainPageEver(false), m_connectStatus(0), m_bHaveThrowMainPage(false)
+		, m_preDay(99), m_bInMainPage(false), m_stopSelfCheck(0)
+		, m_bEnterMainPageEver(false),m_bHaveThrowMainPage(false)
 		,m_bNeedAuthRetry(false), m_bNeedGuardianRestart(true), m_bNeedGuardian(true)
-	,m_worktimeStart(9),m_worktimeEnd(17), m_bToRestartByCenterSetting(false), m_fConfigMode(false){}
+		, m_bToRestartByCenterSetting(false){}
 	virtual ~CHealthManagerEntity() {}
 	virtual const char *GetEntityName() const { return "HealthManager"; }
 	const char* GetEntityVersion() const { return MODULE_VERSION_FULL; }
@@ -267,26 +261,24 @@ private:
 	CUUID m_uuidUpdate,m_uuidMediaController,m_uuidFaceTracking,m_uuidAccessAuth
 		, m_uuidRemoteController, m_uuidGUIConsole, m_uuidHeartBeat, m_uuidIE, m_uuidCenterS, m_uuidVtmLoader;
 	CUUID m_uuidPublic, m_uuid4SIPPhone;
-	int m_devCfgNum,m_connectStatus;
+	int m_stopSelfCheck;
 	int m_restartHour, m_restartMinute, m_lastHour, m_preDay,m_guardianCount, m_maxLostTimes;
 	bool m_bInit, m_bWaitRestartPC, m_bScreenLock, m_bSayIdle
-		, m_bGuardianRun, m_bVerRollback, m_bBrowserIdleFirst, m_bNeedToRestartPAD
+		, m_bGuardianRun, m_bVerRollback, m_bBrowserIdleFirst
 		, m_bInMainPage, m_bEnterMainPageEver, m_bHaveThrowMainPage, m_bToRestartByCenterSetting;
 	bool m_bNeedAuthRetry/*需要重试准入*/, m_bNeedGuardianRestart/*需要重启*/, m_bNeedGuardian;
 	DWORD m_wDayOfWeek,m_dwTimeOfAuthSuc;
-	int xxx,m_worktimeStart, m_worktimeEnd,m_maxWaitMainpageTime;
+	int m_maxWaitMainpageTime;
 	RebootTriggerEnum m_eRebootTrigger;
 	RebootWayEnum m_eRebootWay;
 	CSimpleStringA m_menuChoice,m_currentVer,m_menuPre,m_netState, m_versionEx;
 	map<CSimpleStringA,ModuleRunInfo> m_modRunInfo;
-	map<CSimpleStringA,ModuleReMode> m_modCfgInfo;
 	UpgradeMgrService_ClientBase *m_pUpgMgr;
 	CAutoArray<CSimpleStringA> m_activeEntity;
 
 	pfShakeHands m_pfShake;
 	pfUpgradeRestart m_pfUpgradeRestart;
 	CSystemStaticInfo m_sysStaticInfo;
-	bool m_fConfigMode;
 
 	/** 启动限制配置读取以及监护模块初始化*/
 	bool DoRestart();
@@ -294,7 +286,6 @@ private:
 	void OnSelfCheckTimeout();
 	ErrorCodeEnum RestartModule(const char* pEntityName);
 	void AfterWaitRestartPC();
-	void SplitModuleNames(CSimpleStringA csLine,ModuleReMode eMode);
 	bool SaveCurrentVersion();
 	bool SaveFrameStartTimeForUpgrade();
 	//reture value:

+ 15 - 16
Module/mod_interactivecontrol/mod_interactivecontrol.cpp

@@ -94,14 +94,14 @@ void CITCtrlEntity::OnStarted()
 
 	m_pChannelClient = new ChannelClient(this);
 	if (Error_Succeed == ConnectAssistChannel()) {
-		m_bConnectAssist = TRUE;
+		m_bConnectAssist = true;
 	}
 	else {
 		GetFunction()->SetTimer(1, this, 3370);
 	}
 
 	if (Error_Succeed == ConnectToLocalPlayer(false)) {
-		m_bConnectPlayer = TRUE;
+		m_bConnectPlayer = true;
 	}
 	else {
 		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("ConnectToLocalPlayer Failed!");
@@ -405,7 +405,7 @@ void CITCtrlEntity::OnSysVarEvent(const char *pszKey, const char *pszValue,const
 		{
 			if (pszValue[0] != 'N' && pszValue[0] != 'I')
 			{
-				if (m_bSalesRecording == FALSE)
+				if (m_bSalesRecording == false)
 				{
 					CameraFaultOccurred evt;
 					evt.state = pszValue[0];
@@ -1094,11 +1094,11 @@ void CITCtrlEntity::OnLog(const CAutoArray<CUUID> &SubIDs, const CUUID nLogID,co
 			if (m_pChannelClient!=NULL){
 				m_pChannelClient->GetFunction()->CloseSession();
 				m_pChannelClient = NULL;
-				m_bConnectAssist = FALSE;
+				m_bConnectAssist = false;
 			}
 
 			if (Error_Succeed == ConnectAssistChannel()) {
-				m_bConnectAssist = TRUE;
+				m_bConnectAssist = true;
 			}
 			else {
 				GetFunction()->SetTimer(1, this, 3370);
@@ -1190,7 +1190,7 @@ void CITCtrlEntity::OnLog(const CAutoArray<CUUID> &SubIDs, const CUUID nLogID,co
 	case  LOG_EVT_UI_RECORDFAILED:
 		{
 			OnSalesRecordingFailed(pszMessage);
-			m_bSalesRecording = FALSE;
+			m_bSalesRecording = false;
 		}
 		break;
 	default:
@@ -1379,7 +1379,6 @@ static CSimpleStringA EncryptVideoNameCarNumber(CSimpleStringA StrVideoName)
 {
 	CSimpleStringA StrVideoInfo;
 
-	char *result[16] = {0};
 	auto arr1 = CSimpleStringA2W(StrVideoName).Split('@');
 	int iCount = arr1.GetCount();
 		
@@ -1742,13 +1741,13 @@ void CITCtrlEntity::OnTimeout(DWORD dwTimerID)
 {
 	if (1 == dwTimerID)
 	{
-		if (FALSE == m_bConnectAssist) {
+		if (false == m_bConnectAssist) {
 			if (Error_Succeed == ConnectAssistChannel()) {
-				m_bConnectAssist = TRUE;
+				m_bConnectAssist = true;
 			}
 		}
 
-		if (TRUE == m_bConnectAssist) {
+		if (m_bConnectAssist) {
 			GetFunction()->KillTimer(1);
 		}
 	}
@@ -2270,7 +2269,7 @@ void UIServiceSession::Handle_StartRemoteRecord(SpReqAnsContext<UIService_StartR
 			LogEvent(Severity_Middle, LOG_EVT_UI_STARTREMOTERECORD, GetVideoRecordInfo(CSimpleStringW2A(ctx->Req.VideoName)).GetData());
 			ctx->Ans.ErrorCode = 0;
 			ctx->Ans.ErrorMsg = CSimpleStringA2W("");
-			m_pEntity->m_bSalesRecording = TRUE;
+			m_pEntity->m_bSalesRecording = true;
 			LogWarn(Severity_Low, Error_Debug, LOG_EVT_START_REMOTERECORD_SUCCESS, "start remote record success!");
 			DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_USER).setLogCode("QLR040230BZ70101")("start remote record success.");
 		}
@@ -2309,7 +2308,7 @@ void UIServiceSession::Handle_StopRemoteRecord(SpReqAnsContext<UIService_StopRem
 
 	if (m_pEntity->m_bSalesRecording) {
 		LogEvent(Severity_Middle, LOG_EVT_UI_STOPREMOTERECORD, "stop remote video record.");
-		m_pEntity->m_bSalesRecording = FALSE;
+		m_pEntity->m_bSalesRecording = false;
 		ErrorCodeEnum Error = m_pEntity->StopRecord(CSimpleStringW2A(ctx->Req.content));
 		ctx->Answer(Error);
 		if (Error_Succeed == Error) {
@@ -2425,7 +2424,7 @@ void UIServiceSession::Handle_StartPlayNotice(SpReqAnsContext<UIService_StartPla
 		ctx->Ans.ErrorCode = Error;
 		if (Error_Succeed == Error) {
 			ctx->Answer(Error);
-			m_pEntity->m_bNoticePlaying = TRUE;
+			m_pEntity->m_bNoticePlaying = true;
 			DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_USER).setLogCode("QLR040230BZ80101")("start play notice success.");
 		}
 		else {
@@ -2454,7 +2453,7 @@ void UIServiceSession::Handle_StopPlayNotice(SpReqAnsContext<UIService_StopPlayN
 	}
 	else{
 		if (m_pEntity->m_bNoticePlaying) {
-			m_pEntity->m_bNoticePlaying = FALSE;
+			m_pEntity->m_bNoticePlaying = false;
 			PlayService_StopPlayNotice_Req req;
 			PlayService_StopPlayNotice_Ans ans;
 			req.CfgInx = ctx->Req.CfgInx;
@@ -2501,7 +2500,7 @@ void UIServiceSession::Handle_StartTransactionRecord(SpReqAnsContext<UIService_S
 				if (Error_Succeed == m_pEntity->StartTransactionRecord(ctx->Req.StrVideoName)) {
 					ctx->Ans.ErrorCode = Error_Succeed;
 					ctx->Ans.ErrorMsg = CSimpleStringA2W("启动交易录像成功.");
-					m_pEntity->m_bRecording = TRUE;
+					m_pEntity->m_bRecording = true;
 					DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_USER).setLogCode("QLR040230BZ90101")("start transaction record success.");
 				}
 				else {
@@ -2538,7 +2537,7 @@ void UIServiceSession::Handle_StopTransactionRecord(SpReqAnsContext<UIService_St
 
 		if (m_pEntity->m_bRecording) {
 			m_pEntity->StopTransactionRecord(ctx->Req.StrVideoName);
-			m_pEntity->m_bRecording = FALSE;
+			m_pEntity->m_bRecording = false;
 		}
 		else {
 			LogWarn(Severity_Low, Error_Debug, LOG_EVT_CALL_STOP_TSRECORD_MULTITIMES, "call stop transrecord multitimes!");

+ 8 - 9
Module/mod_interactivecontrol/mod_interactivecontrol.h

@@ -100,10 +100,10 @@ class CITCtrlEntity : public CEntityBase, public ISysVarListener, public ILogLis
 {
 public:
 	CITCtrlEntity() : m_pChannelClient(NULL), m_pPlayClient(NULL), m_pSalesRecordClient(NULL), m_pSipPhoneClient(NULL), m_pMediaCtlClient(NULL), 
-	m_pRecordClient(NULL), m_bConnected(FALSE), m_bSalesRecording(FALSE),m_bNoticePlaying(FALSE), m_bConnectAssist(FALSE){
+	m_pRecordClient(NULL), m_bConnected(false), m_bSalesRecording(false),m_bNoticePlaying(false), m_bConnectAssist(false){
 		m_bAdvOnFlag = false;
 		m_iRecordMode = 0;
-		m_bRecording = FALSE;
+		m_bRecording = false;
 		m_pConnectClient = NULL;
 	}
 
@@ -303,7 +303,7 @@ private:
 
 private:
 	CSimpleStringA m_SessionID;
-	BOOL m_bConnected;
+	bool m_bConnected;
 	CSimpleStringW m_strMenuTree;
 	CSimpleStringW m_strMenuPath;
 	ChannelClient* m_pChannelClient;
@@ -316,17 +316,16 @@ private:
 	CAutoArray<CUUID> m_arrListener;
 	CUUID m_uidLocalMediaListenser;
 	int m_nSysCallType;//0:普通模式,1:p2p模式
-	BOOL m_bConnectAssist;
-	BOOL m_bConnectPlayer;
+	bool m_bConnectAssist;
+	bool m_bConnectPlayer;
 	int m_iRecordMode;
 
 public:
 	DeviceTypeEnum m_eDeviceType;
-	BOOL m_bSalesRecording;     
-	bool m_bDeskToPadFlag;
+	bool m_bSalesRecording;
 	bool m_bAdvOnFlag;
-	BOOL m_bNoticePlaying;
-	BOOL m_bRecording;
+	bool m_bNoticePlaying;
+	bool m_bRecording;
 };
 
 class UIServiceSession : public UIService_ServerSessionBase

+ 44 - 66
Module/mod_mediacontroller/capture.cpp

@@ -113,45 +113,45 @@ static void rvc_sleep(uint32_t umicroseconds)
 
 
 #ifdef RVC_OS_WIN
-static char* utf8togb2312(const char* utf8)
-{
-	int len = MultiByteToWideChar(CP_UTF8, 0, utf8, -1, NULL, 0);
-	wchar_t* wstr = new wchar_t[len + 1];
-	memset(wstr, 0, (len + 1) * sizeof(wchar_t));
-
-	MultiByteToWideChar(CP_UTF8, 0, utf8, -1, wstr, len);
-	len = WideCharToMultiByte(CP_ACP, 0, wstr, -1, NULL, 0, NULL, NULL);
-
-	char* str = new char[len + 1];
-	memset(str, 0, (len + 1) * sizeof(char));
-
-	WideCharToMultiByte(CP_ACP, 0, wstr, -1, str, len, NULL, NULL);
-
-	if (wstr) {
-		delete[]wstr;
-		wstr = NULL;
-	}
-	return str;
-}
-
-static char* gb2312toutf8(const char* gb2312)
-{
-	int len = MultiByteToWideChar(CP_ACP, 0, gb2312, -1, NULL, 0);
-	wchar_t* wstr = new wchar_t[len + 1];
-	memset(wstr, 0, (len + 1) * sizeof(wchar_t));
-
-	MultiByteToWideChar(CP_ACP, 0, gb2312, -1, wstr, len);
-	len = WideCharToMultiByte(CP_UTF8, 0, wstr, -1, NULL, 0, NULL, NULL);
-
-	char* str = new char[len + 1];
-	memset(str, 0, (len + 1) * sizeof(char));
-	WideCharToMultiByte(CP_UTF8, 0, wstr, -1, str, len, NULL, NULL);
-	if (wstr) {
-		delete[] wstr;
-		wstr = NULL;
-	}
-	return str;
-}
+//static char* utf8togb2312(const char* utf8)
+//{
+//	int len = MultiByteToWideChar(CP_UTF8, 0, utf8, -1, NULL, 0);
+//	wchar_t* wstr = new wchar_t[len + 1];
+//	memset(wstr, 0, (len + 1) * sizeof(wchar_t));
+//
+//	MultiByteToWideChar(CP_UTF8, 0, utf8, -1, wstr, len);
+//	len = WideCharToMultiByte(CP_ACP, 0, wstr, -1, NULL, 0, NULL, NULL);
+//
+//	char* str = new char[len + 1];
+//	memset(str, 0, (len + 1) * sizeof(char));
+//
+//	WideCharToMultiByte(CP_ACP, 0, wstr, -1, str, len, NULL, NULL);
+//
+//	if (wstr) {
+//		delete[]wstr;
+//		wstr = NULL;
+//	}
+//	return str;
+//}
+
+//static char* gb2312toutf8(const char* gb2312)
+//{
+//	int len = MultiByteToWideChar(CP_ACP, 0, gb2312, -1, NULL, 0);
+//	wchar_t* wstr = new wchar_t[len + 1];
+//	memset(wstr, 0, (len + 1) * sizeof(wchar_t));
+//
+//	MultiByteToWideChar(CP_ACP, 0, gb2312, -1, wstr, len);
+//	len = WideCharToMultiByte(CP_UTF8, 0, wstr, -1, NULL, 0, NULL, NULL);
+//
+//	char* str = new char[len + 1];
+//	memset(str, 0, (len + 1) * sizeof(char));
+//	WideCharToMultiByte(CP_UTF8, 0, wstr, -1, str, len, NULL, NULL);
+//	if (wstr) {
+//		delete[] wstr;
+//		wstr = NULL;
+//	}
+//	return str;
+//}
 
 
 static int translate_id(bool in_direction, int idx)
@@ -207,14 +207,7 @@ static CSimpleStringA audio_get_dev_name(bool in_direction, int idx)
 		if (in_direction) {
 			if (info->maxInputChannels) {
 				if (idx == ii) {
-#if _MSC_VER < 1929 //VS2010
-					char* str_audioin = utf8togb2312(info->name);
-					CSimpleStringA strInDevice = CSimpleStringA(str_audioin);
-					delete str_audioin;
-					str_audioin = NULL;
-#else
 					CSimpleStringA strInDevice = CSimpleStringA(info->name);
-#endif
 					return strInDevice;
 				}
 				ii++;
@@ -223,14 +216,7 @@ static CSimpleStringA audio_get_dev_name(bool in_direction, int idx)
 		else {
 			if (info->maxOutputChannels) {
 				if (idx == ii) {
-#if _MSC_VER < 1929 //VS2010
-					char* str_audioout = utf8togb2312(info->name);
-					CSimpleStringA strOutDevice = CSimpleStringA(str_audioout);
-					delete str_audioout;
-					str_audioout = NULL;
-#else
 					CSimpleStringA strOutDevice = CSimpleStringA(info->name);
-#endif
 					return strOutDevice;
 				}
 				ii++;
@@ -252,27 +238,18 @@ int capture_get_audio_device_id(bool in_direction, const char* dev_name)
 		const PaDeviceInfo* info = Pa_GetDeviceInfo(i);
 		if (in_direction) {
 			if (info->maxInputChannels) {
-				char* straudio = gb2312toutf8(dev_name);
-				if (strstr(info->name, straudio) != NULL) {
-					delete straudio;
-					straudio = NULL;
+
+				if (strstr(info->name, dev_name) != NULL) {
 					return ii;
 				}
-				delete straudio;
-				straudio = NULL;
 				ii++;
 			}
 		}
 		else {
 			if (info->maxOutputChannels) {
-				char* straudioout = gb2312toutf8(dev_name);
-				if (strstr(info->name, straudioout) != NULL) {
-					delete straudioout;
-					straudioout = NULL;
+				if (strstr(info->name, dev_name) != NULL) {
 					return ii;
 				}
-				delete straudioout;
-				straudioout = NULL;
 				ii++;
 			}
 		}
@@ -449,7 +426,7 @@ static int record_portaudio_capture_start(rvc_audio_capture_t* audio_cap)
 
 	PaError paError;
 	const PaDeviceInfo* info;
-	int nId = capture_get_audio_device_id(true, cap->rvc_audio_config.strAudioIn);
+	int nId = capture_get_audio_device_id(true, cap->rvc_audio_config.strAudioIn.GetData());
 	if (nId == -1)
 	{
 		LogWarn(Severity_Middle, Error_Debug,ERROR_MOD_MEDIACONTROLLER_HANDFREEIN_INITFAIL,"hand free in device config error,please check");
@@ -1990,6 +1967,7 @@ namespace MediaController {
 					md5(x, t1, strlen(t1));
 					Bin2Str(x, sizeof(x), t1, sizeof(t1));
 				}
+				DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("%d = %s;%s", i, t, t1);
 				strJson += CSimpleStringA::Format("\"%d\":\"%s;%s\",", i, t, t1);
 			}
 

+ 12 - 4
Module/mod_pinpad/PinPadFSM.h

@@ -100,8 +100,10 @@ public:
 	SpReqAnsContext<PinPadService_GetInputSM_Req, PinPadService_GetInputSM_Ans>::Pointer ctx;
 	virtual void OnUnhandled() 
 	{
-		if (ctx != NULL)
+		if (ctx != NULL) {
+			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setAPI("GetInputSMEvent")("InvalidState");
 			ctx->Answer(Error_InvalidState);
+		}
 	}
 };
 class LoadKeySMEvent : public FSMEvent
@@ -112,8 +114,10 @@ public:
 	SpReqAnsContext<PinPadService_LoadKeysSM_Req, PinPadService_LoadKeysSM_Ans>::Pointer ctx;
 	virtual void OnUnhandled() 
 	{
-		if (ctx != NULL)
+		if (ctx != NULL) {
+			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setAPI("LoadKeySMEvent")("InvalidState");
 			ctx->Answer(Error_InvalidState);
+		}
 	}
 };
 class EncryptSMEvent : public FSMEvent
@@ -124,8 +128,10 @@ public:
 	SpReqAnsContext<PinPadService_EncryptDataSM_Req, PinPadService_EncryptDataSM_Ans>::Pointer ctx;
 	virtual void OnUnhandled() 
 	{
-		if (ctx != NULL)
+		if (ctx != NULL) {
+			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setAPI("EncryptSMEvent")("InvalidState");
 			ctx->Answer(Error_InvalidState);
+		}
 	}
 };
 class GetCheckCodeEvent : public FSMEvent
@@ -136,8 +142,10 @@ public:
 	SpReqAnsContext<PinPadService_GetCheckCode_Req, PinPadService_GetCheckCode_Ans>::Pointer ctx;
 	virtual void OnUnhandled()
 	{
-		if (ctx != NULL)
+		if (ctx != NULL) {
+			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setAPI("GetCheckCodeEvent")("InvalidState");
 			ctx->Answer(Error_InvalidState);
+		}
 	}
 };
 

+ 1 - 1
Module/mod_recorder/recordinfo.cpp

@@ -4,7 +4,7 @@
 
 
 void HttpsLogCallBack(const char* logtxt) {
-	//DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM).setAPI("HttpsLogCallBack")("HttpsLogCallBack: %s.", logtxt);
+	DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM).setAPI("HttpsLogCallBack")("HttpsLogCallBack: %s.", logtxt);
 }
 
 

+ 0 - 2
Module/mod_sipphone/audio_session.h

@@ -73,6 +73,4 @@ void audio_lib_deinit();
 int audio_get_dev_count(int *in_cnt, int *out_cnt);
 CSimpleStringA audio_get_dev_name(bool in_direction, int idx);
 int capture_get_audio_device_id(bool in_direction, const char *dev_name);
-
-int get_audio_dev_name(char*devname,char*in_dev,char*out_dev);
 #endif // MEDIACONTROLLER_AUDIO_H

+ 41 - 141
Module/mod_sipphone/win/audio_session.cpp

@@ -838,47 +838,47 @@ static void __stdcall __audio_log_func(int level, const char *s)
 }
 
 
-static char* utf8togb2312(const char* utf8)
-{
-	int len = MultiByteToWideChar(CP_UTF8, 0, utf8, -1, NULL, 0);
-
-	wchar_t* wstr = new wchar_t[len + 1];
-	memset(wstr, 0, (len + 1)*sizeof(wchar_t));
-
-	MultiByteToWideChar(CP_UTF8, 0, utf8, -1, wstr, len);
-	len = WideCharToMultiByte(CP_ACP, 0, wstr, -1, NULL, 0, NULL, NULL);
-
-	char* str = new char[len + 1];
-	memset(str, 0, (len + 1)*sizeof(char));
-
-	WideCharToMultiByte(CP_ACP, 0, wstr, -1, str, len, NULL, NULL);
-
-	if (wstr) {
-		delete[]wstr;
-		wstr = NULL;
-	}
-	return str;
-}
-
-
-static char* gb2312toutf8(const char* gb2312)
-{
-	int len = MultiByteToWideChar(CP_ACP, 0, gb2312, -1, NULL, 0);
-	wchar_t* wstr = new wchar_t[len + 1];
-	memset(wstr, 0, (len + 1)*sizeof(wchar_t));
-
-	MultiByteToWideChar(CP_ACP, 0, gb2312, -1, wstr, len);
-	len = WideCharToMultiByte(CP_UTF8, 0, wstr, -1, NULL, 0, NULL, NULL);
-
-	char* str = new char[len + 1];
-	memset(str, 0, (len + 1)*sizeof(char));
-	WideCharToMultiByte(CP_UTF8, 0, wstr, -1, str, len, NULL, NULL);
-	if (wstr) {
-		delete[] wstr;
-		wstr = NULL;
-	}
-	return str;
-}
+//static char* utf8togb2312(const char* utf8)
+//{
+//	int len = MultiByteToWideChar(CP_UTF8, 0, utf8, -1, NULL, 0);
+//
+//	wchar_t* wstr = new wchar_t[len + 1];
+//	memset(wstr, 0, (len + 1)*sizeof(wchar_t));
+//
+//	MultiByteToWideChar(CP_UTF8, 0, utf8, -1, wstr, len);
+//	len = WideCharToMultiByte(CP_ACP, 0, wstr, -1, NULL, 0, NULL, NULL);
+//
+//	char* str = new char[len + 1];
+//	memset(str, 0, (len + 1)*sizeof(char));
+//
+//	WideCharToMultiByte(CP_ACP, 0, wstr, -1, str, len, NULL, NULL);
+//
+//	if (wstr) {
+//		delete[]wstr;
+//		wstr = NULL;
+//	}
+//	return str;
+//}
+//
+//
+//static char* gb2312toutf8(const char* gb2312)
+//{
+//	int len = MultiByteToWideChar(CP_ACP, 0, gb2312, -1, NULL, 0);
+//	wchar_t* wstr = new wchar_t[len + 1];
+//	memset(wstr, 0, (len + 1)*sizeof(wchar_t));
+//
+//	MultiByteToWideChar(CP_ACP, 0, gb2312, -1, wstr, len);
+//	len = WideCharToMultiByte(CP_UTF8, 0, wstr, -1, NULL, 0, NULL, NULL);
+//
+//	char* str = new char[len + 1];
+//	memset(str, 0, (len + 1)*sizeof(char));
+//	WideCharToMultiByte(CP_UTF8, 0, wstr, -1, str, len, NULL, NULL);
+//	if (wstr) {
+//		delete[] wstr;
+//		wstr = NULL;
+//	}
+//	return str;
+//}
 
 
 int audio_lib_init()
@@ -960,14 +960,7 @@ CSimpleStringA audio_get_dev_name(bool in_direction, int idx)
 		if (in_direction) {
 			if (info->maxInputChannels) {
 				if (idx == ii) {
-#if _MSC_VER < 1929 //VS2010
-					char* str_audioin = utf8togb2312(info->name);
-					CSimpleStringA strInDevice = CSimpleStringA(str_audioin);
-					delete str_audioin;
-					str_audioin = NULL;
-#else
 					CSimpleStringA strInDevice = CSimpleStringA(info->name);
-#endif
 					return strInDevice;
 				}
 				ii++;
@@ -975,14 +968,7 @@ CSimpleStringA audio_get_dev_name(bool in_direction, int idx)
 		} else {
 			if (info->maxOutputChannels) {
 				if (idx == ii) {
-#if _MSC_VER < 1929 //VS2010
-					char* str_audioout = utf8togb2312(info->name);
-					CSimpleStringA strOutDevice = CSimpleStringA(str_audioout);
-					delete str_audioout;
-					str_audioout = NULL;
-#else
 					CSimpleStringA strOutDevice = CSimpleStringA(info->name);
-#endif
 					return strOutDevice;
 				}
 				ii++;
@@ -1004,39 +990,17 @@ int capture_get_audio_device_id(bool in_direction, const char *dev_name)
 		const PaDeviceInfo *info = Pa_GetDeviceInfo(i);
 		if (in_direction) {
 			if (info->maxInputChannels) {
-#if _MSC_VER < 1929 //VS2010
-				char* straudio = gb2312toutf8(dev_name);
-				if (strstr(info->name, straudio) != NULL) {
-					delete straudio;
-					straudio = NULL;
-					return ii;
-				}
-				delete straudio;
-				straudio = NULL;
-#else
 				if (strstr(info->name, dev_name) != NULL) {
 					return ii;
 				}
-#endif
 				ii++;
 			}
 		} 
 		else {
 			if (info->maxOutputChannels) {
-#if _MSC_VER < 1929 //VS2010
-				char* straudioout = gb2312toutf8(dev_name);
-				if (strstr(info->name, straudioout) != NULL) {
-					delete straudioout;
-					straudioout = NULL;
-					return ii;
-				}
-				delete straudioout;
-				straudioout = NULL;
-#else
 				if (strstr(info->name, dev_name) != NULL) {
 					return ii;
 				}
-#endif
 				ii++;
 			}
 		}
@@ -1044,67 +1008,3 @@ int capture_get_audio_device_id(bool in_direction, const char *dev_name)
 	return -1;
 }
 
-int get_audio_dev_name(char*devname,char*in_dev,char*out_dev)
-{
-	int icnt, ocnt;
-	int rc = audio_get_dev_count(&icnt, &ocnt);
-	if (rc == 0) 
-	{
-		int i;
-		CSimpleStringA tmp;
-		for (i = 0; i < icnt; ++i) 
-		{		
-			tmp = audio_get_dev_name(TRUE, i);
-			if (strstr(tmp,devname)!=NULL)
-			{
-				memcpy(in_dev,tmp.GetData(),tmp.GetLength());
-				rc++;
-			}
-		}
-		for (i = 0; i < ocnt; ++i) 
-		{
-			tmp = audio_get_dev_name(FALSE, i);
-			if (strstr(tmp,devname)!=NULL)
-			{
-				memcpy(out_dev,tmp.GetData(),tmp.GetLength());
-				rc++;
-			}
-		}
-		return rc;
-	}
-	else
-	{
-		return rc;
-	}
-}
-
-#if 0
-static int translate_id(int in_direction, int idx)
-{
-	int i, n, ii;
-	audio_log_set_func(NULL);
-	n = Pa_GetDeviceCount();
-	for (i = 0, ii = 0; i < n; ++i) {
-		const PaDeviceInfo *info = Pa_GetDeviceInfo(i);
-		if (in_direction) {
-			if (info->maxInputChannels) {
-				if (ii == idx) {
-					audio_log_set_func(__audio_log_func);
-					return i;
-				}
-				ii++;
-			}
-		} else {
-			if (info->maxOutputChannels) {
-				if (ii == idx) {
-					audio_log_set_func(__audio_log_func);
-					return i;
-				}
-				ii++;
-			}
-		}
-	}
-	audio_log_set_func(__audio_log_func);
-	return -1;
-}
-#endif

+ 0 - 31
Other/unix/libbizchan/bizchan.cpp

@@ -145,8 +145,6 @@ typedef int (*lpfn_cryptionfun)(unsigned char *  out ,int outLen,const unsigned
 
 static lpfn_cryptionfun decodestring = NULL;
 static lpfn_cryptionfun encodestring = NULL;
-static lpfn_cryptionfun decodestring_mobile = NULL;
-static lpfn_cryptionfun encodestring_mobile = NULL;
 
 static unsigned char  seed_key []= {0x81,0x32,0x13,0xf5,0x29,0x3b,0x52,0x37,0x61,0x98,0x33,0x15,0x72,0x31,0xfe,0x34};
 
@@ -944,11 +942,6 @@ static void do_shake_send(bizchan_t* chan, SOCKET conn, int* error) {
 	lpfn_cryptionfun encodefun = encodestring;
 	lpfn_cryptionfun decodefun = decodestring;
 
-	if (1 == chan->config.crypt_type) {
-		encodefun = encodestring_mobile;
-		decodefun = decodestring_mobile;
-	}
-
 	int enc_length = KEY_LEN;
 	hdr.tag[0] = 'A';
 	hdr.tag[1] = 'C';
@@ -991,11 +984,6 @@ static void do_shake_recv(bizchan_t* chan, SOCKET conn, int* error) {
 	lpfn_cryptionfun encodefun = encodestring;
 	lpfn_cryptionfun decodefun = decodestring;
 
-	if (1 == chan->config.crypt_type) {
-		encodefun = encodestring_mobile;
-		decodefun = decodestring_mobile;
-	}
-
 	do
 	{
 		t = recv(conn, (char*)&ack_hdr + ack_hdr_recv_bytes, sizeof(ack_hdr) - ack_hdr_recv_bytes, 0);
@@ -1412,25 +1400,6 @@ static int init_decode_func(const bizchan_config_t* config, const bizchan_callba
 			return ret;
 	}
 
-	if (1 == config->crypt_type) {
-		if (!encodestring_mobile) {
-			HMODULE hInst = LoadLibraryA("libacmstrenc_mobile.so");
-			if (hInst) {
-				encodestring_mobile = (lpfn_cryptionfun)GetProcAddress(hInst, "encodestring");
-			}
-			if (!encodestring_mobile)
-				return ret;
-		}
-		if (!decodestring_mobile) {
-			HMODULE hInst = LoadLibraryA("libacmstrdec_mobile.so");
-			if (hInst) {
-				decodestring_mobile = (lpfn_cryptionfun)GetProcAddress(hInst, "decodestring");
-			}
-			if (!decodestring_mobile)
-				return ret;
-		}
-	}
-
 	if (encodestring && decodestring) {
 		ret = 0;
 	}

+ 0 - 1
Other/unix/libbizchan/bizchan.h

@@ -37,7 +37,6 @@ typedef struct bizchan_config_t {
 		int rtp_port;
 		int desc;
 	}video;
-	int crypt_type;
 }bizchan_config_t;
 
 

+ 22 - 32
Other/win/libaudioframework/audiomicspk2.c

@@ -198,26 +198,26 @@ static int get_device_index(int indev, const char *key)
 	return -1;
 }
 
-
-static char* gb2312toutf8(const char* gb2312)
-{
-	int len = MultiByteToWideChar(CP_ACP, 0, gb2312, -1, NULL, 0);
-	wchar_t* wstr = (wchar_t*)malloc(sizeof(wchar_t)*(len+1));
-	char* str = NULL;
-	memset(wstr, 0, (len + 1) * sizeof(wchar_t));
-
-	MultiByteToWideChar(CP_ACP, 0, gb2312, -1, wstr, len);
-	len = WideCharToMultiByte(CP_UTF8, 0, wstr, -1, NULL, 0, NULL, NULL);
-
-	str = (char*)malloc(sizeof(char) * (len + 1));
-	memset(str, 0, (len + 1) * sizeof(char));
-	WideCharToMultiByte(CP_UTF8, 0, wstr, -1, str, len, NULL, NULL);
-	if (wstr) {
-		free(wstr);
-		wstr = NULL;
-	}
-	return str;
-}
+//
+//static char* gb2312toutf8(const char* gb2312)
+//{
+//	int len = MultiByteToWideChar(CP_ACP, 0, gb2312, -1, NULL, 0);
+//	wchar_t* wstr = (wchar_t*)malloc(sizeof(wchar_t)*(len+1));
+//	char* str = NULL;
+//	memset(wstr, 0, (len + 1) * sizeof(wchar_t));
+//
+//	MultiByteToWideChar(CP_ACP, 0, gb2312, -1, wstr, len);
+//	len = WideCharToMultiByte(CP_UTF8, 0, wstr, -1, NULL, 0, NULL, NULL);
+//
+//	str = (char*)malloc(sizeof(char) * (len + 1));
+//	memset(str, 0, (len + 1) * sizeof(char));
+//	WideCharToMultiByte(CP_UTF8, 0, wstr, -1, str, len, NULL, NULL);
+//	if (wstr) {
+//		free(wstr);
+//		wstr = NULL;
+//	}
+//	return str;
+//}
 
 static int get_device_index_poartaudio(int indev, const char *key)
 {
@@ -227,26 +227,16 @@ static int get_device_index_poartaudio(int indev, const char *key)
 		const PaDeviceInfo* pInfo = Pa_GetDeviceInfo(i);
 		if (indev) {
 			if (pInfo->maxInputChannels) {
-				char* straudio = gb2312toutf8(key);
-				if (strstr(pInfo->name, straudio) != NULL) {
-					free(straudio);
-					straudio = NULL;
+				if (strstr(pInfo->name, key) != NULL) {
 					return i;
 				}
-				free(straudio);
-				straudio = NULL;
 			}
 		}
 		else {
 			if (pInfo->maxOutputChannels) {
-				char* straudioout = gb2312toutf8(key);
-				if (strstr(pInfo->name, straudioout) != NULL) {
-					free(straudioout);
-					straudioout = NULL;
+				if (strstr(pInfo->name, key) != NULL) {
 					return i;
 				}
-				free(straudioout);
-				straudioout = NULL;
 			}
 		}
 	}

+ 2 - 24
Other/win/libbizchan/bizchan.c

@@ -98,8 +98,6 @@ typedef int (*lpfn_cryptionfun)(unsigned char *  out ,int outLen,const unsigned
 
 static lpfn_cryptionfun decodestring = NULL;
 static lpfn_cryptionfun encodestring = NULL;
-static lpfn_cryptionfun decodestring_mobile = NULL;
-static lpfn_cryptionfun encodestring_mobile = NULL;
 
 static unsigned char  seed_key []= {0x81,0x32,0x13,0xf5,0x29,0x3b,0x52,0x37,0x61,0x98,0x33,0x15,0x72,0x31,0xfe,0x34};
 
@@ -724,10 +722,7 @@ static void process(bizchan_t *chan)
 		int ack_hdr_recv_bytes = 0;
 		lpfn_cryptionfun encodefun = encodestring;
 		lpfn_cryptionfun decodefun = decodestring;
-		if (1 == chan->config.crypt_type){
-			encodefun = encodestring_mobile;
-			decodefun = decodestring_mobile;
-		}
+
 		while (!chan->stop_flag && !chan->connected) 
 		{ // wait until connected
 			DWORD dwRet = WaitForMultipleObjects(2, evts, FALSE, MAX_TIMEOUT);
@@ -960,24 +955,7 @@ static int init_decode_func()
 			return ret;
 	}
 
-	if (!encodestring_mobile) {
-		HMODULE hInst = LoadLibraryA("acmstrenc_mobile.dll");
-		if (hInst) {
-			encodestring_mobile = (lpfn_cryptionfun)GetProcAddress(hInst, "encodestring");
-		}
-		if (!encodestring_mobile)
-			return ret;
-	}
-	if (!decodestring_mobile) {
-		HMODULE hInst = LoadLibraryA("acmstrdec_mobile.dll");
-		if (hInst) {
-			decodestring_mobile = (lpfn_cryptionfun)GetProcAddress(hInst, "decodestring");
-		}
-		if (!decodestring_mobile)
-			return ret;
-	}
-
-	if (encodestring && decodestring && encodestring_mobile && decodestring_mobile){
+	if (encodestring && decodestring){
 		ret = 0;
 	}
 	return ret;

+ 0 - 1
Other/win/libbizchan/bizchan.h

@@ -33,7 +33,6 @@ typedef struct bizchan_config_t {
 		int rtp_port;
 		int desc;
 	}video;
-	int crypt_type;
 }bizchan_config_t;
 
 

+ 6 - 0
addin/Readme.txt

@@ -0,0 +1,6 @@
+install.sh 用于全新安装版本场景
+upgrade.sh 用于更新版本的场景
+
+根据需求,二者选其一
+均需使用 root 权限运行
+请用命令行执行 ‘sudo bash ./install.sh’或 ‘sudo bash ./upgrade.sh’

+ 0 - 25
addin/Run.ini.in

@@ -1,25 +0,0 @@
-[Precondition]
-MachineType=RVC.Stand2S
-MachineVersion=5.0
-SoftwareVersion=0.0.0-@RVC_FRAMEWORK_VERSION@
-OSVersion=4.0-
-Device=
-Depend=
-Cover=
-
-[Action]
-;UpgradeVersion:A表示自动升级版本号;也可以指定版本,为空表示轻量升级
-UpgradeVersion=@RVC_FRAMEWORK_VERSION@
-;待删除文件列表
-;ToDelete=
-
-
-;待拷贝文件列表,必须为Run或Data子目录,如:Run\bin\*.exe,Run\bin\*.dll,Run\mod\*.dll,Run\dep\*.dll,Run\cfg\*.ini,Run\cfg\*.*
-ToCopy=Run\dep\*,Run\bin\*,Run\mod\*.*,Run\cfg\*.*,Run\res\*
-
-;待运行文件列表,适用于系统外升级
-;ToRun=
-
-;CopyMode拷贝模式:1(存在才拷贝并覆盖)|2(不存在才拷贝)|3(强制拷贝)|4(存在不拷贝)
-;[test20140422.txt]
-CopyMode=3

+ 2 - 2
addin/cfg/UserCodeToMsgTip.ini

@@ -67,8 +67,8 @@
 0x20300203=[RTA2323] [HW] 发卡模块故障,请联系卡库厂商排查
 0x203002A7=[RTA2324] 卡库正在发卡或加卡,请在卡库空闲后重试
 0x2030003B=[RTA2325] [HW] 卡面印刷失败,请联系厂商排查
-0x2030027A=[RTA2326] [HW] 激活卡片失败(接触/非接),请检查卡片是否异常或联系厂商排查
-0x2030027B=[RTA2327] [HW] 激活卡片失败(接触/非接),请检查卡片是否异常或联系厂商排查
+0x2030027A=[RTA2326] [HW] 卡片上电失败(接触/非接),请检查卡片是否异常或联系厂商排查
+0x2030027B=[RTA2327] [HW] 卡片上电失败(接触/非接),请检查卡片是否异常或联系厂商排查
 
 0x203002B4=[RTA2380] 卡箱无卡,请确认卡箱有无卡片或卡片是否放好
 0x203002B5=[RTA2381] 未检测到卡箱,请确认卡箱是否放好

+ 3 - 0
addin/hardwarecfg/root-input.ini

@@ -0,0 +1,3 @@
+[Terminal]
+;仅需在下方等号后面输入我行设备终端号,并把该文件名改成 root.ini 即可
+TerminalNo=

+ 1 - 151
addin/hardwarecfg/root.ini.unix

@@ -1,152 +1,2 @@
 [Terminal]
-TerminalNo=7555980186
-MachineType=RVC.Stand1SPlus
-MachineVersion=5.0
-Manufacturer=CMB
-MachineModel=
-SN=
-Site=cmb.LIB
-Screen=2
-EnrolGPS="0.003,0.003"
-EnrolAddr=广东省深圳市南山区科技园北区科技中一路3号
-
-[Path]
-SysRoot=/opt/rvc/Run
-ADData=/opt/rvc/adData
-SysLog=/opt/rvc/SysLog
-InterLog=/opt/rvc/InterLog
-UploadVideo=/opt/rvc/UploadVideo
-UploadPhoto=/opt/rvc/UploadPhoto
-LocalVideo=/opt/rvc/Video
-Downloads=/opt/rvc/Downloads
-Upgraded=/opt/rvc/Upgraded
-Temp=/opt/rvc/Temp
-CenterSetting=/opt/rvc/CenterSetting
-
-[Audio]
-handfree_in_dev=
-handfree_out_dev=
-pickup_in_dev=
-pickup_out_dev=
-handfree_in_agc=0
-handfree_out_agc=0
-pickup_in_agc=0
-pickup_out_agc=0
-handfree_in_ns=1
-handfree_out_ns=0
-pickup_in_ns=1
-pickup_out_ns=0
-handfree_aec=0
-pickup_aec=0
-handfree_in_volume=100
-handfree_out_volume=100
-pickup_in_volume=100
-pickup_out_volume=100
-
-[Video]
-EnvCamera=
-OptCamera= 
-EnvRotate=0
-OptRotate=270
-mtu=1500
-quant=3;0-10, 0:最清晰, 10:最模糊
-;EnvFps=5
-;OptFps=5
-
-
-;define device category
-[Device]
-Number=6
-1=IDCertificate
-2=CardIssuer
-3=Radar
-4=WatchDog
-5=UPS
-6=Printer
-
-[Device.IDCertificate]
-# parameters such as port 
-Vendor=cmbsz
-Version=1
-Batch=1
-Port=1
-
-
-[Device.CardIssuer]
-# parameters such as port 
-Vendor=cmbsz
-Version=1
-Batch=1
-Port=2
-Baudrate=115200
-
-[Device.CardSwiper]
-# parameters such as port 
-Vendor=cmbsz
-Version=1
-Batch=1
-Port=2
-Baudrate=115200
-
-[Device.ContactlessCard]
-# parameters such as port 
-Vendor=cmbsz
-Version=1
-Batch=1
-Port=2
-Baudrate=115200
-
-[Device.DeviceControl]
-# parameters such as port 
-Vendor=cmbsz
-Version=1
-Batch=1
-Port=0
-Baudrate=0
-
-
-[Device.Gpio]
-# parameters such as port 
-Vendor=cmbsz
-Version=1
-Batch=1
-PortNum=4
-InOutDir=65280
-
-
-[Device.PinPad]
-# parameters such as port 
-Vendor=cmbsz
-Version=1
-Batch=1
-Port=4
-Baudrate=115200
-Checkdata=0000000000000000
-Keysn=000
-
-[Device.Ups]
-Vendor=cmbsz
-Version=1
-Batch=1
-Port=5
-Baudrate=2400
-
-[Device.WatchDog]
-# parameters such as port 
-Vendor=cmbsz
-Version=1
-Batch=1
-Port=
-
-[Device.HSPScanner]
-Vendor=cmbsz
-Version=1
-Batch=1
-
-[Device.FingerPrint]
-Vendor=cmbsz
-Version=1
-Batch=1
-
-
-
+TerminalNo=7555980186

+ 1 - 152
addin/hardwarecfg/root.ini.win32

@@ -1,153 +1,2 @@
 [Terminal]
-TerminalNo=7555980136
-MachineType=RVC.Stand2S
-MachineVersion=2.0
-Manufacturer=CMB
-Site=cmb.LIB
-Screen=2
-EnrolGPS="0.003,0.003"
-EnrolAddr=广东省深圳市南山区科技园北区科技中一路3号
-
-[Path]
-SysRoot=c:\rvc\run
-ADData=c:\rvc\addata
-SysLog=c:\rvc\SysLog
-InterLog=c:\rvc\InterLog
-UploadVideo=c:\rvc\UploadVideo
-UploadPhoto=c:\rvc\UploadPhoto
-LocalVideo=c:\rvc\Video
-Downloads=c:\rvc\Downloads
-Upgraded=c:\rvc\Upgraded
-Temp=c:\rvc\Temp
-CenterSetting=C:\rvc\CenterSetting
-
-[Audio]
-handfree_in_dev=麦克风 (Realtek(R) Audio)
-handfree_out_dev=扬声器 (Realtek(R) Audio)
-;pickup_in_dev=Microsoft 声音映射器
-;pickup_out_dev= Microsoft 声音映射器
-handfree_in_agc=0
-handfree_out_agc=0
-pickup_in_agc=0
-pickup_out_agc=0
-handfree_in_ns=1
-handfree_out_ns=0
-pickup_in_ns=1
-pickup_out_ns=0
-handfree_aec=0
-pickup_aec=0
-handfree_in_volume=100
-handfree_out_volume=100
-;pickup_in_volume=100
-;pickup_out_volume=100
-
-[Video]
-EnvCamera= 
-;OptCamera=WebCam SC-50AFL11C54N;F8ED547658C2E521D8B6A7217010A791 
-EnvRotate=0
-;OptRotate=270
-mtu=1500
-quant=3;0-10, 0:最清晰, 10:最模糊
-
-;define device category
-[Device]
-Number=6
-1=IDCertificate
-2=CardIssuer
-3=Radar
-4=WatchDog
-5=UPS
-6=Printer
-
-[Device.IDCertificate]
-# parameters such as port 
-Vendor=cmbsz
-Version=1
-Batch=1
-Port=1
-
-
-[Device.CardIssuer]
-# parameters such as port 
-Vendor=cmbsz
-Version=1
-Batch=1
-Port=2
-Baudrate=115200
-;Vendor=
-;Version=
-;Batch=
-;Baudrate=19200
-
-
-
-[Device.CardSwiper]
-# parameters such as port 
-Vendor=cmbsz
-Version=1
-Batch=1
-Port=2
-Baudrate=115200
-
-[Device.ContactlessCard]
-# parameters such as port 
-Vendor=cmbsz
-Version=1
-Batch=1
-Port=2
-Baudrate=115200
-
-[Device.DeviceControl]
-# parameters such as port 
-Vendor=cmbsz
-Version=1
-Batch=1
-Port=0
-Baudrate=0
-
-
-[Device.Gpio]
-# parameters such as port 
-Vendor=cmbsz
-Version=1
-Batch=1
-PortNum=4
-InOutDir=65280
-
-
-[Device.PinPad]
-# parameters such as port 
-Vendor=cmbsz
-Version=1
-Batch=1
-Port=4
-Baudrate=115200
-Checkdata=0000000000000000
-Keysn=000
-
-[Device.Ups]
-Vendor=cmbsz
-Version=1
-Batch=1
-Port=5
-Baudrate=2400
-
-[Device.WatchDog]
-# parameters such as port 
-Vendor=cmbsz
-Version=1
-Batch=1
-Port=
-
-[Device.HSPScanner]
-Vendor=cmbsz
-Version=1
-Batch=1
-
-[Device.FingerPrint]
-Vendor=cmbsz
-Version=1
-Batch=1
-
-
-
+TerminalNo=7555980136

+ 0 - 116
addin/hardwarecfg/uos/root-RVC.Stand1SPlus-CW-CASH35AG-1201.ini

@@ -1,116 +0,0 @@
-[Terminal]
-TerminalNo=
-MachineType=RVC.Stand1SPlus
-MachineVersion=5.0
-Manufacturer=CW
-MachineModel=CASH35AG-1201
-SN=
-Site=cmb.LIB
-Screen=2
-EnrolGPS="0.003,0.003"
-EnrolAddr=XXX省XXX市XXX区XXX分行
-
-[Path]
-SysRoot=/opt/rvc/Run
-ADData=/opt/rvc/adData
-SysLog=/opt/rvc/SysLog
-InterLog=/opt/rvc/InterLog
-UploadVideo=/opt/rvc/UploadVideo
-UploadPhoto=/opt/rvc/UploadPhoto
-LocalVideo=/opt/rvc/Video
-Downloads=/opt/rvc/Downloads
-Upgraded=/opt/rvc/Upgraded
-Temp=/opt/rvc/Temp
-CenterSetting=/opt/rvc/CenterSetting
-
-[Audio]
-handfree_in_dev=
-handfree_out_dev=
-pickup_in_dev=
-pickup_out_dev=
-handfree_in_agc=0
-handfree_out_agc=0
-pickup_in_agc=0
-pickup_out_agc=0
-handfree_in_ns=1
-handfree_out_ns=0
-pickup_in_ns=1
-pickup_out_ns=0
-handfree_aec=0
-pickup_aec=0
-handfree_in_volume=100
-handfree_out_volume=100
-pickup_in_volume=100
-pickup_out_volume=100
-
-[Video]
-EnvCamera=
-EnvRotate=0
-mtu=1500
-quant=3;0-10, 0:最清晰, 10:最模糊
-
-;define device category
-[Device]
-Number=2
-1=IDCertificate
-2=CardIssuer
-
-[Device.IDCertificate]
-# parameters such as port 
-Vendor=cw
-Version=1
-Batch=1
-Port=1
-
-[Device.CardIssuer]
-# parameters such as port 
-Vendor=cw
-Version=1
-Batch=1
-Port=2
-Baudrate=38400
-
-[Device.ContactlessCard]
-# parameters such as port 
-Vendor=cw
-Version=1
-Batch=1
-Port=2
-Baudrate=115200
-
-[Device.DeviceControl]
-# parameters such as port 
-Vendor=cmbsz
-Version=1
-Batch=1
-Port=0
-Baudrate=0
-
-[Device.Gpio]
-# parameters such as port 
-Vendor=cw
-Version=1
-Batch=1
-Port=0
-Baudrate=0
-PortNum=4
-InOutDir=65280
-
-[Device.PinPad]
-# parameters such as port 
-Vendor=cw
-Version=1
-Batch=1
-Port=4
-Baudrate=115200
-Checkdata=0000000000000000
-Keysn=000
-
-[Device.FingerPrint]
-Vendor=cw
-Version=1
-Batch=1
-
-
-
-

+ 0 - 116
addin/hardwarecfg/uos/root-RVC.Stand1SPlus-GRG-DT-7000I64A-048.ini

@@ -1,116 +0,0 @@
-[Terminal]
-TerminalNo=
-MachineType=RVC.Stand1SPlus
-MachineVersion=5.0
-Manufacturer=GRG
-MachineModel=DT-7000I64A-048
-SN=
-Site=cmb.LIB
-Screen=2
-EnrolGPS="0.003,0.003"
-EnrolAddr=XXX省XXX市XXX区XXX分行
-
-[Path]
-SysRoot=/opt/rvc/Run
-ADData=/opt/rvc/adData
-SysLog=/opt/rvc/SysLog
-InterLog=/opt/rvc/InterLog
-UploadVideo=/opt/rvc/UploadVideo
-UploadPhoto=/opt/rvc/UploadPhoto
-LocalVideo=/opt/rvc/Video
-Downloads=/opt/rvc/Downloads
-Upgraded=/opt/rvc/Upgraded
-Temp=/opt/rvc/Temp
-CenterSetting=/opt/rvc/CenterSetting
-
-[Audio]
-handfree_in_dev=
-handfree_out_dev=
-pickup_in_dev=
-pickup_out_dev=
-handfree_in_agc=0
-handfree_out_agc=0
-pickup_in_agc=0
-pickup_out_agc=0
-handfree_in_ns=1
-handfree_out_ns=0
-pickup_in_ns=1
-pickup_out_ns=0
-handfree_aec=0
-pickup_aec=0
-handfree_in_volume=100
-handfree_out_volume=100
-pickup_in_volume=100
-pickup_out_volume=100
-
-[Video]
-EnvCamera=
-EnvRotate=0
-mtu=1500
-quant=3;0-10, 0:最清晰, 10:最模糊
-
-;define device category
-[Device]
-Number=2
-1=IDCertificate
-2=CardIssuer
-
-[Device.IDCertificate]
-# parameters such as port 
-Vendor=grg
-Version=1
-Batch=1
-Port=1
-
-[Device.CardIssuer]
-# parameters such as port 
-Vendor=grg
-Version=1
-Batch=1
-Port=2
-Baudrate=38400
-
-[Device.ContactlessCard]
-# parameters such as port 
-Vendor=grg
-Version=1
-Batch=1
-Port=2
-Baudrate=115200
-
-[Device.DeviceControl]
-# parameters such as port 
-Vendor=cmbsz
-Version=1
-Batch=1
-Port=0
-Baudrate=0
-
-[Device.Gpio]
-# parameters such as port 
-Vendor=grg
-Version=1
-Batch=1
-Port=0
-Baudrate=0
-PortNum=4
-InOutDir=65280
-
-[Device.PinPad]
-# parameters such as port 
-Vendor=grg
-Version=1
-Batch=1
-Port=4
-Baudrate=115200
-Checkdata=0000000000000000
-Keysn=000
-
-[Device.FingerPrint]
-Vendor=grg
-Version=1
-Batch=1
-
-
-
-

+ 0 - 116
addin/hardwarecfg/uos/root-RVC.Stand1SPlus-GWI-VTM700-A03.ini

@@ -1,116 +0,0 @@
-[Terminal]
-TerminalNo=
-MachineType=RVC.Stand1SPlus
-MachineVersion=5.0
-Manufacturer=GWI
-MachineModel=VTM700-A03
-SN=
-Site=cmb.LIB
-Screen=2
-EnrolGPS="0.003,0.003"
-EnrolAddr=XXX省XXX市XXX区XXX分行
-
-[Path]
-SysRoot=/opt/rvc/Run
-ADData=/opt/rvc/adData
-SysLog=/opt/rvc/SysLog
-InterLog=/opt/rvc/InterLog
-UploadVideo=/opt/rvc/UploadVideo
-UploadPhoto=/opt/rvc/UploadPhoto
-LocalVideo=/opt/rvc/Video
-Downloads=/opt/rvc/Downloads
-Upgraded=/opt/rvc/Upgraded
-Temp=/opt/rvc/Temp
-CenterSetting=/opt/rvc/CenterSetting
-
-[Audio]
-handfree_in_dev=
-handfree_out_dev=
-pickup_in_dev=
-pickup_out_dev=
-handfree_in_agc=0
-handfree_out_agc=0
-pickup_in_agc=0
-pickup_out_agc=0
-handfree_in_ns=1
-handfree_out_ns=0
-pickup_in_ns=1
-pickup_out_ns=0
-handfree_aec=0
-pickup_aec=0
-handfree_in_volume=100
-handfree_out_volume=100
-pickup_in_volume=100
-pickup_out_volume=100
-
-[Video]
-EnvCamera=
-EnvRotate=0
-mtu=1500
-quant=3;0-10, 0:最清晰, 10:最模糊
-
-;define device category
-[Device]
-Number=2
-1=IDCertificate
-2=CardIssuer
-
-[Device.IDCertificate]
-# parameters such as port 
-Vendor=gwi
-Version=1
-Batch=1
-Port=1
-
-[Device.CardIssuer]
-# parameters such as port 
-Vendor=gwi
-Version=1
-Batch=1
-Port=2
-Baudrate=38400
-
-[Device.ContactlessCard]
-# parameters such as port 
-Vendor=gwi
-Version=1
-Batch=1
-Port=2
-Baudrate=115200
-
-[Device.DeviceControl]
-# parameters such as port 
-Vendor=cmbsz
-Version=1
-Batch=1
-Port=0
-Baudrate=0
-
-[Device.Gpio]
-# parameters such as port 
-Vendor=gwi
-Version=1
-Batch=1
-Port=0
-Baudrate=0
-PortNum=4
-InOutDir=65280
-
-[Device.PinPad]
-# parameters such as port 
-Vendor=gwi
-Version=1
-Batch=1
-Port=4
-Baudrate=115200
-Checkdata=0000000000000000
-Keysn=000
-
-[Device.FingerPrint]
-Vendor=gwi
-Version=1
-Batch=1
-
-
-
-

+ 0 - 116
addin/hardwarecfg/uos/root-RVC.Stand1SPlus-KEBA-E1090.ini

@@ -1,116 +0,0 @@
-[Terminal]
-TerminalNo=
-MachineType=RVC.Stand1SPlus
-MachineVersion=5.0
-Manufacturer=KEBA
-MachineModel=E1090
-SN=
-Site=cmb.LIB
-Screen=2
-EnrolGPS="0.003,0.003"
-EnrolAddr=XXX省XXX市XXX区XXX分行
-
-[Path]
-SysRoot=/opt/rvc/Run
-ADData=/opt/rvc/adData
-SysLog=/opt/rvc/SysLog
-InterLog=/opt/rvc/InterLog
-UploadVideo=/opt/rvc/UploadVideo
-UploadPhoto=/opt/rvc/UploadPhoto
-LocalVideo=/opt/rvc/Video
-Downloads=/opt/rvc/Downloads
-Upgraded=/opt/rvc/Upgraded
-Temp=/opt/rvc/Temp
-CenterSetting=/opt/rvc/CenterSetting
-
-[Audio]
-handfree_in_dev=
-handfree_out_dev=
-pickup_in_dev=
-pickup_out_dev=
-handfree_in_agc=0
-handfree_out_agc=0
-pickup_in_agc=0
-pickup_out_agc=0
-handfree_in_ns=1
-handfree_out_ns=0
-pickup_in_ns=1
-pickup_out_ns=0
-handfree_aec=0
-pickup_aec=0
-handfree_in_volume=100
-handfree_out_volume=100
-pickup_in_volume=100
-pickup_out_volume=100
-
-[Video]
-EnvCamera=
-EnvRotate=0
-mtu=1500
-quant=3;0-10, 0:最清晰, 10:最模糊
-
-;define device category
-[Device]
-Number=2
-1=IDCertificate
-2=CardIssuer
-
-[Device.IDCertificate]
-# parameters such as port 
-Vendor=keba
-Version=1
-Batch=1
-Port=1
-
-[Device.CardIssuer]
-# parameters such as port 
-Vendor=keba
-Version=1
-Batch=1
-Port=2
-Baudrate=38400
-
-[Device.ContactlessCard]
-# parameters such as port 
-Vendor=keba
-Version=1
-Batch=1
-Port=2
-Baudrate=115200
-
-[Device.DeviceControl]
-# parameters such as port 
-Vendor=cmbsz
-Version=1
-Batch=1
-Port=0
-Baudrate=0
-
-[Device.Gpio]
-# parameters such as port 
-Vendor=keba
-Version=1
-Batch=1
-Port=0
-Baudrate=0
-PortNum=4
-InOutDir=65280
-
-[Device.PinPad]
-# parameters such as port 
-Vendor=keba
-Version=1
-Batch=1
-Port=4
-Baudrate=115200
-Checkdata=0000000000000000
-Keysn=000
-
-[Device.FingerPrint]
-Vendor=keba
-Version=1
-Batch=1
-
-
-
-

+ 0 - 116
addin/hardwarecfg/uos/root-RVC.Stand1SPlus-NANTIAN-VTM-6200B15G.ini

@@ -1,116 +0,0 @@
-[Terminal]
-TerminalNo=
-MachineType=RVC.Stand1SPlus
-MachineVersion=5.0
-Manufacturer=NANTIAN
-MachineModel=VTM-6200B15G
-SN=
-Site=cmb.LIB
-Screen=2
-EnrolGPS="0.003,0.003"
-EnrolAddr=XXX省XXX市XXX区XXX分行
-
-[Path]
-SysRoot=/opt/rvc/Run
-ADData=/opt/rvc/adData
-SysLog=/opt/rvc/SysLog
-InterLog=/opt/rvc/InterLog
-UploadVideo=/opt/rvc/UploadVideo
-UploadPhoto=/opt/rvc/UploadPhoto
-LocalVideo=/opt/rvc/Video
-Downloads=/opt/rvc/Downloads
-Upgraded=/opt/rvc/Upgraded
-Temp=/opt/rvc/Temp
-CenterSetting=/opt/rvc/CenterSetting
-
-[Audio]
-handfree_in_dev=
-handfree_out_dev=
-pickup_in_dev=
-pickup_out_dev=
-handfree_in_agc=0
-handfree_out_agc=0
-pickup_in_agc=0
-pickup_out_agc=0
-handfree_in_ns=1
-handfree_out_ns=0
-pickup_in_ns=1
-pickup_out_ns=0
-handfree_aec=0
-pickup_aec=0
-handfree_in_volume=100
-handfree_out_volume=100
-pickup_in_volume=100
-pickup_out_volume=100
-
-[Video]
-EnvCamera=
-EnvRotate=0
-mtu=1500
-quant=3;0-10, 0:最清晰, 10:最模糊
-
-;define device category
-[Device]
-Number=2
-1=IDCertificate
-2=CardIssuer
-
-[Device.IDCertificate]
-# parameters such as port 
-Vendor=nantian
-Version=1
-Batch=1
-Port=1
-
-[Device.CardIssuer]
-# parameters such as port 
-Vendor=nantian
-Version=1
-Batch=1
-Port=2
-Baudrate=38400
-
-[Device.ContactlessCard]
-# parameters such as port 
-Vendor=nantian
-Version=1
-Batch=1
-Port=2
-Baudrate=115200
-
-[Device.DeviceControl]
-# parameters such as port 
-Vendor=cmbsz
-Version=1
-Batch=1
-Port=0
-Baudrate=0
-
-[Device.Gpio]
-# parameters such as port 
-Vendor=nantian
-Version=1
-Batch=1
-Port=0
-Baudrate=0
-PortNum=4
-InOutDir=65280
-
-[Device.PinPad]
-# parameters such as port 
-Vendor=nantian
-Version=1
-Batch=1
-Port=4
-Baudrate=115200
-Checkdata=0000000000000000
-Keysn=000
-
-[Device.FingerPrint]
-Vendor=nantian
-Version=1
-Batch=1
-
-
-
-

+ 0 - 116
addin/hardwarecfg/uos/root-RVC.Stand1SPlus-SZZT-ZT2619.ini

@@ -1,116 +0,0 @@
-[Terminal]
-TerminalNo=
-MachineType=RVC.Stand1SPlus
-MachineVersion=5.0
-Manufacturer=SZZT
-MachineModel=ZT2619
-SN=
-Site=cmb.LIB
-Screen=2
-EnrolGPS="0.003,0.003"
-EnrolAddr=XXX省XXX市XXX区XXX分行
-
-[Path]
-SysRoot=/opt/rvc/Run
-ADData=/opt/rvc/adData
-SysLog=/opt/rvc/SysLog
-InterLog=/opt/rvc/InterLog
-UploadVideo=/opt/rvc/UploadVideo
-UploadPhoto=/opt/rvc/UploadPhoto
-LocalVideo=/opt/rvc/Video
-Downloads=/opt/rvc/Downloads
-Upgraded=/opt/rvc/Upgraded
-Temp=/opt/rvc/Temp
-CenterSetting=/opt/rvc/CenterSetting
-
-[Audio]
-handfree_in_dev=
-handfree_out_dev=
-pickup_in_dev=
-pickup_out_dev=
-handfree_in_agc=0
-handfree_out_agc=0
-pickup_in_agc=0
-pickup_out_agc=0
-handfree_in_ns=1
-handfree_out_ns=0
-pickup_in_ns=1
-pickup_out_ns=0
-handfree_aec=0
-pickup_aec=0
-handfree_in_volume=100
-handfree_out_volume=100
-pickup_in_volume=100
-pickup_out_volume=100
-
-[Video]
-EnvCamera=
-EnvRotate=0
-mtu=1500
-quant=3;0-10, 0:最清晰, 10:最模糊
-
-;define device category
-[Device]
-Number=2
-1=IDCertificate
-2=CardIssuer
-
-[Device.IDCertificate]
-# parameters such as port 
-Vendor=szzt
-Version=1
-Batch=1
-Port=1
-
-[Device.CardIssuer]
-# parameters such as port 
-Vendor=szzt
-Version=1
-Batch=1
-Port=2
-Baudrate=38400
-
-[Device.ContactlessCard]
-# parameters such as port 
-Vendor=szzt
-Version=1
-Batch=1
-Port=2
-Baudrate=115200
-
-[Device.DeviceControl]
-# parameters such as port 
-Vendor=cmbsz
-Version=1
-Batch=1
-Port=0
-Baudrate=0
-
-[Device.Gpio]
-# parameters such as port 
-Vendor=szzt
-Version=1
-Batch=1
-Port=0
-Baudrate=0
-PortNum=4
-InOutDir=65280
-
-[Device.PinPad]
-# parameters such as port 
-Vendor=szzt
-Version=1
-Batch=1
-Port=4
-Baudrate=115200
-Checkdata=0000000000000000
-Keysn=000
-
-[Device.FingerPrint]
-Vendor=szzt
-Version=1
-Batch=1
-
-
-
-

+ 0 - 154
addin/hardwarecfg/uos/root-RVC.Stand2S-CW-CASH35AG-JR10(G).ini

@@ -1,154 +0,0 @@
-[Terminal]
-TerminalNo=
-MachineType=RVC.Stand2S
-MachineVersion=5.0
-Manufacturer=CW
-MachineModel=CASH35AG-JR10(G)
-SN=
-Site=cmb.LIB
-Screen=2
-EnrolGPS="0.003,0.003"
-EnrolAddr=XXX省XXX市XXX区XXX分行
-
-[Path]
-SysRoot=/opt/rvc/Run
-ADData=/opt/rvc/adData
-SysLog=/opt/rvc/SysLog
-InterLog=/opt/rvc/InterLog
-UploadVideo=/opt/rvc/UploadVideo
-UploadPhoto=/opt/rvc/UploadPhoto
-LocalVideo=/opt/rvc/Video
-Downloads=/opt/rvc/Downloads
-Upgraded=/opt/rvc/Upgraded
-Temp=/opt/rvc/Temp
-CenterSetting=/opt/rvc/CenterSetting
-
-[Audio]
-handfree_in_dev=
-handfree_out_dev=
-pickup_in_dev=
-pickup_out_dev=
-handfree_in_agc=0
-handfree_out_agc=0
-pickup_in_agc=0
-pickup_out_agc=0
-handfree_in_ns=1
-handfree_out_ns=0
-pickup_in_ns=1
-pickup_out_ns=0
-handfree_aec=0
-pickup_aec=0
-handfree_in_volume=100
-handfree_out_volume=100
-pickup_in_volume=100
-pickup_out_volume=100
-
-[Video]
-EnvCamera=
-OptCamera= 
-EnvRotate=0
-OptRotate=270
-mtu=1500
-quant=3;0-10, 0:最清晰, 10:最模糊
-;EnvFps=5
-;OptFps=5
-
-
-;define device category
-[Device]
-Number=6
-1=IDCertificate
-2=CardIssuer
-3=Radar
-4=WatchDog
-5=UPS
-6=Printer
-
-[Device.IDCertificate]
-# parameters such as port 
-Vendor=cw
-Version=1
-Batch=1
-Port=1
-
-[Device.CardIssuer]
-# parameters such as port 
-Vendor=cw
-Version=1
-Batch=1
-Port=2
-Baudrate=38400
-
-[Device.CardSwiper]
-# parameters such as port 
-Vendor=cw
-Version=1
-Batch=1
-Port=2
-Baudrate=115200
-
-[Device.ContactlessCard]
-# parameters such as port 
-Vendor=cw
-Version=1
-Batch=1
-Port=2
-Baudrate=115200
-
-
-[Device.DeviceControl]
-# parameters such as port 
-Vendor=cmbsz
-Version=1
-Batch=1
-Port=0
-Baudrate=0
-
-
-[Device.Gpio]
-# parameters such as port 
-Vendor=cw
-Version=1
-Batch=1
-Port=8
-Baudrate=9600
-PortNum=4
-InOutDir=65280
-
-
-[Device.PinPad]
-# parameters such as port 
-Vendor=cw
-Version=1
-Batch=1
-Port=6
-Baudrate=9600
-Checkdata=0000000000000000
-Keysn=000
-
-[Device.Ups]
-Vendor=cw
-Version=1
-Batch=1
-Port=5
-Baudrate=2400
-
-[Device.WatchDog]
-# parameters such as port 
-Vendor=cw
-Version=1
-Batch=1
-Port=
-
-[Device.HSPScanner]
-Vendor=cw
-Version=1
-Batch=1
-
-[Device.FingerPrint]
-Vendor=cw
-Version=1
-Batch=1
-
-
-

+ 0 - 153
addin/hardwarecfg/uos/root-RVC.Stand2S-GRG-DT-7000I64A.ini

@@ -1,153 +0,0 @@
-[Terminal]
-TerminalNo=
-MachineType=RVC.Stand2S
-MachineVersion=5.0
-Manufacturer=GRG
-MachineModel=DT-7000I64A
-SN=
-Site=cmb.LIB
-Screen=2
-EnrolGPS="0.003,0.003"
-EnrolAddr=XXX省XXX市XXX区XXX分行
-
-[Path]
-SysRoot=/opt/rvc/Run
-ADData=/opt/rvc/adData
-SysLog=/opt/rvc/SysLog
-InterLog=/opt/rvc/InterLog
-UploadVideo=/opt/rvc/UploadVideo
-UploadPhoto=/opt/rvc/UploadPhoto
-LocalVideo=/opt/rvc/Video
-Downloads=/opt/rvc/Downloads
-Upgraded=/opt/rvc/Upgraded
-Temp=/opt/rvc/Temp
-CenterSetting=/opt/rvc/CenterSetting
-
-[Audio]
-handfree_in_dev=
-handfree_out_dev=
-pickup_in_dev=
-pickup_out_dev=
-handfree_in_agc=0
-handfree_out_agc=0
-pickup_in_agc=0
-pickup_out_agc=0
-handfree_in_ns=1
-handfree_out_ns=0
-pickup_in_ns=1
-pickup_out_ns=0
-handfree_aec=0
-pickup_aec=0
-handfree_in_volume=100
-handfree_out_volume=100
-pickup_in_volume=100
-pickup_out_volume=100
-
-[Video]
-EnvCamera=
-OptCamera= 
-EnvRotate=0
-OptRotate=270
-mtu=1500
-quant=3;0-10, 0:最清晰, 10:最模糊
-;EnvFps=5
-;OptFps=5
-
-
-;define device category
-[Device]
-Number=6
-1=IDCertificate
-2=CardIssuer
-3=Radar
-4=WatchDog
-5=UPS
-6=Printer
-
-[Device.IDCertificate]
-# parameters such as port 
-Vendor=grg
-Version=1
-Batch=1
-Port=1
-
-
-[Device.CardIssuer]
-# parameters such as port 
-Vendor=grg
-Version=1
-Batch=1
-Port=2
-Baudrate=115200
-
-
-[Device.CardSwiper]
-# parameters such as port 
-Vendor=grg
-Version=1
-Batch=1
-Port=2
-Baudrate=115200
-
-[Device.ContactlessCard]
-# parameters such as port 
-Vendor=grg
-Version=1
-Batch=1
-Port=2
-Baudrate=115200
-
-[Device.DeviceControl]
-# parameters such as port 
-Vendor=cmbsz
-Version=1
-Batch=1
-Port=0
-Baudrate=0
-
-
-[Device.Gpio]
-# parameters such as port 
-Vendor=grg
-Version=1
-Batch=1
-Port=0
-Baudrate=0
-PortNum=4
-InOutDir=65280
-
-
-[Device.PinPad]
-# parameters such as port 
-Vendor=grg
-Version=1
-Batch=1
-Port=4
-Baudrate=115200
-Checkdata=0000000000000000
-Keysn=000
-
-[Device.Ups]
-Vendor=grg
-Version=1
-Batch=1
-Port=5
-Baudrate=2400
-
-[Device.WatchDog]
-# parameters such as port 
-Vendor=grg
-Version=1
-Batch=1
-Port=
-
-[Device.HSPScanner]
-Vendor=grg
-Version=1
-Batch=1
-
-[Device.FingerPrint]
-Vendor=grg
-Version=1
-Batch=1
-

+ 0 - 154
addin/hardwarecfg/uos/root-RVC.Stand2S-KEBA-E1080-L.ini

@@ -1,154 +0,0 @@
-[Terminal]
-TerminalNo=
-MachineType=RVC.Stand2S
-MachineVersion=5.0
-Manufacturer=KEBA
-MachineModel=E1080-L
-SN=
-Site=cmb.LIB
-Screen=2
-EnrolGPS="0.003,0.003"
-EnrolAddr=XXX省XXX市XXX区XXX分行
-
-[Path]
-SysRoot=/opt/rvc/Run
-ADData=/opt/rvc/adData
-SysLog=/opt/rvc/SysLog
-InterLog=/opt/rvc/InterLog
-UploadVideo=/opt/rvc/UploadVideo
-UploadPhoto=/opt/rvc/UploadPhoto
-LocalVideo=/opt/rvc/Video
-Downloads=/opt/rvc/Downloads
-Upgraded=/opt/rvc/Upgraded
-Temp=/opt/rvc/Temp
-CenterSetting=/opt/rvc/CenterSetting
-
-[Audio]
-handfree_in_dev=
-handfree_out_dev=
-pickup_in_dev=
-pickup_out_dev=
-handfree_in_agc=0
-handfree_out_agc=0
-pickup_in_agc=0
-pickup_out_agc=0
-handfree_in_ns=1
-handfree_out_ns=0
-pickup_in_ns=1
-pickup_out_ns=0
-handfree_aec=0
-pickup_aec=0
-handfree_in_volume=100
-handfree_out_volume=100
-pickup_in_volume=100
-pickup_out_volume=100
-
-[Video]
-EnvCamera=
-OptCamera= 
-EnvRotate=0
-OptRotate=270
-mtu=1500
-quant=3;0-10, 0:最清晰, 10:最模糊
-;EnvFps=5
-;OptFps=5
-
-
-;define device category
-[Device]
-Number=6
-1=IDCertificate
-2=CardIssuer
-3=Radar
-4=WatchDog
-5=UPS
-6=Printer
-
-[Device.IDCertificate]
-# parameters such as port 
-Vendor=keba
-Version=1
-Batch=1
-Port=1
-
-
-[Device.CardIssuer]
-# parameters such as port 
-Vendor=keba
-Version=1
-Batch=1
-Port=2
-Baudrate=38400
-
-
-[Device.CardSwiper]
-# parameters such as port 
-Vendor=keba
-Version=1
-Batch=1
-Port=2
-Baudrate=115200
-
-[Device.ContactlessCard]
-# parameters such as port 
-Vendor=keba
-Version=1
-Batch=1
-Port=2
-Baudrate=115200
-
-[Device.DeviceControl]
-# parameters such as port 
-Vendor=cmbsz
-Version=1
-Batch=1
-Port=0
-Baudrate=0
-
-[Device.Gpio]
-# parameters such as port 
-Vendor=keba
-Version=1
-Batch=1
-Port=0
-Baudrate=0
-PortNum=4
-InOutDir=65280
-
-[Device.PinPad]
-# parameters such as port 
-Vendor=keba
-Version=1
-Batch=1
-Port=4
-Baudrate=115200
-Checkdata=0000000000000000
-Keysn=000
-
-[Device.Ups]
-Vendor=keba
-Version=1
-Batch=1
-Port=5
-Baudrate=2400
-
-[Device.WatchDog]
-# parameters such as port 
-Vendor=keba
-Version=1
-Batch=1
-Port=
-
-[Device.HSPScanner]
-Vendor=keba
-Version=1
-Batch=2
-
-[Device.FingerPrint]
-Vendor=keba
-Version=1
-Batch=1
-
-
-
-

+ 99 - 0
addin/install.bat

@@ -0,0 +1,99 @@
+@setlocal enabledelayedexpansion
+@echo off
+
+@rem 要求以管理员方式启动
+bcdedit >nul
+if '%errorlevel%' NEQ '0' (goto UACPrompt) else (goto UACAdmin)
+:UACPrompt
+%1 start "" mshta vbscript:createobject("shell.application").shellexecute("""%~0""","::",,"runas",1)(window.close)&exit
+exit /B
+:UACAdmin
+cd /d "%~dp0"
+
+@set /a argumentNum=0
+@for %%a in (%*) do set /a argumentNum+=1
+@if %argumentNum% gtr 0 (
+	@echo argument count: %argumentNum%
+) else (
+	@echo no any arguments!
+)
+
+echo "[RVCTermianal] === Install Start === "
+
+tasklist /nh | find /i "spshell.exe"
+@if errorlevel 1 (
+	@echo  [INFO] 可视柜台进程不存在,跳过
+) else (
+	@echo  [INFO] 检测到可视柜台进程存在!5s 后将清理可视柜台相关进程
+	@for /l %%a in (1, 1, 5) do (
+		timeout 1 > nul
+		@echo %%a秒…… 如果不想清理可视柜台应用进程,请及时关闭此窗口!
+	)
+	@echo [INFO] 开始清理可视柜台相关进程……
+	TASKKILL /F /IM spshell.exe
+	TASKKILL /F /IM guardian.exe
+	TASKKILL /F /IM cefclient.exe
+
+	@for /f "tokens=1,2 delims= " %%a in ('tasklist /m ^| findstr "sphost.exe"') do (
+		@echo name=%%a, PID = %%b, and will kill it.
+		TASKKILL /F /PID %%a
+	)
+)
+
+
+
+@set ROOT=%cd%
+@set rvc_src_path_rvc_dir=%ROOT%\\rvc
+@set rvc_src_path_Run_dir=%ROOT%\\Run
+@set rvc_install_path_root=C:
+
+@if exist "D:\\" (
+	@echo "D:\\ exists!"
+	@if exist "D:\\Run\\version\\vtm.exe" (
+		@set rvc_install_path_root=D:
+	) else (
+		@set rvc_install_path_root=D:
+	)
+) else (
+	@set rvc_install_path_root=C:
+)
+
+@echo rvc_install_path_root=%rvc_install_path_root%
+@echo rvc_src_path_Run_dir=%rvc_src_path_Run_dir%
+
+@set rvc_install_path_rvc_dir=%rvc_install_path_root%\\rvc
+@set rvc_install_path_Run_dir=%rvc_install_path_root%\\Run
+@set rvc_install_path_hardware_dir=%rvc_install_path_Run_dir%\\hardwarecfg
+@set rvc_install_path_versions_dir=%rvc_install_path_Run_dir%\\version
+
+@echo rvc_install_path_rvc_dir=%rvc_install_path_rvc_dir%
+@echo rvc_install_path_Run_dir=%rvc_install_path_Run_dir%
+@echo rvc_install_path_hardware_dir=%rvc_install_path_hardware_dir%
+@echo rvc_install_path_versions_dir=%rvc_install_path_versions_dir%
+
+@if not exist "%rvc_install_path_rvc_dir%" md "%rvc_install_path_rvc_dir%"
+@if not exist "%rvc_install_path_Run_dir%" md "%rvc_install_path_Run_dir%"
+@if not exist "%rvc_install_path_hardware_dir%" md "%rvc_install_path_hardware_dir%"
+@if not exist "%rvc_install_path_versions_dir%" md "%rvc_install_path_versions_dir%"
+
+@echo 【0/1】拷贝RVC目录...
+@xcopy %rvc_src_path_rvc_dir% %rvc_install_path_rvc_dir%\\  /E/Y/Q
+@echo 【1/1】拷贝RVC目录OK!
+
+
+@echo 【1/2】拷贝终端版本...
+@xcopy %rvc_src_path_Run_dir%\\hardwarecfg\\ %rvc_install_path_hardware_dir%\\  /E/Y/Q
+@xcopy %rvc_src_path_Run_dir%\\version\\ %rvc_install_path_versions_dir%\\  /E/Y/Q
+@echo 【2/2】拷贝终端版本OK!
+
+
+@echo 【2/3】 打开版本所在文件夹
+@start %rvc_install_path_versions_dir%
+
+@echo  [INFO] 3s 后自动退出该执行脚本
+@for /l %%a in (1, 1, 3) do (
+		timeout 1 > nul
+		@echo %%a秒…… !
+	)
+@echo  [INFO] 退出脚本,安装结束!
+@exit 0

+ 280 - 31
addin/install.sh

@@ -5,25 +5,223 @@ MY_PATH="`( cd \"$MY_PATH\" && pwd )`"  # absolutized and normalized
 
 
 echo "[RVCTermianal] === Install Start === "
+curr_timestamp=`date "+%Y%m%d-%H%M%S.%3N"`
+lightdm_file=/etc/lightdm/lightdm.conf
+rvc_pkg_rvc=${MY_PATH}/rvc
 rvc_install_path_root="/opt"
 rvc_install_path_rvc_dir=${rvc_install_path_root}/rvc
 rvc_install_path_Run_dir=${rvc_install_path_root}/Run
 rvc_install_path_hardware_dir=${rvc_install_path_Run_dir}/hardwarecfg
 rvc_install_path_versions_dir=${rvc_install_path_Run_dir}/version
+res=0
 
-#detect the usr input the vendor or not
-has_vendor=0
-tolower_vendor=''
-upper_vendor=''
+#设置开机自动登录用户(有做冗余判断)
+setup_autologin()
+{
+    given_user=$1
+    given_sudoers_file=$2
+
+    if [ ! -f "$given_sudoers_file" ]; then
+        echo "[Seat:*]" > $given_sudoers_file
+        # echo "autologin-guest=false" >> $given_sudoers_file
+        echo "autologin-user=$given_user" >> $given_sudoers_file
+        echo "autologin-user-timeout=0" >> $given_sudoers_file
+    fi
+
+    if [ "$(grep -c "^\\s*autologin-user=${given_user}" $given_sudoers_file)" -gt 0 ]; then
+        echo "autologin-user is already setted in ^lightdm.conf^"
+    else
+        echo "setting autologin-user in ^$given_sudoers_file^"
+        #sed -i.bak -E "s|^#(autologin-user=).*|\\1$given_user|;s|^#(autologin-user-timeout=).*|\\0|" $given_sudoers_file
+        sed -i "s/^\s*#\s*autologin-user=/autologin-user=/g;s/autologin-user=.*$/autologin-user=$given_user/g" $given_sudoers_file
+        #sed -i "s/^#autologin-user=$/autologin-user=${given_user}/" $given_sudoers_file
+        #sed -i "s/^#autologin-user-timeout=$/autologin-user-timeout=0/" $given_sudoers_file
+        sed -i "s/^\s*#\s*autologin-user-timeout=/autologin-user-timeout=/g;s/autologin-user-timeout=.*$/autologin-user-timeout=0/g" $given_sudoers_file
+    fi
+}
+
+#设置免密使用root权限(有做冗余判断)
+sudo_priviledge() 
+{
+
+    given_user=$1
+    given_sudoers_file=$2
+
+    if [ -e ${given_sudoers_file}.tmp -o "$(pidof visudo)" ]; then
+        echo "[ERROR]: ${given_sudoers_file} is working now,  wait a little and then try again later"
+        return 2
+    fi
+
+    ret=0
+	echo "[INFO]: to process editing sudoers file..."
+	cp ${given_sudoers_file} ${given_sudoers_file}.tmp
+    chmod 0640 ${given_sudoers_file}.tmp
+    cat ${given_sudoers_file}.tmp | grep  'includedir /etc/sudoers.d' > /dev/null
+    if [ $? = 0 ]; then
+        echo "[INFO]: '#includedir /etc/sudoers.d' already exists in /etc/sudoers file"
+    else
+        echo "#includedir /etc/sudoers.d"  >> ${given_sudoers_file}.tmp
+        ret=1
+    fi
+
+	if [  "`cat /etc/sudoers | grep ${given_user} | grep ALL=\(ALL\)`" != "" ]; then
+        echo "[WARN]: sudoers file has been loaded up all(all) config"
+    else
+        new_entry="${given_user} ALL=(ALL) ALL"
+        echo "${new_entry}" >> ${given_sudoers_file}.tmp
+        ret=1
+    fi
+
+    if [  "`cat /etc/sudoers|grep ${given_user}|grep Run`" != "" ]; then
+        echo "[WARN]: sudoers file has been loaded up rvc config"
+    else
+        new_entry="${given_user} ALL=(ALL) NOPASSWD: /opt/Run/version/*, NOPASSWD: /bin/sh, NOPASSWD: /bin/bash"
+        echo "${new_entry}" >> ${given_sudoers_file}.tmp
+        ret=1
+    fi
+
+    chmod 0440 ${given_sudoers_file}.tmp
+
+    if visudo -c -f ${given_sudoers_file}.tmp ; then
+        echo check syntax correct on ${given_sudoers_file}.tmp
+    else
+        echo "[ERROR]: syntax check failed on file ${given_sudoers_file}"
+        rm ${given_sudoers_file}.tmp
+		#if [ -f "${given_sudoers_file}.backup" ]; then
+		#fi
+        return 3
+    fi
+
+    if [ $ret -eq 1 ]; then
+        echo "[SUCCESS]: config file has been change !!"
+        cp ${given_sudoers_file} ${given_sudoers_file}.backup
+        mv ${given_sudoers_file}.tmp ${given_sudoers_file}
+        ret=0
+    else
+        echo "[WARN]: config file not change"
+        rm ${given_sudoers_file}.tmp
+        ret=0
+    fi
+
+    return $ret
+}
+
+# check root priviledge
+if [ $(id -u) != 0 ]; then
+    echo "[ERROR] === 该安装脚本需要以ROOT权限启动,请在命令行窗口添加sudo指令执行 'sudo bash $0',如果无法执行相关指令,请先确认系统已开启开发者模式 ==="
+    exit 0
+fi
+
+argument1=
 if [ $# -eq 1 ];then
-    has_vendor=1
     echo has arguments: $*
-	tolower_vendor=$(echo $1 | awk '{ print tolower($0) }' )
-    upper_vendor=$(echo $1 | awk '{ print toupper($0) }' )
+	argument1=$(echo $1 | awk '{ print tolower($0) }' )
 else
-    echo no any arguments indicate vendor name.
+    echo no any arguments.
+fi
+
+#获取当前登录的用户名称,这里可以考虑用另外一种优化的方法
+rvc_user=$USER
+if [ -z "$rvc_user" -o "$rvc_user" = "root" ]; then
+	users=$(cat /etc/passwd | awk -F: '$3>=500' | cut -f 1 -d :)
+	echo "user list: $users"
+	cnt=0
+	for var in $(echo ${users} | awk '{split($0,arr,",");for(i in arr) print arr[i]}')
+	do
+		if [ ${var} != 'nobody' -a ${var} != 'systemd-coredump' -a ${var} != 'liuwt' -a ${var} != 'deepin-anything-server' ]; then
+			cnt=$((${cnt}+1))
+			rvc_user=${var}
+		fi
+	done
+	if [ $cnt -ne 1 ]; then
+		echo "too many users: $cnt"
+		rvc_user=''
+	else
+		echo "aim user: $rvc_user"
+	fi
 fi
 
+#上保险,即另外一种优化的方法
+if [ -z "$rvc_user" -o "$rvc_user" = "root" ]; then
+	name=$(whoami)
+	exec="bash $ABS_CURRENT_PATH/sub_install_user.sh"
+	pid=$(pgrep startdde)
+	. <(xargs -0 bash -c 'printf "export %q\n" "$@"' -- </proc/$pid/environ)
+	name=$(ps -o uname= -p "${pid}")
+	echo new fetch name: $name
+	rvc_user=$name
+fi
+
+if [ "$argument1" = "uninstall" ]; then
+	rm /etc/xdg/autostart/spexplorerauto.desktop > /dev/null 2>&1
+    rm /usr/share/applications/spexplorerauto.desktop > /dev/null 2>&1
+    rm -rf /opt/rvc > /dev/null 2>&1
+    rm -rf /opt/Run > /dev/null 2>&1
+    rm -rf /opt/wlog > /dev/null 2>&1
+
+    echo "[INFO]: set menu tool as show mode..."
+    gsettings set com.deepin.dde.dock hide-mode  keep-showing
+    echo "[INFO]: set menu tool as show mode done!"
+	
+	papers_dir=/usr/share/wallpapers/deepin
+    papers_bak_dir=/usr/share/wallpapers/deepin_bak
+    if [ -d $papers_bak_dir ]; then
+        rm -rf $papers_dir/*  > /dev/null 2>&1
+        cp $papers_bak_dir/* $papers_dir
+		rm -rf $papers_bak_dir
+    fi
+	
+	if [ -z "$rvc_user" ]; then
+		echo "[ERROR]: 无法获取当前用户名称(用户名为空),退出程序"
+		exit 1
+	elif [ "$rvc_user" = "root" ]; then
+		echo "[ERROR]: 无法获取当前用户名称(用户名无效),退出程序"
+		exit 2
+	fi
+    rm /home/$rvc_user/Desktop/spexplorerauto.desktop > /dev/null 2>&1
+	exit 0
+fi
+
+
+if [ "$argument1" = "pure" ]; then
+    killall -9 spshell > /dev/null 2>&1
+    killall -9 sphost > /dev/null 2>&1
+    killall -9 guardian > /dev/null 2>&1
+    killall -9 uosbrowser > /dev/null 2>&1
+	killall -9 browser > /dev/null 2>&1
+    killall -s 9 `ps -aux | grep browser | awk '{print $2}'` > /dev/null 2>&1
+fi
+
+echo "============== previous installation custom scripts start =============="
+user1=$(ps -o user= -p $$ | awk '{print $1}')
+echo "user1: $user1"
+user2=$(whoami)
+echo "user2: $user2"
+#user3=$(logname)
+#echo "user3: $user3"
+
+# 备份壁纸
+papers_dir=/usr/share/wallpapers/deepin
+papers_bak_dir=/usr/share/wallpapers/deepin_bak
+
+if [ -f "${papers_dir}/WallPaper1920.png" ]; then
+	echo "[INFO]: CMB WallPaper has been exist, skip latter copy procedure"
+else
+	if [ ! -d $papers_bak_dir ]; then
+		mkdir -p ${papers_bak_dir}
+		cp $papers_dir/* $papers_bak_dir
+	fi
+	rm -rf $papers_dir/* > /dev/null 2>&1
+	cp ${rvc_pkg_rvc}/Resources/WallPaper1280.png ${papers_dir}
+	cp ${rvc_pkg_rvc}/Resources/WallPaper1920.png ${papers_dir}
+fi
+
+echo "============== previous installation custom scripts done =============="
+
+
+echo "============== during installation custom scripts start =============="
+#拷贝终端版本
+
 # fetch the version full path at pkg
 version_dir=$(find ${MY_PATH}/Run/version/ -maxdepth 1 -regex ".*[0-9\.]$" -type d)
 echo version dir: $version_dir
@@ -31,17 +229,17 @@ slen=${#MY_PATH}
 rel_version_dir=${version_dir:$slen+1}
 echo ${rel_version_dir}
 
+# 如果版本中有root.ini,移除测试的root.ini文件
+if [ -f ${MY_PATH}/Run/hardwarecfg/root.ini ]; then
+	sudo rm ${MY_PATH}/Run/hardwarecfg/root.ini
+fi
+if [ -d ${MY_PATH}/Run/runinfo ]; then
+	sudo rm -rf ${MY_PATH}/Run/runinfo
+fi
+
 if [ ! -f $rvc_install_path_hardware_dir/root.ini ]; then
     #delete /opt/Run
-    sudo rm -rf ${rvc_install_path_Run_dir}
-else
-    echo root.ini 文件已存在,跳过清除 Run 文件夹.
-    if [ -f ${MY_PATH}/Run/hardwarecfg/root.ini ]; then
-        sudo rm ${MY_PATH}/Run/hardwarecfg/root.ini
-    fi
-    if [ -d ${MY_PATH}/Run/runinfo ]; then
-        sudo rm -rf ${MY_PATH}/Run/runinfo
-    fi
+    sudo rm -rf ${rvc_install_path_Run_dir} > /dev/null 2>&1
 fi
 
 #copy the Run pkg to run path
@@ -59,31 +257,82 @@ if [ ! -d $rvc_install_path_rvc_dir/adData ]; then
 fi
 sudo cp -rvf $MY_PATH/rvc/adData/Audio ${rvc_install_path_rvc_dir}/adData
 echo copy rvc Audio files completely!
-sudo cp -rvf $MY_PATH/rvc/adData/Video ${rvc_install_path_rvc_dir}/adData
-echo copy rvc Video files completely!
+#sudo cp -rvf $MY_PATH/rvc/adData/Video ${rvc_install_path_rvc_dir}/adData
+#echo copy rvc Video files completely!
 
-echo change the run scripts priviledge...
+echo "[INFO]: change the run scripts priviledge..."
 echo ${rvc_install_path_rvc_dir}
 echo ${rvc_install_path_root}/${rel_version_dir}
 sudo chmod 777 ${rvc_install_path_root}
 sudo chmod a+rw -R ${rvc_install_path_rvc_dir}
 sudo chmod a+rw -R ${rvc_install_path_hardware_dir}
+
 sudo chmod 777 -R ${rvc_install_path_root}/${rel_version_dir}
 sudo chmod 777 ${rvc_install_path_versions_dir}/spexplorer.sh
 sudo chmod 777 ${rvc_install_path_versions_dir}/sudo_spexplorer.sh
 sudo chmod a+rw ${rvc_install_path_versions_dir}/active.txt
-echo change the run scripts priviledge done!
-
-if [ $has_vendor -eq 1 ];then
-    root_file=$rvc_install_path_hardware_dir/root.ini
-    root_vendor_file=$rvc_install_path_hardware_dir/root-Stand2S-G1-$tolower_vendor.ini
-    if [ -f $root_vendor_file -a ! -f $root_files ] #  ! -f $root_file -a 
-    then
-        echo "重命名 root.ini "
-        sudo cp $root_vendor_file $root_file
-    fi
+sudo chmod a+rw ${rvc_install_path_versions_dir}
+sudo chmod a+rw ${rvc_install_path_Run_dir}
+
+echo "[INFO]: change the run scripts priviledge done!"
+
+echo "============== during installation custom scripts done =============="
+
+echo "============== post installation custom scripts start =============="
+
+sudoers_file=/etc/sudoers
+if [ -z "$rvc_user" ]; then
+	echo "[ERROR]: 无法获取当前用户名称(用户名为空),退出程序"
+	exit 1
+elif [ "$rvc_user" = "root" ]; then
+	echo "[ERROR]: 无法获取当前用户名称(用户名无效),退出程序"
+	exit 2
+fi
+
+echo "[INFO]: Going to add entry into /etc/sudoers file for user: $rvc_user"
+
+if [ ! -d '/etc/sudoers.d' ]; then
+	mkidr /etc/sudoers.d
+	chmod 750 /etc/sudoers.d
 fi
 
-echo "[RVCTermianal] === Install Done ! === "
+sudo_priviledge ${rvc_user}   ${sudoers_file}
+res=$?
+if [ $res -eq 0 ]; then
+
+	# 清理桌面数据
+	echo "[INFO]: rm file under desktop directory..."
+	rm -rf /home/$rvc_user/Desktop/* > /dev/null 2>&1
+	echo "[INFO]: rm file under desktop directory done!"
+
+	echo "[INFO]: setup user $rvc_user auto login.." 
+	setup_autologin  ${rvc_user}   ${lightdm_file}
+	
+	#设置桌面图标
+	echo "[INFO]: Copy application icon to menu tools..."
+	cp ${rvc_pkg_rvc}/Resources/spexplorerauto.desktop /usr/share/applications
+	echo "[INFO]: Active application icon autorun after boot..."
+	cp ${rvc_pkg_rvc}/Resources/spexplorerauto.desktop /etc/xdg/autostart/
+	echo "[INFO]: Copy application icon to desktop..."
+	cp ${rvc_pkg_rvc}/Resources/spexplorerauto.desktop /home/$rvc_user/Desktop
+else
+	echo "[ERROR]: 设置SUDO权限失败!!"
+	exit 1
+fi
+
+#去掉密钥环,之前出现过这种问题,统信指示移除该文件即可
+keyring_file=/home/$rvc_user/.local/share/keyrings/login.keyring
+if [ -f "$keyring_file" ]; then
+	rm $keyring_file
+	echo "[INFO]: remove keyring file."
+fi
+
+# 设置隐藏菜单栏
+echo "[INFO]: set menu tool as hidden mode..."
+gsettings set com.deepin.dde.dock hide-mode  keep-hidden
+echo "[INFO]: set menu tool as hidden mode done!"
+
+echo "============== post installation custom scripts done =============="
 
+echo "[INFO]: === 所有步骤执行成功,正常退出=== "
 exit 0

+ 0 - 335
addin/installv2.sh

@@ -1,335 +0,0 @@
-#!/bin/bash
-MY_PATH="`dirname \"$0\"`"              # relative
-# echo "1"$MY_PATH
-MY_PATH="`( cd \"$MY_PATH\" && pwd )`"  # absolutized and normalized
-
-
-echo "[RVCTermianal] === Install Start === "
-curr_timestamp=`date "+%Y%m%d-%H%M%S.%3N"`
-lightdm_file=/etc/lightdm/lightdm.conf
-rvc_install_path_root="/opt"
-rvc_install_path_rvc_dir=${rvc_install_path_root}/rvc
-rvc_install_path_Run_dir=${rvc_install_path_root}/Run
-rvc_install_path_hardware_dir=${rvc_install_path_Run_dir}/hardwarecfg
-rvc_install_path_versions_dir=${rvc_install_path_Run_dir}/version
-res=0
-
-#设置开机自动登录用户
-setup_autologin()
-{
-    given_user=$1
-    given_sudoers_file=$2
-
-    if [ ! -f "$given_sudoers_file" ]; then
-        echo "[Seat:*]" > $given_sudoers_file
-        # echo "autologin-guest=false" >> $given_sudoers_file
-        echo "autologin-user=$given_user" >> $given_sudoers_file
-        echo "autologin-user-timeout=0" >> $given_sudoers_file
-    fi
-
-    if [ "$(grep -c "^\\s*autologin-user=${given_user}" $given_sudoers_file)" -gt 0 ]; then
-        echo "autologin-user is already setted in ^lightdm.conf^"
-    else
-        echo "setting autologin-user in ^$given_sudoers_file^"
-        #sed -i.bak -E "s|^#(autologin-user=).*|\\1$given_user|;s|^#(autologin-user-timeout=).*|\\0|" $given_sudoers_file
-        sed -i "s/^\s*#\s*autologin-user=/autologin-user=/g;s/autologin-user=.*$/autologin-user=$given_user/g" $given_sudoers_file
-        #sed -i "s/^#autologin-user=$/autologin-user=${given_user}/" $given_sudoers_file
-        #sed -i "s/^#autologin-user-timeout=$/autologin-user-timeout=0/" $given_sudoers_file
-        sed -i "s/^\s*#\s*autologin-user-timeout=/autologin-user-timeout=/g;s/autologin-user-timeout=.*$/autologin-user-timeout=0/g" $given_sudoers_file
-    fi
-}
-
-#设置免密使用root权限
-sudo_priviledge() 
-{
-
-    given_user=$1
-    given_sudoers_file=$2
-
-    if [ -e ${given_sudoers_file}.tmp -o "$(pidof visudo)" ]; then
-        echo "[ERROR]: ${given_sudoers_file} is working now,  wait a little and then try again later"
-        return 2
-    fi
-
-    ret=0
-	echo "[INFO]: to process editing sudoers file..."
-    
-    cp ${given_sudoers_file} ${given_sudoers_file}.tmp
-	
-    chmod 0640 ${given_sudoers_file}.tmp
-    cat ${given_sudoers_file}.tmp | grep  'includedir /etc/sudoers.d' > /dev/null
-    if [ $? = 0 ]; then
-        echo "[INFO]: '#includedir /etc/sudoers.d' already exists in /etc/sudoers file"
-    else
-        echo "#includedir /etc/sudoers.d"  >> ${given_sudoers_file}.tmp
-        ret=1
-    fi
-
-	if [  "`cat /etc/sudoers|grep ${given_user}|grep ALL=(ALL)`" != "" ]; then
-        echo "[WARN]: sudoers file has been loaded up all(all) config"
-    else
-        new_entry="${given_user} ALL=(ALL) ALL"
-        echo "${new_entry}" >> ${given_sudoers_file}.tmp
-        ret=1
-    fi
-
-    if [  "`cat /etc/sudoers|grep ${given_user}|grep Run`" != "" ]; then
-        echo "[WARN]: sudoers file has been loaded up rvc config"
-    else
-        new_entry="${given_user} ALL=(ALL) NOPASSWD: /opt/Run/version/*, NOPASSWD: /bin/sh, NOPASSWD: /bin/bash"
-        echo "${new_entry}" >> ${given_sudoers_file}.tmp
-        ret=1
-    fi
-
-    chmod 0440 ${given_sudoers_file}.tmp
-
-    if visudo -c -f ${given_sudoers_file}.tmp ; then
-        echo check syntax correct on ${given_sudoers_file}
-    else
-        echo "[ERROR]: syntax check failed on file ${given_sudoers_file}"
-        rm ${given_sudoers_file}.tmp
-        return 3
-    fi
-
-    if [ $ret -eq 1 ]; then
-        echo "[SUCCESS]: config file has been change !!"
-        cp ${given_sudoers_file} ${given_sudoers_file}.backup.${curr_timestamp}
-        mv ${given_sudoers_file}.tmp ${given_sudoers_file}
-        ret=0
-    else
-        echo "[WARN]: config file not change"
-        rm ${given_sudoers_file}.tmp
-        ret=0
-    fi
-
-    return $ret
-}
-
-# check root priviledge
-if [ $(id -u) != 0 ]; then
-    echo "[ERROR] === it requires root priviledge to run this shell scripts, please use 'sudo bash ./$0' ==="
-    exit 0
-fi
-
-argument1=
-if [ $# -eq 1 ];then
-    echo has arguments: $*
-	argument1=$(echo $1 | awk '{ print tolower($0) }' )
-else
-    echo no any arguments.
-fi
-
-if [ "$argument1" = "uninstall" ]; then
-	rm /etc/xdg/autostart/spexplorerauto.desktop > /dev/null 2>&1
-    rm /usr/share/applications/spexplorerauto.desktop > /dev/null 2>&1
-    rm -rf /opt/rvc > /dev/null 2>&1
-    rm -rf /opt/Run > /dev/null 2>&1
-    rm -rf /opt/wlog > /dev/null 2>&1
-	
-	rvc_user=$USER
-    if [ -z "$rvc_user" -o "$rvc_user" = "root" ]; then
-        users=$(cat /etc/passwd | awk -F: '$3>=500' | cut -f 1 -d :)
-        echo "user list: $users"
-        cnt=0
-        for var in $(echo ${users} | awk '{split($0,arr,",");for(i in arr) print arr[i]}')
-        do
-            if [ ${var} != 'nobody' -a ${var} != 'systemd-coredump' -a ${var} != 'liuwt' -a ${var} != 'deepin-anything-server' ]; then
-                cnt=$((${cnt}+1))
-                rvc_user=${var}
-            fi
-        done
-        if [ $cnt -ne 1 ]; then
-            echo "too many users: $cnt"
-            rvc_user=''
-        else
-            echo "aim user: $rvc_user"
-        fi
-    fi
-    rm /home/$rvc_user/Desktop/spexplorerauto.desktop > /dev/null 2>&1
-
-    echo "[INFO]: set menu tool as show mode..."
-    gsettings set com.deepin.dde.dock hide-mode  keep-showing
-    echo "[INFO]: set menu tool as show mode done!"
-	
-	papers_dir=/usr/share/wallpapers/deepin
-    papers_bak_dir=/usr/share/wallpapers/deepin_bak
-    if [ -d $papers_bak_dir ]; then
-        rm -rf $papers_dir/*  > /dev/null 2>&1
-        cp $papers_bak_dir/* $papers_dir
-		rm -rf $papers_bak_dir
-    fi
-	
-	exit 0
-fi
-
-
-if [ "$argument1" = "pure" ]; then
-    killall -9 spshell > /dev/null 2>&1
-    killall -9 sphost > /dev/null 2>&1
-    killall -9 guardian > /dev/null 2>&1
-    killall -9 uosbrowser > /dev/null 2>&1
-    killall -s 9 `ps -aux | grep browser | awk '{print $2}'` > /dev/null 2>&1
-fi
-
-echo "============== previous installation custom scripts start =============="
-user1=$(ps -o user= -p $$ | awk '{print $1}')
-echo "user1: $user1"
-user2=$(whoami)
-echo "user2: $user2"
-#user3=$(logname)
-#echo "user3: $user3"
-
-# 备份壁纸
-papers_dir=/usr/share/wallpapers/deepin
-papers_bak_dir=/usr/share/wallpapers/deepin_bak
-
-if [ -f "${papers_dir}/WallPaper1920.png" ]; then
-	echo "[INFO]: CMB WallPaper has been exist, skip latter copy procedure"
-else
-	if [ ! -d $papers_bak_dir ]; then
-		mkdir -p ${papers_bak_dir}
-		cp $papers_dir/* $papers_bak_dir
-	fi
-	rm -rf $papers_dir/* > /dev/null 2>&1
-	cp ${rvc_install_path_rvc_dir}/Resources/WallPaper1280.png ${papers_dir}
-	cp ${rvc_install_path_rvc_dir}/Resources/WallPaper1920.png ${papers_dir}
-fi
-
-echo "============== previous installation custom scripts done =============="
-
-
-echo "============== during installation custom scripts start =============="
-#拷贝终端版本
-
-# fetch the version full path at pkg
-version_dir=$(find ${MY_PATH}/Run/version/ -maxdepth 1 -regex ".*[0-9\.]$" -type d)
-echo version dir: $version_dir
-slen=${#MY_PATH}
-rel_version_dir=${version_dir:$slen+1}
-echo ${rel_version_dir}
-
-# 如果版本中有root.ini,移除测试的root.ini文件
-if [ -f ${MY_PATH}/Run/hardwarecfg/root.ini ]; then
-	sudo rm ${MY_PATH}/Run/hardwarecfg/root.ini
-fi
-if [ -d ${MY_PATH}/Run/runinfo ]; then
-	sudo rm -rf ${MY_PATH}/Run/runinfo
-fi
-
-if [ ! -f $rvc_install_path_hardware_dir/root.ini ]; then
-    #delete /opt/Run
-    sudo rm -rf ${rvc_install_path_Run_dir}
-fi
-
-#copy the Run pkg to run path
-echo to copy Run package...
-sudo cp -rvf $MY_PATH/Run ${rvc_install_path_root}
-echo copy Run package completely!
-
-#copy the res pkg to rvc path
-echo to copy rvc Audio files...
-if [ ! -d $rvc_install_path_rvc_dir ]; then
-    sudo mkdir -p ${rvc_install_path_rvc_dir}
-fi
-if [ ! -d $rvc_install_path_rvc_dir/adData ]; then
-    sudo mkdir -p ${rvc_install_path_rvc_dir}/adData
-fi
-sudo cp -rvf $MY_PATH/rvc/adData/Audio ${rvc_install_path_rvc_dir}/adData
-echo copy rvc Audio files completely!
-#sudo cp -rvf $MY_PATH/rvc/adData/Video ${rvc_install_path_rvc_dir}/adData
-#echo copy rvc Video files completely!
-
-echo "[INFO]: change the run scripts priviledge..."
-echo ${rvc_install_path_rvc_dir}
-echo ${rvc_install_path_root}/${rel_version_dir}
-sudo chmod 777 ${rvc_install_path_root}
-sudo chmod a+rw -R ${rvc_install_path_rvc_dir}
-sudo chmod a+rw -R ${rvc_install_path_hardware_dir}
-sudo chmod 777 -R ${rvc_install_path_root}/${rel_version_dir}
-sudo chmod 777 ${rvc_install_path_versions_dir}/spexplorer.sh
-sudo chmod 777 ${rvc_install_path_versions_dir}/sudo_spexplorer.sh
-sudo chmod a+rw ${rvc_install_path_versions_dir}/active.txt
-echo "[INFO]: change the run scripts priviledge done!"
-
-echo "============== during installation custom scripts done =============="
-
-echo "============== post installation custom scripts start =============="
-
-rvc_user=$USER
-sudoers_file=/etc/sudoers
-
-#获取当前登录的用户名称,这里可以考虑用另外一种优化的方法
-if [ -z "$rvc_user" -o "$rvc_user" = "root" ]; then
-	users=$(cat /etc/passwd | awk -F: '$3>=500' | cut -f 1 -d :)
-	echo "user list: $users"
-	cnt=0
-	for var in $(echo ${users} | awk '{split($0,arr,",");for(i in arr) print arr[i]}')
-	do
-		if [ ${var} != 'nobody' -a ${var} != 'systemd-coredump' -a ${var} != 'liuwt' -a ${var} != 'deepin-anything-server' ]; then
-			cnt=$((${cnt}+1))
-			rvc_user=${var}
-		fi
-	done
-	if [ $cnt -ne 1 ]; then
-		echo "too many users: $cnt"
-		rvc_user=''
-	else
-		echo "aim user: $rvc_user"
-	fi
-fi
-
-if [ -z "$rvc_user" ]; then
-	echo "[ERROR]: username is empty, please find more details"
-	exit 1
-elif [ "$rvc_user" = "root" ]; then
-	echo "[ERROR]: username is invalid, please find more details"
-	exit 2
-fi
-
-echo "[INFO]: Going to add entry into /etc/sudoers file for user: $rvc_user"
-
-if [ ! -d '/etc/sudoers.d' ]; then
-	mkidr /etc/sudoers.d
-	chmod 750 /etc/sudoers.d
-fi
-
-sudo_priviledge ${rvc_user}   ${sudoers_file}
-res=$?
-if [ $res -eq 0 ]; then
-
-	# 清理桌面数据
-	echo "[INFO]: rm file under desktop directory..."
-	rm -rf /home/$rvc_user/Desktop/* > /dev/null 2>&1
-	echo "[INFO]: rm file under desktop directory done!"
-
-	echo "[INFO]: setup user $rvc_user auto login.." 
-	setup_autologin  ${rvc_user}   ${lightdm_file}
-	
-	#设置桌面图标,
-	echo "[INFO]: Copy application icon to menu tools..."
-	cp /opt/rvc/Resources/spexplorerauto.desktop /usr/share/applications
-	echo "[INFO]: Active application icon autorun after boot..."
-	cp /opt/rvc/Resources/spexplorerauto.desktop /etc/xdg/autostart/
-	echo "[INFO]: Copy application icon to desktop..."
-	cp /opt/rvc/Resources/spexplorerauto.desktop /home/$rvc_user/Desktop
-fi
-
-#去掉密钥环,之前出现过这种问题,统信指示移除该文件即可
-keyring_file=/home/$rvc_user/.local/share/keyrings/login.keyring
-if [ -f "$keyring_file" ]; then
-	rm $keyring_file
-	echo "[INFO]: remove keyring file."
-fi
-
-# 设置隐藏菜单栏
-echo "[INFO]: set menu tool as hidden mode..."
-gsettings set com.deepin.dde.dock hide-mode  keep-hidden
-echo "[INFO]: set menu tool as hidden mode done!"
-
-echo "============== post installation custom scripts done =============="
-
-if [ "$argument1" = "pure" ]; then
-    sudo ${rvc_install_path_versions_dir}/spexplorer.sh
-fi
-
-exit 0

+ 23 - 0
addin/kill.bat

@@ -0,0 +1,23 @@
+@setlocal enabledelayedexpansion
+@echo off
+
+bcdedit >nul
+if '%errorlevel%' NEQ '0' (goto UACPrompt) else (goto UACAdmin)
+:UACPrompt
+%1 start "" mshta vbscript:createobject("shell.application").shellexecute("""%~0""","::",,"runas",1)(window.close)&exit
+exit /B
+:UACAdmin
+
+echo '============================================begin====================================================='
+
+TASKKILL /F /IM spshell.exe
+TASKKILL /F /IM guardian.exe
+TASKKILL /F /IM cefclient.exe
+
+for /f "tokens=1,2 delims= " %%a in ('tasklist /m ^| findstr "sphost.exe"') do (
+    echo name=%%a, PID = %%b, and will kill it.
+    TASKKILL /F /PID %%a
+)
+
+echo "=============================================end====================================================="
+

+ 99 - 0
addin/upgrade.bat

@@ -0,0 +1,99 @@
+@setlocal enabledelayedexpansion
+@echo off
+
+@rem 要求以管理员方式启动
+bcdedit >nul
+if '%errorlevel%' NEQ '0' (goto UACPrompt) else (goto UACAdmin)
+:UACPrompt
+%1 start "" mshta vbscript:createobject("shell.application").shellexecute("""%~0""","::",,"runas",1)(window.close)&exit
+exit /B
+:UACAdmin
+cd /d "%~dp0"
+
+@set /a argumentNum=0
+@for %%a in (%*) do set /a argumentNum+=1
+@if %argumentNum% gtr 0 (
+	@echo argument count: %argumentNum%
+) else (
+	@echo no any arguments!
+)
+
+echo "[RVCTermianal] === Install Start === "
+
+tasklist /nh | find /i "spshell.exe"
+@if errorlevel 1 (
+	@echo  [INFO] 可视柜台进程不存在,跳过
+) else (
+	@echo  [INFO] 检测到可视柜台进程存在!5s 后将清理可视柜台相关进程
+	@for /l %%a in (1, 1, 5) do (
+		timeout 1 > nul
+		@echo %%a秒…… 如果不想清理可视柜台应用进程,请及时关闭此窗口!
+	)
+	@echo [INFO] 开始清理可视柜台相关进程……
+	TASKKILL /F /IM spshell.exe
+	TASKKILL /F /IM guardian.exe
+	TASKKILL /F /IM cefclient.exe
+
+	@for /f "tokens=1,2 delims= " %%a in ('tasklist /m ^| findstr "sphost.exe"') do (
+		@echo name=%%a, PID = %%b, and will kill it.
+		TASKKILL /F /PID %%a
+	)
+)
+
+
+
+@set ROOT=%cd%
+@set rvc_src_path_rvc_dir=%ROOT%\\rvc
+@set rvc_src_path_Run_dir=%ROOT%\\Run
+@set rvc_install_path_root=C:
+
+@if exist "D:\\" (
+	@echo "D:\\ exists!"
+	@if exist "D:\\Run\\version\\vtm.exe" (
+		@set rvc_install_path_root=D:
+	) else (
+		@set rvc_install_path_root=D:
+	)
+) else (
+	@set rvc_install_path_root=C:
+)
+
+@echo rvc_install_path_root=%rvc_install_path_root%
+@echo rvc_src_path_Run_dir=%rvc_src_path_Run_dir%
+
+@set rvc_install_path_rvc_dir=%rvc_install_path_root%\\rvc
+@set rvc_install_path_Run_dir=%rvc_install_path_root%\\Run
+@set rvc_install_path_hardware_dir=%rvc_install_path_Run_dir%\\hardwarecfg
+@set rvc_install_path_versions_dir=%rvc_install_path_Run_dir%\\version
+
+@echo rvc_install_path_rvc_dir=%rvc_install_path_rvc_dir%
+@echo rvc_install_path_Run_dir=%rvc_install_path_Run_dir%
+@echo rvc_install_path_hardware_dir=%rvc_install_path_hardware_dir%
+@echo rvc_install_path_versions_dir=%rvc_install_path_versions_dir%
+
+@if not exist "%rvc_install_path_rvc_dir%" md "%rvc_install_path_rvc_dir%"
+@if not exist "%rvc_install_path_Run_dir%" md "%rvc_install_path_Run_dir%"
+@if not exist "%rvc_install_path_hardware_dir%" md "%rvc_install_path_hardware_dir%"
+@if not exist "%rvc_install_path_versions_dir%" md "%rvc_install_path_versions_dir%"
+
+@echo 【0/1】拷贝RVC目录...
+@xcopy %rvc_src_path_rvc_dir% %rvc_install_path_rvc_dir%\\  /E/Y/Q
+@echo 【1/1】拷贝RVC目录OK!
+
+
+@echo 【1/2】拷贝终端版本...
+@xcopy %rvc_src_path_Run_dir%\\hardwarecfg\\ %rvc_install_path_hardware_dir%\\  /E/Y/Q
+@xcopy %rvc_src_path_Run_dir%\\version\\ %rvc_install_path_versions_dir%\\  /E/Y/Q
+@echo 【2/2】拷贝终端版本OK!
+
+
+@echo 【2/3】 打开版本所在文件夹
+@start %rvc_install_path_versions_dir%
+
+@echo  [INFO] 3s 后自动退出该执行脚本
+@for /l %%a in (1, 1, 3) do (
+		timeout 1 > nul
+		@echo %%a秒…… !
+	)
+@echo  [INFO] 退出脚本,安装结束!
+@exit 0

+ 89 - 0
addin/upgrade.sh

@@ -0,0 +1,89 @@
+#!/bin/bash
+MY_PATH="`dirname \"$0\"`"              # relative
+# echo "1"$MY_PATH
+MY_PATH="`( cd \"$MY_PATH\" && pwd )`"  # absolutized and normalized
+
+
+echo "[RVCTermianal] === Install Start === "
+rvc_install_path_root="/opt"
+rvc_install_path_rvc_dir=${rvc_install_path_root}/rvc
+rvc_install_path_Run_dir=${rvc_install_path_root}/Run
+rvc_install_path_hardware_dir=${rvc_install_path_Run_dir}/hardwarecfg
+rvc_install_path_versions_dir=${rvc_install_path_Run_dir}/version
+
+# check root priviledge
+if [ $(id -u) != 0 ]; then
+    echo "[ERROR] === 该安装脚本需要以ROOT权限启动,请在命令行窗口添加sudo指令执行 'sudo bash $0',如果无法执行相关指令,请先确认系统已开启开发者模式 ==="
+    exit 0
+fi
+
+argument1=
+if [ $# -eq 1 ];then
+    echo has arguments: $*
+	argument1=$(echo $1 | awk '{ print tolower($0) }' )
+else
+    echo no any arguments.
+fi
+
+if [ "$argument1" = "pure" ]; then
+    killall -9 spshell > /dev/null 2>&1
+    killall -9 sphost > /dev/null 2>&1
+    killall -9 guardian > /dev/null 2>&1
+    killall -9 uosbrowser > /dev/null 2>&1
+	killall -9 browser > /dev/null 2>&1
+    killall -s 9 `ps -aux | grep browser | awk '{print $2}'` > /dev/null 2>&1
+fi
+
+# fetch the version full path at pkg
+version_dir=$(find ${MY_PATH}/Run/version/ -maxdepth 1 -regex ".*[0-9\.]$" -type d)
+echo version dir: $version_dir
+slen=${#MY_PATH}
+rel_version_dir=${version_dir:$slen+1}
+echo ${rel_version_dir}
+
+if [ ! -f $rvc_install_path_hardware_dir/root.ini ]; then
+    #delete /opt/Run
+    sudo rm -rf ${rvc_install_path_Run_dir}
+else
+    echo root.ini 文件已存在,跳过清除 Run 文件夹.
+    if [ -f ${MY_PATH}/Run/hardwarecfg/root.ini ]; then
+        sudo rm ${MY_PATH}/Run/hardwarecfg/root.ini
+    fi
+    if [ -d ${MY_PATH}/Run/runinfo ]; then
+        sudo rm -rf ${MY_PATH}/Run/runinfo
+    fi
+fi
+
+#copy the Run pkg to run path
+echo to copy Run package...
+sudo cp -rvf $MY_PATH/Run ${rvc_install_path_root}
+echo copy Run package completely!
+
+#copy the res pkg to rvc path
+echo to copy rvc Audio files...
+if [ ! -d $rvc_install_path_rvc_dir ]; then
+    sudo mkdir -p ${rvc_install_path_rvc_dir}
+fi
+if [ ! -d $rvc_install_path_rvc_dir/adData ]; then
+    sudo mkdir -p ${rvc_install_path_rvc_dir}/adData
+fi
+sudo cp -rvf $MY_PATH/rvc/adData/Audio ${rvc_install_path_rvc_dir}/adData
+echo copy rvc Audio files completely!
+sudo cp -rvf $MY_PATH/rvc/adData/Video ${rvc_install_path_rvc_dir}/adData
+echo copy rvc Video files completely!
+
+echo change the run scripts priviledge...
+echo ${rvc_install_path_rvc_dir}
+echo ${rvc_install_path_root}/${rel_version_dir}
+sudo chmod 777 ${rvc_install_path_root}
+sudo chmod a+rw -R ${rvc_install_path_rvc_dir}
+sudo chmod a+rw -R ${rvc_install_path_hardware_dir}
+sudo chmod 777 -R ${rvc_install_path_root}/${rel_version_dir}
+sudo chmod 777 ${rvc_install_path_versions_dir}/spexplorer.sh
+sudo chmod 777 ${rvc_install_path_versions_dir}/sudo_spexplorer.sh
+sudo chmod a+rw ${rvc_install_path_versions_dir}/active.txt
+echo change the run scripts priviledge done!
+
+echo "[RVCTermianal] === Install Done ! === "
+echo "[RVCTermianal] === 所有步骤执行成功,正常退出=== "
+exit 0

+ 0 - 57
rvc_test.bat

@@ -1,57 +0,0 @@
-@echo off
-setlocal enabledelayedexpansion
-
-%1 %2
-set result=-1
-ver|find "5.">nul&&goto :admin
-mshta vbscript:createobject("shell.application").shellexecute("%~s0","goto :admin","","runas",1)(window.close)&goto :eof
-:admin
-set result=0
-taskkill /F /IM sphost.exe
-taskkill /F /IM spshell.exe
-if %errorlevel% neq 0 (
-if %errorlevel% equ 128 (
-echo specified process is not existed.
-) else (
-echo error occurs: %errorlevel%
-)
-) else (
-echo normal resut delay 3 seconds for safety.
-rem delay seconds
-choice /t 3 /d y /n >nul
-)
-
-
-
-echo current disk: %~d0
-set run_path=%~d0
-set relate_path="\\Run\\version\\spexplorer.vbs"
-set exec_path=%run_path%%relate_path%
-echo execute path: %exec_path%
-rem start %exec_path%
-
-for /f "delims=" %%i in ('cscript //nologo %exec_path%') do set "d=%%i"
-echo %d%
-
-choice /t 15 /d y /n >nul
-
-set has_sphost=no
-set has_spshell=no
-
-for /F "tokens=1*" %%a in ('tasklist /nh /fi "imagename eq spshell.exe"') do if %%a == spshell.exe set has_spshell=yes
-for /F "tokens=1*" %%a in ('tasklist /nh /fi "imagename eq sphost.exe"') do if %%a == sphost.exe set has_sphost=yes
-if %has_sphost% == yes (
-echo sphost is loaded successfully.
-) else (
-echo sphost is boost failed!!
-set result=-1
-)
-if %has_spshell% == yes (
-echo spshell is loaded successfully.
-) else (
-echo spshell is boost failed!!
-set result=-1
-)
-:eof
-echo result:  %result%
-exit /b %result%