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

"product" property not accessible from cpp.setupRunEnvironment Property

    XMLWordPrintable

Details

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

    Description

      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.

      Attachments

        Issue Links

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

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes