CapeSoft.Com
Clarion Accessories
NetTalk
Doc Index
mBuild
CapeSoft Logo

CapeSoft NetTalk
mBuild

Download Latest Version
Installed Version Latest Version

mBuild

Introduction

mBuild is a utility which ships as part of NetTalk Apps.
It takes a disconnected web application as input, collects all the resources used by the application, then interfaces to the Adobe PhoneGap Build online platform. It uploads your resources, instructs PhoneGap build to build the project, and then downloads the result. The result is a native program, suitable for running on Android, iOS or Windows Phone.

Installation

mBuild is installed by the NetTalk 9 Apps installer. It is installed (by default) into the \clarion\accessory\bin\mbuild folder.
If necessary you can move it to any folder you like by simply moving all the files in the folder.

The data files for mBuild are located (by default) in C:\ProgramData\CapeSoft\NetTalk\mBuild
You can select an alternative folder for the data files if you prefer - this is done vial the Tools menu, Options, Data folder.
The location of the data folder is stored in C:\ProgramData\CapeSoft\NetTalk\mBuild\Settings.Ini

Running

To run mBuild navigate to the appropriate folder and run the mbuild.exe file.

Phone Gap Build

To make use of mBuild you will need to create a Developer Account at Adobe's PhoneGap Build service. You can create a free account (which limits you to a single, project) or use their Paid Plan (currently $9.99 per month) to allow for up to 25 projects at a time.

Once you have signed on to PhoneGap Build you will need to supply your login credentials to the mBuild program. This is done via the Tools menu, Options screen, Adobe PhoneGap Build tab. You will need your user name and password here. The password will be encrypted, base64 encoded, and stored in the settings.ini file.

Some tasks have not yet been automated by mBuild yet, but it's likely they will be automated in the near future. Keep an eye on this documentation for updates.

Certificates

In order to create applications for the various operating systems, you need code-signing certificates for those platforms. It is possible to create Android apps without a certificate, for debugging and testing purposes, but this option is not available on the other platforms.

More information on certificates will be included here soon.

Projects

The heart of the mBuild system is the project file. You can access the Project list on the Projects tab.
From this tab you can Insert, Change and Delete projects. You can also trigger a Generate, PG Build, or Make option.

Project Settings

Each project contains the following settings. It is likely that these settings will grow fairly rapidly so keep an eye on this documentation for new settings.

Details Tab

Name
the name of the project. This must match the name in the PhoneGap Build system (or alternatively you will need to manually enter the PhoneGap build Project ID.)
Description
A description for the project.

Generate Tab

Server URL
This is the server from which you will get the resources.In other words, this is the URL of the server which will serve the disconnected web app.
PhoneGap Resources
This is a folder containing icons and splash screens for the different devices, and for different screen resolutions.
Deployment Folder
This is a temporary (empty) folder that will be used as a store for the data during the build process.
Zip Name
PhoneGap Build takes in resources as a single file which is zipped together. All the files in the deployment folder will be zipped up into this file. This setting allows you to set the path, and name, of the output ZIP file. It is allowed to store this zip file inside the deployment folder (although you may jsut as easily store it in any other folder) it is automatically deleted when a Generate takes place and so it is not included in itself.

Build Tab

Android
Tick this on to target Android as a platform.
iOS
Tick this on to target iOS as a platform.
Windows Mobile
Tick this on to target Windows Phone as a platform.
Version
Enter a version number here. This is typically of the form n.n.n
reverse ID
Enter the domain for the product, or company here, using reverse DNS notation. For example com.capesoft.mbuild
Default Icon (png)
The default icon will be used on any device where the specific icon resource needed is not identified in the config.xml. This file must be in PBG format, not ICO format.
Default Splash
The default splash graphic will be used here where the specified splash resource is not identified in the config.xml.
PhoneGap Build ID
If the name of your project in mBuild matches the name of the project in PhoneGap Build, then you can leave this item blank, it will be populated when the first PG Build or Make is done. If the names do not match then get the ID number from the PhoneGap Build interface and enter it here.

Result Tab

Result File Android
When the build completes an APK file will be created. This APK will automatically be donloaded and saved to the location, and name, specified in this setting. Enter your desired location, and name, of the APK file here.
Result File iOS
When the build completes an APK file will be created. This IPA will automatically be donloaded and saved to the location, and name, specified in this setting. Enter your desired location, and name, of the IPA file here.
Result File WinPhone
When the build completes an APK file will be created. This XAP will automatically be donloaded and saved to the location, and name, specified in this setting. Enter your desired location, and name, of the XAP file here.
URL Android
The APK will be made available for direct download to your Android device by PhoneGap Build. The URL to this file will be fetched and placed into this field for you.
URL iOS
The IPA will be made available for direct download to your iOS device by PhoneGap Build. The URL to this file will be fetched and placed into this field for you.
URL WinPhone
The XAP will be made available for direct download to your Android device by PhoneGap Build. The URL to this file will be fetched and placed into this field for you.

Config.Xml Tab

Use Default
This loads the defaultconfig.xml file from the same folder as mBuild.Exe, into the config.xml field.
Config.XML
The config.xml file is used by PhoneGap Build as the place where all the settings regarding the build are set. A default config file ships with mBuild and can be used as a starting point. It is expected that there will be more functionality in mBuild in the near future to make setting the various items in the config.xml easier. For now the field can be edited by hand as required. Note that the following "tags" are already supported based on other settings in the project;
TagDescription
<!--[name]-->The project Name setting.
<!--[description]-->The project Description setting.
<!--[version]-->The project Version setting.
<!--[reverseid]-->The project Reverse ID setting.
<!--[ios]-->If the iOS checkbox in the project is on, then this adds <gap:platform name="ios" /> to the xml file.
<!--[android]-->If the Android checkbox in the project is on, then this adds <gap:platform name="android" /> to the xml file.
<!--[winphone]-->If the WinPhone checkbox in the project is on, then this adds <gap:platform name="winphone" /> to the xml file.


Building a Project

The build process takes place in two steps. mBuild provides a toolbar button for doing each step individually, (Generate and PG Build) as well as a button for doing both steps together (Make).

Generate

The first step consists of collecting all the resources for a project together, and then creating a ZIP file of them. This step uses the settings on the Generate tab of the Project settings.
Some of the resources are collected directly from a web server, while others are copied from a resources folder on the drive.
The files are collected together into the Deployment folder.
All the items in this folder are then zipped together into the zip file.

If additional files are placed in the deployment folder then they will also be included in the ZIP file.

PG Build

The second step uploads the ZIP file (created in Generate above) to the PhoneGap Build web service. A Build event is triggered there, and the service is monitored to see when the build has been completed. When the build is complete then the resultant file, or files, are downloaded to the current machine. This step uses the settings on the Build tab of the project settings.

Make

The Make option combines both steps into a single task. The Generate code is first done, then the PG Build code is done.
[End of this document]
Return to NetTalk Documentation Index