Configure for a Web client customization

You can set up your environment to display your application using a specific Genero Browser Client customization.

Before setting up your environment for a specific Genero Browser Client (GBC) customization, you should first ensure that you can display your application using the Genero Browser Client. See Configure for the Web client.

Once you successfully display your application in a browser using the Genero Browser Client, you have several options to have your application launch from Genero Studio and use a specific GBC customization.

Deploy the customization as the default for the GAS

You can deploy your customization to the Genero Application Server. Refer to the Genero Browser Client User Guide for information about deploying a customization project to the Genero Application Server.

Once deployed, use the gasadmin tool or the GAS deployment portal to set your desired customization as the default customization to use. As this change is registered in the GAS itself, it will affect all applications connecting to and using the GAS to deliver to the Genero Browser Client.

Specify within GST

To specify a specific configuration for all applications launched within Genero Studio, do two things:

First, in the Genero Application Server Management dialog, add an option to the Start script options field to specify the customization parent folder in the GBC project directory.
-E res.path.gbc.user=<path_to_customization_parent_folder>
For example, if the GBC project directory is C:/gbc-project, then you would set the resource to:
-E res.path.gbc.user="C:\gbc-project\dist\customization"
Tip: This is not the customization project directory. There can be multiple customization projects within the customization folder. This is the parent directory, which holds the compiled customization projects.
Second, create an empty file in the customization parent folder named "_default" (with no extension). Inside this file, specify the name of the customization to use. For example, to use a customization named red, the file would contain the following:
red

For more information on configuring an application to use a GBC customization, see the Genero Browser Client User Guide. For information on application configuration files, see the Genero Application Server User Guide.

Specify a customization for a specific project

To specify a specific configuration for an application within a single Genero Studio project, do two things:

First, in the Genero Application Server Management dialog, add an option to the Start script options field to specify the customization parent folder in the GBC project directory.
-E res.path.gbc.user=<path_to_customization_parent_folder>
For example, if the GBC project directory is C:/gbc-project, then you would set the resource to:
-E res.path.gbc.user="C:\gbc-project\dist\customization"
Tip: This is not the customization project directory. There can be multiple customization projects within the customization folder. This is the parent directory, which holds the compiled customization projects.
Second, create an external application configuration file to specify which customization project to use, and save this file within the project itself. For example, to apply a customization named "red" to the Hello World demo application, you would:
  1. Open the HelloWorld.4pw project.
  2. Create a new application configuration file named HelloWorld.xcf. The file name should match the name of the application. In this file, set the <GBC> element to the name of the customization project to use:
    <?xml version="1.0" encoding="UTF-8" ?>
    <APPLICATION Parent="defaultgwc"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:noNamespaceSchemaLocation="http://www.4js.com/ns/gas/3.10/cfextwa.xsd">
      <UA_OUTPUT>
      <PUBLIC_IMAGEPATH>$(res.public.resources)</PUBLIC_IMAGEPATH>
      <GBC>red</GBC>
      </UA_OUTPUT>
    </APPLICATION>
  3. Save the file in your project, and in the same directory as the compiled executable.

For more information on configuring an application to use a GBC customization, see the Genero Browser Client User Guide. For information on application configuration files, see the Genero Application Server User Guide.