Added initial harmattan packaging.
[gpsdata] / deployment.pri
index 04b1b16..cc21b2b 100644 (file)
@@ -1,4 +1,4 @@
-# checksum 0x2939 version 0x20001
+# checksum 0x838c version 0x70002
 # This file was generated by an application wizard of Qt Creator.
 # The code below handles deployment to Symbian and Maemo, aswell as copying
 # of the application data to shadow build directories on desktop.
@@ -20,10 +20,8 @@ for(deploymentfolder, DEPLOYMENTFOLDERS) {
 MAINPROFILEPWD = $$PWD
 
 symbian {
-    ICON = $${TARGET}.svg
-    TARGET.EPOCHEAPSIZE = 0x20000 0x2000000
-    contains(DEFINES, ORIENTATIONLOCK):LIBS += -lavkon -leikcore -lcone
-    contains(DEFINES, NETWORKACCESS):TARGET.CAPABILITY += NetworkServices
+    isEmpty(ICON):exists($${TARGET}.svg):ICON = $${TARGET}.svg
+    isEmpty(TARGET.EPOCHEAPSIZE):TARGET.EPOCHEAPSIZE = 0x20000 0x2000000
 } else:win32 {
     copyCommand =
     for(deploymentfolder, DEPLOYMENTFOLDERS) {
@@ -32,9 +30,17 @@ symbian {
         sourcePathSegments = $$split(source, \\)
         target = $$OUT_PWD/$$eval($${deploymentfolder}.target)/$$last(sourcePathSegments)
         target = $$replace(target, /, \\)
+        target ~= s,\\\\\\.?\\\\,\\,
         !isEqual(source,$$target) {
             !isEmpty(copyCommand):copyCommand += &&
-            copyCommand += $(COPY_DIR) \"$$source\" \"$$target\"
+            isEqual(QMAKE_DIR_SEP, \\) {
+                copyCommand += $(COPY_DIR) \"$$source\" \"$$target\"
+            } else {
+                source = $$replace(source, \\\\, /)
+                target = $$OUT_PWD/$$eval($${deploymentfolder}.target)
+                target = $$replace(target, \\\\, /)
+                copyCommand += test -d \"$$target\" || mkdir -p \"$$target\" && cp -r \"$$source\" \"$$target\"
+            }
         }
     }
     !isEmpty(copyCommand) {
@@ -47,23 +53,29 @@ symbian {
     }
 } else:unix {
     maemo5 {
-        installPrefix = /opt/usr
+        desktopfile.files = $${TARGET}.desktop
         desktopfile.path = /usr/share/applications/hildon
-    } else {
-        installPrefix = /usr/local
+        icon.files = $${TARGET}64.png
+        icon.path = /usr/share/icons/hicolor/64x64/apps
+    } else:!isEmpty(MEEGO_VERSION_MAJOR) {
+        desktopfile.files = $${TARGET}_harmattan.desktop
         desktopfile.path = /usr/share/applications
+        icon.files = $${TARGET}80.png
+        icon.path = /usr/share/icons/hicolor/80x80/apps
+    } else { # Assumed to be a Desktop Unix
         copyCommand =
         for(deploymentfolder, DEPLOYMENTFOLDERS) {
             source = $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source)
-            source = $$replace(source, \\, /)
+            source = $$replace(source, \\\\, /)
             macx {
                 target = $$OUT_PWD/$${TARGET}.app/Contents/Resources/$$eval($${deploymentfolder}.target)
             } else {
                 target = $$OUT_PWD/$$eval($${deploymentfolder}.target)
             }
-            target = $$replace(target, \\, /)
+            target = $$replace(target, \\\\, /)
             sourcePathSegments = $$split(source, /)
             targetFullPath = $$target/$$last(sourcePathSegments)
+            targetFullPath ~= s,/\\.?/,/,
             !isEqual(source,$$targetFullPath) {
                 !isEmpty(copyCommand):copyCommand += &&
                 copyCommand += $(MKDIR) \"$$target\"
@@ -79,26 +91,29 @@ symbian {
             QMAKE_EXTRA_TARGETS += first copydeploymentfolders
         }
     }
+    installPrefix = /opt/$${TARGET}
     for(deploymentfolder, DEPLOYMENTFOLDERS) {
         item = item$${deploymentfolder}
         itemfiles = $${item}.files
         $$itemfiles = $$eval($${deploymentfolder}.source)
         itempath = $${item}.path
-        $$itempath = $${installPrefix}/share/$${TARGET}/$$eval($${deploymentfolder}.target)
+        $$itempath = $${installPrefix}/$$eval($${deploymentfolder}.target)
         export($$itemfiles)
         export($$itempath)
         INSTALLS += $$item
     }
-    icon.files = $${TARGET}.png
-    icon.path = /usr/share/icons/hicolor/64x64/apps
-    desktopfile.files = $${TARGET}.desktop
+
+    !isEmpty(desktopfile.path) {
+        export(icon.files)
+        export(icon.path)
+        export(desktopfile.files)
+        export(desktopfile.path)
+        INSTALLS += icon desktopfile
+    }
+
     target.path = $${installPrefix}/bin
-    export(icon.files)
-    export(icon.path)
-    export(desktopfile.files)
-    export(desktopfile.path)
     export(target.path)
-    INSTALLS += desktopfile icon target
+    INSTALLS += target
 }
 
 export (ICON)