Package and deploy rules (mobile)

A platform includes a package rule and a deploy rule. These rules are the commands used to create and deploy a package file.

Platform

A platform is similar to the concept of building and running an app based on a set of build, link and execution rules, but instead the rules are for packaging and deploying. The platform corresponds to the Platform property for the Package node in the project, defining the package and deploy rules to use.

There are currently four platforms for Genero Mobile:
Android™ (x86)
For Android, use the appropriate processor depending on the setup of your Android Virtual Device (AVD) or you 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.
iOS
For an iOS physical device.
iOS Simulator
For an iOS simulator.

Package rules

The package rule contains a list of files that are generated by the package rule (output files) and a list of dependencies to determine if the output files are up to date. The Package Rules can be viewed by right-clicking on the Package Node and selecting Edit Package Rules.

Figure: Example Package Rule


Example package rule for an Android device.

Deploy rules

A deploy rule runs a script to deploy the package to a connected device or emulator.

Figure: Example Deploy Rule



Commands and variables

These commands and variables are specific to package and deploy rules, but other predefined node variables such as $(ProjectDir) and $(InstallDir) are also valid. See the Predefined node variables topic in the Genero Studio User Guide for a list of node variables.

$(delete)
This command, available in a package rule, deletes the specified file.
$(DistDir)
Variable for the path of the destination directory of the current package node.
$(generateXMLPackage)
This command, available in a package rule, generates an XML file that describes the contents of the package.
$(generateXMLPackage) -o outputFile.xml
$(GMATOOLSDIR)
Environment variable for the path to the tools that support Genero Mobile for Android.
$(GMITOOLSDIR)
Environment variable for the path to the tools that support Genero Mobile for iOS. Set
$(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.