Merge commit '0.0.2'
[vncallhistory] / deployment.pri
1 # checksum 0x9840 version 0x40002
2 # This file was generated by an application wizard of Qt Creator.
3 # The code below handles deployment to Symbian and Maemo, aswell as copying
4 # of the application data to shadow build directories on desktop.
5 # It is recommended not to modify this file, since newer versions of Qt Creator
6 # may offer an updated version of it.
7
8 defineTest(qtcAddDeployment) {
9 for(deploymentfolder, DEPLOYMENTFOLDERS) {
10     item = item$${deploymentfolder}
11     itemsources = $${item}.sources
12     $$itemsources = $$eval($${deploymentfolder}.source)
13     itempath = $${item}.path
14     $$itempath= $$eval($${deploymentfolder}.target)
15     export($$itemsources)
16     export($$itempath)
17     DEPLOYMENT += $$item
18 }
19
20 MAINPROFILEPWD = $$PWD
21
22 symbian {
23     isEmpty(ICON):exists($${TARGET}.svg):ICON = $${TARGET}.svg
24     isEmpty(TARGET.EPOCHEAPSIZE):TARGET.EPOCHEAPSIZE = 0x20000 0x2000000
25 } else:win32 {
26     copyCommand =
27     for(deploymentfolder, DEPLOYMENTFOLDERS) {
28         source = $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source)
29         source = $$replace(source, /, \\)
30         sourcePathSegments = $$split(source, \\)
31         target = $$OUT_PWD/$$eval($${deploymentfolder}.target)/$$last(sourcePathSegments)
32         target = $$replace(target, /, \\)
33         !isEqual(source,$$target) {
34             !isEmpty(copyCommand):copyCommand += &&
35             isEqual(QMAKE_DIR_SEP, \\) {
36                 copyCommand += $(COPY_DIR) \"$$source\" \"$$target\"
37             } else {
38                 source = $$replace(source, \\\\, /)
39                 target = $$OUT_PWD/$$eval($${deploymentfolder}.target)
40                 target = $$replace(target, \\\\, /)
41                 copyCommand += test -d \"$$target\" || mkdir -p \"$$target\" && cp -r \"$$source\" \"$$target\"
42             }
43         }
44     }
45     !isEmpty(copyCommand) {
46         copyCommand = @echo Copying application data... && $$copyCommand
47         copydeploymentfolders.commands = $$copyCommand
48         first.depends = $(first) copydeploymentfolders
49         export(first.depends)
50         export(copydeploymentfolders.commands)
51         QMAKE_EXTRA_TARGETS += first copydeploymentfolders
52     }
53 } else:unix {
54     maemo5 {
55         desktopfile.path = /usr/share/applications/hildon
56     } else {
57         desktopfile.path = /usr/share/applications
58         copyCommand =
59         for(deploymentfolder, DEPLOYMENTFOLDERS) {
60             source = $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source)
61             source = $$replace(source, \\\\, /)
62             macx {
63                 target = $$OUT_PWD/$${TARGET}.app/Contents/Resources/$$eval($${deploymentfolder}.target)
64             } else {
65                 target = $$OUT_PWD/$$eval($${deploymentfolder}.target)
66             }
67             target = $$replace(target, \\\\, /)
68             sourcePathSegments = $$split(source, /)
69             targetFullPath = $$target/$$last(sourcePathSegments)
70             !isEqual(source,$$targetFullPath) {
71                 !isEmpty(copyCommand):copyCommand += &&
72                 copyCommand += $(MKDIR) \"$$target\"
73                 copyCommand += && $(COPY_DIR) \"$$source\" \"$$target\"
74             }
75         }
76         !isEmpty(copyCommand) {
77             copyCommand = @echo Copying application data... && $$copyCommand
78             copydeploymentfolders.commands = $$copyCommand
79             first.depends = $(first) copydeploymentfolders
80             export(first.depends)
81             export(copydeploymentfolders.commands)
82             QMAKE_EXTRA_TARGETS += first copydeploymentfolders
83         }
84     }
85     installPrefix = /opt/$${TARGET}
86     for(deploymentfolder, DEPLOYMENTFOLDERS) {
87         item = item$${deploymentfolder}
88         itemfiles = $${item}.files
89         $$itemfiles = $$eval($${deploymentfolder}.source)
90         itempath = $${item}.path
91         $$itempath = $${installPrefix}/$$eval($${deploymentfolder}.target)
92         export($$itemfiles)
93         export($$itempath)
94         INSTALLS += $$item
95     }
96     icon.files = $${TARGET}.png
97     icon.path = /usr/share/icons/hicolor/64x64/apps
98     desktopfile.files = $${TARGET}.desktop
99     target.path = $${installPrefix}/bin
100     export(icon.files)
101     export(icon.path)
102     export(desktopfile.files)
103     export(desktopfile.path)
104     export(target.path)
105     INSTALLS += desktopfile icon target
106 }
107
108 export (ICON)
109 export (INSTALLS)
110 export (DEPLOYMENT)
111 export (TARGET.EPOCHEAPSIZE)
112 export (TARGET.CAPABILITY)
113 export (LIBS)
114 export (QMAKE_EXTRA_TARGETS)
115 }