Repository navigation
Titanium Installation
These are some design notes for installation of the titanium SDK and titanium apps:
Need to be able to support 2 types of applications:
- Installation executable that contains everything you need to run the application including SDK, etc.
- 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:
- 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.
- Application is auto-installed using a “badge installer” from a web page
The Titanium Application Archive will have the following special properties:
- Mimetype: application/vnd.appcelerator.titanium-application-installer-package+zip
- 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:
- META-INF
- assets
- application
The META-INF folder will contain 2 files:
- application.xml – the application manifest file
- 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:
- logo_16.png – 16×16 icon
- logo_32.png – 32×32 icon
- logo_48.png – 48×48 icon
- logo_128.png – 128×128 icon
The application folder will contain all the assets used by the application as its root directory.
Assuming the OS has the Titanium SDK installed, the SDK will attempt to open the application archive doing the following:
- check the code signing credentials
- extract the zip into a temporary directory
- read the application descriptor to build the installation dialog
- show the user the application dialog, using the application descriptor to customize. example dialog from AIR:
- 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.
- the installer will open the application
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
On OSX, we’ll need to set the CFBundleTypeExtensions and CFBundleTypeMIMETypes in the Info.plist.
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:
- 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)
- if the SDK isn’t installed, the SDK will be downloaded and executed before continuing
- once the SDK is installed, the installer will download the application archive
- 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
