When installing software, the user is given the choice of drive to
install to if there are multiple drives on the phone and !
is used
as the target drive letter in the PKG file.
If the user chooses to install all files in the package to a drive
containing a writable media card, the properties of the card after removal from
the phone are dependent on the phone’s installation policy. This is configured
by a device manufacturer using a file called
swipolicy.ini. One of
the configurable settings in swipolicy.ini
governs package
propagation.
If package propagation is allowed:
inserting the card into another phone will cause the package to install on that phone (no files are copied – it just updates the phone's SIS registry). Note that UIs may implement the installation differently – for example by asking the user if they want to proceed, or by silently installing the package.
uninstalling the package from the original phone will remove all files that were installed to the card. If the card is absent, the files will be deleted from the card the next time it is inserted.
uninstalling the package from phones to which it was propagated might cause all files to be deleted from the card (if present), but only if the phone’s installation policy has been configured to delete pre-installed files on uninstall. The default behaviour is that pre-installed files are not deleted.
If package propagation is not allowed then no installation takes place when the card is inserted into another phone. Auto propagation is not supported for packages that have been upgraded or patched.
An application can be pre-installed to a media card before sale, in other words by the vendor rather than the end user.
To prepare such a media card, a PKG file of type PA
('preinstalled application') is required. The PKG file must include an
install-file section which lists all
executables and data files. The source filenames are not relevant and may
consist of empty quotes. The !
character should be used as the
target drive letter for all files.
Note that any FILERUN
(FR
),
FILEMIME
(FM
) or FILETEXT
(FT
) statements in the installation package for a pre-installed
application are ignored by the software installer.
When MakeSIS is run on a PA
PKG file, it produces a
'stub' SIS file. The media card should contain the executable(s) and data
file(s) in a pre-installed form (in other words, not packaged in the SIS file),
together with the stub SIS file. The stub is required by the software installer
to validate the package, to propagate it and to uninstall it (where supported).
The stub SIS file must be located in the card's
\private\10202DCE\
directory in order to be detected by the
default background process that monitors for media card insertion. Note that it
is possible for a phone manufacturer to implement their own version of this
process, which may expect the stub to be located in a different location.
When the media card is inserted into a phone for the first time (or on phone boot-up), an installation takes place. Unlike a standard installation, this only involves validating the package and, if successful, updating the SIS registry; no files are copied. If the media card is later removed, the package is not uninstalled, so, for example, saved game levels will not be lost if the card is removed, then re-inserted.
Because a stub SIS file is present on the media card, this installation mechanism enables propagation of the package to other phones. Inserting the card into another phone will cause the package to install on that phone (after prompting the user). Auto propagation is not supported for packages that have been upgraded or patched.
The effect of uninstalling a pre-installed application depends on the installation policy. The default behaviour is that the SIS registry entry for the package is removed, but no files are removed. However, the installer may be configured so that all pre-installed files on the card (if writable) are deleted when a package is uninstalled. In this case, all related private directories on all drives will also be removed. If the card is not present when the uninstall occurs, the files will be removed from the card the next time it is inserted into the phone.
A pre-installed patch delivers removable functionality to an existing package. The executables and data files in the patch are pre-extracted to the media card, (rather than packaged in the SIS file). Applications that support patching in this way may need to be able to recognise that the additional information (for example new game levels) may exist on a different media drive from the one on which the main package was installed. To create a SIS file containing a pre-installed patch, the PKG file is of type PP.