summaryrefslogtreecommitdiffstats
path: root/mkspecs
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@digia.com>2011-04-11 11:42:04 (GMT)
committerMiikka Heikkinen <miikka.heikkinen@digia.com>2011-04-26 13:54:06 (GMT)
commitb4b4e3311f06ef79e307f90eb216b05ed2990358 (patch)
tree0743899fcd71fba1416310508c40e56342f864c9 /mkspecs
parent0c62e02b80570bf8b92eff7acceb9018df61c89e (diff)
downloadQt-b4b4e3311f06ef79e307f90eb216b05ed2990358.zip
Qt-b4b4e3311f06ef79e307f90eb216b05ed2990358.tar.gz
Qt-b4b4e3311f06ef79e307f90eb216b05ed2990358.tar.bz2
Implement support for enable_backup CONFIG value.
The enable_backup CONFIG value can be used to generate deployment for backup registration file for an application. BACKUP_REGISTRATION_FILE_SYMBIAN and BACKUP_REGISTRATION_FILE_MAEMO variables can be used to specify a custom backup registration files. Only works on Symbian and Maemo platforms. Task-number: QTBUG-17214 Reviewed-by: Oswald Buddenhagen
Diffstat (limited to 'mkspecs')
-rw-r--r--mkspecs/common/symbian/backup_registration.xml8
-rw-r--r--mkspecs/features/enable_backup.prf43
2 files changed, 51 insertions, 0 deletions
diff --git a/mkspecs/common/symbian/backup_registration.xml b/mkspecs/common/symbian/backup_registration.xml
new file mode 100644
index 0000000..794e11d
--- /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 0000000..7700ca2
--- /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
+}