Follow this procedure to create a package for your mobile app.
If you created your project using the BAM Mobile
Project (.4pw) or Mobile Project (.4pw) options, default package
nodes were created for both Android and iOS devices. Even with these packaging nodes, you
should still read through this procedure to add any additional directories and validate all
properties.
-
Launch Genero Studio.
-
Open your project.
-
Make a list of all the files needed to run your app and the full path to where these
files currently reside.
-
Right-click on the Group node and select New
Package.
-
Define the package
properties.
You can accept many of the default values. You should, however, provide details for the
properties listed under the Package group.
Figure 1. Package properties
-
Create a New Directory in the Package node for each physical directory on disk that contains
files to be included in the package.
Right-click on the Package node and select New Directory. Define the
properties for each directory added.
In the Source directory property, you must specify the directory where
the file(s) will come from. In the Destination directory directory, specify
the directory where you want the file copied to. This directory must be contained in the Root
directory.
Note: In the default project that is set up when you create a new BAM Mobile
Project (.4pw), both of these properties are set to
$(ProjectDir)/bin. If the source and destination directories are the same, the
packaging process does not have to perform the copy, resulting in an optimization of the packaging
process.
If you need to include or exclude files from the source directory, you would add the criteria
to the Included files and/or Excluded files
properties.
Figure 2. Directory properties
-
Confirm the Package rules.
Right-click on the Package node and select Edit Package Rules.
Note: You will typically not have to modify the package rules.
-
Right-click on the package node and select Build. This action builds the
package according to the package rules. Progress of the packaging will appear in the output
panel.
Important: You need an internet connection for the first
time you build an Android package. During this first build, an automated process will download and
install Gradle with all necessary extensions into a directory in your user directory. Gradle is a
project automation tool, find out more about Gradle at http://www.gradle.org.
Figure 3. Build package
-
Confirm that the package is on your local file system.
-
Validate this package on a device by transferring it to the device, installing it on the
device, and running it on the device. To do so, follow the instructions to Deploy a mobile app for testing.