annotate python/build.py @ 135:01d88140dc03

Improve hexedit
author Windel Bouwman
date Mon, 21 Jan 2013 21:12:36 +0100
parents af0d7913677a
children
rev   line source
101
af0d7913677a Fixes and splitting into 3 stage
windel
parents: 95
diff changeset
1 #!/usr/bin/python
af0d7913677a Fixes and splitting into 3 stage
windel
parents: 95
diff changeset
2
68
654c5ac4f2c5 Refactor of menus
windel
parents: 65
diff changeset
3 import sys, os, argparse
65
361f7d13adea Fixes after movage
windel
parents: 64
diff changeset
4
15
de004f808e56 Fixup in multidocument area stuff
windel
parents:
diff changeset
5 # Compiler imports:
65
361f7d13adea Fixes after movage
windel
parents: 64
diff changeset
6 from compiler import Compiler
15
de004f808e56 Fixup in multidocument area stuff
windel
parents:
diff changeset
7 from project import Project
de004f808e56 Fixup in multidocument area stuff
windel
parents:
diff changeset
8
de004f808e56 Fixup in multidocument area stuff
windel
parents:
diff changeset
9 if __name__ == '__main__':
68
654c5ac4f2c5 Refactor of menus
windel
parents: 65
diff changeset
10 parser = argparse.ArgumentParser(description='Build tool to build projects')
654c5ac4f2c5 Refactor of menus
windel
parents: 65
diff changeset
11 parser.add_argument('project', type=str, help='the project to be build')
654c5ac4f2c5 Refactor of menus
windel
parents: 65
diff changeset
12 args = parser.parse_args()
654c5ac4f2c5 Refactor of menus
windel
parents: 65
diff changeset
13
654c5ac4f2c5 Refactor of menus
windel
parents: 65
diff changeset
14 try:
654c5ac4f2c5 Refactor of menus
windel
parents: 65
diff changeset
15 project = Project(args.project)
654c5ac4f2c5 Refactor of menus
windel
parents: 65
diff changeset
16 except IOError:
654c5ac4f2c5 Refactor of menus
windel
parents: 65
diff changeset
17 print('Failed to load {0}'.format(args.project))
654c5ac4f2c5 Refactor of menus
windel
parents: 65
diff changeset
18 sys.exit(3)
15
de004f808e56 Fixup in multidocument area stuff
windel
parents:
diff changeset
19 pc = Compiler()
de004f808e56 Fixup in multidocument area stuff
windel
parents:
diff changeset
20 pc.compileProject(project)
de004f808e56 Fixup in multidocument area stuff
windel
parents:
diff changeset
21