deployment.pri 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. # checksum 0x838c version 0x70002
  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. defineTest(qtcAddDeployment) {
  8. for(deploymentfolder, DEPLOYMENTFOLDERS) {
  9. item = item$${deploymentfolder}
  10. itemsources = $${item}.sources
  11. $$itemsources = $$eval($${deploymentfolder}.source)
  12. itempath = $${item}.path
  13. $$itempath= $$eval($${deploymentfolder}.target)
  14. export($$itemsources)
  15. export($$itempath)
  16. DEPLOYMENT += $$item
  17. }
  18. MAINPROFILEPWD = $$PWD
  19. symbian {
  20. isEmpty(ICON):exists($${TARGET}.svg):ICON = $${TARGET}.svg
  21. isEmpty(TARGET.EPOCHEAPSIZE):TARGET.EPOCHEAPSIZE = 0x20000 0x2000000
  22. } else:win32 {
  23. copyCommand =
  24. for(deploymentfolder, DEPLOYMENTFOLDERS) {
  25. source = $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source)
  26. source = $$replace(source, /, \\)
  27. sourcePathSegments = $$split(source, \\)
  28. target = $$OUT_PWD/$$eval($${deploymentfolder}.target)/$$last(sourcePathSegments)
  29. target = $$replace(target, /, \\)
  30. target ~= s,\\\\\\.?\\\\,\\,
  31. !isEqual(source,$$target) {
  32. !isEmpty(copyCommand):copyCommand += &&
  33. isEqual(QMAKE_DIR_SEP, \\) {
  34. copyCommand += $(COPY_DIR) \"$$source\" \"$$target\"
  35. } else {
  36. source = $$replace(source, \\\\, /)
  37. target = $$OUT_PWD/$$eval($${deploymentfolder}.target)
  38. target = $$replace(target, \\\\, /)
  39. copyCommand += test -d \"$$target\" || mkdir -p \"$$target\" && cp -r \"$$source\" \"$$target\"
  40. }
  41. }
  42. }
  43. !isEmpty(copyCommand) {
  44. copyCommand = @echo Copying application data... && $$copyCommand
  45. copydeploymentfolders.commands = $$copyCommand
  46. first.depends = $(first) copydeploymentfolders
  47. export(first.depends)
  48. export(copydeploymentfolders.commands)
  49. QMAKE_EXTRA_TARGETS += first copydeploymentfolders
  50. }
  51. } else:unix {
  52. maemo5 {
  53. desktopfile.files = $${TARGET}.desktop
  54. desktopfile.path = /usr/share/applications/hildon
  55. icon.files = $${TARGET}64.png
  56. icon.path = /usr/share/icons/hicolor/64x64/apps
  57. } else:!isEmpty(MEEGO_VERSION_MAJOR) {
  58. desktopfile.files = $${TARGET}_harmattan.desktop
  59. desktopfile.path = /usr/share/applications
  60. icon.files = $${TARGET}80.png
  61. icon.path = /usr/share/icons/hicolor/80x80/apps
  62. } else { # Assumed to be a Desktop Unix
  63. copyCommand =
  64. for(deploymentfolder, DEPLOYMENTFOLDERS) {
  65. source = $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source)
  66. source = $$replace(source, \\\\, /)
  67. macx {
  68. target = $$OUT_PWD/$${TARGET}.app/Contents/Resources/$$eval($${deploymentfolder}.target)
  69. } else {
  70. target = $$OUT_PWD/$$eval($${deploymentfolder}.target)
  71. }
  72. target = $$replace(target, \\\\, /)
  73. sourcePathSegments = $$split(source, /)
  74. targetFullPath = $$target/$$last(sourcePathSegments)
  75. targetFullPath ~= s,/\\.?/,/,
  76. !isEqual(source,$$targetFullPath) {
  77. !isEmpty(copyCommand):copyCommand += &&
  78. copyCommand += $(MKDIR) \"$$target\"
  79. copyCommand += && $(COPY_DIR) \"$$source\" \"$$target\"
  80. }
  81. }
  82. !isEmpty(copyCommand) {
  83. copyCommand = @echo Copying application data... && $$copyCommand
  84. copydeploymentfolders.commands = $$copyCommand
  85. first.depends = $(first) copydeploymentfolders
  86. export(first.depends)
  87. export(copydeploymentfolders.commands)
  88. QMAKE_EXTRA_TARGETS += first copydeploymentfolders
  89. }
  90. }
  91. installPrefix = /opt/$${TARGET}
  92. for(deploymentfolder, DEPLOYMENTFOLDERS) {
  93. item = item$${deploymentfolder}
  94. itemfiles = $${item}.files
  95. $$itemfiles = $$eval($${deploymentfolder}.source)
  96. itempath = $${item}.path
  97. $$itempath = $${installPrefix}/$$eval($${deploymentfolder}.target)
  98. export($$itemfiles)
  99. export($$itempath)
  100. INSTALLS += $$item
  101. }
  102. !isEmpty(desktopfile.path) {
  103. export(icon.files)
  104. export(icon.path)
  105. export(desktopfile.files)
  106. export(desktopfile.path)
  107. INSTALLS += icon desktopfile
  108. }
  109. target.path = $${installPrefix}/bin
  110. export(target.path)
  111. INSTALLS += target
  112. }
  113. export (ICON)
  114. export (INSTALLS)
  115. export (DEPLOYMENT)
  116. export (TARGET.EPOCHEAPSIZE)
  117. export (TARGET.CAPABILITY)
  118. export (LIBS)
  119. export (QMAKE_EXTRA_TARGETS)
  120. }