From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 3990321D1E2D5 for ; Fri, 25 Aug 2017 06:04:19 -0700 (PDT) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Aug 2017 06:06:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,425,1498546800"; d="scan'208";a="1210382221" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga002.fm.intel.com with ESMTP; 25 Aug 2017 06:06:54 -0700 Received: from fmsmsx114.amr.corp.intel.com (10.18.116.8) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 25 Aug 2017 06:06:54 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by FMSMSX114.amr.corp.intel.com (10.18.116.8) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 25 Aug 2017 06:06:53 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.183]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.219]) with mapi id 14.03.0319.002; Fri, 25 Aug 2017 21:06:52 +0800 From: "Zhu, Yonghong" To: "Gao, Liming" , "edk2-devel@lists.01.org" Thread-Topic: [Patch] BaseTools: Update toolsetup.bat to support the case without EDK_TOOLS_BIN Thread-Index: AQHTHX9u1JWNp21gMU+bkvn8NIK54qKVCuXA Date: Fri, 25 Aug 2017 13:06:51 +0000 Message-ID: References: <1503651109-15160-1-git-send-email-liming.gao@intel.com> In-Reply-To: <1503651109-15160-1-git-send-email-liming.gao@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [Patch] BaseTools: Update toolsetup.bat to support the case without EDK_TOOLS_BIN X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Aug 2017 13:04:19 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Yonghong Zhu Best Regards, Zhu Yonghong -----Original Message----- From: Gao, Liming=20 Sent: Friday, August 25, 2017 4:52 PM To: edk2-devel@lists.01.org Cc: Zhu, Yonghong Subject: [Patch] BaseTools: Update toolsetup.bat to support the case withou= t EDK_TOOLS_BIN When EDK_TOOLS_BIN is not set, %EDK_TOOLS_PATH%\Bin\Win32 will be used as t= he binary tool directory. But, %EDK_TOOLS_PATH%\Bin\Win32 may not exist. On= this case, toolsetup.bat should continue to do the other setting, such VS = tool chain and tool conf file copy. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao Cc: Yonghong Zhu --- BaseTools/toolsetup.bat | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/BaseTools/toolsetup.bat b/BaseTools/toolsetup.bat index 3801ce= 0..51c2760 100755 --- a/BaseTools/toolsetup.bat +++ b/BaseTools/toolsetup.bat @@ -118,16 +118,13 @@ if /I "%1"=3D=3D"/?" goto Usage :set_PATH if defined WORKSPACE_TOOLS_PATH goto check_PATH if not defined EDK_TOOLS_BIN ( - if exist %EDK_TOOLS_PATH%\Bin\Win32 ( - set EDK_TOOLS_BIN=3D%EDK_TOOLS_PATH%\Bin\Win32 - ) else ( - set "PATH=3D%EDK_TOOLS_PATH%\Bin\Win32;%PATH%" + set EDK_TOOLS_BIN=3D%EDK_TOOLS_PATH%\Bin\Win32 + if not exist %EDK_TOOLS_PATH%\Bin\Win32 ( echo. echo !!! ERROR !!! Cannot find BaseTools Bin Win32!!! echo Please check the directory %EDK_TOOLS_PATH%\Bin\Win32 echo Or configure EDK_TOOLS_BIN env to point Win32 directory. echo.=20 - goto check_build_environment ) ) set PATH=3D%EDK_TOOLS_BIN%;%PATH% @@ -137,16 +134,13 @@ if /I "%1"=3D=3D"/?" goto Usage :check_PATH if "%EDK_TOOLS_PATH%"=3D=3D"%WORKSPACE_TOOLS_PATH%" goto PATH_ok if not defined EDK_TOOLS_BIN ( - if exist %EDK_TOOLS_PATH%\Bin\Win32 ( - set EDK_TOOLS_BIN=3D%EDK_TOOLS_PATH%\Bin\Win32 - ) else ( - set "PATH=3D%EDK_TOOLS_PATH%\Bin\Win32;%PATH%" + set EDK_TOOLS_BIN=3D%EDK_TOOLS_PATH%\Bin\Win32 + if not exist %EDK_TOOLS_PATH%\Bin\Win32 ( echo. echo !!! ERROR !!! Cannot find BaseTools Bin Win32!!! echo Please check the directory %EDK_TOOLS_PATH%\Bin\Win32 echo Or configure EDK_TOOLS_BIN env to point Win32 directory. echo.=20 - goto check_build_environment ) ) set PATH=3D%EDK_TOOLS_BIN%;%PATH% @@ -260,6 +254,7 @@ echo. if defined FORCE_REBUILD goto check_build_environment if defined REBUILD = goto check_build_environment if not exist "%EDK_TOOLS_PATH%" goto check_bu= ild_environment +if not exist "%EDK_TOOLS_BIN%" goto check_build_environment =20 IF NOT EXIST "%EDK_TOOLS_BIN%\BootSectImage.exe" goto check_c_tools IF NO= T EXIST "%EDK_TOOLS_BIN%\EfiLdrImage.exe" goto check_c_tools -- 2.8.0.windows.1