Home Download Buy Blog Forum Support

How do I use environment variables in project files?

How do I use environment variables in project files?

Postby Charles Randall on Thu Jul 12, 2012 1:59 am

Hi, I'm trying to create a project specific build system which references Visual Studio's devenv.exe... which is generally located via an environment variable VC90COMNTOOLS.

So this is what I have, which obviously doesn't work. But how do I make that environment variable work?

Code: Select all
   "build_systems":
   [
      {
         "cmd":
         [
            "%VS90COMNTOOLS%\\..\\IDE\\devenv.exe",
            "/Build",
            "\"Win32Debug|x64\"",
            "project.sln"
         ],
         "name": "Debug x64"
      }
   ]
Charles Randall
 
Posts: 1
Joined: Thu Jul 12, 2012 1:56 am

Re: How do I use environment variables in project files?

Postby sublimator on Thu Jul 12, 2012 2:31 am

You might have some luck putting a `"shell"=true` key/val at the same level as `cmd`

That way it will run the command via cmd.exe which I'm guessing might expands the env vars?
It is better to remain silent and be thought a fool, than to speak out and remove all doubt
sublimator
 
Posts: 649
Joined: Thu Mar 20, 2008 5:41 am


Return to Technical Support

Who is online

Users browsing this forum: Majestic-12 [Bot] and 40 guests