Ejemplo n.º 1
0
void do_file(IoVM& vm, string file_name)
{
    std::string scriptPath(file_name);
    boost::algorithm::trim_right_if(scriptPath, IsNotDirChar());
    vm.set_script_path(scriptPath);
    std::stringstream code;
    code << "doFile(\"" << file_name << "\")";
    vm.do_string(code.str());
}
Ejemplo n.º 2
0
void do_file(IoVM& vm, string file_name)
{
    std::string scriptPath(file_name);
    boost::algorithm::trim_right_if(scriptPath, IsNotDirChar());
    //vm.add_proto("scriptPath", scriptPath, NamespacePath::global(), true);
    ScriptUtil::set_script_path(scriptPath);
    std::stringstream code;
    code << "doFile(\"" << file_name << "\")";
    vm.do_string(code.str());
}