Hi Bruce, The only reason for enabling the visual studio environment (using --nt32) is to build the Nt32Pkg emulation platform. We discourage using a VS command prompt window for normal development, so that new, novice EDK II developers (who may do things like including <stdio.h>) will not be able to build using code from the standard Microsoft headers and libraries. The edk2 build system will use VS paths and commands defined in the Conf/tools_def.txt file (copied from the BaseTools/Conf/tools_def.template file) based on the tool chain tag, i.e., VS2008, VS2008x86, VS2013, VS2013x86. (The x86 tells the edk2 build tools that VS was installed in Program File (x86) instead of Program Files.)
I had originally written the Edk2Setup script to permit the user to specify which version of VS that they wanted to use for building the BaseTools binaries. However, I was requested to have the script act as the current edksetup which builds using the highest version of VS found on their system. (Some of us have more than one version of VS installed on our workstations.) The BUILD_TOOLS_WITH environment variable was to be set by a selection script and can be removed. Cheers, Larry -----Original Message----- From: Bruce Cran [mailto:bruce.c...@gmail.com] Sent: Thursday, October 30, 2014 8:22 AM To: edk2-devel@lists.sourceforge.net Subject: Re: [edk2] Edk2Setup.bat doesn't inherit %PATH% from calling shell On 10/27/2014 11:27 AM, Hauch, Larry wrote: > Actually, ORIGINAL_PATH is not a local variable, but is used as a flag so > that when Edk2Setup (or edksetup) is run multiple times in the same command > prompt window, the EDK II BaseTools path does not get added more than one > time, along with other changes to the PATH. > The design allowed for using Edk2Setup once with --nt32 for including visual > studio tools, then run it a second time without the flag and the visual > studio tools would be cleared from the PATH. Thanks. It would be nice if we could avoid changing the calling environment - could we require the user to already be running a VS Command Prompt for whichever version of Visual C++ they want to use, since Visual Studio installs shortcuts which set up the environment? Also, I see in SetVisualStudio.bat that it sets a COMMONTOOLSx64 variable: could it set the path to %VSxxCOMNTOOLS%\..\..\VC and then call "%COMMONTOOLSx64%\vcvarsall.bat x86_amd64" to avoid the hard-coded paths? Will the error message under the VersionNotFound label work? I don't see any parameters being passed from Edk2Setup.bat - in particular, BUILD_TOOLS_WITH appears unused. -- Bruce ------------------------------------------------------------------------------ _______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel ------------------------------------------------------------------------------ _______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel