From 87efce51877a540d943b1aa26307994b38bba55b Mon Sep 17 00:00:00 2001 From: Eduardo DAVILA Date: Wed, 5 Aug 2015 14:40:02 +0200 Subject: [PATCH] #2536 BBTK Feature New Normal wt-version Package --- kernel/appli/bbi/CMakeLists.txt | 12 ++++++ kernel/appli/bbi/bbi.cxx | 8 ++-- kernel/src/bbtkConfigurationFile.cxx | 10 ++++- kernel/src/bbtkExecuter.cxx | 1 + kernel/src/bbtkInterpreterVirtual.cxx | 3 +- kernel/src/bbtkPackage.cxx | 2 + kernel/src/bbtkUtilities.cxx | 34 +++++++++++------ kernel/src/bbtkUtilities.h | 3 +- kernel/src/bbtkWtBlackBox.cxx | 55 +++++++++++++++++---------- kernel/src/bbtkWtBlackBox.h | 3 ++ 10 files changed, 92 insertions(+), 39 deletions(-) diff --git a/kernel/appli/bbi/CMakeLists.txt b/kernel/appli/bbi/CMakeLists.txt index 71b16c1..bfe73d5 100644 --- a/kernel/appli/bbi/CMakeLists.txt +++ b/kernel/appli/bbi/CMakeLists.txt @@ -45,3 +45,15 @@ ENDIF(BBTK_USE_WXWIDGETS AND WIN32) TARGET_LINK_LIBRARIES(bbi bbtk) INSTALL_TARGETS(/bin/ bbi) + +SET(SOURCES + bbiWeb + ) + +ADD_EXECUTABLE(bbiWeb.wt MACOSX_BUNDLE ${SOURCES}) +TARGET_LINK_LIBRARIES(bbiWeb.wt bbtk) +INSTALL_TARGETS(/bin/ bbiWeb.wt) + + + + diff --git a/kernel/appli/bbi/bbi.cxx b/kernel/appli/bbi/bbi.cxx index c7bb325..89a3daa 100644 --- a/kernel/appli/bbi/bbi.cxx +++ b/kernel/appli/bbi/bbi.cxx @@ -195,7 +195,7 @@ bool wxBBIApp::OnInit( ) //Borrame //printf ("EED bbi wxBBIApp::OnInit .....................\n"); -cmd.input_file.push_back("/home/davila/Borrame/testwt.bbs"); +//cmd.input_file.push_back("/home/davila/Borrame/testwt.bbs"); bbtk::WxGUIConsole *I = new bbtk::WxGUIConsole(0,_T("bbi"),wxSize(800,600)); @@ -206,9 +206,9 @@ cmd.input_file.push_back("/home/davila/Borrame/testwt.bbs"); I->SetInputs(cmd.param_map); bool help_on_script = cmd.help && (cmd.input_file.size() > 0); - if (help_on_script) I->SetNoExecMode(true); - if (cmd.graphical_dialog) I->SetDialogMode(bbtk::VirtualExec::GraphicalDialog); - if (cmd.text_dialog) I->SetDialogMode(bbtk::VirtualExec::TextDialog); + if (help_on_script) I->SetNoExecMode(true); + if (cmd.graphical_dialog) I->SetDialogMode(bbtk::VirtualExec::GraphicalDialog); + if (cmd.text_dialog) I->SetDialogMode(bbtk::VirtualExec::TextDialog); std::vector::const_iterator i; bool error = false; diff --git a/kernel/src/bbtkConfigurationFile.cxx b/kernel/src/bbtkConfigurationFile.cxx index c79747c..7706084 100644 --- a/kernel/src/bbtkConfigurationFile.cxx +++ b/kernel/src/bbtkConfigurationFile.cxx @@ -64,6 +64,7 @@ namespace bbtk // ==> Set system paths mBin_path = Utilities::GetExecutablePath(); + /* EED 23 Mars 2009 #ifdef MACOSX mInstall_path = mBin_path + "/../../../.."; @@ -81,6 +82,7 @@ namespace bbtk } #endif + ///\TODO : better use ?? mInstall_path = mBin_path + "/.."; @@ -230,6 +232,7 @@ namespace bbtk if (!Utilities::FileExists(mDot_bbtk_path)) mDot_bbtk_is_new = true; Utilities::CreateDirectoryIfNeeded(mDot_bbtk_path); + mDoc_path = Utilities::MakeUserSettingsFullFileName("doc"); Utilities::CreateDirectoryIfNeeded(mDoc_path); @@ -293,6 +296,7 @@ namespace bbtk mTemp_path = Utilities::MakeUserSettingsFullFileName("tmp"); Utilities::CreateDirectoryIfNeeded(mTemp_path); + } //========================================================================= @@ -346,9 +350,13 @@ namespace bbtk strcpy(bbtk_path, Utilities::GetExecutablePath().c_str()); // JPR //strcpy(bbtk_path, "/usr/local/bin"); + + std::string str_home=Utilities::GetEnvHome(); + + // rootDirectory char rootDirectory[200]; - sprintf( rootDirectory, "%s/.bbtk", getenv("HOME")); + sprintf( rootDirectory, "%s/.bbtk", str_home.c_str()); // configPath char configPath[200]; diff --git a/kernel/src/bbtkExecuter.cxx b/kernel/src/bbtkExecuter.cxx index d20ed65..bf51fe5 100644 --- a/kernel/src/bbtkExecuter.cxx +++ b/kernel/src/bbtkExecuter.cxx @@ -132,6 +132,7 @@ namespace bbtk #if(USE_WXWIDGETS) Wx::ProcessPendingEvents(); #endif + // Create user package Package::Pointer p = diff --git a/kernel/src/bbtkInterpreterVirtual.cxx b/kernel/src/bbtkInterpreterVirtual.cxx index 2498e90..d3538e1 100644 --- a/kernel/src/bbtkInterpreterVirtual.cxx +++ b/kernel/src/bbtkInterpreterVirtual.cxx @@ -77,6 +77,7 @@ namespace bbtk //======================================================================= void InterpreterVirtual::Init() { +printf("EED InterpreterVirtual::Init start\n"); mUser = 0; mCommandLine = false; mThrow = false; @@ -345,7 +346,7 @@ namespace bbtk mCommandDict[info.keyword] = info; */ - +printf("EED InterpreterVirtual::Init end\n"); } //======================================================================= diff --git a/kernel/src/bbtkPackage.cxx b/kernel/src/bbtkPackage.cxx index 16f4ffb..7cf93fc 100644 --- a/kernel/src/bbtkPackage.cxx +++ b/kernel/src/bbtkPackage.cxx @@ -85,8 +85,10 @@ namespace bbtk mDescription(description), mVersion(version) { + bbtkDebugMessage("object",2,"==> Package('"<require("http://get.goXTK.com/xtk.js"); //this->useStyleSheet("css/demo.css"); + + + //this->require("http://get.goXTK.com/xtk.js"); + this->require( "resourcesXTK/xtk.js" ); + // this->require("http://get.goXTK.com/xtk_edge.js"); // this->require("http://get.goXTK.com/xtk_xdat.gui.js"); - this->require("xtk_xdat.gui.js"); + this->require( "resourcesXTK/xtk_xdat.gui.js" ); - //this->require("http://get.goXTK.com/xtk.js"); - this->require("xtk.js"); - this->useStyleSheet("styleWT.css"); + this->useStyleSheet("resourcesXTK/styleWT.css"); // std::cout<<"Cargado------------ "<isRunning()) { std::cout<<"Checking the existence of a Server deployed -DELETE THIS MESSAGE bbtkWTBlackBox.cxx"<stop(); } */ - std::cout<<"Deploying Server -- Definition of server parameters by default -DELETE THIS MESSAGE bbtkWTBlackBox.cxx"<