Skip to content

Titanium Installation

jhaynie edited this page Sep 13, 2010 · 30 revisions

These are some design notes for installation of the titanium SDK and titanium apps:

General Design

Need to be able to support 2 types of applications:

  1. Installation executable that contains everything you need to run the application including SDK, etc.
  2. Application archive that contains only the application specific files and requires the Titanium SDK to be installed

Application installation can be initiated in several different ways:

  1. Application is bundled in its own installer by the developer. This can either be by (a) bundling the full executable or (b) building the Titanium SDK and the application archive.
  2. Application is auto-installed using a “badge installer” from a web page

The Titanium Application Archive will have the following special properties:

  1. Mimetype: application/vnd.appcelerator.titanium-application-installer-package+zip
  2. File extension: TIA (titanium archive or titanium application)

(NOTE: I checked the File extension registry and this is not used by any known application)

The application archive will be a zip file which will contain the following file and folder structure:

  1. META-INF
  2. assets
  3. application

The META-INF folder will contain 2 files:

  1. application.xml – the application manifest file
  2. signatures.xml – the application security information for the code signing of the application

The assets folder will contain files used by the application installer during setup/installation:

  1. logo_16.png – 16×16 icon
  2. logo_32.png – 32×32 icon
  3. logo_48.png – 48×48 icon
  4. logo_128.png – 128×128 icon

The application folder will contain all the assets used by the application as its root directory.

Application Installation from SDK

Assuming the OS has the Titanium SDK installed, the SDK will attempt to open the application archive doing the following:

  1. check the code signing credentials
  2. extract the zip into a temporary directory
  3. read the application descriptor to build the installation dialog
  4. show the user the application dialog, using the application descriptor to customize. example dialog from AIR:

  1. if the user approves the installation, create the desktop icon, tray icon and application and any related files, icons, etc. as appropriate for the OS into the application folder, etc.
  2. the installer will open the application

Win32

On windows, we’ll need to associate the file extension with the shell open command so that windows knows to run our SDK installer to install the app. Here is sample code example: http://www.codeproject.com/KB/shell/cgfiletype.aspx

OSX

On OSX, we’ll need to set the CFBundleTypeExtensions and CFBundleTypeMIMETypes in the Info.plist.

Browser Auto-Install

The end-user application will use a “badge installer” to support auto-installation of the application. The badge installer will be a stub Flash SWF and will do the following:

  1. check to see if the SDK was already installed (for future, we should support minimum version of the SDK so we can check if the version criteria is met and auto-update to SDK before installation)
  2. if the SDK isn’t installed, the SDK will be downloaded and executed before continuing
  3. once the SDK is installed, the installer will download the application archive
  4. the installer will open the application (thus causing the SDK to install the application)

NOTE: the fscommand (“exec”, “someApplication.exe”) can be used to execute an OS specific command

Clone this wiki locally