From 8b8d5c360ca8f8a2b41c8827c3b9d95f71fad472 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 24 Apr 2015 16:34:14 +0100 Subject: [PATCH] Add prototypes for includes/srcfiles --- platformio/ide/projectgenerator.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/platformio/ide/projectgenerator.py b/platformio/ide/projectgenerator.py index 3ce36a6b..7873d801 100644 --- a/platformio/ide/projectgenerator.py +++ b/platformio/ide/projectgenerator.py @@ -37,6 +37,12 @@ class ProjectGenerator(object): def get_project_name(self): return basename(self.project_dir) + def get_includes(self): + return [] + + def get_srcfiles(self): + return [] + def get_tpls(self): tpls_dir = join(util.get_source_dir(), "ide", "tpls", self.ide) return glob(join(tpls_dir, ".*.tpl")) + glob(join(tpls_dir, "*.tpl")) @@ -45,6 +51,7 @@ class ProjectGenerator(object): for tpl_path in self.get_tpls(): file_name = basename(tpl_path)[:-4] with open(join(self.project_dir, file_name), "w") as f: + print tpl_path f.write(self._render_tpl(tpl_path)) def _render_tpl(self, tpl_path): @@ -57,7 +64,9 @@ class ProjectGenerator(object): data = self.get_project_env() data.update({ - "project_name": self.get_project_name() + "project_name": self.get_project_name(), + "includes": self.get_includes(), + "srcfiles": self.get_srcfiles() }) return data