X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;ds=sidebyside;f=edksetup.bat;h=2c8c072884b87498f55c036065e9e170c296db95;hb=e84f07b5fc919fcb13292aa6c33925c81f642e32;hp=4412ac27ed0fbb4e47d5fdf050774ddae7fe0730;hpb=3a6b4559e5182bd50a2f1de5abe5373d6c379388;p=mirror_edk2.git diff --git a/edksetup.bat b/edksetup.bat index 4412ac27ed..2c8c072884 100755 --- a/edksetup.bat +++ b/edksetup.bat @@ -1,8 +1,8 @@ @REM @file @REM Windows batch file to setup a WORKSPACE environment @REM -@REM Copyright (c) 2006 - 2008, Intel Corporation -@REM All rights reserved. This program and the accompanying materials +@REM Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.
+@REM This program and the accompanying materials @REM are licensed and made available under the terms and conditions of the BSD License @REM which accompanies this distribution. The full text of the license may be found at @REM http://opensource.org/licenses/bsd-license.php @@ -29,8 +29,24 @@ @REM pushd . cd %~dp0 + +if not defined WORKSPACE ( + @goto SetWorkSpace +) + +if %WORKSPACE% == %CD% ( + @REM Workspace is not changed. + @goto ParseArgs +) + +:SetWorkSpace +@REM set new workspace +@REM clear EFI_SOURCE and EDK_SOURCE for the new workspace set WORKSPACE=%CD% +set EFI_SOURCE= +set EDK_SOURCE= +:ParseArgs @if /I "%1"=="-h" goto Usage @if /I "%1"=="-help" goto Usage @if /I "%1"=="--help" goto Usage @@ -45,15 +61,27 @@ set WORKSPACE=%CD% @REM and headers to interface with Windows. if not defined VCINSTALLDIR ( - if defined VS71COMNTOOLS ( - call "%VS71COMNTOOLS%\vsvars32.bat" + if defined VS110COMNTOOLS ( + call "%VS110COMNTOOLS%\vsvars32.bat" ) else ( - if defined VS80COMNTOOLS ( - call "%VS80COMNTOOLS%\vsvars32.bat" + if defined VS100COMNTOOLS ( + call "%VS100COMNTOOLS%\vsvars32.bat" ) else ( - echo. - echo !!! WARNING !!! Cannot find Visual Studio !!! - echo. + if defined VS90COMNTOOLS ( + call "%VS90COMNTOOLS%\vsvars32.bat" + ) else ( + if defined VS80COMNTOOLS ( + call "%VS80COMNTOOLS%\vsvars32.bat" + ) else ( + if defined VS71COMNTOOLS ( + call "%VS71COMNTOOLS%\vsvars32.bat" + ) else ( + echo. + echo !!! WARNING !!! Cannot find Visual Studio !!! + echo. + ) + ) + ) ) ) )