Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. using environment vars in run params?

using environment vars in run params?

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
8 Posts 2 Posters 597 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    davecotter
    wrote on last edited by davecotter
    #1

    If i edit the kit to include some environment vars, like this:

    kit.png

    see those two vars? OS_NAME_LONG and OS_NAME_SHORT.

    now, can i use them in my RUN params, like this?

    run_cmd.png

    i would expect so, run env is based on build env. build env is based on kit env, so it should work? but it doesn't. and yes i tried using BuildConfig:Env: and RunConfig:Env: prefixes too, to no avail.

    1 Reply Last reply
    0
    • D Offline
      D Offline
      davecotter
      wrote on last edited by davecotter
      #8

      yes, a workaround is to reference the var this way:

      %{ActiveProject:BuildConfig:Env:OS_NAME_SHORT}
      

      however THE SOLUTION wold be if Qt Creator were fixed so that this worked:

      %{Env:OS_NAME_SHORT}
      
      1 Reply Last reply
      0
      • D Offline
        D Offline
        davecotter
        wrote on last edited by
        #2

        really nobody has any idea about this?

        1 Reply Last reply
        0
        • D Offline
          D Offline
          davecotter
          wrote on last edited by
          #3

          would you EXPECT this to work?

          is this a bug?

          1 Reply Last reply
          0
          • M Offline
            M Offline
            mchinand
            wrote on last edited by
            #4

            Do all the other variables get expanded correctly?

            1 Reply Last reply
            0
            • D Offline
              D Offline
              davecotter
              wrote on last edited by
              #5

              Yes, All of the other variables expand correctly

              1 Reply Last reply
              0
              • D Offline
                D Offline
                davecotter
                wrote on last edited by
                #6

                bump
                this is still failing in Qt Creator 6.0.0

                1 Reply Last reply
                0
                • M Offline
                  M Offline
                  mchinand
                  wrote on last edited by
                  #7

                  Does the fix for this issue work here? https://forum.qt.io/topic/122881/using-environment-vars-in-build-params

                  1 Reply Last reply
                  0
                  • D Offline
                    D Offline
                    davecotter
                    wrote on last edited by davecotter
                    #8

                    yes, a workaround is to reference the var this way:

                    %{ActiveProject:BuildConfig:Env:OS_NAME_SHORT}
                    

                    however THE SOLUTION wold be if Qt Creator were fixed so that this worked:

                    %{Env:OS_NAME_SHORT}
                    
                    1 Reply Last reply
                    0

                    • Login

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Users
                    • Groups
                    • Search
                    • Get Qt Extensions
                    • Unsolved