General Interface is an open source project hosted by the Dojo Foundation

Creating Custom Builds

Creating custom General Interface builds to run your General Interface applications involves two steps:

  1. Customizing the General Interface optimization script
  2. Running the General Interface optimization script and testing the build

Customizing the Optimization Script

To customize and run the optimization script, complete the following steps:

  1. Open the gi-merge.sh script in a text editor. In the Professional Edition the script is located in GI_HOME/util/.
  2. Specify which classes to include in the custom build. To include a class in the custom build, set the class variable to 1 as described below.
    The gi-merge.sh file defines a variable for each optional class. Each variable name is the fully-qualified class name with periods ( . ) replaced with underscores ( _ ). For example, the jsx3.gui.Matrix class would be jsx3_gui_Matrix in the gi-merge.sh file.
    When you run the optimization script, classes with the variable set to 1 are included in the custom build. The script automatically resolves dependencies between classes. For example, if you include the jsx3.gui.Button class, the jsx3.gui.Form class is also included because Button implements Form. Any classes that are set to 0 and that aren't required by an included class are excluded.
    The following example shows a code snippet from a sample optimization script file. Classes with a variable of 1, such as jsx.gui.Form, jsx.gui.Heavyweight, and so on, are copied to the custom build.
    . . .
    jsx3_gui_Dialog=0
    jsx3_gui_Form=0
    jsx3_gui_Grid=0
    jsx3_gui_HotKey=1
    jsx3_gui_Image=1
    jsx3_gui_ImageButton=1
    jsx3_gui_LayoutGrid=1
    jsx3_gui_List=0
    jsx3_gui_Matrix=1
    . . .

Running the Optimization Script and Testing the Build

Running the optimization script modifies the jsx.js files located in the deployment directory: deploy_dir/JSX/js/fx, deploy_dir/JSX/js/ie6, and deploy_dir/JSX/js/ie7. The optimization script notifies you of any classes that are required by the classes that you included. The optimization script also creates a backup of the original jsx.js files in the deployment directory. For example, if your deployment directory is gideploy1, then backups of the original files are copied to these locations:

gideploy1/JSX/js/fx/jsx.js.orig
gideploy1/JSX/js/ie6/jsx.js.orig
gideploy1/JSX/js/ie7/jsx.js.orig

To run and test the optimization script, complete the following steps:

  1. Open the command line according to your environment.
  2. Change to the General Interface deployment directory. For example, if the custom build is located in gideploy1, change to that directory from the command line.
    The following example shows how to change to the gideploy1 directory in a Linux shell environment.
    $ cd gideploy1
  3. Enter the command to run the customized optimization script from the General Interface deployment directory.
    Because the optimization script modifies files in the JSX directory, always run the optimization script on each deployment directory, not on the General Interface installation directory.

    The following example shows how to run the command in a Linux shell environment.

    $ sh /path_to_tool/gi-merge.sh

    After running the optimization script, output similar to the following is printed to the command line and the listed classes are merged with the classes in the jsx.js files in the specified deployment directory.
    In this example output, jsx3_gui_Matrix is set to 1:

    Creating backup of ie6/jsx.js
       Creating backup of ie7/jsx.js
       Creating backup of fx/jsx.js
       jsx3_gui_Matrix requires jsx3_xml_Cacheable
       jsx3_gui_Matrix requires jsx3_gui_Form
       jsx3_gui_Matrix requires jsx3_gui_Matrix_Column
       All done
  4. Deploy the custom build and test the performance of your application with the new customized build. See Deploying Custom Builds.

If you're not satisfied with the results, continue to modify the optimization script, rerun the optimization script, and test the application performance until you're satisfied with the results.

Contents

Searching General Interface Docs

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.