Browse Source

svn地址从配置文件中读取;

Jeff 5 năm trước cách đây
mục cha
commit
61b76f5873

+ 9 - 0
SATHelper/SATHelper/Global.cpp

@@ -270,6 +270,15 @@ namespace Global
 		}
 		g_Config.strSCBCInitBat = szValue;
 
+		// svn¸üеØÖ·;
+		GetPrivateProfileString(_T("SATHelper"), _T("SVNUpdateUrl"), NULL, szValue, MAX_PATH, szConfigpath);
+		if (_tcslen(szValue) == 0)
+		{
+			WritePrivateProfileString(_T("SATHelper"), _T("SCBCInitBat"), _T("http://10.126.16.60:8580/btc_execute_se/ajaxInteractiveManage!getSvnVersion.action"), szConfigpath);
+			_stprintf_s(szValue, _T("http://10.126.16.60:8580/btc_execute_se/ajaxInteractiveManage!getSvnVersion.action"));
+		}
+		g_Config.svnUpdateUrl = szValue;
+
 		g_Config.bGenerics = GetPrivateProfileInt(_T("ir-device"), _T("generics"), 0, szConfigpath);
 		if (PathFileExists(g_szPython27Dir))
 		{

+ 1 - 0
SATHelper/SATHelper/Global.h

@@ -33,6 +33,7 @@ namespace Global
 		std::string svnScriptSavePath;
 		std::string svnTesterSavePath;
 		std::string svnResourceSavePath;
+		std::string svnUpdateUrl;
 
 		// test wizard
 		int twPort;

+ 1 - 1
SATHelper/SATHelper/MainFrm.cpp

@@ -1797,7 +1797,7 @@ void CMainFrame::OnTimer(UINT_PTR nIDEvent)
 {
 	// TODO: 在此添加消息处理程序代码和/或调用默认值
 	if ( nIDEvent == 0 ) {
-		if (CSVNMgr::GetInstance()->CheckNewVersion(_T("http://192.168.1.103:8580/btc_execute_se/ajaxInteractiveManage!getSvnVersion.action"), _T("")))
+		if (CSVNMgr::GetInstance()->CheckNewVersion(Global::g_Config.svnUpdateUrl, _T("")))
 		{
 			m_trayIcon.SetInfo(_T("SVN资源有更新!"), _T("更新提醒!"));
 			CSVNMgr::GetInstance()->Store();