Эх сурвалжийг харах

Z991239-4942 #comment feat: 合并windows端代码

陈良瑜80374463 2 жил өмнө
parent
commit
014ff44d50

+ 1 - 37
CMakePresets.json

@@ -1,27 +1,7 @@
 {
   "version": 2,
   "configurePresets": [
-    {
-      "name": "linux-default",
-      "displayName": "Linux Debug",
-      "description": "面向适用于 Linux 的 Windows 子系统(WSL)或远程 Linux 系统。",
-      "generator": "Unix Makefiles",
-      "binaryDir": "${sourceDir}/out/build/${presetName}",
-      "cacheVariables": {
-        "CMAKE_BUILD_TYPE": "Debug",
-        "CMAKE_INSTALL_PREFIX": "${sourceDir}/out/install/${presetName}",
-        "SIMULATE_ON": {
-          "value": "False",
-          "type": "BOOL"
-        },
-        "BUILD_TESTING": "OFF",
-        "BUILD_DEVADAPTER": "ON"
-      },
-      "vendor": {
-        "microsoft.com/VisualStudioSettings/CMake/1.0": { "hostOS": [ "Linux" ] },
-        "microsoft.com/VisualStudioRemoteSettings/CMake/1.0": { "sourceDir": "$env{HOME}/.vs/$ms{projectDirName}" }
-      }
-    },
+
     {
       "name": "linux-release",
       "displayName": "Linux Release",
@@ -42,22 +22,6 @@
         "microsoft.com/VisualStudioSettings/CMake/1.0": { "hostOS": [ "Linux" ] },
         "microsoft.com/VisualStudioRemoteSettings/CMake/1.0": { "sourceDir": "$env{HOME}/.vs/$ms{projectDirName}" }
       }
-    },
-    {
-      "name": "windows-default",
-      "displayName": "Windows x64 Debug",
-      "description": "面向具有 Visual Studio 开发环境的 Windows。",
-      "generator": "Ninja",
-      "binaryDir": "${sourceDir}/out/build/${presetName}",
-      "architecture": {
-        "value": "x64",
-        "strategy": "external"
-      },
-      "cacheVariables": {
-        "CMAKE_BUILD_TYPE": "Debug",
-        "CMAKE_INSTALL_PREFIX": "${sourceDir}/out/install/${presetName}"
-      },
-      "vendor": { "microsoft.com/VisualStudioSettings/CMake/1.0": { "hostOS": [ "Windows" ] } }
     }
   ]
 }

+ 0 - 66
CMakeSettings.json

