From 915003be08bd73fbd9ae3de0be5af855fac43487 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Sat, 18 Aug 2018 17:05:49 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E8=84=9A=E6=9C=AC=E5=BC=95?= =?UTF-8?q?=E6=93=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cpp/scriptengine.cc | 6 +++++- cpp/scriptengine.h | 2 +- cpp/utils.cc | 1 - 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/cpp/scriptengine.cc b/cpp/scriptengine.cc index a28d01d..66ed879 100644 --- a/cpp/scriptengine.cc +++ b/cpp/scriptengine.cc @@ -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(); diff --git a/cpp/scriptengine.h b/cpp/scriptengine.h index 2f4d427..3de6402 100644 --- a/cpp/scriptengine.h +++ b/cpp/scriptengine.h @@ -24,7 +24,7 @@ class ScriptEngine : public a8::Singleton const char* func_name, std::initializer_list args); - private: + public: a8::PyEngine *engine_ = nullptr; }; diff --git a/cpp/utils.cc b/cpp/utils.cc index b9568d5..c7750cc 100644 --- a/cpp/utils.cc +++ b/cpp/utils.cc @@ -7,7 +7,6 @@ #include "framework/cpp/utils.h" - bool ReadCsvMetaFile(const std::string& filename, google::protobuf::Message* prototype, std::function push_back_func)