Просмотр исходного кода

Z991239-825 #comment feat:UpgradeRun 实体 cmake 在linux 首次编译通过

Signed-Off-By: commit-hook
刘文涛174520 5 лет назад
Родитель
Сommit
078f7bfcba

+ 39 - 3
Module/mod_UpgradeRun/CMakeLists.txt

@@ -2,16 +2,51 @@
 define_module("UpgradeRun")
 
 #整个实体加载的文件
-file(GLOB ${MODULE_PREFIX}_SRCS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}"
-    "${CMAKE_CURRENT_SOURCE_DIR}/*.h" "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp"
-    "${CMAKE_CURRENT_SOURCE_DIR}/*.hpp")
+if(WIN32)
+set(${MODULE_PREFIX}_SRCS
+	mod_UpgradeRun.cpp
+	mod_UpgradeRun.h
+	UpgradeRun_client_g.h
+	UpgradeRun_def_g.h
+	UpgradeRun_msg_g.h
+	UpgradeRun_server_g.h
+	UpgradeRunFSM.cpp
+	UpgradeRunFSM.h
+	WMIDeviceQuery.cpp
+	WMIDeviceQuery.h
+	XUnzip.cpp
+	XUnzip.h
+	ZipZilb.cpp
+	ZipZilb.h
+	)
+else()
+set(${MODULE_PREFIX}_SRCS
+	mod_UpgradeRun.cpp
+	mod_UpgradeRun.h
+	UpgradeRun_client_g.h
+	UpgradeRun_def_g.h
+	UpgradeRun_msg_g.h
+	UpgradeRun_server_g.h
+	UpgradeRunFSM.cpp
+	UpgradeRunFSM.h
+	ZipZilb.cpp
+	ZipZilb.h
+	)
+endif(WIN32)
 #设置版本
 set(MOD_VERSION_STRING "1.0.0-dev1")
 add_module_libraries(${MODULE_PREFIX} ${MODULE_NAME} ${MOD_VERSION_STRING})
 
+#附加包含的目录
+if(WIN32)
 conan_cmake_run(REQUIRES zlib/1.2.11@LR04.02_ThirdParty/testing
 BASIC_SETUP CMAKE_TARGETS
 BUILD missing)