@@ -1,71 +1,5 @@
 {
   "configurations": [
-    {
-      "name": "x86-Debug",
-      "generator": "Visual Studio 16 2019",
-      "configurationType": "Debug",
-      "buildRoot": "${projectDir}\\out\\build\\${name}",
-      "installRoot": "${projectDir}\\out\\install\\${name}",
-      "cmakeCommandArgs": "-D BUILD_TESTING=ON -D BUILD_DEVADAPTER=ON",
-      "buildCommandArgs": "",
-      "ctestCommandArgs": "-C Debug",
-      "inheritEnvironments": [ "msvc_x86" ],
-      "variables": [
-        {
-          "name": "SIMULATE_ON",
-          "value": "False",
-          "type": "BOOL"
-        },
-        {
-          "name": "BUILD_DEVADAPTER",
-          "value": "True",
-          "type": "BOOL"
-        },
-        {
-          "name": "BUILD_SAMPLES",
-          "value": "False",
-          "type": "BOOL"
-        }
-      ]
-    },
-    {
-      "name": "x86-Release",
-      "generator": "Visual Studio 16 2019",
-      "configurationType": "Release",
-      "buildRoot": "${projectDir}\\out\\build\\${name}",
-      "installRoot": "${projectDir}\\out\\install\\${name}",
-      "cmakeCommandArgs": "-D BUILD_TESTING=OFF",
-      "buildCommandArgs": "",
-      "ctestCommandArgs": "-C Release",
-      "inheritEnvironments": [ "msvc_x86" ]
-    },
-    {
-      "name": "ARM64-GCC-Debug",
-      "generator": "Unix Makefiles",
-      "configurationType": "Debug",
-      "cmakeExecutable": "cmake",
-      "remoteCopySourcesExclusionList": [ ".vs", ".git", "out" ],
-      "cmakeCommandArgs": "-D BUILD_TESTING=OFF -D WITH_CI_NUMBER=OFF -D SIMULATE_ON=OFF -D BUILD_DEVADAPTER=ON",
-      "buildCommandArgs": "",
-      "ctestCommandArgs": "--output-on-failure",
-      "inheritEnvironments": [ "linux_arm" ],
-      "remoteMachineName": "${defaultRemoteMachineName}",
-      "remoteCMakeListsRoot": "$HOME/.vs/${projectDirName}/${workspaceHash}/src",
-      "remoteBuildRoot": "$HOME/.vs/${projectDirName}/${workspaceHash}/out/build/${name}",
-      "remoteInstallRoot": "$HOME/.vs/${projectDirName}/${workspaceHash}/out/install/${name}",
-      "remoteCopySources": true,
-      "rsyncCommandArgs": "-t --delete --delete-excluded --exclude \"/build\" --exclude \"/out\" --exclude-from=.gitignore",
-      "remoteCopyBuildOutput": false,
-      "remoteCopySourcesMethod": "rsync",
-      "addressSanitizerRuntimeFlags": "detect_leaks=0",
-      "variables": [
-        {
-          "name": "SIMULATE_ON",
-          "value": "False",
-          "type": "BOOL"
-        }
-      ]
-    },
     {
       "name": "ARM64-GCC-Release",
       "generator": "Unix Makefiles",

+ 2 - 0
Module/mod_CenterSetting/CMakeLists.txt

@@ -17,6 +17,8 @@ target_include_directories(${MODULE_NAME} PRIVATE
 	${CONAN_INCLUDE_DIRS_JSONCPP}
 )
 
+set(CMAKE_CXX_FLAGS "${CMAK_CXX_FLAGS} -g3")
+
 target_link_directories(${MODULE_NAME} PRIVATE
 	${CONAN_LIB_DIRS_JSONCPP}
 )

+ 17 - 5
Module/mod_chromium/mod_chromium.cpp

@@ -529,19 +529,19 @@ namespace Chromium {
 		DbgEx("open page extend %s, pid:%d", Error_Succeed == openRet.first ? "success" : "fail", openRet.second);
 	}
 
-	void CChromiumEntity::OnPreStart(CAutoArray<CSimpleStringA> strArgs, CSmartPointer<ITransactionContext> pTransactionContext)
+	void CChromiumEntity::startWithCfg()
 	{
-		OnPreStart_Init(strArgs, pTransactionContext);//初始化部分, perf ,killchromium, signal, get custom url
-		if (!OnPreStart_socketStart(strArgs, pTransactionContext)) {//OnPreStart_socketStart()->new CWebsocketServer(strStructPath, this) 时间过长
+		OnPreStart_Init(m_strArgs, m_pTransactionContext);//初始化部分, perf ,killchromium, signal, get custom url
+		if (!OnPreStart_socketStart(m_strArgs, m_pTransactionContext)) {//OnPreStart_socketStart()->new CWebsocketServer(strStructPath, this) 时间过长
 			return;
 		}
 		if (!IsConfigMode()) {
-			if (!OnPreStart_register(strArgs, pTransactionContext)) {
+			if (!OnPreStart_register(m_strArgs, m_pTransactionContext)) {
 				return;
 			}
 			//if contain default setting, then oepn web by setting
 #if (defined _WIN32 || defined _WIN64)
-			if (strArgs.GetCount())
+			if (m_strArgs.GetCount())
 			{
 				if (!m_strCustomMainUrl.IsNullOrEmpty())
 					openMainPage();
@@ -554,6 +554,16 @@ namespace Chromium {
 				return;
 			}
 		}
+	}
+
+	void CChromiumEntity::OnPreStart(CAutoArray<CSimpleStringA> strArgs, CSmartPointer<ITransactionContext> pTransactionContext)
+	{
+		m_strArgs = strArgs;
+		m_pTransactionContext = pTransactionContext;
+
+		DbgEx("subscribe VtmLoader %s",
+			(Error_Succeed == GetFunction()->SubscribeLog(m_uuidVTMLoader, this, Log_Event, Severity_None, Error_IgnoreAll, -1, "VtmLoader")) ? "success" : "failed");
+
 		
 		pTransactionContext->SendAnswer(Error_Succeed);
 	}
@@ -715,6 +725,8 @@ namespace Chromium {
 		const CAutoArray<DWORD>& Param, const char* pszEntityName, const char* pszModuleName, const char* pszMessage, const linkContext& pLinkInfo)
 	{
 		DbgEx("OnLog %x from entity %s, msg : %s", dwUserCode, NULL == pszEntityName ? "" : pszEntityName, NULL == pszMessage ? "" : pszMessage);
+		if (Event_VtmLoader_GetCenterSetting_Suc == dwUserCode)
+			startWithCfg();
 #if (defined _WIN32 || defined _WIN64)
 		//No Log_Notify
 #else