Document Information

Last modified:
2008/10/21 19:17 by thron7

Generator Usage

The generator is a command-line utility which serves as the single entry point front-end for all qooxdoo tool chain functions (nearly; there are a few functions that are available through other programs, but these really serve special-case purposes).

The generator is started to execute various jobs. Those jobs represent the feature set of the tool chain. This page is about how to invoke the generator.

Files and Folder Structure

The qooxdoo SDK has a dedicated tool folder that contains all elements that make up the tool chain. The general structure is like this:

tool
   |- app   -- helper apps
   |- bin    -- stand-alone programs and scripts
   |- data  -- various data files
   |- pylib  -- Python modules

The generator is actually the program under tool/bin/generator.py.

generate.py

To make it easier to invoke the generator, each library in the SDK (framework, applications, components) contains a generate.py script that is really just a proxy for the generator itself. It is also part of each project structure created by the create-application.py wizard. The aim is to hide the actual path to the generator program.

Command-line Options

Since the generator is nearly complete driven by its config files, there are very few command-line options:

shell> generator.py -h
Usage: generator.py [options] job,...

Arguments:
  job,...               a list of jobs (like 'source' or 'copy-files',
                          without the quotes) to perform
  ?                      use '?' to get a list of all available jobs
                          from the configuration file

Options:
  -h, --help         show this help message and exit
  -c CFGFILE, --config=CFGFILE
                         path to configuration file containing job definitions
                         (default: config.json)
  -q, --quiet       quiet output mode (extra quiet)
  -v, --verbose   verbose output mode (extra verbose)
  -l FILENAME, --logfile=FILENAME
                         log file

The most important options are the path of the config file to use, and the list of jobs to execute.

Configuration Files

The singe most-important way to control the actions of the generator is through specialized config files. These files have a JSON syntax and contain the definitions for the various jobs the generator is supposed to execute. There is a whole section in this manual dedicated to these config files.

Usage Patterns

As a few quick hints at how you would invoke the generator, here are the most common use cases. All these examples name a single job to run, and rely on the availability of the default config file config.json in the current directory:

  • generate.py source – when you just started to create your application and every time you have added new classes to it.
  • generate.py build – when you have completed your application and/or want to create an optimized, deployable version of it.
  • generate.py api – when your application is getting complex and/or you want to have a local version of the standard Apiviewer application that includes the documentation of all of your application classes.
  • generate.py test – when you have created unit test classes for your application and want to run them in the Testrunner frame application.

The Hello World tutorial will give the complete steps how to start a project and get going.

Information

Last modified:
2008/10/21 19:17 by thron7

Account

Not logged in

 
 

Job Offers

To further improve qooxdoo we are seeking javascript developers. Read more...

Rich Ajax Platform (RAP)

RAP uses qooxdoo, Java and the Eclipse development model to build rich web applications. Read more...

qooxdoo Web Toolkit (QWT)

Similar to GWT this framework allows to create impressive qooxdoo applications just using Java. Read more...

Pustefix

Pustefix is a MVC-based web application framework using Java and XML/XSLT. Read more...

 
SourceForge.net Logo

Bad Behavior has blocked 0 potential spam attempts in the last 7 days.