Uploaded image for project: 'Qbs ("Cubes")'
  1. Qbs ("Cubes")
  2. QBS-218

the artifact's config is not accessible in Rule.Artifact.fileName

    XMLWordPrintable

Details

    Description

      The artifact's config is not accessible in Rule.Artifact.fileName.

      Rule:

          Rule {
              inputs: [ "devheader" ]
              Artifact {
                  fileTags: [ "hpp",  "installed_content" ]
                  fileName: "GeneratedFiles/" + input.modules.qbs.installDir + "/" + input.fileName
              }
      
              prepare: {
                  var cmd = new JavaScriptCommand();
                  cmd.sourceCode = function() {
                      var inputFile = new TextFile(input.fileName, TextFile.ReadOnly);
                      var file = new TextFile(output.fileName, TextFile.WriteOnly);
                      file.truncate();
                      file.write("#include \"" + input.fileName + "\"\n");
                      file.close();
                  }
                  cmd.description = "generating " + FileInfo.fileName(output.fileName);
                  cmd.highlight = "filegen";
                  return cmd;
              }
          }
      

      Rule usage:

          Group {
              files: [
                  "api/*_p.h",
                  "api/draft/*_p.h",
                  "api/draft/*.h"
              ]
              fileTags: ["devheader"]
              overrideTags: false
              qbs.installDir: "include/vreen/" + vreen.core.version + "/vreen/private"
          }
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            jbornema Joerg Bornemann
            jbornema Joerg Bornemann
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes