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

Titanium will support the following different package creation modes:

  1. Auto-create application installer which includes runtime and application archive
  2. Auto-create standalone installer and standalone application
  3. Create standalone application (which requires no runtime to be installed)
  4. Create application archive

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-app-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. download the application archive
  2. check the code signing credentials
  3. extract the zip into a temporary directory
  4. read the application descriptor to build the installation dialog
  5. show the user the application dialog, using the application descriptor to customize. example dialog from AIR:
  6. 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.
  7. the installer will open the application

NOTE: can we make the installation be an actual titanium application itself and just do the extraction, code verification and then pass on the command line the info to the installer titanium app. The advantage is that the dialogs and code could be done in HTML/Javascript. We could use the Desktop and Filesystem API to write the file, etc.

NOTE: all dialogs will need to be localizable.

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.

Information of UTIs: http://developer.apple.com/macosx/uniformtypeidentifiers.html

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: it appears Adobe Flash 9+ has special Adobe AIR provisions that we don’t have access to).

Install of SDK

Install screens from Adobe AIR:

License Screen (initial)

This is the initial screen that is displayed when you double click the installer (from OSX).

Install Complete

This is the screen that is displayed during install.

uninstall

The screen above is the warning if apps are installed that depend on AIR.

This is the screen during uninstallation. No confirmation is shown upon completion.

Clone this wiki locally