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

"product" property not accessible from cpp.setupRunEnvironment Property

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Not Evaluated Not Evaluated
    • None
    • 1.7.0
    • General
    • None
    • Windows 7 x64

      I want to add a path to external .dll files into "PATH" environment variable. I use setupRunEnvironment Property for it:

      import qbs 1.0
      StaticLibrary  {
           ...
          Export {
              Depends { name: "cpp" }
      
              cpp.setupRunEnvironment: {
                  var v = new ModUtils.EnvironmentVariable("PATH", ";", true);
                  v.prepend(product.sourceDirectory + "/dll" );
                  v.set();
              }
          }
      }
      

      Seems "product" property not accessible from this fragment.
      I got a error message: "Error retrieving run environment: ...\example_setupRunEnvironment\lib\lib.qbs:14:34 Error while setting up run environment: ReferenceError: Can't find variable: product"

      I prepared and attached a small example project.

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

            kandeler Christian Kandeler
            ramzes2 Roman Chernenko
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes