deployment.pri 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. # checksum 0x9840 version 0x4000b
  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. !isEqual(source,$$target) {
  31. !isEmpty(copyCommand):copyCommand += &&
  32. isEqual(QMAKE_DIR_SEP, \\) {
  33. copyCommand += $(COPY_DIR) \"$$source\" \"$$target\"
  34. } else {
  35. source = $$replace(source, \\\\, /)
  36. target = $$OUT_PWD/$$eval($${deploymentfolder}.target)
  37. target = $$replace(target, \\\\, /)
  38. copyCommand += test -d \"$$target\" || mkdir -p \"$$target\" && cp -r \"$$source\" \"$$target\"
  39. }
  40. }
  41. }
  42. !isEmpty(copyCommand) {
  43. copyCommand = @echo Copying application data... && $$copyCommand
  44. copydeploymentfolders.commands = $$copyCommand
  45. first.depends = $(first) copydeploymentfolders
  46. export(first.depends)
  47. export(copydeploymentfolders.commands)
  48. QMAKE_EXTRA_TARGETS += first copydeploymentfolders
  49. }
  50. } else:unix {
  51. maemo5 {
  52. desktopfile.path = /usr/share/applications/hildon
  53. } else {
  54. desktopfile.path = /usr/share/applications
  55. copyCommand =
  56. for(deploymentfolder, DEPLOYMENTFOLDERS) {
  57. source = $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source)
  58. source = $$replace(source, \\\\, /)
  59. macx {
  60. target = $$OUT_PWD/$${TARGET}.app/Contents/Resources/$$eval($${deploymentfolder}.target)
  61. } else {
  62. target = $$OUT_PWD/$$eval($${deploymentfolder}.target)
  63. }
  64. target = $$replace(target, \\\\, /)
  65. sourcePathSegments = $$split(source, /)
  66. targetFullPath = $$target/$$last(sourcePathSegments)
  67. !isEqual(source,$$targetFullPath) {
  68. !isEmpty(copyCommand):copyCommand += &&
  69. copyCommand += $(MKDIR) \"$$target\"
  70. copyCommand += && $(COPY_DIR) \"$$source\" \"$$target\"
  71. }
  72. }
  73. !isEmpty(copyCommand) {
  74. copyCommand = @echo Copying application data... && $$copyCommand
  75. copydeploymentfolders.commands = $$copyCommand
  76. first.depends = $(first) copydeploymentfolders
  77. export(first.depends)
  78. export(copydeploymentfolders.commands)
  79. QMAKE_EXTRA_TARGETS += first copydeploymentfolders
  80. }
  81. }
  82. installPrefix = /opt/$${TARGET}
  83. for(deploymentfolder, DEPLOYMENTFOLDERS) {
  84. item = item$${deploymentfolder}
  85. itemfiles = $${item}.files
  86. $$itemfiles = $$eval($${deploymentfolder}.source)
  87. itempath = $${item}.path
  88. $$itempath = $${installPrefix}/$$eval($${deploymentfolder}.target)
  89. export($$itemfiles)
  90. export($$itempath)
  91. INSTALLS += $$item
  92. }
  93. icon.files = $${TARGET}.png
  94. icon.path = /usr/share/icons/hicolor/64x64/apps
  95. desktopfile.files = $${TARGET}.desktop
  96. target.path = $${installPrefix}/bin
  97. export(icon.files)
  98. export(icon.path)
  99. export(desktopfile.files)
  100. export(desktopfile.path)
  101. export(target.path)
  102. INSTALLS += desktopfile icon target
  103. }
  104. export (ICON)
  105. export (INSTALLS)
  106. export (DEPLOYMENT)
  107. export (TARGET.EPOCHEAPSIZE)
  108. export (TARGET.CAPABILITY)
  109. export (LIBS)
  110. export (QMAKE_EXTRA_TARGETS)
  111. }