+else(WIN32)
+conan_cmake_run(REQUIRES zlib/1.2.11@LR04.02_ThirdParty/stable
+BASIC_SETUP CMAKE_TARGETS
+BUILD missing)
+endif(WIN32)
 
 #附加包含的目录(DevHeadPath:)
 target_include_directories(${MODULE_NAME} PRIVATE
@@ -20,6 +55,7 @@ target_include_directories(${MODULE_NAME} PRIVATE
 	${MODULE_BASE_DIR}/mod_pinpad
 	${RVC_FRAMEWORK_INCLUDES_DIR}
 	${CONAN_INCLUDE_DIRS_ZLIB}
+	${CONAN_RVCFRAMEWORK_ROOT}/include
 
 )
 

+ 144 - 59
Module/mod_UpgradeRun/UpgradeRunFSM.cpp

@@ -1,15 +1,28 @@
-#include "StdAfx.h"
-#include <shellapi.h>
+//#include "StdAfx.h"
+
 #include "UpgradeRunFSM.h"
-#include "XUnzip.h"
+
 #include "mod_UpgradeRun.h"
 #include "iniutil.h"
 #include "memutil.h"
 #include "fileutil.h"
-#include <io.h>
+
 #include <vector>
 #include "EventCode.h"
 
+#ifdef RVC_OS_WIN
+
+#include <shellapi.h>
+#include <io.h>
+#include "XUnzip.h"
+
+#else
+
+#include <sys/utsname.h>
+
+#endif // RVC_OS_WIN
+
+
 CUpgradeRunFSM::CUpgradeRunFSM(void)
 {
 	//解决sonar扫描问题
@@ -505,14 +518,18 @@ bool CUpgradeRunFSM::IsManual()
 	assert(rc == Error_Succeed);
 
 	// 检查文件是否存在
+#ifdef RVC_OS_WIN
 	DWORD attr = GetFileAttributesA(strConfigPath);
 	Dbg("check install config: %s, attr[0x%08X]", (const char*)strConfigPath, attr);
 	if (attr == INVALID_FILE_ATTRIBUTES || (attr & FILE_ATTRIBUTE_DIRECTORY))
 	{
-		LogError(Severity_Low, Error_Unexpect, 0, CSimpleStringA::Format("install config \"%s\" not exists", 
- 			(const char*)strConfigPath));
+		LogError(Severity_Low, Error_Unexpect, 0, CSimpleStringA::Format("install config \"%s\" not exists",
+			(const char*)strConfigPath));
 		return false;
 	}
+#endif // RVC_OS_WIN
+
+	
 
 	// InstallType=manual
 	char *p = inifile_read_str(strConfigPath, "Precondition", "InstallType", "");
@@ -598,11 +615,14 @@ ErrorCodeEnum CUpgradeRunFSM::NewUnzipPack()
 
 ErrorCodeEnum CUpgradeRunFSM::UnzipPack()
 {
+#ifdef RVC_OS_WIN
+
 	assert(!m_strInstallPack.IsNullOrEmpty());
 
 	// 设定解压临时目录
 	char szOldPath[MAX_PATH] = {};
 	GetCurrentDirectoryA(MAX_PATH, szOldPath);
+	
 
 	CSimpleStringA strDownloadsPath;
 	auto rc = m_pEntity->GetFunction()->GetPath("Downloads",  strDownloadsPath);
@@ -717,6 +737,8 @@ ErrorCodeEnum CUpgradeRunFSM::UncabPack()
 
 	SetCurrentDirectoryA(szOldPath);
 	return rc;
+#endif // RVC_OS_WIN
+	return Error_Exception;
 }
 
 ErrorCodeEnum CUpgradeRunFSM::DeleteInstallingPack()
@@ -728,8 +750,8 @@ ErrorCodeEnum CUpgradeRunFSM::DeleteInstallingPack()
 	assert(rc == Error_Succeed);
 
 	CSimpleStringA strZipFile = CSimpleStringA::Format("%s\\%s", (const char*)strDownloadsPath, (const char*)m_strInstallPack);
-
-	DWORD attr = GetFileAttributesA(strZipFile);	
+#ifdef RVC_OS_WIN
+	DWORD attr = GetFileAttributesA(strZipFile);
 	if (attr == INVALID_FILE_ATTRIBUTES)
 	{
 		Dbg("pack [%s] not exists", strZipFile);
@@ -747,12 +769,19 @@ ErrorCodeEnum CUpgradeRunFSM::DeleteInstallingPack()
 
 	// 删除临时解压目录
 	DeleteUnzipDir();
+#endif // RVC_OS_WIN
+
+	
 	
 	return Error_Succeed;
 }
 
 DWORD CUpgradeRunFSM::waitSystem(const CSimpleStringA cmd, const CSimpleStringA par, BOOL nShow)
 {
+#ifdef RVC_OS_WIN
+
+
+
 	SHELLEXECUTEINFOA ShExecInfo = { 0 };
 	ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO);
 	ShExecInfo.fMask = SEE_MASK_NOCLOSEPROCESS;
@@ -790,6 +819,8 @@ DWORD CUpgradeRunFSM::waitSystem(const CSimpleStringA cmd, const CSimpleStringA
 	//Sleep(100);
 
 	return exitCode;
+#endif // RVC_OS_WIN
+	return -1;
 }
 
 DWORD CUpgradeRunFSM::SYSTEM_ON(CSimpleStringA cmdLine, BOOL isWait)
@@ -854,6 +885,10 @@ ErrorCodeEnum CUpgradeRunFSM::CheckInstallConfig(CAutoArray<CSimpleStringA> &cov
 	assert(rc == Error_Succeed);
 
 	// 检查文件是否存在
+#ifdef RVC_OS_WIN
+
+
+
 	DWORD attr = GetFileAttributesA(strConfigPath);	
 	Dbg("check install config: %s", (const char*)strConfigPath);
 	//assert((attr != INVALID_FILE_ATTRIBUTES) && !(attr & FILE_ATTRIBUTE_DIRECTORY));
@@ -864,7 +899,7 @@ ErrorCodeEnum CUpgradeRunFSM::CheckInstallConfig(CAutoArray<CSimpleStringA> &cov
 		strErrMsg = "run.ini不存在";
 		return Error_Unexpect;
 	}
-
+#endif // RVC_OS_WIN
 	CSystemStaticInfo sysInfo;
 	ZeroMemory(&sysInfo, sizeof(sysInfo));
 	rc = m_pEntity->GetFunction()->GetSystemStaticInfo(sysInfo);
@@ -976,42 +1011,56 @@ ErrorCodeEnum CUpgradeRunFSM::CheckInstallConfig(CAutoArray<CSimpleStringA> &cov
 
 	if (!strOSVersion.IsNullOrEmpty())
 	{
-		OSVERSIONINFO osvi;    
-		ZeroMemory(&osvi, sizeof(OSVERSIONINFO));
-		osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
-		GetVersionEx(&osvi);
-		CVersion osVersion(osvi.dwMajorVersion, osvi.dwMinorVersion);
+		//查询系统版本
+		//OSVERSIONINFO osvi;
+		//ZeroMemory(&osvi, sizeof(OSVERSIONINFO));
+		//osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
+		//GetVersionEx(&osvi);
+		//CVersion osVersion(osvi.dwMajorVersion, osvi.dwMinorVersion);
+		DWORD dwMajorVersion(0), dwMinorVersion(0);
+		if (getOSVersion(dwMajorVersion,dwMinorVersion)) {
+
+			CVersion osVersion(dwMajorVersion, dwMinorVersion);
+
+			DWORD dwMajor1(0), dwMinor1(0);
+			int n = sscanf(strOSVersion, "%d.%d", &dwMajor1, &dwMinor1);
+			CVersion beginVersion(dwMajor1, dwMinor1);
+
+			bool bMatch = false;
+			auto list = strOSVersion.Split('-');
+			if (list.GetCount() >= 2)
+			{
+				DWORD dwMajor2(0), dwMinor2(0);
+				n = sscanf(list[1], "%d.%d", &dwMajor2, &dwMinor2);
+				CVersion endVersion(dwMajor2, dwMinor2);
 
-		DWORD dwMajor1(0), dwMinor1(0);
-		int n = sscanf(strOSVersion, "%d.%d", &dwMajor1, &dwMinor1);
-		CVersion beginVersion(dwMajor1, dwMinor1);
+				bMatch = osVersion >= beginVersion && osVersion <= endVersion;
+			}
+			else
+			{
+				if (strOSVersion.IsEndWith("-"))
+					bMatch = osVersion >= beginVersion;
+				else
+					bMatch = osVersion == beginVersion;
+			}
 
-		bool bMatch = false;
-		auto list = strOSVersion.Split('-');
-		if (list.GetCount() >= 2)
-		{
-			DWORD dwMajor2(0), dwMinor2(0);
-			n = sscanf(list[1], "%d.%d", &dwMajor2, &dwMinor2);
-			CVersion endVersion(dwMajor2, dwMinor2);
 
-			bMatch = osVersion >= beginVersion && osVersion <= endVersion;
-		}
-		else
-		{
-			if (strOSVersion.IsEndWith("-"))
-				bMatch = osVersion >= beginVersion;
-			else
-				bMatch = osVersion == beginVersion;
-		}
-		
+			if (!bMatch)
+			{
+				LogError(Severity_Low, Error_NotMeetCondition, 0, CSimpleStringA::Format("OS version mismatch, config: [%s], current: [%s]",
+					(const char*)strOSVersion, (const char*)osVersion.ToString()));
 
-		if (!bMatch)
-		{
-			LogError(Severity_Low, Error_NotMeetCondition, 0, CSimpleStringA::Format("OS version mismatch, config: [%s], current: [%s]",
-				(const char*)strOSVersion, (const char*)osVersion.ToString()));
+				strErrMsg = CSimpleStringA::Format("操作系统版本不匹配(配置:%s, 当前:%s)", (const char*)strOSVersion, (const char*)osVersion.ToString());
+				return Error_NotMeetCondition;
+			}
+		}
+		else{
+			LogError(Severity_Low, Error_NotMeetCondition, 0, CSimpleStringA::Format("OS version get fail, config: [%s], current: [0.0.0.0]",
+				(const char*)strOSVersion));
 
-			strErrMsg = CSimpleStringA::Format("操作系统版本不匹配(配置:%s, 当前:%s)", (const char*)strOSVersion, (const char*)osVersion.ToString());
+			strErrMsg = CSimpleStringA::Format("操作系统版本获取失败(配置:%s, 当前:0.0.0.0)", (const char*)strOSVersion);
 			return Error_NotMeetCondition;
+
 		}
 	}
 
@@ -1171,8 +1220,10 @@ ErrorCodeEnum CUpgradeRunFSM::InstallPack(bool &bSysInstall, bool &bLightPack, C
 	assert(rc == Error_Succeed);
 
 	// 检查文件是否存在
-	DWORD attr = GetFileAttributesA(strConfigPath);	
+#ifdef RVC_OS_WIN
+	DWORD attr = GetFileAttributesA(strConfigPath);
 	assert((attr != INVALID_FILE_ATTRIBUTES) && !(attr & FILE_ATTRIBUTE_DIRECTORY));
+#endif // RVC_OS_WIN
 
 	// UpgradeVersion=1.1.2|A	
 	char *p = inifile_read_str(strConfigPath, "Action", "UpgradeVersion", "");
@@ -1482,30 +1533,35 @@ bool CUpgradeRunFSM::IsFileMatch(const char *pszFilter, const char *pszFileName)
 
 void getFiles(string path, vector<string>& files)  
 {  
+#ifdef RVC_OS_WIN
+	//查询文件
 	//文件句柄  
 	long hFile = 0;
 
 	//文件信息  
-	struct _finddata_t fileinfo;  
-	string p;  
-	if((hFile = _findfirst(p.assign(path).append("\\*").c_str(),&fileinfo)) !=  -1)  
-	{  
-		do  
-		{  
+	struct _finddata_t fileinfo;
+	string p;
+	if ((hFile = _findfirst(p.assign(path).append("\\*").c_str(), &fileinfo)) != -1)
+	{
+		do
+		{
 			//如果是目录,迭代之  
 			//如果不是,加入列表  
-			if((fileinfo.attrib &  _A_SUBDIR))  
-			{  
-				if(strcmp(fileinfo.name,".") != 0  &&  strcmp(fileinfo.name,"..") != 0)  
-					getFiles(p.assign(path).append("\\").append(fileinfo.name), files);  
-			}  
-			else  
-			{  
-				files.push_back(p.assign(path).append("\\").append(fileinfo.name) );
-			}  
-		}while(_findnext(hFile, &fileinfo)  == 0);  
-		_findclose(hFile);  
-	}  
+			if ((fileinfo.attrib & _A_SUBDIR))
+			{
+				if (strcmp(fileinfo.name, ".") != 0 && strcmp(fileinfo.name, "..") != 0)
+					getFiles(p.assign(path).append("\\").append(fileinfo.name), files);
+			}
+			else
+			{
+				files.push_back(p.assign(path).append("\\").append(fileinfo.name));
+			}
+		} while (_findnext(hFile, &fileinfo) == 0);
+		_findclose(hFile);
+	}
+#endif // RVC_OS_WIN
+
+	
 }
 
 bool CUpgradeRunFSM::CheckNewRunFilesSign()
@@ -1640,4 +1696,33 @@ bool CUpgradeRunFSM::CheckNewRunFilesSign()
 	//}
 
 	return true;
-}
+}
+
+bool CUpgradeRunFSM::getOSVersion(DWORD &dwMajorVersion, DWORD &dwMinorVersion)
+{
+#ifdef RVC_OS_WIN
+	OSVERSIONINFO osvi;
+	ZeroMemory(&osvi, sizeof(OSVERSIONINFO));
+	osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
+	GetVersionEx(&osvi);
+	dwMajorVersion = osvi.dwMajorVersion;
+	dwMinorVersion = osvi.dwMinorVersion;
+	return true;
+#else
+	struct utsname kernel_info;
+	int ret = uname(&kernel_info);
+	if (ret == 0) {
+		Dbg("get linux kernel version success: %s\n", kernel_info.release);
+		//char kversion[100] = { 0 };
+		//strncpy(kversion, kernel_info.release, strlen(kernel_info.release));
+		int n = sscanf((const char*)kernel_info.release, "%d.%d", &dwMajorVersion, &dwMinorVersion);
+		return true;
+	}
+	else {
+		Dbg("get linux kernel version fail: %s\n", strerror(errno));
+		return false;
+	}
+#endif // RVC_OS_WIN
+
+	
+}

+ 1 - 0
Module/mod_UpgradeRun/UpgradeRunFSM.h

@@ -93,6 +93,7 @@ private:
 	ErrorCodeEnum DeleteUnzipDir();	
 	CSimpleStringA GetSysPatchNameFromPackName(const char *pszPackName);
 	bool CheckNewRunFilesSign();
+	bool getOSVersion(DWORD &dwMajorVersion, DWORD &dwMinorVersion);
 
 
 public:	

+ 141 - 0
Module/mod_UpgradeRun/ZipZilb.cpp

@@ -0,0 +1,141 @@
+#include "ZipZilb.h"
+#include "libtoolkit/path.h"
+
+
+bool CreateZipFromFile(string srcFileName, string zipFileName)
+{
+	if (srcFileName.empty() || srcFileName.length() == 0 ||
+		zipFileName.empty() || zipFileName.length() == 0) {
+		Dbg("压缩文件参数为空:");
+		return false;
+	}
+	int pos = srcFileName.find_last_of(SPLIT_SLASH);
+
+/*
+#ifdef RVC_OS_WIN
+	int pos = srcFileName.find_last_of('\\');
+#else
+	int pos = srcFileName.find_last_of('/');
+#endif 
+*/
+
+	if (pos < 0) {
+		Dbg("文件路径不对:%s",srcFileName.c_str());
+		return false;
+	}
+	string strName(srcFileName.substr(pos + 1));
+
+
+	zipFile newZipFile = zipOpen(zipFileName.c_str(), APPEND_STATUS_CREATE); //创建zip文件
+	if (newZipFile == NULL)
+	{
+		Dbg("无法创建zip文件!");
+		return false;
+	}
+	//
+	//压缩文件
+	if (AddFileToZip(newZipFile, strName.c_str(), srcFileName.c_str()) != 0)
+	{
+		Dbg("压缩文件失败");
+		zipClose(newZipFile, NULL); 
+		if (remove(zipFileName.c_str()) != 0) {
+			Dbg("删除临时压缩文件失败");
+		}
+		return false;
+	}
+	//释放文件
+	zipClose(newZipFile, NULL); 
+	Dbg("文件压缩成功: %s", zipFileName.c_str());
+	return true;
+	
+}
+
+bool AddFileToZip(zipFile zf, const char* fileNameInZip, const char* srcFile)
+{
+	FILE* srcfp = NULL;
+
+	//初始化写入zip的文件信息
+	zip_fileinfo zi;
+	zi.tmz_date.tm_sec = zi.tmz_date.tm_min = zi.tmz_date.tm_hour =
+		zi.tmz_date.tm_mday = zi.tmz_date.tm_mon = zi.tmz_date.tm_year = 0;
+	zi.dosDate = 0;
+	zi.internal_fa = 0;
+	zi.external_fa = 0;
+
+	//如果srcFile为空,加入空目录
+	char new_file_name[256];
+	memset(new_file_name, 0, sizeof(new_file_name));
+	strcat(new_file_name, fileNameInZip);
+	if (srcFile == NULL)
+	{
+		strcat(new_file_name, "/");
+	}
+
+	//在zip文件中创建新文件或文件夹
+	int ret = zipOpenNewFileInZip(zf, new_file_name, &zi, NULL, 0, NULL, 0, NULL, Z_DEFLATED, Z_DEFAULT_COMPRESSION);
+
+	if (ret != ZIP_OK)
+	{
+		if (srcFile != NULL) {
+			Dbg("在zip文件中创建新文件失败: %s", srcFile);
+		}
+		else {
+			Dbg("在zip文件中创建新目录失败: %s", new_file_name);
+		}
+
+		return false;
+	}
+
+
+	if (srcFile != NULL)
+	{
+		//打开源文件
+		srcfp = fopen(srcFile, "rb+");
+		if (srcfp == NULL)
+		{
+			Dbg("打开要往zip压缩的文件失败: %s", srcFile);
+			zipCloseFileInZip(zf); //关闭zip中的新文件
+			return false;
+		}
+		int fileLen = (int)GetFileLen(srcfp);
+		//读入源文件并写入zip文件
+		char buf[16 * 1024]; 
+		int numBytes = 0;
+		int sumWrite = 0;
+		while (!feof(srcfp) && !ferror(srcfp))
+		{
+			numBytes = fread(buf, 1, sizeof(buf), srcfp);
+			int ret = zipWriteInFileInZip(zf, buf, numBytes);
+			if (ret != ZIP_OK) {
+				Dbg("文件写入zip压缩包失败1: %s", srcFile);
+				fclose(srcfp);
+				zipCloseFileInZip(zf);
+				return false;//写文件失败
+			}
+			sumWrite += numBytes;
+		}
+		//和原文件长度是否相同
+		if (sumWrite != fileLen) {
+			Dbg("文件写入zip压缩包失败,总长度不一致: %s", srcFile);
+			fclose(srcfp);
+			zipCloseFileInZip(zf);
+			return false;//写文件失败
+		}
+		//关闭源文件
+		fclose(srcfp);
+	}
+
+	//关闭zip文件
+	zipCloseFileInZip(zf);
+	return true;
+	
+}
+
+long GetFileLen(FILE* _file)
+{
+	long curPosit = ftell(_file), fileLen;
+	fseek(_file, 0, SEEK_END);
+	fileLen = ftell(_file);
+	fseek(_file, curPosit, SEEK_SET);
+	return fileLen;
+}

+ 29 - 0
Module/mod_UpgradeRun/ZipZilb.h

@@ -0,0 +1,29 @@
+#ifndef RVC_MOD_UPLOAD_ZIP_H_
+#define RVC_MOD_UPLOAD_ZIP_H_
+
+
+#include "SpBase.h"
+
+#ifdef RVC_OS_WIN
+
+#define ZLIB_WINAPI //win32 必须使用的宏
+
+#endif 
+
+
+
+#include "zip.h"
+#include "unzip.h"
+#include <iostream>
+#include <stdio.h>
+
+using namespace std;
+
+bool CreateZipFromFile(string srcFileName, string zipFileName);
+
+bool AddFileToZip(zipFile zf, const char* fileNameInZip, const char* srcFile);
+
+//获取文件长度 完成
+long GetFileLen(FILE* _file);
+
+#endif //RVC_MOD_UPLOAD_ZIP_H_

+ 11 - 3
Module/mod_UpgradeRun/mod_UpgradeRun.cpp

@@ -1,11 +1,16 @@
-#include "stdafx.h"
+//#include "stdafx.h"
 #include "mod_UpgradeRun.h"
 #include "SpHelper.h"
-#include "WMIDeviceQuery.h"
+
 #include "PinPad_client_g.h"
 using namespace PinPad;
 #include "DeviceBaseClass.h"
 
+#ifdef RVC_OS_WIN
+#include "WMIDeviceQuery.h"
+#endif // RVC_OS_WIN
+
+
 CServerSessionBase *CUpgradeRunEntity::OnNewSession(const char* /*pszRemoteEntityName*/, const char * /*pszParam*/)
 {
 	return  new CUpgradeRunSession(this);
@@ -124,6 +129,9 @@ bool CUpgradeRunEntity::GetServerPackUpgradeResult(const char *pszPackageName, C
 {
 	char szTmp[4096] = {};
 	int nTmpBufLen = 4096;//win7补丁可能有200多个,每个补丁(如KB3105211加分隔符;)需要10个字节
+#ifdef RVC_OS_WIN
+
+
 
 	if (!QueryWMIDevice(PatchList, "HotFixID", szTmp, &nTmpBufLen))
 	{
@@ -146,7 +154,7 @@ bool CUpgradeRunEntity::GetServerPackUpgradeResult(const char *pszPackageName, C
 
 	Dbg("find PatchName[%s] from PatchList[%s]", strPatchName, strPatchList);
 	strVerison = strPatchName;
-
+#endif // RVC_OS_WIN
 	return true;
 }
 

+ 0 - 114
Module/mod_UpgradeRun/mod_UpgradeRun.vcxproj

@@ -1,114 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <ItemGroup Label="ProjectConfigurations">
-    <ProjectConfiguration Include="Debug|Win32">
-      <Configuration>Debug</Configuration>
-      <Platform>Win32</Platform>
-    </ProjectConfiguration>
-    <ProjectConfiguration Include="Release|Win32">
-      <Configuration>Release</Configuration>
-      <Platform>Win32</Platform>
-    </ProjectConfiguration>
-  </ItemGroup>
-  <ItemGroup>
-    <ClCompile Include="$(FrameworkHeadRoot)\Common\stdafx.cpp">
-      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
-      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
-    </ClCompile>
-    <ClCompile Include="mod_UpgradeRun.cpp" />
-    <ClCompile Include="UpgradeRunFSM.cpp" />
-    <ClCompile Include="WMIDeviceQuery.cpp" />
-    <ClCompile Include="XUnzip.cpp">
-      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
-      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
-    </ClCompile>
-  </ItemGroup>
-  <ItemGroup>
-    <ClInclude Include="$(FrameworkHeadRoot)\Common\stdafx.h" />
-    <ClInclude Include="mod_UpgradeRun.h" />
-    <ClInclude Include="UpgradeRunFSM.h" />
-    <ClInclude Include="UpgradeRun_client_g.h" />
-    <ClInclude Include="UpgradeRun_def_g.h" />
-    <ClInclude Include="UpgradeRun_msg_g.h" />
-    <ClInclude Include="UpgradeRun_server_g.h" />
-    <ClInclude Include="WMIDeviceQuery.h" />
-    <ClInclude Include="XUnzip.h" />
-  </ItemGroup>
-  <ItemGroup>
-    <None Include="UpgradeRun.xml" />
-  </ItemGroup>
-  <PropertyGroup Label="Globals">
-    <ProjectGuid>{3DF201A3-7B3C-4B52-88AC-88D9896B736B}</ProjectGuid>
-    <Keyword>Win32Proj</Keyword>
-    <RootNamespace>mod_UpgradeRun</RootNamespace>
-  </PropertyGroup>
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
-    <ConfigurationType>DynamicLibrary</ConfigurationType>
-    <UseDebugLibraries>true</UseDebugLibraries>
-    <CharacterSet>MultiByte</CharacterSet>
-    <PlatformToolset>Windows7.1SDK</PlatformToolset>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-    <ConfigurationType>DynamicLibrary</ConfigurationType>
-    <UseDebugLibraries>false</UseDebugLibraries>
-    <WholeProgramOptimization>true</WholeProgramOptimization>
-    <CharacterSet>MultiByte</CharacterSet>
-  </PropertyGroup>
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
-  <ImportGroup Label="ExtensionSettings">
-  </ImportGroup>
-  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-  </ImportGroup>
-  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-  </ImportGroup>
-  <PropertyGroup Label="UserMacros" />
-  <Import Project="..\modmake.setting" />
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-    <LinkIncremental>true</LinkIncremental>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-    <LinkIncremental>false</LinkIncremental>
-  </PropertyGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-    <ClCompile>
-      <PrecompiledHeader>Use</PrecompiledHeader>
-      <WarningLevel>Level3</WarningLevel>
-      <Optimization>Disabled</Optimization>
-      <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;MOD_UPGRADERUN_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <AdditionalIncludeDirectories>$(FrameworkHeadRoot)\Common;$(FrameworkHeadRoot)\libtoolkit;$(ThirdPartyHeadRoot)\KMC</AdditionalIncludeDirectories>
-    </ClCompile>
-    <Link>
-      <SubSystem>Windows</SubSystem>
-      <GenerateDebugInformation>true</GenerateDebugInformation>
-      <AdditionalDependencies>$(FrameworkLib)\spbase.lib;$(FrameworkLib)\libtoolkit.lib;$(ThirdPartyLib)\RVCCrypt.lib;Shell32.lib</AdditionalDependencies>
-    </Link>
-  </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-    <ClCompile>
-    	<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>    
-      <WarningLevel>Level3</WarningLevel>
-      <PrecompiledHeader>Use</PrecompiledHeader>
-      <Optimization>MaxSpeed</Optimization>
-      <FunctionLevelLinking>true</FunctionLevelLinking>
-      <IntrinsicFunctions>true</IntrinsicFunctions>
-      <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;MOD_UPGRADERUN_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <AdditionalIncludeDirectories>$(FrameworkHeadRoot)\Common;$(FrameworkHeadRoot)\libtoolkit;$(ThirdPartyHeadRoot)\KMC</AdditionalIncludeDirectories>
-    </ClCompile>
-    <Link>
-      <SubSystem>Windows</SubSystem>
-      <GenerateDebugInformation>true</GenerateDebugInformation>
-      <EnableCOMDATFolding>true</EnableCOMDATFolding>
-      <OptimizeReferences>true</OptimizeReferences>
-      <AdditionalDependencies>$(FrameworkLib)\spbase.lib;$(FrameworkLib)\libtoolkit.lib;$(ThirdPartyLib)\RVCCrypt.lib</AdditionalDependencies>
-    </Link>
-  </ItemDefinitionGroup>
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
-  <ImportGroup Label="ExtensionTargets">
-  </ImportGroup>
-  <ItemGroup>
-    <ResourceCompile Include="..\..\Version.rc" />
-  </ItemGroup>
-</Project>

+ 0 - 66
Module/mod_UpgradeRun/mod_UpgradeRun.vcxproj.filters

@@ -1,66 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <ItemGroup>
-    <Filter Include="Source Files">
-      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
-      <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
-    </Filter>
-    <Filter Include="Header Files">
-      <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
-      <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
-    </Filter>
-    <Filter Include="Resource Files">
-      <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
-      <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
-    </Filter>
-  </ItemGroup>
-  <ItemGroup>
-    <ClCompile Include="..\..\Framework\Common\stdafx.cpp">
-      <Filter>Source Files</Filter>
-    </ClCompile>
-    <ClCompile Include="mod_UpgradeRun.cpp">
-      <Filter>Source Files</Filter>
-    </ClCompile>
-    <ClCompile Include="UpgradeRunFSM.cpp">
-      <Filter>Source Files</Filter>
-    </ClCompile>
-    <ClCompile Include="XUnzip.cpp">
-      <Filter>Source Files</Filter>
-    </ClCompile>
-    <ClCompile Include="WMIDeviceQuery.cpp">
-      <Filter>Source Files</Filter>
-    </ClCompile>
-  </ItemGroup>
-  <ItemGroup>
-    <ClInclude Include="..\..\Framework\Common\stdafx.h">
-      <Filter>Header Files</Filter>
-    </ClInclude>
-    <ClInclude Include="mod_UpgradeRun.h">
-      <Filter>Header Files</Filter>
-    </ClInclude>
-    <ClInclude Include="UpgradeRun_client_g.h">
-      <Filter>Header Files</Filter>
-    </ClInclude>
-    <ClInclude Include="UpgradeRun_def_g.h">
-      <Filter>Header Files</Filter>
-    </ClInclude>
-    <ClInclude Include="UpgradeRun_msg_g.h">
-      <Filter>Header Files</Filter>
-    </ClInclude>
-    <ClInclude Include="UpgradeRun_server_g.h">
-      <Filter>Header Files</Filter>
-    </ClInclude>
-    <ClInclude Include="UpgradeRunFSM.h">
-      <Filter>Header Files</Filter>
-    </ClInclude>
-    <ClInclude Include="XUnzip.h">
-      <Filter>Header Files</Filter>
-    </ClInclude>
-    <ClInclude Include="WMIDeviceQuery.h">
-      <Filter>Header Files</Filter>
-    </ClInclude>
-  </ItemGroup>
-  <ItemGroup>
-    <None Include="UpgradeRun.xml" />
-  </ItemGroup>
-</Project>