Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. QMAKE_BUNDLE_DATA doesn't remove old folders
QtWS25 Last Chance

QMAKE_BUNDLE_DATA doesn't remove old folders

Scheduled Pinned Locked Moved Installation and Deployment
2 Posts 2 Posters 885 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    kambala
    wrote on last edited by
    #1

    Hi. There's such piece in my .pro which copies 'translations' and 'data' folders:
    @macx {
    appresources.files += resources/translations
    appresources.files += resources/data
    appresources.path = Contents/Resources
    QMAKE_BUNDLE_DATA += appresources
    }@

    If these folders don't exist in .app/Contents/Resources, then they're copied just fine. But if they do, then old folders aren't removed, although makefile says that they must be removed (the @$(DEL_FILE) lines):
    @COPY_DIR = cp -f -R
    DEL_FILE = rm -f

    MedianXLOfflineTools.app/Contents/Resources/translations: /Users/svp/mxl_offline_tools/resources/translations
    @$(CHK_DIR_EXISTS) MedianXLOfflineTools.app/Contents/Resources || $(MKDIR) MedianXLOfflineTools.app/Contents/Resources
    @$(DEL_FILE) -r MedianXLOfflineTools.app/Contents/Resources/translations
    @$(COPY_DIR) /Users/svp/mxl_offline_tools/resources/translations MedianXLOfflineTools.app/Contents/Resources/translations

    MedianXLOfflineTools.app/Contents/Resources/data: /Users/svp/mxl_offline_tools/resources/data
    @$(CHK_DIR_EXISTS) MedianXLOfflineTools.app/Contents/Resources || $(MKDIR) MedianXLOfflineTools.app/Contents/Resources
    @$(DEL_FILE) -r MedianXLOfflineTools.app/Contents/Resources/data
    @$(COPY_DIR) /Users/svp/mxl_offline_tools/resources/data MedianXLOfflineTools.app/Contents/Resources/data@

    Is it possible to make the folders be removed somehow? QMAKE_PRE_LINK and QMAKE_EXTRA_TARGETS with rm -rf command doesn't work the way I want because QMAKE_BUNDLE_DATA copying is done before building the target:
    @all: Makefile MedianXLOfflineTools.app/Contents/PkgInfo MedianXLOfflineTools.app/Contents/Resources/empty.lproj MedianXLOfflineTools.app/Contents/Info.plist MedianXLOfflineTools.app/Contents/Resources/icon.icns MedianXLOfflineTools.app/Contents/Resources/translations MedianXLOfflineTools.app/Contents/Resources/data MedianXLOfflineTools.app/Contents/Resources/locversion.plist $(TARGET)@

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      You might want to try asking on the interest mailing list, you'll find Qt's developers/maintainers there (this forum is more user oriented).

      Maybe also check the "bug report system":http://bugreports.qt-project.org/issues to see if it's a known issue

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved