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. QBS -> custom toolchain
Forum Updated to NodeBB v4.3 + New Features

QBS -> custom toolchain

Scheduled Pinned Locked Moved Qt Creator and other tools
1 Posts 1 Posters 1.2k Views 1 Watching
  • 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.
  • strahlexS Offline
    strahlexS Offline
    strahlex
    wrote on last edited by
    #1

    How can one add a custom build toolchain to QBS? As far as I understand this should be possible using a Module. I tried it like this:
    @import qbs 1.0
    import qbs.File
    import qbs.FileInfo
    import qbs.ModUtils

    Module {
    name: "hal"

    FileTagger {
               patterns: ["*.hal"]
               fileTags: ["hal"]
           }
    
    Rule {
        id: compiler
        inputs: ['hal']
        prepare: {
            var args = [];
            args.push(input.fileName);
            var cmd = new Command("echo", args);
            cmd.description = 'compiling ' + FileInfo.fileName(input.fileName);
            cmd.highlight = 'compiler';
            return cmd;
        }
    }
    

    }
    @

    @import qbs

    Product {
    name: "testProduct"
    files: ["test.hal", "main.cpp"]

    Group {
        name: "QML files"
        files: ["main.qml"]
        fileTags: ["qml"]
    }
    
    Depends { name: "hal" }
    
    FileTagger {
              patterns: "*.qml"
              fileTags: ["qml"]
          }
    
    Group {     // Properties for qml files
        name: "Install"
        fileTagsFilter: ["hal"]
        qbs.install: true
        qbs.installDir: "/blu/bin"
    }
    
    qbsSearchPaths: "machinekit"
    

    }
    @

    Shouldn't this echo all my *.hal files?

    Where can I get more help to QBS in general? The stuff in the documentation is not much at all.

    Regards
    Alexander

    Feel free to check out my website machinekoder.com
    and my pet projects Intellicute and QtQuickVcp

    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