Package and deploy rules

A platform includes rules that are used to create and deploy a package file.

  • To edit package and deploy rules at a global level, select Tools > Global setup > Edit Package Rules.
  • To edit package and deploy rules at the project level, right-click on a node and select Edit Package Rules.

This opens the Edit Package Rules dialog, which is described below.

Platform

A platform is similar to the concept of building and running an application based on a set of build, link and execution rules, but instead the rules are for packaging and deploying. The Platform in the Edit Package Rules dialog corresponds to the Platform property for the Package node, and can be one of the following:
  • Genero Application Server
  • Android
  • iOS
  • iOS Simulator
  • Java
  • ZIP
Note:

For Android™, use the appropriate processor depending on the setup of your Android Virtual Device (AVD) or your physical device hardware. To avoid performance issues, we recommend that you configure your AVD with an x86 processor and Intel® Hardware emulation enabled (HAX). When you create the default AVD using the Genero Studio menu option, the AVD has an x86 processor.

You can add additional platforms (or duplicate an existing one) to create custom package types.

Package rules

The package rule contains a list of output files that are generated by the package rule, and a list of dependencies to determine if these output files are up to date. Figure 1 displays an example of package rules for an Android platform.
Figure: Example Package Rules

Example package rules for an Android platform.

Deploy rules

A deploy rule runs a script to deploy the package to a configured application server, a connected device, or an emulator. Figure 2 displays an example of deploy rules for a GAS package.

Figure: Example Deploy Rule

Example deploy rules for a GAS package.

Commands and variables

These commands and variables are specific to package and deploy rules:

$(delete)
Command that deletes the specified file.
$(DistDir)
Variable for the path of the destination directory of the current package node.
$(generateXMLPackage)
Command that generates an XML file to describe the contents of the package. For example:
$(generateXMLPackage) -o outputFile.xml
$(PackageFiles)
Variable for the list of files in the package.
$(packageId)
Variable for the package ID.
$(PackageName)
Variable for the name of the current package node.
These environment variables are specific to package and deploy rules for mobile devices:
$(GMATOOLSDIR)
Path to the tools that support Genero Mobile for Android.
$(GMITOOLSDIR)
Path to the tools that support Genero Mobile for iOS.

Other predefined node variables such as $(ProjectDir) and $(InstallDir) are also valid.

You can add custom variables on the Variables tab of the Edit Package Rules dialog.