Create Device Installer: Difference between revisions

From EPOD
No edit summary
(Added Android APK building details)
Line 84: Line 84:


== {{PDAType|Android=Y}} Android ==
== {{PDAType|Android=Y}} Android ==
{{warning}} Whole section needs writing
===Create an APK file===
===Building===
The Android Client builds to an APK package file, and is created through Titanium Studio.
* Description - keyfile, configurations, etc.
Configure the packager from ''Run/Configurations''.
* What process to follow:
* Click ''Titanium Android App Store Configuration''.
* Where to put the build files
* Click '''Add''' and add a new configuration for the project, specifying:
** Distribution Location - P:\EPOD\_Development\ePOD Release to Google Play\Distro
** Keystore Location - P:\EPOD\_Development\Development Tools\AndroidKeyStore\KeyStore
** Password - as provided.
{{Note}} For testing purposes, you may want to add another packager configuration, to create a package locally. Copy the same configuration as above, but specify a different name and distribution location. ALWAYS use this local location for alpha builds, never the project folder.


The APK will be built when you choose your distribution configuration from the '''Publish''' button, called "Calidus ePOD.apk". Once complete, this should be compressed in this folder as "Calidus ePOD.v<versionText>.<ext>".


[[Category:WI 287575 EPOD Development and Release Process|300]]
[[Category:WI 287575 EPOD Development and Release Process|300]]

Revision as of 14:12, 6 June 2013

Windows Mobile: Windows Mobile

Create a CAB file

Assume we have the following solution:

CAB(2).PNG

and we want to include a project to create the cab installer for our application, which should:1) Copy DeviceCoolApp.exe, the referenced assembly MyDeviceLibrary.dll and the resource file called SampleKindOfResourceFile.xml to the application folder.2) Additionally, it should create a shortcut in the Programs folder on the device and3) Set the string value HKLM\Software\Mobile Practices\DeviceCoolApp\Version to "1.0".

First of all, we need to add a new Smart Device CAB Project to the solution: Right click on the solution, Add - New Project...

CAB (3).png

Call it DeviceCoolAppInstaller and press OK. The new project will appear at the bottom in the Solution Explorer window.

Now, I recommend we change the project properties to get a *nice* product installation. Set the Manufacturer (Mobile Practices) and Product Name (DeviceCoolApp) as follows:

CAB (4).png

It's time to add DeviceCoolApp.exe (the DeviceCoolApp project output) to the CAB Project. Right click on DeviceCoolAppInstaller - Add - Project Output...

CAB (5).png

Select DeviceCoolApp on the Project selector, and Primary Output as follows, and press OK.

CAB (6).png

Visual Studio will detect automatically the DeviceCoolApp dependencies. In this case it will detect MyLibrary.dll

CAB (7).png

**If the dependencies are not detected, you can rebuild the solution and then Right Click on Detected Dependencies - Refresh Dependencies.

As you can see, due to the automatic dependencies detection, we don't need to add MyDeviceLibrary as Project Output on DeviceCoolAppInstaller.

Now it's time to add the resource file SampleKindOfResourceFile.xml which should be installed on the Installation folder. Let's use the File System Editor, having the DeviceCoolAppInstaller project selected press the File System Editor button (btw, it's probably already open).

CAB (8).png

Now, right click on Application Folder - Add - File....

CAB (9).png

Browse and find SampleKindOfResourceFile.xml and press OK.

CAB (10).png

Congrats!, now we have all the necessary files ready to be installed. The next step is to add the shortcut.

Unfortunately, the Programs Folder is not already included on the File System Editor, and we need to include it manually: Right click on File System on Target Machine - Add Special Folder - Programs Folder.

CAB (11).png

And now, select Programs Folder on the File System tree, and right click on the empty panel at right and select Create New Shortcut

CAB (12).png

And select Application Folder - Primary output from DeviceCoolApp (Active) and press OK.

CAB (13).png

And rename it to "Device Cool App"

CAB (14).png

This will be the application shortcut on the Programs group on the smart device after installation. Now we just have to add the registry entry. Press the Registry Editor button:

CAB (15).png

And add the string value "HKLM\Software\Mobile Practices\DeviceCoolApp\Version". You need to create the path key by key, and the add the string value on the right panel.

CAB (16).png

Name it "Version" and then, select it, and enter "1.0" into the Value field on the Properties Window

CAB (17).PNG

And *voila* the Smart Device CAB Project is done! We're ready to build the solution, right click on the DeviceCoolAppInstaller project and select Build.

You can find the DeviceCoolAppInstaller.cab file in the DeviceCoolAppInstaller\debug folder.

CAB (18).png

We are ready to ship our application and distributing it. If you want to test it (highly recommendable), you can copy it to the emulator (or share de folder to make it visible from the emulator as a Storage Card) or to the device and install it. You can also uninstall it through the Remove Programs option.

Android: Android

Create an APK file

The Android Client builds to an APK package file, and is created through Titanium Studio.

Configure the packager from Run/Configurations.
  • Click Titanium Android App Store Configuration.
  • Click Add and add a new configuration for the project, specifying:
    • Distribution Location - P:\EPOD\_Development\ePOD Release to Google Play\Distro
    • Keystore Location - P:\EPOD\_Development\Development Tools\AndroidKeyStore\KeyStore
    • Password - as provided.

Note Note: For testing purposes, you may want to add another packager configuration, to create a package locally. Copy the same configuration as above, but specify a different name and distribution location. ALWAYS use this local location for alpha builds, never the project folder.

The APK will be built when you choose your distribution configuration from the Publish button, called "Calidus ePOD.apk". Once complete, this should be compressed in this folder as "Calidus ePOD.v<versionText>.<ext>".