int main(int argc, char* argv[])
{
- printf("bbiWeb...1 argc=%d \n",argc);
+ printf("bbiWeb...A argc=%d \n",argc);
+
//bbtk::MessageManager::SetMessageLevel("all",9);
printf("bbiWeb: [0]: %s \n",argv[0]);
printf("bbiWeb: [1]: %s \n",argv[1]);
- printf("bbiWeb...2\n");
+printf("bbiWeb: [2]: %s \n",argv[2]);
+printf("bbiWeb: [3]: %s \n",argv[3]);
+printf("bbiWeb: [4]: %s \n",argv[4]);
+ printf("bbiWeb...B\n");
bbtk::WtBlackBox::wtServerData::argc = argc;
bbtk::Interpreter::Pointer I = bbtk::Interpreter::New();
- printf("bbiWeb...3\n");
-// std::string f(argv[1]);
-// std::string f("/var/www/testwtdbg/docroot/.bbtk/tmp/testwt.bbs");
- std::string f("/var/www/testwtdbg/docroot/.bbtk/tmp/demoPresentacion1Boton02.bbs");
- printf("bbiWeb...4\n");
- I->InterpretFile(f);
- printf("bbiWeb...5\n");
+
+printf("bbiWeb...C\n");
+
+ std::string fileName = argv[0];
+ std::size_t pos = fileName.find("_");
+ fileName = fileName.substr (pos+1);
+ pos = fileName.find(".wt");
+ fileName = fileName.erase (pos);
+ fileName = "bbs/"+fileName;
+
+printf("bbiWeb fileName %s\n", fileName.c_str() );
+// std::string fileName("/var/www/testwtdbg/docroot/.bbtk/tmp/demoPresentacion1Boton02.bbs");
+
+
+
+
+ printf("bbiWeb...D\n");
+ I->InterpretFile(fileName);
+ printf("bbiWeb...E\n");
return 0;
}