X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=kernel%2Fappli%2Fbbi%2Fbbi.cxx;fp=kernel%2Fappli%2Fbbi%2Fbbi.cxx;h=c594a081f5d939f8e5d30948b8eb1b3b3197bd5c;hb=9a55784801f7fcfebbe935be9a7b68d8fd1cd6f2;hp=ea8dd6cc5f504360e72013197270ecd90c7bc932;hpb=a9c7cf15bdbdbc2dba83a2a0b395916394fd5cbf;p=bbtk.git diff --git a/kernel/appli/bbi/bbi.cxx b/kernel/appli/bbi/bbi.cxx index ea8dd6c..c594a08 100644 --- a/kernel/appli/bbi/bbi.cxx +++ b/kernel/appli/bbi/bbi.cxx @@ -27,6 +27,8 @@ #ifdef _USE_WXWIDGETS_ +#include + //========================================================================== // WITH WX //========================================================================== @@ -111,13 +113,20 @@ void WxProcessCmdLine::Process(wxCmdLineParser& parser) bbtk::StaticInitTime::PrintObjectListInfo = true; } - debug = ( parser.Found(_T("d")) ); - quiet = ( parser.Found(_T("q")) ); - help = ( parser.Found(_T("h")) ); - graphical_dialog = ( parser.Found(_T("wxcommandlineg")) ); - text_dialog = ( parser.Found(_T("t")) ); - no_console = ( parser.Found(_T("N")) ); - + debug = ( parser.Found(_T("d")) ); + quiet = ( parser.Found(_T("q")) ); + help = ( parser.Found(_T("h")) ); + +//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0 +#if wxMAJOR_VERSION <= 2 + graphical_dialog = ( parser.Found(_T("wxcommandlineg")) ); +#else + printf("EED Warnning. WxProcessCmdLine::Process g wxcommandlineg "); + graphical_dialog = ( parser.Found(_T("g")) ); +#endif + + text_dialog = ( parser.Found(_T("t")) ); + no_console = ( parser.Found(_T("N")) ); if (quiet) bbtk::MessageManager::SetMessageLevel("max",0); if (debug) bbtk::MessageManager::SetMessageLevel("all",9); @@ -153,7 +162,7 @@ void WxProcessCmdLine::Process(wxCmdLineParser& parser) ((input_file.size() == 0) && (!no_console) && (!usage) ) ); - + } //========================================================================== @@ -323,7 +332,7 @@ int main(int argc, char* argv[]) if (!cmdline.proceed) return 0; - if (cmdline.no_console) + if (cmdline.no_console) { // std::cout << "main NC"<InterpretFile(*i); - if (error) break; - } - if (help_on_script) - { - I->SetNoExecMode(false); - std::string package; - I->GetExecuter()->GetFactory()->PrintHelpDescriptor("workspace", + { + error = ! I->InterpretFile(*i); + if (error) break; + } + if (help_on_script) + { + I->SetNoExecMode(false); + std::string package; + I->GetExecuter()->GetFactory()->PrintHelpDescriptor("workspace", package, false); - } - if (cmdline.input_file.size()==0) - I->CommandLineInterpreter(); - + } + if (cmdline.input_file.size()==0) + { + I->CommandLineInterpreter(); + } // if cmdline.input_file.size // - } - else - { + } else { wxEntry(argc, argv); - } + } // if cmdline.no_console }