[QBS] Making sense of the `installSourceBase' property

Georger Araujo georger.araujo at gmail.com
Fri Mar 18 18:15:37 CET 2016


Hi,
I want to install local files and I'm having trouble making sense of the
`installSourceBase' property.

I'm using qbs 1.4.4 with Qt Creator 3.6.0 on Windows with Qt 5.5.1, stock
install. Here's what my folder tree looks like:

\---recursive_install
    +---assets
    |   +---txt
    |   |       file.txt
    |   |
    |   \---xml
    |           file.xml
    |
    +---proj
    |   +---qbs
    |   |       recursive_install.qbs
    |   |
    |   \---vs2013
    |           recursive_install.sln
    |           recursive_install.vcxproj
    |           recursive_install.vcxproj.filters
    |           recursive_install.vcxproj.user
    |
    \---src
            main.cpp

And here's what recursive_install.qbs looks like:

import qbs

CppApplication {
    consoleApplication: true
    files: "../../src/main.cpp"

    Group {
        name: "Assets"
        files: ["../../assets/**"]
        qbs.install: true
//        qbs.installDir: "assets"               // #1
//        qbs.installSourceBase: "../../assets"  // #2
    }
    Group {     // Properties for the produced executable
        fileTagsFilter: product.type
        qbs.install: true
    }
}

When I uncomment #1, the local files are installed into
`installRoot/assets', but the folder structure is not preserved: both
`file.txt' and `file.xml' go into `assets'.

When I uncomment both #1 and #2, then it works as I intended: the local
files are installed to their respective folders, under
`install-root/assets'.

I've read [1] but couldn't make sense of what this means:
"Specifies the base directory of the local files that are going to be
installed. The source base directory is omitted from the target directory
path specified in installDir."
If e.g. I set qbs.installSourceBase as in #2, then does it mean that:
- `../../assets/txt/file.txt' will be stripped of "../../assets",
- prefixed with qbs.installDir as in #1,
- and installed to 'assets/txt/file.txt' (this is what I want)?
Or does it mean something else? Doesn't this clash with what's described in
[2], where it is instructed that qbs.installSourceBase is set to "."?

BTW, I inadvertently put an invalid path in #2, saved the file, and Qt
Creator immediately crashed -- no error message in the issues pane, no
warning dialog, nothing. I upgraded to 3.6.1 and it still crashes.

Best regards,

Georger

[1] http://doc.qt.io/qbs/qbs-module.html#installation-properties
[2] https://bugreports.qt.io/browse/QBS-842

Este e-mail foi enviado por um computador sem vĂ­rus e protegido pelo Avast.
www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
<#DDB4FAA8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qbs/attachments/20160318/fc598b46/attachment.html>


More information about the Qbs mailing list