1 | #!/usr/bin/env python |
---|
2 | ################################################################################ |
---|
3 | # |
---|
4 | # qooxdoo - the new era of web development |
---|
5 | # |
---|
6 | # http://qooxdoo.org |
---|
7 | # |
---|
8 | # Copyright: |
---|
9 | # 2008 1&1 Internet AG, Germany, http://www.1und1.de |
---|
10 | # |
---|
11 | # License: |
---|
12 | # LGPL: http://www.gnu.org/licenses/lgpl.html |
---|
13 | # EPL: http://www.eclipse.org/org/documents/epl-v10.php |
---|
14 | # See the LICENSE file in the project's top-level directory for details. |
---|
15 | # |
---|
16 | # Authors: |
---|
17 | # * Thomas Herchenroeder (thron7) |
---|
18 | # |
---|
19 | ################################################################################ |
---|
20 | |
---|
21 | ## |
---|
22 | # This is a stub proxy for the real generator.py |
---|
23 | ## |
---|
24 | |
---|
25 | import sys, os, subprocess |
---|
26 | |
---|
27 | CMD_PYTHON = 'python' |
---|
28 | QOOXDOO_PATH = '../qooxdoo-0.8-sdk' |
---|
29 | REAL_GENERATOR = os.path.normpath( |
---|
30 | os.path.join(os.path.abspath(os.path.dirname(sys.argv[0])), |
---|
31 | QOOXDOO_PATH, 'tool', 'bin', 'generator.py')) |
---|
32 | |
---|
33 | os.chdir(os.path.dirname(sys.argv[0])) # switch to skeleton dir |
---|
34 | |
---|
35 | argList = [] |
---|
36 | argList.append(CMD_PYTHON) |
---|
37 | argList.append(REAL_GENERATOR) |
---|
38 | argList.extend(sys.argv[1:]) |
---|
39 | if sys.platform == "win32": |
---|
40 | argList1=[] |
---|
41 | for arg in argList: |
---|
42 | if arg.find(' ')>-1: |
---|
43 | argList1.append('"%s"' % arg) |
---|
44 | else: |
---|
45 | argList1.append(arg) |
---|
46 | argList = argList1 |
---|
47 | else: |
---|
48 | argList = ['"%s"' % x for x in argList] # quote argv elements |
---|
49 | cmd = " ".join(argList) |
---|
50 | subprocess.call(cmd, shell=True) |
---|