|
| 1 | +# This file was generated by an application wizard of Qt Creator. |
| 2 | +# The code below handles deployment to Android and Maemo, aswell as copying |
| 3 | +# of the application data to shadow build directories on desktop. |
| 4 | +# It is recommended not to modify this file, since newer versions of Qt Creator |
| 5 | +# may offer an updated version of it. |
| 6 | + |
| 7 | +defineTest(qtcAddDeployment) { |
| 8 | +for(deploymentfolder, DEPLOYMENTFOLDERS) { |
| 9 | + item = item$${deploymentfolder} |
| 10 | + greaterThan(QT_MAJOR_VERSION, 4) { |
| 11 | + itemsources = $${item}.files |
| 12 | + } else { |
| 13 | + itemsources = $${item}.sources |
| 14 | + } |
| 15 | + $$itemsources = $$eval($${deploymentfolder}.source) |
| 16 | + itempath = $${item}.path |
| 17 | + $$itempath= $$eval($${deploymentfolder}.target) |
| 18 | + export($$itemsources) |
| 19 | + export($$itempath) |
| 20 | + DEPLOYMENT += $$item |
| 21 | +} |
| 22 | + |
| 23 | +MAINPROFILEPWD = $$PWD |
| 24 | + |
| 25 | +android-no-sdk { |
| 26 | + for(deploymentfolder, DEPLOYMENTFOLDERS) { |
| 27 | + item = item$${deploymentfolder} |
| 28 | + itemfiles = $${item}.files |
| 29 | + $$itemfiles = $$eval($${deploymentfolder}.source) |
| 30 | + itempath = $${item}.path |
| 31 | + $$itempath = /data/user/qt/$$eval($${deploymentfolder}.target) |
| 32 | + export($$itemfiles) |
| 33 | + export($$itempath) |
| 34 | + INSTALLS += $$item |
| 35 | + } |
| 36 | + |
| 37 | + target.path = /data/user/qt |
| 38 | + |
| 39 | + export(target.path) |
| 40 | + INSTALLS += target |
| 41 | +} else:android { |
| 42 | + for(deploymentfolder, DEPLOYMENTFOLDERS) { |
| 43 | + item = item$${deploymentfolder} |
| 44 | + itemfiles = $${item}.files |
| 45 | + $$itemfiles = $$eval($${deploymentfolder}.source) |
| 46 | + itempath = $${item}.path |
| 47 | + $$itempath = /assets/$$eval($${deploymentfolder}.target) |
| 48 | + export($$itemfiles) |
| 49 | + export($$itempath) |
| 50 | + INSTALLS += $$item |
| 51 | + } |
| 52 | + |
| 53 | + x86 { |
| 54 | + target.path = /libs/x86 |
| 55 | + } else: armeabi-v7a { |
| 56 | + target.path = /libs/armeabi-v7a |
| 57 | + } else { |
| 58 | + target.path = /libs/armeabi |
| 59 | + } |
| 60 | + |
| 61 | + export(target.path) |
| 62 | + INSTALLS += target |
| 63 | +} else:win32 { |
| 64 | + copyCommand = |
| 65 | + for(deploymentfolder, DEPLOYMENTFOLDERS) { |
| 66 | + source = $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source) |
| 67 | + source = $$replace(source, /, \\) |
| 68 | + sourcePathSegments = $$split(source, \\) |
| 69 | + target = $$OUT_PWD/$$eval($${deploymentfolder}.target)/$$last(sourcePathSegments) |
| 70 | + target = $$replace(target, /, \\) |
| 71 | + target ~= s,\\\\\\.?\\\\,\\, |
| 72 | + !isEqual(source,$$target) { |
| 73 | + !isEmpty(copyCommand):copyCommand += && |
| 74 | + isEqual(QMAKE_DIR_SEP, \\) { |
| 75 | + copyCommand += $(COPY_DIR) \"$$source\" \"$$target\" |
| 76 | + } else { |
| 77 | + source = $$replace(source, \\\\, /) |
| 78 | + target = $$OUT_PWD/$$eval($${deploymentfolder}.target) |
| 79 | + target = $$replace(target, \\\\, /) |
| 80 | + copyCommand += test -d \"$$target\" || mkdir -p \"$$target\" && cp -r \"$$source\" \"$$target\" |
| 81 | + } |
| 82 | + } |
| 83 | + } |
| 84 | + !isEmpty(copyCommand) { |
| 85 | + copyCommand = @echo Copying application data... && $$copyCommand |
| 86 | + copydeploymentfolders.commands = $$copyCommand |
| 87 | + first.depends = $(first) copydeploymentfolders |
| 88 | + export(first.depends) |
| 89 | + export(copydeploymentfolders.commands) |
| 90 | + QMAKE_EXTRA_TARGETS += first copydeploymentfolders |
| 91 | + } |
| 92 | +} else:ios { |
| 93 | + copyCommand = |
| 94 | + for(deploymentfolder, DEPLOYMENTFOLDERS) { |
| 95 | + source = $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source) |
| 96 | + source = $$replace(source, \\\\, /) |
| 97 | + target = $CODESIGNING_FOLDER_PATH/$$eval($${deploymentfolder}.target) |
| 98 | + target = $$replace(target, \\\\, /) |
| 99 | + sourcePathSegments = $$split(source, /) |
| 100 | + targetFullPath = $$target/$$last(sourcePathSegments) |
| 101 | + targetFullPath ~= s,/\\.?/,/, |
| 102 | + !isEqual(source,$$targetFullPath) { |
| 103 | + !isEmpty(copyCommand):copyCommand += && |
| 104 | + copyCommand += mkdir -p \"$$target\" |
| 105 | + copyCommand += && cp -r \"$$source\" \"$$target\" |
| 106 | + } |
| 107 | + } |
| 108 | + !isEmpty(copyCommand) { |
| 109 | + copyCommand = echo Copying application data... && $$copyCommand |
| 110 | + !isEmpty(QMAKE_POST_LINK): QMAKE_POST_LINK += ";" |
| 111 | + QMAKE_POST_LINK += "$$copyCommand" |
| 112 | + export(QMAKE_POST_LINK) |
| 113 | + } |
| 114 | +} else:unix { |
| 115 | + maemo5 { |
| 116 | + desktopfile.files = $${TARGET}.desktop |
| 117 | + desktopfile.path = /usr/share/applications/hildon |
| 118 | + icon.files = $${TARGET}64.png |
| 119 | + icon.path = /usr/share/icons/hicolor/64x64/apps |
| 120 | + } else:!isEmpty(MEEGO_VERSION_MAJOR) { |
| 121 | + desktopfile.files = $${TARGET}_harmattan.desktop |
| 122 | + desktopfile.path = /usr/share/applications |
| 123 | + icon.files = $${TARGET}80.png |
| 124 | + icon.path = /usr/share/icons/hicolor/80x80/apps |
| 125 | + } else { # Assumed to be a Desktop Unix |
| 126 | + copyCommand = |
| 127 | + for(deploymentfolder, DEPLOYMENTFOLDERS) { |
| 128 | + source = $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source) |
| 129 | + source = $$replace(source, \\\\, /) |
| 130 | + macx { |
| 131 | + target = $$OUT_PWD/$${TARGET}.app/Contents/Resources/$$eval($${deploymentfolder}.target) |
| 132 | + } else { |
| 133 | + target = $$OUT_PWD/$$eval($${deploymentfolder}.target) |
| 134 | + } |
| 135 | + target = $$replace(target, \\\\, /) |
| 136 | + sourcePathSegments = $$split(source, /) |
| 137 | + targetFullPath = $$target/$$last(sourcePathSegments) |
| 138 | + targetFullPath ~= s,/\\.?/,/, |
| 139 | + !isEqual(source,$$targetFullPath) { |
| 140 | + !isEmpty(copyCommand):copyCommand += && |
| 141 | + copyCommand += $(MKDIR) \"$$target\" |
| 142 | + copyCommand += && $(COPY_DIR) \"$$source\" \"$$target\" |
| 143 | + } |
| 144 | + } |
| 145 | + !isEmpty(copyCommand) { |
| 146 | + copyCommand = @echo Copying application data... && $$copyCommand |
| 147 | + copydeploymentfolders.commands = $$copyCommand |
| 148 | + first.depends = $(first) copydeploymentfolders |
| 149 | + export(first.depends) |
| 150 | + export(copydeploymentfolders.commands) |
| 151 | + QMAKE_EXTRA_TARGETS += first copydeploymentfolders |
| 152 | + } |
| 153 | + } |
| 154 | + !isEmpty(target.path) { |
| 155 | + installPrefix = $${target.path} |
| 156 | + } else { |
| 157 | + installPrefix = /opt/$${TARGET} |
| 158 | + } |
| 159 | + for(deploymentfolder, DEPLOYMENTFOLDERS) { |
| 160 | + item = item$${deploymentfolder} |
| 161 | + itemfiles = $${item}.files |
| 162 | + $$itemfiles = $$eval($${deploymentfolder}.source) |
| 163 | + itempath = $${item}.path |
| 164 | + $$itempath = $${installPrefix}/$$eval($${deploymentfolder}.target) |
| 165 | + export($$itemfiles) |
| 166 | + export($$itempath) |
| 167 | + INSTALLS += $$item |
| 168 | + } |
| 169 | + |
| 170 | + !isEmpty(desktopfile.path) { |
| 171 | + export(icon.files) |
| 172 | + export(icon.path) |
| 173 | + export(desktopfile.files) |
| 174 | + export(desktopfile.path) |
| 175 | + INSTALLS += icon desktopfile |
| 176 | + } |
| 177 | + |
| 178 | + isEmpty(target.path) { |
| 179 | + target.path = $${installPrefix}/bin |
| 180 | + export(target.path) |
| 181 | + } |
| 182 | + INSTALLS += target |
| 183 | +} |
| 184 | + |
| 185 | +export (ICON) |
| 186 | +export (INSTALLS) |
| 187 | +export (DEPLOYMENT) |
| 188 | +export (LIBS) |
| 189 | +export (QMAKE_EXTRA_TARGETS) |
| 190 | +} |
| 191 | + |
0 commit comments