source: generate.py @ 89:c19183cdd9f2

Last change on this file since 89:c19183cdd9f2 was 72:5c5d51f30cb2, checked in by fnevgeny, 16 years ago

Qooxdoo-0.8 migration.

  • Property exe set to *
File size: 1.4 KB
Line 
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
25import sys, os, subprocess
26
27CMD_PYTHON = 'python'
28QOOXDOO_PATH = '../qooxdoo-0.8-sdk'
29REAL_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                                 
33os.chdir(os.path.dirname(sys.argv[0]))  # switch to skeleton dir
34
35argList = []
36argList.append(CMD_PYTHON)
37argList.append(REAL_GENERATOR)
38argList.extend(sys.argv[1:])
39if 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
47else:
48    argList = ['"%s"' % x for x in argList]  # quote argv elements
49cmd = " ".join(argList)
50subprocess.call(cmd, shell=True)
Note: See TracBrowser for help on using the repository browser.
<