Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Excluding DEPLOYMENT Folders or QML Folder Disappears

Excluding DEPLOYMENT Folders or QML Folder Disappears

Scheduled Pinned Locked Moved Qt Creator and other tools
2 Posts 2 Posters 2.4k 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.
  • G Offline
    G Offline
    ghotihed
    wrote on last edited by
    #1

    Preface: I'm using a slightly older version of QtCreator 2.2.1, and I'm somewhat loathe to upgrade, because I'd rather not "rock the boat" at the moment with my currently-stable code base. If that's what's required to solve the problem, though, then I'm willing to try it.

    I'm switching from Git to Mercurial on one of my Symbian-based development projects so that I can more easily have nested projects. To this end, I've created a library of QML components that I want to include as a sub-directory under the main qml directory. The problem is that the new QML sub-directory now includes a .hg sub-sub-directory that I don't want to include in the final deployment. So, for a simplistic example:

    @<root>
    .hg
    .hgsub
    inc
    src
    qml
    tool-library
    .hg
    qmldir
    component1.qml
    ...
    main.qml
    page.qml
    ...@

    With this in place, the entire contents of the qml/tool-library/.hg directory are included in the DEPLOYMENT. I've tried a couple of methods to try and get around this.

    First: Try Excluding from DEPLOYMENT
    I tried to subtract the .hg folder from the DEPLOYMENT in the .pro file:

    @hgfiles.sources = qml/.hg
    DEPLOYMENT -= hgfiles@

    I also tried:

    @hgfiles.sources = qml/.hg/*
    DEPLOYMENT -= hgfiles@

    No joy in Mudville, I'm afraid. I also played around with trying to remove things via the DEPLOYMENTFOLDERS, but as I expected (based on my reading of the qmlapplicationviewer.pri file), it didn't work.

    Second: Cause QML Folder to Disappear
    I tried manually setting up the DEPLOYMENTFOLDERS variable:

    @folder_qml.source = qml/.qml qml/.js
    folder_qml.target = qml
    folder_components.source = qml/tool-library/.qml qml/tool-library/.js qml/tool-library/gfx
    folder_components.target = qml/tool-library
    DEPLOYMENTFOLDERS = folder_qml folder_components@

    This works perfectly, as far as the resulting .pkg file, in that only the desired files are included. Unfortunately, the QML section of the Projects tool window in the IDE disappears, and I can't access any of the related QML files.

    Any suggestions on a solution to this?

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      A cruel hack would be:

      Add QML files as OTHER_FILES in .pro file. Those files will not be included in deployment, but will show up in Qt Creator. So it should solve the issue while not braking anything else. If you are concernde that your .pro file will look ugly, though, you can consider including thid directive in a .pri file :)

      A short example taken from my project, just to give you a visual representation of my words :)
      @
      OTHER_FILES +=
      ../qml/main.qml
      ../qml/engineLogicHelpers.js \

      .... blah blah blah and so on ....

      @

      (Z(:^

      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