Skip to content

Commit 0bd4e6d

Browse files
committed
added:meter convert plugin module
1 parent 2aee349 commit 0bd4e6d

File tree

13 files changed

+834
-0
lines changed

13 files changed

+834
-0
lines changed
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
CC = g++ -Wall -std=c++17 -fPIC
2+
SHAREFLAG = -shared
3+
SHAREDLL = so
4+
RELEASE = 0
5+
UNICODE = 0
6+
INCLUDE = -I ./ -I ../../XEngine_ThirdPart/jsoncpp
7+
LOADBIN = -L /usr/local/lib/XEngine_Release/XEngine_BaseLib -L ../../XEngine_ThirdPart/jsoncpp
8+
LIB = -lXEngine_BaseLib -ljsoncpp
9+
LIBEX = -ldl -lpthread
10+
LOADSO = -Wl,-rpath=../,--disable-new-dtags
11+
LIBINCLUDE = Plugin_Meter.o pch.o
12+
13+
ifeq ($(shell uname),Darwin)
14+
SHAREDLL = dylib
15+
SHAREFLAG = -dynamiclib
16+
LOADSO =
17+
else
18+
SHAREDLL = so
19+
SHAREFLAG = -shared
20+
endif
21+
22+
ifeq ($(RELEASE),1)
23+
FLAGS = -c -O2
24+
DEBUG =
25+
else
26+
FLAGS = -c
27+
DEBUG = -g
28+
endif
29+
30+
ifeq ($(UNICODE),1)
31+
UNICODE = -D _UNICODE
32+
else
33+
UNICODE =
34+
endif
35+
36+
37+
all:$(LIBINCLUDE)
38+
$(CC) $(DEBUG) $(LIBINCLUDE) -o libModulePlugin_Meter.$(SHAREDLL) $(SHAREFLAG) -fPIC $(LOADBIN) $(LIB) $(LIBEX) $(LOADSO)
39+
40+
Plugin_Meter.o:./Plugin_Meter/Plugin_Meter.cpp
41+
$(CC) $(DEBUG) $(FLAGS) $(UNICODE) $(INCLUDE) ./Plugin_Meter/Plugin_Meter.cpp
42+
43+
pch.o:./pch.cpp
44+
$(CC) $(DEBUG) $(FLAGS) $(UNICODE) $(INCLUDE) ./pch.cpp
45+
46+
47+
InstallAll:InstallSo
48+
InstallSo:./libModulePlugin_Meter.$(SHAREDLL)
49+
cp ./libModulePlugin_Meter.$(SHAREDLL) ../../../XEngine_Release/XEngine_Plugin/libModulePlugin_Meter.$(SHAREDLL)
50+
51+
CleanAll:CleanObj CleanMk
52+
CleanObj:
53+
rm *.o
54+
CleanMk:
55+
rm *.$(SHAREDLL)
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
LIBRARY
2+
3+
EXPORTS
4+
PluginCore_GetLastError
5+
6+
PluginCore_Init
7+
PluginCore_UnInit
8+
PluginCore_Call
Lines changed: 193 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,193 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ItemGroup Label="ProjectConfigurations">
4+
<ProjectConfiguration Include="Debug|Win32">
5+
<Configuration>Debug</Configuration>
6+
<Platform>Win32</Platform>
7+
</ProjectConfiguration>
8+
<ProjectConfiguration Include="Release|Win32">
9+
<Configuration>Release</Configuration>
10+
<Platform>Win32</Platform>
11+
</ProjectConfiguration>
12+
<ProjectConfiguration Include="Debug|x64">
13+
<Configuration>Debug</Configuration>
14+
<Platform>x64</Platform>
15+
</ProjectConfiguration>
16+
<ProjectConfiguration Include="Release|x64">
17+
<Configuration>Release</Configuration>
18+
<Platform>x64</Platform>
19+
</ProjectConfiguration>
20+
</ItemGroup>
21+
<PropertyGroup Label="Globals">
22+
<VCProjectVersion>16.0</VCProjectVersion>
23+
<Keyword>Win32Proj</Keyword>
24+
<ProjectGuid>{6f111577-daf8-4294-b516-0077c22d7613}</ProjectGuid>
25+
<RootNamespace>ModulePluginMeter</RootNamespace>
26+
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
27+
<ProjectName>libModulePlugin_Meter</ProjectName>
28+
</PropertyGroup>
29+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
30+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
31+
<ConfigurationType>DynamicLibrary</ConfigurationType>
32+
<UseDebugLibraries>true</UseDebugLibraries>
33+
<PlatformToolset>v143</PlatformToolset>
34+
<CharacterSet>MultiByte</CharacterSet>
35+
</PropertyGroup>
36+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
37+
<ConfigurationType>DynamicLibrary</ConfigurationType>
38+
<UseDebugLibraries>false</UseDebugLibraries>
39+
<PlatformToolset>v143</PlatformToolset>
40+
<WholeProgramOptimization>true</WholeProgramOptimization>
41+
<CharacterSet>MultiByte</CharacterSet>
42+
</PropertyGroup>
43+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
44+
<ConfigurationType>DynamicLibrary</ConfigurationType>
45+
<UseDebugLibraries>true</UseDebugLibraries>
46+
<PlatformToolset>v143</PlatformToolset>
47+
<CharacterSet>MultiByte</CharacterSet>
48+
</PropertyGroup>
49+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
50+
<ConfigurationType>DynamicLibrary</ConfigurationType>
51+
<UseDebugLibraries>false</UseDebugLibraries>
52+
<PlatformToolset>v143</PlatformToolset>
53+
<WholeProgramOptimization>true</WholeProgramOptimization>
54+
<CharacterSet>MultiByte</CharacterSet>
55+
</PropertyGroup>
56+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
57+
<ImportGroup Label="ExtensionSettings">
58+
</ImportGroup>
59+
<ImportGroup Label="Shared">
60+
</ImportGroup>
61+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
62+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
63+
</ImportGroup>
64+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
65+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
66+
</ImportGroup>
67+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
68+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
69+
</ImportGroup>
70+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
71+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
72+
</ImportGroup>
73+
<PropertyGroup Label="UserMacros" />
74+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
75+
<OutDir>$(SolutionDir)$(Configuration)\XEngine_Plugin\</OutDir>
76+
<IntDir>$(Configuration)\XEngine_Plugin\</IntDir>
77+
<IncludePath>$(XEngine_Include);../../XEngine_ThirdPart/jsoncpp;$(IncludePath)</IncludePath>
78+
<LibraryPath>$(XEngine_Lib32);$(LibraryPath)</LibraryPath>
79+
</PropertyGroup>
80+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
81+
<OutDir>$(SolutionDir)$(Configuration)\XEngine_Plugin\</OutDir>
82+
<IntDir>$(Configuration)\XEngine_Plugin\</IntDir>
83+
<IncludePath>$(XEngine_Include);../../XEngine_ThirdPart/jsoncpp;$(IncludePath)</IncludePath>
84+
<LibraryPath>$(XEngine_Lib32);$(LibraryPath)</LibraryPath>
85+
</PropertyGroup>
86+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
87+
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\XEngine_Plugin\</OutDir>
88+
<IntDir>$(Platform)\$(Configuration)\XEngine_Plugin\</IntDir>
89+
<IncludePath>$(XEngine_Include);../../XEngine_ThirdPart/jsoncpp;$(IncludePath)</IncludePath>
90+
<LibraryPath>$(XEngine_Lib64);$(LibraryPath)</LibraryPath>
91+
</PropertyGroup>
92+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
93+
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\XEngine_Plugin\</OutDir>
94+
<IntDir>$(Platform)\$(Configuration)\XEngine_Plugin\</IntDir>
95+
<IncludePath>$(XEngine_Include);../../XEngine_ThirdPart/jsoncpp;$(IncludePath)</IncludePath>
96+
<LibraryPath>$(XEngine_Lib64);$(LibraryPath)</LibraryPath>
97+
</PropertyGroup>
98+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
99+
<ClCompile>
100+
<WarningLevel>Level3</WarningLevel>
101+
<SDLCheck>true</SDLCheck>
102+
<PreprocessorDefinitions>WIN32;_DEBUG;MODULEPLUGINMETER_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
103+
<ConformanceMode>true</ConformanceMode>
104+
<PrecompiledHeader>Use</PrecompiledHeader>
105+
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
106+
</ClCompile>
107+
<Link>
108+
<SubSystem>Windows</SubSystem>
109+
<GenerateDebugInformation>true</GenerateDebugInformation>
110+
<EnableUAC>false</EnableUAC>
111+
<ModuleDefinitionFile>ModulePlugin_Meter.def</ModuleDefinitionFile>
112+
</Link>
113+
</ItemDefinitionGroup>
114+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
115+
<ClCompile>
116+
<WarningLevel>Level3</WarningLevel>
117+
<FunctionLevelLinking>true</FunctionLevelLinking>
118+
<IntrinsicFunctions>true</IntrinsicFunctions>
119+
<SDLCheck>true</SDLCheck>
120+
<PreprocessorDefinitions>WIN32;NDEBUG;MODULEPLUGINMETER_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
121+
<ConformanceMode>true</ConformanceMode>
122+
<PrecompiledHeader>Use</PrecompiledHeader>
123+
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
124+
</ClCompile>
125+
<Link>
126+
<SubSystem>Windows</SubSystem>
127+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
128+
<OptimizeReferences>true</OptimizeReferences>
129+
<GenerateDebugInformation>true</GenerateDebugInformation>
130+
<EnableUAC>false</EnableUAC>
131+
<ModuleDefinitionFile>ModulePlugin_Meter.def</ModuleDefinitionFile>
132+
</Link>
133+
</ItemDefinitionGroup>
134+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
135+
<ClCompile>
136+
<WarningLevel>Level3</WarningLevel>
137+
<SDLCheck>true</SDLCheck>
138+
<PreprocessorDefinitions>_DEBUG;MODULEPLUGINMETER_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
139+
<ConformanceMode>true</ConformanceMode>
140+
<PrecompiledHeader>Use</PrecompiledHeader>
141+
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
142+
</ClCompile>
143+
<Link>
144+
<SubSystem>Windows</SubSystem>
145+
<GenerateDebugInformation>true</GenerateDebugInformation>
146+
<EnableUAC>false</EnableUAC>
147+
<ModuleDefinitionFile>ModulePlugin_Meter.def</ModuleDefinitionFile>
148+
</Link>
149+
</ItemDefinitionGroup>
150+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
151+
<ClCompile>
152+
<WarningLevel>Level3</WarningLevel>
153+
<FunctionLevelLinking>true</FunctionLevelLinking>
154+
<IntrinsicFunctions>true</IntrinsicFunctions>
155+
<SDLCheck>true</SDLCheck>
156+
<PreprocessorDefinitions>NDEBUG;MODULEPLUGINMETER_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
157+
<ConformanceMode>true</ConformanceMode>
158+
<PrecompiledHeader>Use</PrecompiledHeader>
159+
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
160+
</ClCompile>
161+
<Link>
162+
<SubSystem>Windows</SubSystem>
163+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
164+
<OptimizeReferences>true</OptimizeReferences>
165+
<GenerateDebugInformation>true</GenerateDebugInformation>
166+
<EnableUAC>false</EnableUAC>
167+
<ModuleDefinitionFile>ModulePlugin_Meter.def</ModuleDefinitionFile>
168+
</Link>
169+
</ItemDefinitionGroup>
170+
<ItemGroup>
171+
<ClInclude Include="framework.h" />
172+
<ClInclude Include="pch.h" />
173+
<ClInclude Include="PluginMeter_Define.h" />
174+
<ClInclude Include="PluginMeter_Error.h" />
175+
<ClInclude Include="Plugin_Meter\Plugin_Meter.h" />
176+
</ItemGroup>
177+
<ItemGroup>
178+
<ClCompile Include="dllmain.cpp" />
179+
<ClCompile Include="pch.cpp">
180+
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
181+
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
182+
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
183+
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
184+
</ClCompile>
185+
<ClCompile Include="Plugin_Meter\Plugin_Meter.cpp" />
186+
</ItemGroup>
187+
<ItemGroup>
188+
<None Include="ModulePlugin_Meter.def" />
189+
</ItemGroup>
190+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
191+
<ImportGroup Label="ExtensionTargets">
192+
</ImportGroup>
193+
</Project>
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ItemGroup>
4+
<Filter Include="源文件">
5+
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
6+
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
7+
</Filter>
8+
<Filter Include="头文件">
9+
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
10+
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
11+
</Filter>
12+
<Filter Include="资源文件">
13+
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
14+
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
15+
</Filter>
16+
<Filter Include="头文件\Plugin_Meter">
17+
<UniqueIdentifier>{787df7a3-1a7f-4e06-88a0-34b0a4b6bbb5}</UniqueIdentifier>
18+
</Filter>
19+
<Filter Include="源文件\Plugin_Meter">
20+
<UniqueIdentifier>{8b14df4b-7a4b-4ec5-b07c-d210aa340660}</UniqueIdentifier>
21+
</Filter>
22+
</ItemGroup>
23+
<ItemGroup>
24+
<ClInclude Include="framework.h">
25+
<Filter>头文件</Filter>
26+
</ClInclude>
27+
<ClInclude Include="pch.h">
28+
<Filter>头文件</Filter>
29+
</ClInclude>
30+
<ClInclude Include="Plugin_Meter\Plugin_Meter.h">
31+
<Filter>头文件\Plugin_Meter</Filter>
32+
</ClInclude>
33+
<ClInclude Include="PluginMeter_Define.h">
34+
<Filter>头文件</Filter>
35+
</ClInclude>
36+
<ClInclude Include="PluginMeter_Error.h">
37+
<Filter>头文件</Filter>
38+
</ClInclude>
39+
</ItemGroup>
40+
<ItemGroup>
41+
<ClCompile Include="dllmain.cpp">
42+
<Filter>源文件</Filter>
43+
</ClCompile>
44+
<ClCompile Include="pch.cpp">
45+
<Filter>源文件</Filter>
46+
</ClCompile>
47+
<ClCompile Include="Plugin_Meter\Plugin_Meter.cpp">
48+
<Filter>源文件\Plugin_Meter</Filter>
49+
</ClCompile>
50+
</ItemGroup>
51+
<ItemGroup>
52+
<None Include="ModulePlugin_Meter.def">
53+
<Filter>源文件</Filter>
54+
</None>
55+
</ItemGroup>
56+
</Project>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup />
4+
</Project>

0 commit comments

Comments
 (0)