完善脚本引擎

This commit is contained in:
aozhiwei 2018-08-18 17:05:49 +08:00
parent 58ef5f9e7d
commit 915003be08
3 changed files with 6 additions and 3 deletions

View File

@ -7,7 +7,11 @@
void ScriptEngine::Init()
{
engine_ = new a8::PyEngine();
engine_->work_path = "pyscript/";
if (getenv("machine_type")) {
engine_->work_path = "/data/conf_test/game1008/res/pyscripts/";
} else {
engine_->work_path = "../res/pyscripts/";
}
engine_->Init();
if (!engine_->IsInitialized()) {
abort();

View File

@ -24,7 +24,7 @@ class ScriptEngine : public a8::Singleton<ScriptEngine>
const char* func_name,
std::initializer_list<a8::XValue> args);
private:
public:
a8::PyEngine *engine_ = nullptr;
};

View File

@ -7,7 +7,6 @@
#include "framework/cpp/utils.h"
bool ReadCsvMetaFile(const std::string& filename,
google::protobuf::Message* prototype,
std::function<void (google::protobuf::Message*)> push_back_func)