summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/src/development/qmake-manual.qdoc49
-rw-r--r--mkspecs/common/symbian/backup_registration.xml8
-rw-r--r--mkspecs/features/enable_backup.prf43
3 files changed, 100 insertions, 0 deletions
diff --git a/doc/src/development/qmake-manual.qdoc b/doc/src/development/qmake-manual.qdoc
index 2bc8a340ff..0149da282f 100644
--- a/doc/src/development/qmake-manual.qdoc
+++ b/doc/src/development/qmake-manual.qdoc
@@ -1120,6 +1120,44 @@
\tableofcontents{3}
+
+ \target BACKUP_REGISTRATION_FILE_MAEMO
+ \section1 BACKUP_REGISTRATION_FILE_MAEMO
+
+ \e {This is only used on the Maemo platform.}
+
+ This variable is used to specify the backup registration file to use with
+ \c enable_backup \c CONFIG value for Maemo platform. The default value is:
+ \c{$$_PRO_FILE_PWD_/backup_registration/maemo/$$basename(TARGET).conf}.
+
+ Unfortunately it is not possible to have a common registration file for Maemo like there is
+ for Symbian, so the developer must always provide one if the platform default backup support is
+ not sufficient.
+
+ For documentation about how to create backup registration files and how the device
+ backup works in general, see:
+ (\l{http://wiki.maemo.org/Documentation/Maemo_5_Developer_Guide/Generic_Platform_Components/Using_Backup_Application}{Using Backup Application})
+
+ \target BACKUP_REGISTRATION_FILE_SYMBIAN
+ \section1 BACKUP_REGISTRATION_FILE_SYMBIAN
+
+ \e {This is only used on the Symbian platform.}
+
+ This variable is used to specify the backup registration file to use with
+ \c enable_backup \c CONFIG value for Symbian platform. The default value is
+ determined as follows:
+
+ If a custom registration file \c{$$_PRO_FILE_PWD_/backup_registration/symbian/backup_registration.xml}
+ exists, it is used. Otherwise, the common registration file \c{$$[QT_INSTALL_DATA]/mkspecs/common/symbian/backup_registration.xml}
+ is used. This common registration file will define backing up of application binaries,
+ resources, and all files under application private directory. Also note that \c{C:/Data}
+ contents are backed up by default on Symbian devices, so no registration is needed for any
+ files found there.
+
+ For documentation about how to create backup registration files and how the device
+ backup works in general, see:
+ (\l{http://library.forum.nokia.com/index.jsp?topic=/S60_5th_Edition_Cpp_Developers_Library/GUID-35228542-8C95-4849-A73F-2B4F082F0C44/sdk/doc_source/guide/Connectivity-subsystem-guide/Connectivity/PC_Connectivity_How-To_Write_Backup_Aware_Software.html}{How-To Write Backup-aware Software})
+
\target BLD_INF_RULES
\section1 BLD_INF_RULES
@@ -1341,6 +1379,17 @@
so some \c{.ts} files may be ignored by qmake.
\endtable
+ These options only have an effect on Symbian and Maemo platforms:
+
+ \table 95%
+ \header \o Option \o Description
+ \row \o enable_backup \o Generates deployment for backup registration file
+ to enable backing up the application during device backup.
+ See \l{#BACKUP_REGISTRATION_FILE_MAEMO}{BACKUP_REGISTRATION_FILE_MAEMO}
+ and \l{#BACKUP_REGISTRATION_FILE_SYMBIAN}{BACKUP_REGISTRATION_FILE_SYMBIAN}
+ for more information about backup.
+ \endtable
+
These options have an effect on Linux/Unix platforms:
\table 95%
diff --git a/mkspecs/common/symbian/backup_registration.xml b/mkspecs/common/symbian/backup_registration.xml
new file mode 100644
index 0000000000..794e11d5a6
--- /dev/null
+++ b/mkspecs/common/symbian/backup_registration.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" standalone="yes"?>
+<backup_registration>
+ <passive_backup>
+ <include_directory name = "\" />
+ </passive_backup>
+ <system_backup/>
+ <restore requires_reboot = "no"/>
+</backup_registration>
diff --git a/mkspecs/features/enable_backup.prf b/mkspecs/features/enable_backup.prf
new file mode 100644
index 0000000000..7700ca2d6c
--- /dev/null
+++ b/mkspecs/features/enable_backup.prf
@@ -0,0 +1,43 @@
+# Generate deployment for backup registration file for mobile devices
+symbian|maemo5|linux-g++-maemo {
+ symbian {
+ isEmpty(BACKUP_REGISTRATION_FILE_SYMBIAN) {
+ # Do not require a custom registration file in Symbian builds as the
+ # default file can be used as is in vast majority of projects.
+ # However, if the custom file exists in the default location, use that.
+
+ CUSTOM_BACKUP_REG_FILE = $$_PRO_FILE_PWD_/backup_registration/symbian/backup_registration.xml
+
+ exists($$CUSTOM_BACKUP_REG_FILE) {
+ BACKUP_REGISTRATION_FILE = $$CUSTOM_BACKUP_REG_FILE
+ } else {
+ BACKUP_REGISTRATION_FILE = $$[QT_INSTALL_DATA]/mkspecs/common/symbian/backup_registration.xml
+ }
+ } else {
+ BACKUP_REGISTRATION_FILE = $$BACKUP_REGISTRATION_FILE_SYMBIAN
+ }
+
+ contains(TEMPLATE, app) {
+ enable_backup_deployment.path = /private/$$replace(TARGET.UID3, 0x,)
+ } else {
+ enable_backup_deployment.path = /private/10202D56/import/packages/$$replace(TARGET.UID3, 0x,)
+ }
+ DEPLOYMENT += enable_backup_deployment
+ } else {
+ isEmpty(BACKUP_REGISTRATION_FILE_MAEMO) {
+ BACKUP_REGISTRATION_FILE = $$_PRO_FILE_PWD_/backup_registration/maemo/$$basename(TARGET).conf
+ } else {
+ BACKUP_REGISTRATION_FILE = $$BACKUP_REGISTRATION_FILE_MAEMO
+ }
+
+ enable_backup_deployment.path = /etc/osso-backup/applications
+ INSTALLS += enable_backup_deployment
+ }
+
+ # Make sure that BACKUP_REGISTRATION_FILE has absolute path, otherwise the following exists check will not work.
+ !contains(BACKUP_REGISTRATION_FILE, "(^/|^\\\\|^.:).*"): BACKUP_REGISTRATION_FILE = $$_PRO_FILE_PWD_/$$BACKUP_REGISTRATION_FILE
+
+ !exists($$BACKUP_REGISTRATION_FILE): warning(The backup registration file \'$$BACKUP_REGISTRATION_FILE\' was not found. Please provide a valid backup registration file.)
+
+ enable_backup_deployment.files = $$BACKUP_REGISTRATION_FILE
+}