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

Get files for macos bundle via tags

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • 2.0.1
    • API: C++, Platforms: Darwin
    • None
    • macOS

    Description

      Hi!

      I noticed, that Qbs allows to specify content for bundle only explicitly, not via tags. But this lead to some restrictions in my case. I want to put public headers to bundle, which are generated during build.

       

      I didn't found any proper solution how to put this file to bundle, except explicitly compute their further names:

              Properties {
                  bundle.publicHeaders: {
                      // Workaround.
                      // Public headers are generated to buildDirectory during build.
                      // So, we can't get it location directly: only execute it.
                      var headers = []

                      for (i in headersProbe.pubHeadersTempls) {
                          var file = headersProbe.pubHeadersTempls[i];
                          file = FileInfo.relativePath(sourceDirectory, file);
                          if (file.endsWith(".in"))
                              file = file.slice(0, -3);

                          file = FileInfo.joinPaths(buildDirectory, file)

                          headers.push(file);
                      }

                      return headers;
                  }
              }

              Probe {
                  id: headersProbe
                  property pathList pubHeadersTempls
                  property path includePath: FileInfo.joinPaths(product.sourceDirectory, "include")
                  configure: {
                      function seekIncludeFiles (dir) {
                          var includeFiles = File.directoryEntries(dir, File.Files);
                          includeFiles = includeFiles.map(function(file) {
                              return FileInfo.joinPaths(dir, file);
                          });
                          var innerDirs = File.directoryEntries(dir, File.Dirs | File.NoDotAndDotDot);
                          innerDirs.forEach(function(curDir) {
                              includeFiles = includeFiles.concat(seekIncludeFiles(FileInfo.joinPaths(dir, curDir)));
                          });
                          return includeFiles;
                      }

                      pubHeadersTempls = seekIncludeFiles(includePath);
                      found = true;
                  }
              }

       

      But i think it may be resolved by getting publicHeadrs (and another bundle content files) via tags.

       

      What do you  think about that?

      Attachments

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

        Activity

          People

            kandeler Christian Kandeler
            lo1ol Petr Mikhalitsyn
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes