Optimize project structure

* Move includeing path, lib path and etc to a specific file Virtools.props
* Add mk_materializer_cfg.py to change Virtools.props for more build configuration
* Ready for multi-virtools-version development
This commit is contained in:
yyc12345 2021-08-27 23:46:16 +08:00
parent 2496449c1e
commit 4951670e3d
4 changed files with 257 additions and 37 deletions

View File

@ -17,18 +17,16 @@ Global
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{4D941003-020F-47FD-9FA2-FFC989E306B8}.Debug|Any CPU.ActiveCfg = VT5Debug|Win32
{4D941003-020F-47FD-9FA2-FFC989E306B8}.Debug|Any CPU.Build.0 = VT5Debug|Win32
{4D941003-020F-47FD-9FA2-FFC989E306B8}.Debug|x64.ActiveCfg = VT5Debug|Win32
{4D941003-020F-47FD-9FA2-FFC989E306B8}.Debug|x64.Build.0 = VT5Debug|Win32
{4D941003-020F-47FD-9FA2-FFC989E306B8}.Debug|x86.ActiveCfg = VT5Debug|Win32
{4D941003-020F-47FD-9FA2-FFC989E306B8}.Debug|x86.Build.0 = VT5Debug|Win32
{4D941003-020F-47FD-9FA2-FFC989E306B8}.Release|Any CPU.ActiveCfg = VT5Release|Win32
{4D941003-020F-47FD-9FA2-FFC989E306B8}.Release|Any CPU.Build.0 = VT5Release|Win32
{4D941003-020F-47FD-9FA2-FFC989E306B8}.Release|x64.ActiveCfg = VT5Debug|Win32
{4D941003-020F-47FD-9FA2-FFC989E306B8}.Release|x64.Build.0 = VT5Debug|Win32
{4D941003-020F-47FD-9FA2-FFC989E306B8}.Release|x86.ActiveCfg = VT5Debug|Win32
{4D941003-020F-47FD-9FA2-FFC989E306B8}.Release|x86.Build.0 = VT5Debug|Win32
{4D941003-020F-47FD-9FA2-FFC989E306B8}.Debug|Any CPU.ActiveCfg = Debug|Win32
{4D941003-020F-47FD-9FA2-FFC989E306B8}.Debug|Any CPU.Build.0 = Debug|Win32
{4D941003-020F-47FD-9FA2-FFC989E306B8}.Debug|x64.ActiveCfg = Debug|Win32
{4D941003-020F-47FD-9FA2-FFC989E306B8}.Debug|x86.ActiveCfg = Debug|Win32
{4D941003-020F-47FD-9FA2-FFC989E306B8}.Debug|x86.Build.0 = Debug|Win32
{4D941003-020F-47FD-9FA2-FFC989E306B8}.Release|Any CPU.ActiveCfg = Release|Win32
{4D941003-020F-47FD-9FA2-FFC989E306B8}.Release|Any CPU.Build.0 = Release|Win32
{4D941003-020F-47FD-9FA2-FFC989E306B8}.Release|x64.ActiveCfg = Release|Win32
{4D941003-020F-47FD-9FA2-FFC989E306B8}.Release|x86.ActiveCfg = Release|Win32
{4D941003-020F-47FD-9FA2-FFC989E306B8}.Release|x86.Build.0 = Release|Win32
{6D751BF5-87D6-4123-94B3-34721938CF04}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6D751BF5-87D6-4123-94B3-34721938CF04}.Debug|x64.ActiveCfg = Debug|Any CPU
{6D751BF5-87D6-4123-94B3-34721938CF04}.Debug|x86.ActiveCfg = Debug|Any CPU

View File

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="VT5Debug|Win32">
<Configuration>VT5Debug</Configuration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="VT5Release|Win32">
<Configuration>VT5Release</Configuration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
@ -17,13 +17,13 @@
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='VT5Debug|Win32'">
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<PlatformToolset>v142</PlatformToolset>
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseOfMfc>Dynamic</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='VT5Release|Win32'" Label="Configuration">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
@ -34,45 +34,53 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="Virtools.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="Virtools.props" />
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='VT5Debug|Win32'">
<OutDir>E:\Virtools\Virtools Dev 5.0\InterfacePlugins\</OutDir>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>$(VIRTOOLS_OUTPUT_PATH)</OutDir>
<LinkIncremental>true</LinkIncremental>
<IntDir>Temp\$(Configuration)\</IntDir>
<TargetExt>.$(VIRTOOLS_BUILD_SUFFIX)</TargetExt>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='VT5Release|Win32'">
<OutDir>E:\Virtools\Virtools Dev 5.0\InterfacePlugins\</OutDir>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>$(VIRTOOLS_OUTPUT_PATH)</OutDir>
<IntDir>Temp\$(Configuration)\</IntDir>
<TargetExt>.$(VIRTOOLS_BUILD_SUFFIX)</TargetExt>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='VT5Debug|Win32'">
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='VT5Debug|Win32'">
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<AdditionalIncludeDirectories>D:\CppLib\SQLite\sqlite-amalgamation-3310100;E:\Virtools\Virtools Dev 5.0\Sdk\Includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(VIRTOOLS_HEADER_PATH);$(SQLITE_HEADER_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_WINDOWS;_USRDLL;VIRTOOLS_5;VX_MEM_RELEASE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;_WINDOWS;_USRDLL;$(VIRTOOLS_VER);VX_MEM_RELEASE;$(VIRTOOLS_BUILD_TYPE);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<FunctionLevelLinking>true</FunctionLevelLinking>
</ClCompile>
<Link>
<OutputFile>E:\Virtools\Virtools Dev 5.0\InterfacePlugins\$(ProjectName).dll</OutputFile>
<OutputFile>$(VIRTOOLS_OUTPUT_PATH)SuperScriptMaterializer.$(VIRTOOLS_BUILD_SUFFIX)</OutputFile>
</Link>
<Link>
<AdditionalLibraryDirectories>D:\CppLib\SQLite\sqlite-dll-win32-x86-3310100;E:\Virtools\Virtools Dev 5.0\Sdk\Lib\Win32\Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>vxmath.lib;DllEditor.lib;ck2.lib;InterfaceControls.lib;CKControls.lib;sqlite3.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(SQLITE_LIB_PATH);$(VIRTOOLS_LIB_PATH);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>$(VIRTOOLS_ATTACH_REF);$(SQLITE_ATTACH_REF);%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>E:\Virtools\Virtools Dev 5.0\InterfacePlugins\$(ProjectName).pdb</ProgramDatabaseFile>
<ProgramDatabaseFile>$(VIRTOOLS_OUTPUT_PATH)SuperScriptMaterializer.pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<ModuleDefinitionFile>SuperScriptMaterializer.def</ModuleDefinitionFile>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='VT5Release|Win32'">
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
@ -83,9 +91,9 @@
</SDLCheck>
<ConformanceMode>false</ConformanceMode>
<LanguageStandard>Default</LanguageStandard>
<AdditionalIncludeDirectories>D:\CppLib\SQLite\sqlite-amalgamation-3310100;E:\Virtools\Virtools Dev 5.0\Sdk\Includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(VIRTOOLS_HEADER_PATH);$(SQLITE_HEADER_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<PreprocessorDefinitions>WIN32;_WINDOWS;_USRDLL;VIRTOOLS_5;VX_MEM_RELEASE;_RELEASE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;_WINDOWS;_USRDLL;$(VIRTOOLS_VER);VX_MEM_RELEASE;_RELEASE;$(VIRTOOLS_BUILD_TYPE);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
</ClCompile>
<Link>
@ -93,10 +101,10 @@
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<ModuleDefinitionFile>SuperScriptMaterializer.def</ModuleDefinitionFile>
<OutputFile>E:\Virtools\Virtools Dev 5.0\InterfacePlugins\$(ProjectName).dll</OutputFile>
<AdditionalLibraryDirectories>D:\CppLib\SQLite\sqlite-dll-win32-x86-3310100;E:\Virtools\Virtools Dev 5.0\Sdk\Lib\Win32\Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>vxmath.lib;DllEditor.lib;ck2.lib;InterfaceControls.lib;CKControls.lib;sqlite3.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ProgramDatabaseFile>E:\Virtools\Virtools Dev 5.0\InterfacePlugins\$(ProjectName).pdb</ProgramDatabaseFile>
<OutputFile>$(VIRTOOLS_OUTPUT_PATH)SuperScriptMaterializer.$(VIRTOOLS_BUILD_SUFFIX)</OutputFile>
<AdditionalLibraryDirectories>$(VIRTOOLS_LIB_PATH);$(SQLITE_LIB_PATH);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>$(VIRTOOLS_ATTACH_REF);$(SQLITE_ATTACH_REF);%(AdditionalDependencies)</AdditionalDependencies>
<ProgramDatabaseFile>$(VIRTOOLS_OUTPUT_PATH)SuperScriptMaterializer.pdb</ProgramDatabaseFile>
</Link>
</ItemDefinitionGroup>
<ItemGroup>

View File

@ -0,0 +1,62 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets"/>
<PropertyGroup Label="UserMacros">
<VIRTOOLS_HEADER_PATH>E:\Virtools\Virtools Dev 5.0\Sdk/Includes</VIRTOOLS_HEADER_PATH>
<VIRTOOLS_LIB_PATH>E:\Virtools\Virtools Dev 5.0\Sdk/Lib/Win32/Release</VIRTOOLS_LIB_PATH>
<SQLITE_HEADER_PATH>D:\CppLib\SQLite\sqlite-amalgamation-3310100</SQLITE_HEADER_PATH>
<SQLITE_LIB_PATH>D:\CppLib\SQLite\sqlite-dll-win32-x86-3310100</SQLITE_LIB_PATH>
<VIRTOOLS_OUTPUT_PATH>E:\Virtools\Virtools Dev 5.0\InterfacePlugins\</VIRTOOLS_OUTPUT_PATH>
<VIRTOOLS_BUILD_TYPE>VIRTOOLS_PLUGIN</VIRTOOLS_BUILD_TYPE>
<VIRTOOLS_DEBUG_TARGET>E:\Virtools\Virtools Dev 5.0\devr.exe</VIRTOOLS_DEBUG_TARGET>
<VIRTOOLS_DEBUG_ROOT>E:\Virtools\Virtools Dev 5.0</VIRTOOLS_DEBUG_ROOT>
<VIRTOOLS_BUILD_SUFFIX>dll</VIRTOOLS_BUILD_SUFFIX>
<VIRTOOLS_VER>VIRTOOLS_50</VIRTOOLS_VER>
<BML_SPECIAL_MACRO></BML_SPECIAL_MACRO>
<VIRTOOLS_ATTACH_REF>vxmath.lib;DllEditor.lib;ck2.lib;InterfaceControls.lib;CKControls.lib</VIRTOOLS_ATTACH_REF>
<SQLITE_ATTACH_REF>sqlite3.lib</SQLITE_ATTACH_REF>
</PropertyGroup>
<PropertyGroup/>
<ItemDefinitionGroup/>
<ItemGroup>
<BuildMacro Include="VIRTOOLS_HEADER_PATH">
<Value>$(VIRTOOLS_HEADER_PATH)</Value>
</BuildMacro>
<BuildMacro Include="VIRTOOLS_LIB_PATH">
<Value>$(VIRTOOLS_LIB_PATH)</Value>
</BuildMacro>
<BuildMacro Include="SQLITE_HEADER_PATH">
<Value>$(SQLITE_HEADER_PATH)</Value>
</BuildMacro>
<BuildMacro Include="SQLITE_LIB_PATH">
<Value>$(SQLITE_LIB_PATH)</Value>
</BuildMacro>
<BuildMacro Include="VIRTOOLS_OUTPUT_PATH">
<Value>$(VIRTOOLS_OUTPUT_PATH)</Value>
</BuildMacro>
<BuildMacro Include="VIRTOOLS_BUILD_TYPE">
<Value>$(VIRTOOLS_BUILD_TYPE)</Value>
</BuildMacro>
<BuildMacro Include="VIRTOOLS_DEBUG_TARGET">
<Value>$(VIRTOOLS_DEBUG_TARGET)</Value>
</BuildMacro>
<BuildMacro Include="VIRTOOLS_DEBUG_ROOT">
<Value>$(VIRTOOLS_DEBUG_ROOT)</Value>
</BuildMacro>
<BuildMacro Include="VIRTOOLS_BUILD_SUFFIX">
<Value>$(VIRTOOLS_BUILD_SUFFIX)</Value>
</BuildMacro>
<BuildMacro Include="VIRTOOLS_VER">
<Value>$(VIRTOOLS_VER)</Value>
</BuildMacro>
<BuildMacro Include="BML_SPECIAL_MACRO">
<Value>$(BML_SPECIAL_MACRO)</Value>
</BuildMacro>
<BuildMacro Include="VIRTOOLS_ATTACH_REF">
<Value>$(VIRTOOLS_ATTACH_REF)</Value>
</BuildMacro>
<BuildMacro Include="SQLITE_ATTACH_REF">
<Value>$(SQLITE_ATTACH_REF)</Value>
</BuildMacro>
</ItemGroup>
</Project>

152
mk_materializer_cfg.py Normal file
View File

@ -0,0 +1,152 @@
import xml.dom.minidom as minidom
import xml.dom
import os
import sys
# ======================== const define
program_name = "SuperScriptMaterializer"
build_type_standalone = "standalone"
build_type_plugin = "plugin"
valid_build_type = (
build_type_standalone,
build_type_plugin
)
valid_virtools_standalone_ver = (
"21",
"25",
"35",
"40",
"50"
)
valid_virtools_plugin_ver = (
"35",
"40",
"50"
)
# ======================== assist func
def write_macro(dom, node_property_group, node_item_group, macro_upcase, data):
node = dom.createElement(macro_upcase)
node.appendChild(dom.createTextNode(data))
node_property_group.appendChild(node)
node = dom.createElement("BuildMacro")
node.setAttribute('Include', macro_upcase)
inter_node = dom.createElement('Value')
inter_node.appendChild(dom.createTextNode("$({})".format(macro_upcase)))
node.appendChild(inter_node)
node_item_group.appendChild(node)
def get_executable_virtools(vt_ver):
if vt_ver == '21':
return 'Dev.exe'
elif vt_ver == '25':
return 'Dev.exe'
elif vt_ver == '35':
return 'devr.exe'
elif vt_ver == '40':
return 'devr.exe'
elif vt_ver == '50':
return 'devr.exe'
# ======================== requirement check
if len(sys.argv) != 8:
print("Error parameter!")
print("Example: python3 mk_materializer_cfg.py [plugin|standalone] [21|25|35|40|50] [virtools_root_path] [sqlite_header] [sqlite_lib] [sqlite attach ref] [bml path]")
sys.exit(1)
build_type = sys.argv[1]
if build_type not in valid_build_type:
print("Invalid build_type!")
sys.exit(1)
virtools_version = sys.argv[2]
if build_type == build_type_standalone and virtools_version not in valid_virtools_standalone_ver:
print("Invalid virtools_version!")
sys.exit(1)
elif build_type == build_type_plugin and virtools_version not in valid_virtools_plugin_ver:
print("Invalid virtools_version!")
sys.exit(1)
virtools_root_path = sys.argv[3]
sqlite_header_path = sys.argv[4]
sqlite_lib_path = sys.argv[5]
sqlite_attach_ref = sys.argv[6]
bml_path = sys.argv[7]
# ======================== construct some path
# .......todo
virtools_header_path = os.path.join(virtools_root_path, 'Sdk/Includes')
virtools_lib_path = os.path.join(virtools_root_path, 'Sdk/Lib/Win32/Release')
virtools_ver = 'VIRTOOLS_' + virtools_version
virtools_debug_root = virtools_root_path
if build_type == build_type_plugin:
virtools_build_type = 'VIRTOOLS_PLUGIN'
virtools_build_suffix = 'dll'
virtools_debug_target = os.path.join(virtools_root_path, get_executable_virtools(virtools_version))
virtools_output_path = os.path.join(virtools_root_path, 'InterfacePlugins')
elif build_type == build_type_standalone:
virtools_build_type = 'VIRTOOLS_STANDALONE'
virtools_build_suffix = 'exe'
virtools_debug_target = os.path.join(virtools_root_path, 'SuperScriptMaterializer.exe')
virtools_output_path = virtools_root_path
if virtools_output_path[-1] != '\\' or virtools_output_path[-1] != '/':
virtools_output_path = virtools_output_path + '\\'
if virtools_version == '21':
bml_special_macro = 'BML_EXPORT='
else:
bml_special_macro = ''
# ======================== create document
dom = minidom.getDOMImplementation().createDocument(None, 'Project', None)
root = dom.documentElement
root.setAttribute('ToolsVersion', '4.0')
root.setAttribute('xmlns', 'http://schemas.microsoft.com/developer/msbuild/2003')
cache = dom.createElement('ImportGroup')
cache.setAttribute('Label', 'PropertySheets')
root.appendChild(cache)
node_property_group = dom.createElement('PropertyGroup')
node_property_group.setAttribute('Label', 'UserMacros')
root.appendChild(node_property_group)
cache = dom.createElement('PropertyGroup')
root.appendChild(cache)
cache = dom.createElement('ItemDefinitionGroup')
root.appendChild(cache)
node_item_group = dom.createElement('ItemGroup')
root.appendChild(node_item_group)
# ======================== write macro
write_macro(dom, node_property_group, node_item_group, 'VIRTOOLS_HEADER_PATH', virtools_header_path)
write_macro(dom, node_property_group, node_item_group, 'VIRTOOLS_LIB_PATH', virtools_lib_path)
write_macro(dom, node_property_group, node_item_group, 'SQLITE_HEADER_PATH', sqlite_header_path)
write_macro(dom, node_property_group, node_item_group, 'SQLITE_LIB_PATH', sqlite_lib_path)
write_macro(dom, node_property_group, node_item_group, 'VIRTOOLS_OUTPUT_PATH', virtools_output_path)
write_macro(dom, node_property_group, node_item_group, 'VIRTOOLS_BUILD_TYPE', virtools_build_type)
write_macro(dom, node_property_group, node_item_group, 'VIRTOOLS_DEBUG_TARGET', virtools_debug_target)
write_macro(dom, node_property_group, node_item_group, 'VIRTOOLS_DEBUG_ROOT', virtools_debug_root)
write_macro(dom, node_property_group, node_item_group, 'VIRTOOLS_BUILD_SUFFIX', virtools_build_suffix)
write_macro(dom, node_property_group, node_item_group, 'VIRTOOLS_VER', virtools_ver)
write_macro(dom, node_property_group, node_item_group, 'BML_SPECIAL_MACRO', bml_special_macro)
write_macro(dom, node_property_group, node_item_group, 'VIRTOOLS_ATTACH_REF', "vxmath.lib;DllEditor.lib;ck2.lib;InterfaceControls.lib;CKControls.lib")
write_macro(dom, node_property_group, node_item_group, 'SQLITE_ATTACH_REF', sqlite_attach_ref)
# ======================== output
with open('./SuperScriptMaterializer/Virtools.props', 'w', encoding='utf-8') as f:
dom.writexml(f, addindent='\t', newl='\n', encoding='utf-8')
print("OK!")