diff options
| author | aozima <[email protected]> | 2013-06-16 23:18:16 +0800 |
|---|---|---|
| committer | aozima <[email protected]> | 2013-06-16 23:18:16 +0800 |
| commit | fd289ff34f7006e8d9932e83e6eef2afdc601f5f (patch) | |
| tree | 15b1d49884c0f93f38952e3ff45388d695b581c3 /tools/codeblocks.py | |
| parent | 7eb4120a8577ac28fc8fedfec9d1eb1976c60db6 (diff) | |
add a default codeblocks template.
Diffstat (limited to 'tools/codeblocks.py')
| -rw-r--r-- | tools/codeblocks.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/codeblocks.py b/tools/codeblocks.py index 9a25114e97..78f9629cbb 100644 --- a/tools/codeblocks.py +++ b/tools/codeblocks.py @@ -38,8 +38,12 @@ def CB_AddCFiles(ProjectFiles, parent, gname, files, project_path): def CBProject(target, script, program): project_path = os.path.dirname(os.path.abspath(target)) + + if os.path.isfile('template.cbp'): + tree = etree.parse('template.cbp') + else: + tree = etree.parse(os.path.join(os.path.dirname(__file__), 'template.cbp')) - tree = etree.parse('template.cbp') root = tree.getroot() out = file(target, 'wb') |
