Create Device Installer

From EPOD
Revision as of 12:28, 4 June 2013 by Anw (talk | contribs)

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

Warning Warning: Whole section needs writing

Building

  • Description - keyfile, configurations, etc.
  • What process to follow:
  • Where to put the build files

Releasing

  • Document how the Google Play Developer website works
  • No passwords!
  • How to upload
  • When to change the description
  • Possible future use: different apk files per client possibly?

Then through market, or sideloading - show how sideloading can be enabled on a device.