Browse Source

Z991239-825 #comment feat:upgradeRun 实体 首次编译windows版本通过

Signed-Off-By: commit-hook
刘文涛174520 5 năm trước cách đây
mục cha
commit
b1ade55010

+ 35 - 0
Module/mod_UpgradeRun/CMakeLists.txt

@@ -0,0 +1,35 @@
+#实体命名
+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")
+#设置版本
+set(MOD_VERSION_STRING "1.0.0-dev1")
+add_module_libraries(${MODULE_PREFIX} ${MODULE_NAME} ${MOD_VERSION_STRING})
+
+conan_cmake_run(REQUIRES zlib/1.2.11@LR04.02_ThirdParty/testing
+BASIC_SETUP CMAKE_TARGETS
+BUILD missing)
+
+#附加包含的目录(DevHeadPath:)
+target_include_directories(${MODULE_NAME} PRIVATE
+	${DevHeadPath}
+	${ModuleCommonHeadPath}
+	${MODULE_BASE_DIR}/mod_pinpad
+	${RVC_FRAMEWORK_INCLUDES_DIR}
+	${CONAN_INCLUDE_DIRS_ZLIB}
+
+)
+
+# 添加实体需要依赖的其他共享库(包括系统库):连接器包含的包
+target_link_directories(${MODULE_NAME} PRIVATE
+	${CONAN_LIB_DIRS_ZLIB}
+)
+
+set(${MODULE_PREFIX}_LIBS ${MODULE_BASE_ALL_LIBS} ${CONAN_PKG_LIBS_ZLIB})
+
+target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})  
+
+deploy_module(${MODULE_PREFIX} ${MODULE_NAME})

+ 2 - 1
Module/mod_UpgradeRun/UpgradeRunFSM.cpp

@@ -1,4 +1,5 @@
 #include "StdAfx.h"
+#include <shellapi.h>
 #include "UpgradeRunFSM.h"
 #include "XUnzip.h"
 #include "mod_UpgradeRun.h"
@@ -7,7 +8,7 @@
 #include "fileutil.h"
 #include <io.h>
 #include <vector>
-#include "..\EventCode.h"
+#include "EventCode.h"
 
 CUpgradeRunFSM::CUpgradeRunFSM(void)
 {

+ 4 - 1
Module/mod_UpgradeRun/UpgradeRunFSM.h

@@ -1,4 +1,6 @@
-#pragma once
+#ifndef RVC_MOD_UPGRADE_RUN_FSM_H_
+#define RVC_MOD_UPGRADE_RUN_FSM_H_
+
 #include "SpFSM.h"
 #include <list>
 #include "SpBase.h"
@@ -99,3 +101,4 @@ public:
 	char m_chInstallState;			//  N δ½âѹ£» Z Òѽâѹ£»C ÒѼì²é£» I ÒѰ²×°
 };
 
+#endif //RVC_MOD_UPGRADE_RUN_FSM_H_

+ 3 - 1
Module/mod_UpgradeRun/WMIDeviceQuery.h

@@ -1,4 +1,5 @@
-#pragma once
+#ifndef RVC_MOD_UPGRADE_RUN_DEVICE_QUERY_H_
+#define RVC_MOD_UPGRADE_RUN_DEVICE_QUERY_H_
 
 #include <windows.h>
 
@@ -22,3 +23,4 @@ extern "C"
 #ifdef __cplusplus
 }
 #endif
+#endif //RVC_MOD_UPGRADE_RUN_DEVICE_QUERY_H_

+ 2 - 2
Module/mod_UpgradeRun/mod_UpgradeRun.cpp

@@ -2,9 +2,9 @@
 #include "mod_UpgradeRun.h"
 #include "SpHelper.h"
 #include "WMIDeviceQuery.h"
-#include "..\mod_pinpad\PinPad_client_g.h"
+#include "PinPad_client_g.h"
 using namespace PinPad;
-#include "..\..\DeviceAdapter\DevInc\DeviceBaseClass.h"
+#include "DeviceBaseClass.h"
 
 CServerSessionBase *CUpgradeRunEntity::OnNewSession(const char* /*pszRemoteEntityName*/, const char * /*pszParam*/)
 {

+ 15 - 2
Module/mod_UpgradeRun/mod_UpgradeRun.h

@@ -1,9 +1,14 @@
-#pragma once
+#ifndef RVC_MOD_UPGRADE_RUN_H_
+#define RVC_MOD_UPGRADE_RUN_H_
+
 #include "SpBase.h"
 #include "UpgradeRunFSM.h"
 #include "UpgradeRun_server_g.h"
 #include "UpgradeRun_msg_g.h"
 
+#include "SpTest.h"
+#include "modVer.h"
+
 using namespace UpgradeRun;
 
 // Éý¼¶Ö´ÐÐ UpgradeRun	0x507
@@ -15,6 +20,13 @@ public:
 	virtual const char *GetEntityName() const { return "UpgradeRun"; }
 	virtual bool IsService()const{return true;}
 
+	const char* GetEntityVersion() const override
+	{
+		return MODULE_VERSION_FULL;
+	}
+
+	ON_ENTITYT_TEST()
+
 	virtual void OnStarted();
 	virtual void OnPreClose(EntityCloseCauseEnum eCloseCause,CSmartPointer<ITransactionContext> pTransactionContext);
 
@@ -58,4 +70,5 @@ public:
 
 private:
 	CUpgradeRunEntity *m_pEntity;
-};
+};
+#endif //RVC_MOD_UPGRADE_RUN_H_