+ return WinMain(::GetModuleHandle(NULL), NULL, ::GetCommandLine(), SW_SHOWNORMAL);
+}
+
+#else
+//==========================================================================
+// OTHER ( Linux... )
+//==========================================================================
+
+IMPLEMENT_APP_NO_MAIN(wxBBIApp);
+
+
+int main(int argc, char* argv[])
+{
+ wxMessageOutput::Set( new wxMessageOutputBest );
+
+ wxCmdLineParser parser(cmdLineDesc,argc,argv);
+ int val = parser.Parse(false);
+ if (val>0)
+ {
+ parser.Usage();
+ return 0;
+ }
+ ProcessCmdLine cmdline;
+ cmdline.Process(parser);
+
+ if (!cmdline.proceed) return 0;
+
+ if (cmdline.no_console)
+ {
+ // std::cout << "main NC"<<std::endl;
+ // Interpreter
+ bbtk::Interpreter::Pointer I = bbtk::Interpreter::New();
+ I->SetInputs(cmdline.param_map);
+ bool help_on_script = cmdline.help && (cmdline.input_file.size() > 0);
+ if (help_on_script) I->SetNoExecMode(true);
+ if (cmdline.text_dialog) I->SetDialogMode(bbtk::VirtualExec::TextDialog);
+ std::vector<std::string>::const_iterator i;
+ bool error = false;
+ for (i=cmdline.input_file.begin();
+ i!=cmdline.input_file.end(); ++i)
+ {
+ 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();
+
+ //
+ }
+ else
+ {
+ wxEntry(argc, argv);
+ }
+