Creating a package
To create a package from Genero Studio, you must define a package node with one or more child directory nodes.
The package node defines the target platform (such as the Genero Application Server (GAS) or a mobile device) for the package. A package node will contain at least one directory node. The directory nodes identify where the application files can be found and how they should be organized when written to the package.
A package node creates a single package. You must have a package node for each package you need to create.
To create a package from Genero Studio:
- Identify the target platform.
- Identify the files required by the application.
- Add a package node.
- Add directory nodes.
- Build the package.
Identify the target platform
Each package is designed for a specific platform. A package will eventually be deployed to the GAS, installed on an Androidâ„¢ or iOS device, or shared as a compressed (zip) file.
Each target platform has its own rules and requirements around how to organize the files in a package. Some target platforms require additional configuration; for example, a GAS package may require environment variables to be set in the application configuration file.
Identify the files required
All applications have binaries that must be included in the package. An application may require other files, such as:
- fglprofile
- database files
- images
- libraries
- resource files (such as topmenu, toolbar, or presentation styles files)
- webcomponent files
- application configuration files (GAS package only)
Identify which files are needed for the application, and where the files are located.
Add a package node
A package node defines the package basics. It specifies the target platform and some package base directories.
The package node is the parent node in the package definition. It specifies the target platform; each target platform must have its own package node. A package node contains one or more directory nodes, as shown in Figure 1.
To add a package node, right-click a group node in the Projects view. Select New package and then the target platform:
- Empty Package
- Genero Application Server
- Android
- iOS
- iOS Simulator
- Java
- ZIP
The target platform determines the default values of the package node properties. Certain target platforms also create a default directory structure; see Package and directory nodes (GAS) and Package and directory nodes (mobile).
- Root directory
- Base directory containing the files to be included in the package. The target platform has rules on what structure is allowed and expected. The top-level directory in this structure is known as the Root directory (RootDir). All files to be included in the package must sit under the Root directory.
- Distribution directory
- Directory where the package is written. The default distribution directory is $(ProjectDir)/distbin.
- ID
- ID for the package.
- Label
- Label displayed to the user.
Add directory nodes
A directory node specifies the directory where application files sit (the source of one or more application files) and where they will be written to within the package. You create a directory node for each directory that houses needed application files.
Directory nodes are children of the package node. A package must have at least one directory node.
To add a directory node, right-click on the Package node and select New Directory.
To configure a directory node, define these properties:
- Source directory
- Directory containing the files to be included in the package, such as binary files or compiled form files.
- Destination directory
- Directory where the application resources will be written to, within the package. The destination directory must be within the root directory (defined in the package node). The default destination directory is the root directory ($(RootDir)).
- Included files
- Files to include in the package. For example, specify *.42f *.42m to include only files that match these types. By default, all files are included.
- Excluded files
- Files to exclude from the package. By default, no files are excluded.
- Recursive
- If selected, the files are searched recursively in the sub directories.
To include an external file or a library binary file:
- Add a directory node.
- Set the Source directory property to the path where the file sits. The path can be defined using environment variables.
- Set the Included files to the name of the file.
For example, if the application uses the library libgre.42x located in the lib subdirectory of GREDIR, create a directory node with Source directory set to $(GREDIR)/lib/ and Included files set to libgre.42x.
To exclude the directory from the package build without deleting it, select Exclude from package.
Build the package
Right-click on the package node and select Build. The package is saved in the distribution directory. The file name is the name of the package node. The file type depends on the platform, as described in Table 1.
Target platform | Packaged file | What to do next? |
---|---|---|
Genero Application Server | Genero archive file (.gar) | Deploy the package to the GAS |
Android | AAB (Android App Bundle) package (.aab) Important: Google Play
requires an AAB package. APK (Android Package Kit) package (.apk) |
Distribute the Android app |
iOS or iOS Simulator | iOS App Store Package (.ipa) | Distribute the iOS app |
Java | Java Archive (.jar) | Deploy using Java |
ZIP | .zip file | Share zipped file |