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

Add noInstall property to qbs module for detecting --no-install option

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Invalid
    • Not Evaluated
    • None
    • some future version
    • API: JavaScript
    • None

    Description

      When working with the `windeployqt` tool, it's necessary to determine if the `--no-install` option has been set from the command line. Currently, I rely on `qbs.installRoot`, but this is more of a hack and not an ideal solution. The check is done by verifying whether the `installRoot` directory exists, which feels like a dirty workaround.

      For example:

      if (!File.exists(product.qbs.installRoot)) {
          var cmd = new JavaScriptCommand();
          cmd.windeployqtProgram = windeployqtProgram;
          cmd.description = "Cannot invoke '" + windeployqtProgram + "' when '--no-install' option has been set from command line";
          cmd.sourceCode = function () { 
              console.warn("Cannot invoke '" + windeployqtProgram + "' when '--no-install' option has been set from command line (tip: remove your build directory entirely after unchecking '--no-install' option)"); }
      } else {
          // Calling windeployqt
      }
      

       

      Proposal:
      I suggest adding a noInstall property to the qbs module, which would allow developers to properly detect when the --no-install option has been set without resorting to hacks like checking directory existence.

      Attachments

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

        Activity

          People

            kandeler Christian Kandeler
            dismine Roman Telezhynskyi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes