add error window for materializer
This commit is contained in:
parent
2588e3fb41
commit
7b31e3576b
|
@ -23,7 +23,7 @@ The inspiration came from:
|
||||||
|
|
||||||
* This project does not give ability to edit hidden scripts within the file. It simply exports and views.
|
* This project does not give ability to edit hidden scripts within the file. It simply exports and views.
|
||||||
* The latest commit may not be stable to use, please visit the Release page to get a stable version.
|
* The latest commit may not be stable to use, please visit the Release page to get a stable version.
|
||||||
* The development cycle of this program is very long. If you use a version before the first official version, you need to rebuild all the data because the previous version is not compatible with the official version.
|
* If you change the version (including the version before the first stable version), then you need to rebuild all the data, because the data between the various versions may not be compatible with each other.
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
|
|
|
@ -17,18 +17,18 @@ Global
|
||||||
Release|x86 = Release|x86
|
Release|x86 = Release|x86
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
{4D941003-020F-47FD-9FA2-FFC989E306B8}.Debug|Any CPU.ActiveCfg = VT5|Win32
|
{4D941003-020F-47FD-9FA2-FFC989E306B8}.Debug|Any CPU.ActiveCfg = VT5Debug|Win32
|
||||||
{4D941003-020F-47FD-9FA2-FFC989E306B8}.Debug|Any CPU.Build.0 = VT5|Win32
|
{4D941003-020F-47FD-9FA2-FFC989E306B8}.Debug|Any CPU.Build.0 = VT5Debug|Win32
|
||||||
{4D941003-020F-47FD-9FA2-FFC989E306B8}.Debug|x64.ActiveCfg = VT5|x64
|
{4D941003-020F-47FD-9FA2-FFC989E306B8}.Debug|x64.ActiveCfg = VT5Debug|Win32
|
||||||
{4D941003-020F-47FD-9FA2-FFC989E306B8}.Debug|x64.Build.0 = VT5|x64
|
{4D941003-020F-47FD-9FA2-FFC989E306B8}.Debug|x64.Build.0 = VT5Debug|Win32
|
||||||
{4D941003-020F-47FD-9FA2-FFC989E306B8}.Debug|x86.ActiveCfg = VT35|Win32
|
{4D941003-020F-47FD-9FA2-FFC989E306B8}.Debug|x86.ActiveCfg = VT5Debug|Win32
|
||||||
{4D941003-020F-47FD-9FA2-FFC989E306B8}.Debug|x86.Build.0 = VT35|Win32
|
{4D941003-020F-47FD-9FA2-FFC989E306B8}.Debug|x86.Build.0 = VT5Debug|Win32
|
||||||
{4D941003-020F-47FD-9FA2-FFC989E306B8}.Release|Any CPU.ActiveCfg = VT5|Win32
|
{4D941003-020F-47FD-9FA2-FFC989E306B8}.Release|Any CPU.ActiveCfg = VT5Release|Win32
|
||||||
{4D941003-020F-47FD-9FA2-FFC989E306B8}.Release|Any CPU.Build.0 = VT5|Win32
|
{4D941003-020F-47FD-9FA2-FFC989E306B8}.Release|Any CPU.Build.0 = VT5Release|Win32
|
||||||
{4D941003-020F-47FD-9FA2-FFC989E306B8}.Release|x64.ActiveCfg = VT5|x64
|
{4D941003-020F-47FD-9FA2-FFC989E306B8}.Release|x64.ActiveCfg = VT5Debug|Win32
|
||||||
{4D941003-020F-47FD-9FA2-FFC989E306B8}.Release|x64.Build.0 = VT5|x64
|
{4D941003-020F-47FD-9FA2-FFC989E306B8}.Release|x64.Build.0 = VT5Debug|Win32
|
||||||
{4D941003-020F-47FD-9FA2-FFC989E306B8}.Release|x86.ActiveCfg = VT5|Win32
|
{4D941003-020F-47FD-9FA2-FFC989E306B8}.Release|x86.ActiveCfg = VT5Debug|Win32
|
||||||
{4D941003-020F-47FD-9FA2-FFC989E306B8}.Release|x86.Build.0 = VT5|Win32
|
{4D941003-020F-47FD-9FA2-FFC989E306B8}.Release|x86.Build.0 = VT5Debug|Win32
|
||||||
{6D751BF5-87D6-4123-94B3-34721938CF04}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{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|x64.ActiveCfg = Debug|Any CPU
|
||||||
{6D751BF5-87D6-4123-94B3-34721938CF04}.Debug|x86.ActiveCfg = Debug|Any CPU
|
{6D751BF5-87D6-4123-94B3-34721938CF04}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||||
|
|
|
@ -1,30 +1,14 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
<ProjectConfiguration Include="VT35|Win32">
|
<ProjectConfiguration Include="VT5Debug|Win32">
|
||||||
<Configuration>VT35</Configuration>
|
<Configuration>VT5Debug</Configuration>
|
||||||
<Platform>Win32</Platform>
|
<Platform>Win32</Platform>
|
||||||
</ProjectConfiguration>
|
</ProjectConfiguration>
|
||||||
<ProjectConfiguration Include="VT35|x64">
|
<ProjectConfiguration Include="VT5Release|Win32">
|
||||||
<Configuration>VT35</Configuration>
|
<Configuration>VT5Release</Configuration>
|
||||||
<Platform>x64</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="VT4|Win32">
|
|
||||||
<Configuration>VT4</Configuration>
|
|
||||||
<Platform>Win32</Platform>
|
<Platform>Win32</Platform>
|
||||||
</ProjectConfiguration>
|
</ProjectConfiguration>
|
||||||
<ProjectConfiguration Include="VT4|x64">
|
|
||||||
<Configuration>VT4</Configuration>
|
|
||||||
<Platform>x64</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="VT5|Win32">
|
|
||||||
<Configuration>VT5</Configuration>
|
|
||||||
<Platform>Win32</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="VT5|x64">
|
|
||||||
<Configuration>VT5</Configuration>
|
|
||||||
<Platform>x64</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<PropertyGroup Label="Globals">
|
<PropertyGroup Label="Globals">
|
||||||
<VCProjectVersion>16.0</VCProjectVersion>
|
<VCProjectVersion>16.0</VCProjectVersion>
|
||||||
|
@ -33,29 +17,19 @@
|
||||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='VT35|Win32'">
|
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='VT5Debug|Win32'">
|
||||||
<PlatformToolset>v142</PlatformToolset>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='VT35|x64'">
|
|
||||||
<PlatformToolset>v142</PlatformToolset>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='VT5|Win32'">
|
|
||||||
<PlatformToolset>v142</PlatformToolset>
|
<PlatformToolset>v142</PlatformToolset>
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
<UseOfMfc>Dynamic</UseOfMfc>
|
<UseOfMfc>Dynamic</UseOfMfc>
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='VT4|Win32'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='VT5Release|Win32'" Label="Configuration">
|
||||||
<PlatformToolset>v142</PlatformToolset>
|
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
<UseOfMfc>Dynamic</UseOfMfc>
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
|
<PlatformToolset>v142</PlatformToolset>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
</PropertyGroup>
|
<UseOfMfc>Dynamic</UseOfMfc>
|
||||||
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='VT5|x64'">
|
|
||||||
<PlatformToolset>v142</PlatformToolset>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='VT4|x64'" Label="Configuration">
|
|
||||||
<PlatformToolset>v142</PlatformToolset>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
<ImportGroup Label="ExtensionSettings">
|
<ImportGroup Label="ExtensionSettings">
|
||||||
|
@ -63,33 +37,28 @@
|
||||||
<ImportGroup Label="Shared">
|
<ImportGroup Label="Shared">
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<PropertyGroup Label="UserMacros" />
|
<PropertyGroup Label="UserMacros" />
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='VT5|Win32'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='VT5Debug|Win32'">
|
||||||
<OutDir>E:\Virtools\Virtools Dev 5.0\InterfacePlugins\</OutDir>
|
<OutDir>E:\Virtools\Virtools Dev 5.0\InterfacePlugins\</OutDir>
|
||||||
<LinkIncremental>true</LinkIncremental>
|
<LinkIncremental>true</LinkIncremental>
|
||||||
<IntDir>Temp\$(Configuration)\</IntDir>
|
<IntDir>Temp\$(Configuration)\</IntDir>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='VT4|Win32'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='VT5Release|Win32'">
|
||||||
<OutDir>E:\Virtools\Virtools Dev 4.0\InterfacePlugins\</OutDir>
|
<OutDir>E:\Virtools\Virtools Dev 5.0\InterfacePlugins\</OutDir>
|
||||||
<LinkIncremental>true</LinkIncremental>
|
|
||||||
<IntDir>Temp\$(Configuration)\</IntDir>
|
<IntDir>Temp\$(Configuration)\</IntDir>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='VT5|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='VT5Debug|Win32'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='VT4|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='VT5Debug|Win32'">
|
||||||
<ClCompile>
|
|
||||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
|
||||||
</ClCompile>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='VT5|Win32'">
|
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<AdditionalIncludeDirectories>D:\CppLib\SQLite\sqlite-amalgamation-3310100;E:\Virtools\Virtools Dev 5.0\Sdk\Includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>D:\CppLib\SQLite\sqlite-amalgamation-3310100;E:\Virtools\Virtools Dev 5.0\Sdk\Includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<PreprocessorDefinitions>WIN32;_WINDOWS;_USRDLL;VIRTOOLS_5;VX_MEM_RELEASE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;_WINDOWS;_USRDLL;VIRTOOLS_5;VX_MEM_RELEASE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<OutputFile>E:\Virtools\Virtools Dev 5.0\InterfacePlugins\$(ProjectName).dll</OutputFile>
|
<OutputFile>E:\Virtools\Virtools Dev 5.0\InterfacePlugins\$(ProjectName).dll</OutputFile>
|
||||||
|
@ -103,47 +72,31 @@
|
||||||
<ModuleDefinitionFile>SuperScriptMaterializer.def</ModuleDefinitionFile>
|
<ModuleDefinitionFile>SuperScriptMaterializer.def</ModuleDefinitionFile>
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='VT4|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='VT5Release|Win32'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<AdditionalIncludeDirectories>D:\CppLib\SQLite\sqlite-amalgamation-3310100;E:\Virtools\Virtools Dev 4.0\Sdk\Includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<PreprocessorDefinitions>WIN32;_WINDOWS;_USRDLL;VIRTOOLS_4;VX_MEM_RELEASE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<FunctionLevelLinking>
|
||||||
|
</FunctionLevelLinking>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<SDLCheck>
|
||||||
|
</SDLCheck>
|
||||||
|
<ConformanceMode>false</ConformanceMode>
|
||||||
|
<LanguageStandard>Default</LanguageStandard>
|
||||||
|
<AdditionalIncludeDirectories>D:\CppLib\SQLite\sqlite-amalgamation-3310100;E:\Virtools\Virtools Dev 5.0\Sdk\Includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<PreprocessorDefinitions>WIN32;_WINDOWS;_USRDLL;VIRTOOLS_5;VX_MEM_RELEASE;_RELEASE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<OutputFile>E:\Virtools\Virtools Dev 4.0\InterfacePlugins\$(ProjectName).dll</OutputFile>
|
|
||||||
</Link>
|
|
||||||
<Link>
|
|
||||||
<AdditionalLibraryDirectories>D:\CppLib\SQLite\sqlite-dll-win32-x86-3310100;E:\Virtools\Virtools Dev 4.0\Sdk\Lib\Win32\Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
|
||||||
<AdditionalDependencies>vxmath.lib;DllEditor.lib;ck2.lib;InterfaceControls.lib;CKControls.lib;sqlite3.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
||||||
<ProgramDatabaseFile>E:\Virtools\Virtools Dev 4.0\InterfacePlugins\$(ProjectName).pdb</ProgramDatabaseFile>
|
|
||||||
<SubSystem>Windows</SubSystem>
|
<SubSystem>Windows</SubSystem>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
<ModuleDefinitionFile>SuperScriptMaterializer.def</ModuleDefinitionFile>
|
<ModuleDefinitionFile>SuperScriptMaterializer.def</ModuleDefinitionFile>
|
||||||
</Link>
|
<OutputFile>E:\Virtools\Virtools Dev 5.0\InterfacePlugins\$(ProjectName).dll</OutputFile>
|
||||||
</ItemDefinitionGroup>
|
<AdditionalLibraryDirectories>D:\CppLib\SQLite\sqlite-dll-win32-x86-3310100;E:\Virtools\Virtools Dev 5.0\Sdk\Lib\Win32\Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='VT5|x64'">
|
<AdditionalDependencies>vxmath.lib;DllEditor.lib;ck2.lib;InterfaceControls.lib;CKControls.lib;sqlite3.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<Link>
|
<ProgramDatabaseFile>E:\Virtools\Virtools Dev 5.0\InterfacePlugins\$(ProjectName).pdb</ProgramDatabaseFile>
|
||||||
<ModuleDefinitionFile>SuperScriptMaterializer.def</ModuleDefinitionFile>
|
|
||||||
</Link>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='VT4|x64'">
|
|
||||||
<Link>
|
|
||||||
<ModuleDefinitionFile>SuperScriptMaterializer.def</ModuleDefinitionFile>
|
|
||||||
</Link>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='VT35|Win32'">
|
|
||||||
<Link>
|
|
||||||
<ModuleDefinitionFile>SuperScriptMaterializer.def</ModuleDefinitionFile>
|
|
||||||
</Link>
|
|
||||||
<ClCompile>
|
|
||||||
<PreprocessorDefinitions>VIRTOOLS_35;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
</ClCompile>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='VT35|x64'">
|
|
||||||
<Link>
|
|
||||||
<ModuleDefinitionFile>SuperScriptMaterializer.def</ModuleDefinitionFile>
|
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -48,6 +48,9 @@ void UpdateMenu() {
|
||||||
s_Plugininterface->AddPluginMenuItem(s_MainMenu, 0, "Export all scripts");
|
s_Plugininterface->AddPluginMenuItem(s_MainMenu, 0, "Export all scripts");
|
||||||
s_Plugininterface->AddPluginMenuItem(s_MainMenu, 1, "Export environment");
|
s_Plugininterface->AddPluginMenuItem(s_MainMenu, 1, "Export environment");
|
||||||
|
|
||||||
|
s_Plugininterface->AddPluginMenuItem(s_MainMenu, -1, NULL, TRUE);
|
||||||
|
s_Plugininterface->AddPluginMenuItem(s_MainMenu, 2, "Report bug");
|
||||||
|
s_Plugininterface->AddPluginMenuItem(s_MainMenu, 3, "Plugin homepage");
|
||||||
//===========================freeze chirs241097 code for future expand
|
//===========================freeze chirs241097 code for future expand
|
||||||
//s_Plugininterface->AddPluginMenuItem(s_MainMenu, -1, NULL, TRUE);
|
//s_Plugininterface->AddPluginMenuItem(s_MainMenu, -1, NULL, TRUE);
|
||||||
|
|
||||||
|
@ -68,31 +71,24 @@ void PluginMenuCallback(int commandID) {
|
||||||
AFX_MANAGE_STATE(AfxGetStaticModuleState());
|
AFX_MANAGE_STATE(AfxGetStaticModuleState());
|
||||||
CKContext* ctx = s_Plugininterface->GetCKContext();
|
CKContext* ctx = s_Plugininterface->GetCKContext();
|
||||||
|
|
||||||
OPENFILENAME ofn;
|
//switch mode
|
||||||
char* file = (char*)malloc(1024 * sizeof(char));
|
#if defined(_RELEASE)
|
||||||
ZeroMemory(&ofn, sizeof(OPENFILENAME));
|
try {
|
||||||
ofn.lStructSize = sizeof(OPENFILENAME);
|
#endif
|
||||||
ofn.lpstrFile = file;
|
|
||||||
ofn.lpstrFile[0] = '\0';
|
|
||||||
ofn.nMaxFile = 1024;
|
|
||||||
ofn.lpstrFilter = "Database file(*.db)\0*.db\0";
|
|
||||||
ofn.lpstrDefExt = "db";
|
|
||||||
ofn.lpstrFileTitle = NULL;
|
|
||||||
ofn.nMaxFileTitle = 0;
|
|
||||||
ofn.lpstrInitialDir = NULL;
|
|
||||||
ofn.Flags = OFN_EXPLORER;
|
|
||||||
if (GetSaveFileName(&ofn)) {
|
|
||||||
//make sure file is not exist
|
|
||||||
DeleteFile(file);
|
|
||||||
|
|
||||||
//switch mode
|
|
||||||
switch (commandID) {
|
switch (commandID) {
|
||||||
case 0:
|
case 0:
|
||||||
{
|
{
|
||||||
|
//init file
|
||||||
|
std::string file;
|
||||||
|
OpenFileDialog(&file);
|
||||||
|
if (file.empty())
|
||||||
|
break;
|
||||||
|
DeleteFile(file.c_str());
|
||||||
|
|
||||||
//init resources
|
//init resources
|
||||||
scriptDatabase* _db = new scriptDatabase();
|
scriptDatabase* _db = new scriptDatabase();
|
||||||
dbScriptDataStructHelper* _helper = new dbScriptDataStructHelper();
|
dbScriptDataStructHelper* _helper = new dbScriptDataStructHelper();
|
||||||
_db->open(file);
|
_db->open(file.c_str());
|
||||||
_helper->init(ctx->GetParameterManager());
|
_helper->init(ctx->GetParameterManager());
|
||||||
|
|
||||||
//iterate item
|
//iterate item
|
||||||
|
@ -103,14 +99,23 @@ void PluginMenuCallback(int commandID) {
|
||||||
_db->close();
|
_db->close();
|
||||||
delete _helper;
|
delete _helper;
|
||||||
delete _db;
|
delete _db;
|
||||||
|
|
||||||
|
ctx->OutputToConsole("[Super Script Materializer] Done");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
{
|
{
|
||||||
|
//init file
|
||||||
|
std::string file;
|
||||||
|
OpenFileDialog(&file);
|
||||||
|
if (file.empty())
|
||||||
|
break;
|
||||||
|
DeleteFile(file.c_str());
|
||||||
|
|
||||||
//init
|
//init
|
||||||
envDatabase* _db = new envDatabase();
|
envDatabase* _db = new envDatabase();
|
||||||
dbEnvDataStructHelper* _helper = new dbEnvDataStructHelper();
|
dbEnvDataStructHelper* _helper = new dbEnvDataStructHelper();
|
||||||
_db->open(file);
|
_db->open(file.c_str());
|
||||||
_helper->init();
|
_helper->init();
|
||||||
|
|
||||||
//iterate parameter operation/param
|
//iterate parameter operation/param
|
||||||
|
@ -126,10 +131,49 @@ void PluginMenuCallback(int commandID) {
|
||||||
_db->close();
|
_db->close();
|
||||||
delete _helper;
|
delete _helper;
|
||||||
delete _db;
|
delete _db;
|
||||||
|
|
||||||
|
ctx->OutputToConsole("[Super Script Materializer] Done");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case 2:
|
||||||
|
ShellExecute(NULL, "open", "https://github.com/yyc12345/SuperScriptMaterializer/issues", NULL, NULL, SW_SHOWNORMAL);
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
ShellExecute(NULL, "open", "https://github.com/yyc12345/SuperScriptMaterializer", NULL, NULL, SW_SHOWNORMAL);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
ctx->OutputToConsole("[Super Script Materializer] Done");
|
#if defined(_RELEASE)
|
||||||
|
} catch (const std::exception & e) {
|
||||||
|
std::string errstr;
|
||||||
|
errstr = "An error occurs, application will exit. Please report to developer with this window and reproduce step.\nError message: ";
|
||||||
|
errstr += e.what();
|
||||||
|
AfxMessageBox(errstr.c_str(), MB_OK | MB_ICONSTOP);
|
||||||
|
exit(1);
|
||||||
}
|
}
|
||||||
free(file);
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
BOOL OpenFileDialog(std::string* returned_file) {
|
||||||
|
returned_file->clear();
|
||||||
|
|
||||||
|
char* file = (char*)malloc(1024 * sizeof(char));
|
||||||
|
BOOL status;
|
||||||
|
OPENFILENAME OpenFileStruct;
|
||||||
|
ZeroMemory(&OpenFileStruct, sizeof(OPENFILENAME));
|
||||||
|
OpenFileStruct.lStructSize = sizeof(OPENFILENAME);
|
||||||
|
OpenFileStruct.lpstrFile = file;
|
||||||
|
OpenFileStruct.lpstrFile[0] = '\0';
|
||||||
|
OpenFileStruct.nMaxFile = 1024;
|
||||||
|
OpenFileStruct.lpstrFilter = "Database file(*.db)\0*.db\0";
|
||||||
|
OpenFileStruct.lpstrDefExt = "db";
|
||||||
|
OpenFileStruct.lpstrFileTitle = NULL;
|
||||||
|
OpenFileStruct.nMaxFileTitle = 0;
|
||||||
|
OpenFileStruct.lpstrInitialDir = NULL;
|
||||||
|
OpenFileStruct.Flags = OFN_EXPLORER;
|
||||||
|
if (status = GetSaveFileName(&OpenFileStruct))
|
||||||
|
*returned_file = file;
|
||||||
|
|
||||||
|
free(file);
|
||||||
|
return status;
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,4 +11,6 @@ void RemoveMenu();
|
||||||
void UpdateMenu();
|
void UpdateMenu();
|
||||||
void PluginMenuCallback(int commandID);
|
void PluginMenuCallback(int commandID);
|
||||||
|
|
||||||
|
BOOL OpenFileDialog(std::string* returned_file);
|
||||||
|
|
||||||
#endif
|
#endif
|
Loading…
Reference in New Issue
Block a user