Results 1 to 4 of 4

Thread: Adding directories to resources

  1. #1
    Join Date
    Apr 2008
    Posts
    104
    Thanks
    8
    Thanked 7 Times in 7 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Adding directories to resources

    Is there any way to add into the resource all files in some directory? I've tried something like this (at the .pro-file):
    RESOURCES += some_directory
    but it doesn't works. I've tried also somedirectory/*. The same question about the adding a whole directory to the DISTFILES variable - is that possible?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Adding directories to resources

    Hmm... using wildcards in .pro files should work. Just remember RESOURCES contains a list or .qrc files, not a list of files inside a .qrc file.

  3. #3
    Join Date
    Apr 2008
    Posts
    104
    Thanks
    8
    Thanked 7 Times in 7 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Adding directories to resources

    Thank you! And can I use wildcards or something else inside of the .qrc file to add a whole directory, not file-by-file?

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Adding directories to resources

    No, unfortunately currently you can't. Theoretically it should be easy to write a simple "precompiler" for qmake to do that, but as of yet nobody did it.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.