QMAKE_BUNDLE_DATA doesn't remove old folders



  • 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)@


  • Lifetime Qt Champion

    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


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.