Note: | For instructions for how to perform a build of your mobile application project, see Building Mobile Applications. |
1 | Display the Multi Build dialog (optional JPanel) Mobile Designer displays the Multi Build dialog, and also a custom JPanel for the build, if you defined one. For more information, see Setting Properties at Build Time Using a
Custom JPanel.
| ||
2 | Determine settings for target devices Mobile Designer determines the settings for the device for which it is building the application. It retrieves the settings from the following sources in the order listed. Project-level device_name.xml files Project-level _defaults_.xml file Mobile Designer device database Mobile Designer sdk.properties file Mobile Designer uses the first setting it encounters. For example, if Mobile Designer encounters a setting in the project-level target device_name.xml file and then again in the project-level _defaults_.xml file, Mobile Designer uses the setting from the target device_name.xml file. For more information about: | ||
hook point | PreBuildResources If you have created an Ant script to run at the PreBuildResources hook point, Mobile Designer runs the Ant script. | ||
3 | Execute the resource handler Mobile Designer runs the resource handler that you created for the project. When running the resource handler, Mobile Designer records all the resources required for your application. Mobile Designer also creates the com.softwareag.mobile.runtime.Parameters class. For more information about creating the resource handler, see Defining Resources for a Mobile Application
Project. For more information about the Parameters class, see Application and Parameter Classes. At this point in the build process, Mobile Designer uses the following project properties: project.reshandler.src.path for the location of the project’s resource handler script and any associated classes project.java.reshandler.name for the name of the resource handler class you created for your project. project.resource.dir.root for the location of the top-level folder that contains the resources (audio files, image files, etc.) for your project project.reshandler.additional.libs.path for the location of additional libraries that your project’s resource handler requires For more information about these properties, see Resource Handler Properties. | ||
hook point | PostBuildResources If you have created an Ant script to run at the PostBuildResources hook point, Mobile Designer runs the Ant script. | ||
4 | Cross compile the application for a device Mobile Designer copies your project’s application code for the target device into the project’s _temp_\_src_ folder. At this point in the build process, Mobile Designer uses the following project properties: project.runtime.project.src.path for the location of your project’s application code project.runtime.additional.classes.path for the location of additional precompiled classes that your application requires project.runtime.additional.stubs.path for the location of additional stubs to use when compiling your application code For more information about these properties, see Run-Time Code Compilation Properties. Mobile Designer converts the mobile application source code into a neutral language, for example, C++ or Java. The neutral language that Mobile Designer uses is the required neutral language for the target device. You can set the following code conversion properties to customize how Mobile Designer converts the application source code: cpp.no.selfprotect for whether to add a safeguard to every method call cross.compiler.extractinners for whether to extract inner classes included in the Java source code cross.compiler.nodatestamp for whether to include timestamps at the top of every generated C++ (CPP) and H file cross.compiler.render.selfprotect for whether to add an extra line at the top of every non-static method java.parser.retain.comments for whether to retain comments when compiling For more information about these properties, see Code Conversion Properties. The neutral language code that Mobile Designer generates from converting your application code is easy-to-read and, by default, retains comments from the original Java source code.
| ||
5 | Prepare platform-required source files Mobile Designer gathers other source files that it requires to make the final binary. For example, additional platform-specific files might be needed for the final binary. | ||
hook point | PostCrossCompiler If you have created an Ant script to run at the PostCrossCompiler hook point, Mobile Designer runs the Ant script. | ||
6 | Prepare resources Mobile Designer gathers the resources that the project requires and prepares them for building the final binary. These includes, for example, the resources defined by your project’s resource handler, NativeUI resources, and resources that the specific platform might require. | ||
hook point | PreMakefileGeneration If you have created an Ant script to run at the PreMakefileGeneration hook point, Mobile Designer runs the Ant script. | ||
7 | Generate makefile and optional project Mobile Designer creates the makefile that defines everything that is required to create the final binary. Additionally, if appropriate for the target platform, Mobile Designer creates the platform-specific project. For example, when building an application that runs on the iOS platform, Mobile Designer creates an Xcode project or when building an application that runs on the Android platform, it creates an Eclipse project. You can set the cross-compiler properties that affect this step in the build process: project.handset.custom.stubfolder for whether to override the makefile and project template files that are provided with Mobile Designer with makefile and project template files that you supply Several properties that customize the generation of the makefile. See Makefile Additions. | ||
hook point | PrePatch If you have created an Ant script to run at the PrePatch hook point, Mobile Designer runs the Ant script. | ||
8 | Apply patches If you created patches, Mobile Designer applies the patches to the cross-compiled code. For more information about when to use patches and how to create patches, see Creating Patch Files to Apply to the
Cross-Compiled Code. |
Note: | If you set the project.handset.skip.compilation property to true, Mobile Designer skips the following actions. |
hook point | PreCompilation and PreObfuscation If you have created Ant script(s) to run at the PreCompilation and/or PreObfuscation hook points, Mobile Designer runs the Ant script(s). |
9 | Compile the application into binary Mobile Designer executes the makefile it created in a previous step to create binary for the target device. During this step Mobile Designer requires the platform-specific SDKs that you installed when setting up the platform. For more information, see Setting Up Platforms. |
hook point | PostCompilation and PreVerification If you have created Ant script(s) to run at the PostCompilation and/or PreVerification hook points, Mobile Designer runs the Ant script(s). |
10 | Sign and package the final binary Mobile Designer packages the output of the build so that is ready for installation on the target device. The packaging process varies from platform to platform. For example, for Android builds, the output is in an application package (apk) file. Additionally, if required by the target platform, Mobile Designer signs the final build. |
hook point | PostPackaging and PostVerification If you have created Ant script(s) to run at the PostPackaging and/or PostVerification hook points, Mobile Designer runs the Ant script(s). |
11 | Copy final binary (optional cleanup temp files) When Mobile Designer builds your project, it adds a Builds folder to your project folder. Within the Builds folder, Mobile Designer creates a folder for the device for which it is building your application: project/Builds/x.y.z/device In the folder location above: project is the name of your project. x.y,z is the version number you specified for the build. device is the name of the device for which Mobile Designer is building your application. The device folder contains a _temp_ folder. Mobile Designer stores temporary files in the _temp_ directory while it is building the application. After it creates the final binary, Mobile Designer copies the final binary from within the _temp_ folder into the device folder. Mobile Designer then optionally performs cleanup. If you clear the Retain output build files check box in the Multi Build dialog when you started the build, Mobile Designer cleans up the temporary files by deleting the _temp_ folder. |
Note: | If you set the project.handset.skip.compilation property to true, Mobile Designer resumes processing with the following actions. |
hook point | PostBuild If you have created an Ant script to run at the PostBuild hook point, Mobile Designer runs the Ant script. |
12 | Perform build for the next device If you select multiple devices/language combinations in the Multi Build dialog to have Mobile Designer build your application for multiple device/language combinations, Mobile Designer restarts the build process at step 2 for the next device/language to build. |
hook point | PostMultiBuild If you have created an Ant script to run at the PostMultiBuild hook point, Mobile Designer runs the Ant script. |