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)
+
+
+
+
//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));
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<std::string>::const_iterator i;
bool error = false;
// ==> Set system paths
mBin_path = Utilities::GetExecutablePath();
+
/* EED 23 Mars 2009
#ifdef MACOSX
mInstall_path = mBin_path + "/../../../..";
}
#endif
+
///\TODO : better use ??
mInstall_path = mBin_path + "/..";
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);
mTemp_path = Utilities::MakeUserSettingsFullFileName("tmp");
Utilities::CreateDirectoryIfNeeded(mTemp_path);
+
}
//=========================================================================
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];
#if(USE_WXWIDGETS)
Wx::ProcessPendingEvents();
#endif
+
// Create user package
Package::Pointer p =
//=======================================================================
void InterpreterVirtual::Init()
{
+printf("EED InterpreterVirtual::Init start\n");
mUser = 0;
mCommandLine = false;
mThrow = false;
mCommandDict[info.keyword] = info;
*/
-
+printf("EED InterpreterVirtual::Init end\n");
}
//=======================================================================
mDescription(description),
mVersion(version)
{
+
bbtkDebugMessage("object",2,"==> Package('"<<name<<"',...)"
<<bbtkendl);
+
std::string default_doc_dir = ConfigurationFile::GetInstance().Get_default_temp_dir();
char c = default_doc_dir.c_str()[strlen(default_doc_dir.c_str())-1];
std::string url = default_doc_dir;
/// Returns the user settings dir, e.g. /home/username/.bbtk
std::string Utilities::GetUserSettingsDir()
{
-#if defined(__GNUC__)
- std::string str_home(getenv("HOME"));
-#elif defined(_WIN32)
- std::string str_home(getenv("USERPROFILE"));
-#endif
- std::string fullname = str_home + "/.bbtk";
+ std::string str_Home=Utilities::GetEnvHome();
+ std::string fullname = str_Home + "/.bbtk";
MakeValidFileName(fullname);
return fullname;
}
/// in user settings dir, e.g. /home/username/.bbtk/
std::string Utilities::MakeUserSettingsFullFileName(const std::string& name)
{
-#if defined(__GNUC__)
- std::string str_home(getenv("HOME"));
-#elif defined(_WIN32)
- std::string str_home(getenv("USERPROFILE"));
-#endif
+ std::string str_home=Utilities::GetEnvHome();
std::string fullname = str_home + "/.bbtk/" + name;
MakeValidFileName(fullname);
return fullname;
}
//=========================================================================
+
+std::string Utilities::GetEnvHome()
+{
+#if defined(__GNUC__)
+ std::string strHome;
+ char *envHome=getenv("HOME");
+ if (envHome!=NULL)
+ {
+ strHome=envHome;
+ } else {
+ strHome = "/var/www/testwtdbg/docroot";
+ } // if
+#elif defined(_WIN32)
+ std::string strHome( getenv("USERPROFILE") );
+#endif
+ return strHome;
+}
+
+
+
//TAD Arbol CFT
static bool loosematch(std::string stdLine,std::string stdOptions);
-
+
+ static std::string GetEnvHome();
};
//this->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------------ "<<loadedJS<<std::endl;
//std::string WtBlackBox::wtServerData::docRoot = "/usr/local/share/wtResources";
//std::string WtBlackBox::wtServerData::port = "8081";
- std::string WtBlackBox::wtServerData::docRoot = "<void>";
- std::string WtBlackBox::wtServerData::port = "<void>";
- std::string WtBlackBox::wtServerData::address = "0.0.0.0";
-
+ std::string WtBlackBox::wtServerData::docRoot = "<void>";
+ std::string WtBlackBox::wtServerData::port = "<void>";
+ std::string WtBlackBox::wtServerData::address = "0.0.0.0";
+ int WtBlackBox::wtServerData::argc = 0;
+ char **WtBlackBox::wtServerData::argv = NULL;
+
//=========================================================================
//=========================================================================
void WtBlackBox::bbUserSetDefaultValues()
{
bbtkBlackBoxDebugMessage("widget",5,"WtBlackBox::bbUserSetDefaultValues()"<<std::endl);
bbmWindow = 0;
- /* WtBlackBox::serData.docRoot = "/home/gonzalez/Documents/pruebaResources";
- WtBlackBox::serData.address = "0.0.0.0";
- WtBlackBox::serData.port = "8080";*/
-
-
}
//=========================================================================
//char *argv[7] = {"./WtTest","--docroot","/home/gonzalez/Documents/pruebaResources","--http-address","0.0.0.0","--http-port","8080"};
//int argc = 7;
-
- char *argv[7] = {"./WtTest","--docroot",(char*)WtBlackBox::wtServerData::docRoot.c_str(),"--http-address",(char*)WtBlackBox::wtServerData::address.c_str(),"--http-port",(char*)WtBlackBox::wtServerData::port.c_str()};
- int argc = 7;
-
+/*
+ char *argv[7] = {"./WtTest"
+,"--docroot",(char*)WtBlackBox::wtServerData::docRoot.c_str()
+,"--http-address",(char*)WtBlackBox::wtServerData::address.c_str()
+,"--http-port",(char*)WtBlackBox::wtServerData::port.c_str()
+};
+ int argc = 3;
std::cout<<" --- PUERTO :"<<WtBlackBox::wtServerData::port<<std::endl;
-
+*/
+
+/*
+char *argv[2] = {"./bbiWeb.wt","client"};
+int argc=2;
+*/
+
+
/* if(Wt::WServer::instance()->isRunning())
{
std::cout<<"Checking the existence of a Server deployed -DELETE THIS MESSAGE bbtkWTBlackBox.cxx"<<std::endl;
Wt::WServer::instance()->stop();
}
*/
- std::cout<<"Deploying Server -- Definition of server parameters by default -DELETE THIS MESSAGE bbtkWTBlackBox.cxx"<<std::endl;
- Wt::WRun(argc,argv,&createApplication);
- }
+ std::cout<<"EED WtBlackBox::bbCreateFrameWindow Deploying Server -- Definition of server parameters by default -DELETE THIS MESSAGE bbtkWTBlackBox.cxx"<<std::endl;
+// Wt::WRun(argc,argv,&createApplication);
+ Wt::WRun(WtBlackBox::wtServerData::argc,
+ WtBlackBox::wtServerData::argv,
+ &createApplication);
+ }
//==================================================================
static std::string docRoot ;
static std::string port ;
static std::string address ;
+
+ static int argc;
+ static char **argv;
};
/* static std::string* jScript;