Community: Wiki

你在这里: You Are Here: Olet tässä: Vous êtes ici: Sie befinden sich hier: Tu sei qui: 現在のページ: Você está aqui: Вы здесь: Usted está aquí:
This page was last modified 13:56, 6 November 2008.

TSS001073 - Backup of add-on DLLs

From Forum Nokia Wiki



ID TSS001073 Creation date August 12, 2008, updated September 17, 2008
Platform S60 3rd Edition Devices All (S60 3rd Edition)
Category Symbian C++ Subcategory Base/System, Backup & Restore


Keywords (APIs, classes, methods, functions):

Description

3rd party application developers need to enable backup and restore for their applications by including a backup_registration.xml file in the application's private directory. If the main application is designed so that its functionality can be later extended by installing add-on components (DLLs), they should be registered for backup as well.

Solution

If the UID of the DLL to be installed is known in beforehand, the backup registration of the DLL can be done by the main application package by using the following statement in the pkg file:

"DLL1BinaryBackup.xml" 
     - "!:\private\10202D56\import\packages\<DLL1_UID>\backup_registration.xml"

In this case, the add-on DLL can be installed as a normal SISX package. Typically, a minimal system backup definition (taking backups of the binaries) is sufficient for the DLL.

See Image:DLLBackupExample.zip for sample .pkg definitions.

The DLL installation can also be carried out with a partial upgrade (PU) SIS package over the existing application in case the UID of the DLL is not known. This upgrade package then defines the backup registration file, and either the add-on DLL directly or an embedded SISX file containing the binaries.


Backup of files generated by plug-ins

Apart from just backing up the binaries of the plug-in binaries, it might also be necessary for the user to backup the files generated by the plug-ins (for example, plug-in-specific settings).

Any application backup_registration*.xml present in the application's private directory indicates the files that need to be backed up. The backup_registration.xml is regarded as the main backup file of the application whereas other files only provide additional files not mentioned in the main backup file.

See Image:BackupOfPluginComponents.zip for sample .pkg definitions.

MainApp.pkg: Package file of the main application with its own backup_registration.xml file.

MyPrivateFilesDLL1_Upgrade.pkg: Upgrade package for the main application. Includes the plug-in DLL1 as an embedded SIS.

The important line in the MyPrivateFilesDLL1_Upgrade.pkg file :-

   "<DLL1 Path>\DLL1PrivateFileBackup.xml"
       - "!:\private\<APP_UID>\backup_registration1.xml"

copies an additional file backup_registration1.xml to the private directory of the main application.

The backup_registration1.xml can define all additional files that need to be backed up. For example:

 <include_file name="c:\private\<APP_UID>\backup\<DLL_UID>\DLL1File1.txt" />
 <include_file name="c:\private\<APP_UID>\backup\<DLL_UID>\DLL1File2.dat" />
 ...

Any additional files to be backed up must either be in a public folder or under the main application's private folder structure.


Notes

The file name "DLL1BinaryBackup.xml" is only used to distinguish between the main application and the add-on DLL. When defining backup registration files in a .pkg file, the target name must always be in the following format: backup_registration*.xml.


Trying to update the main application's backup_registration.xml to contain additional files/folders with a PU-type SIS package has no effect.


See also

TSS000750 - Enabling backup and restore for installed C++ applications

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditFurlTechnocratiMagnoliaTwitter  Share this page Share this page Invite a friend Invite a friend
E-mail Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us Regional websites: Chinese Japanese © 2008 Nokia