From nobody Fri May 3 05:52:48 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+64139+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+64139+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1597300849; cv=none; d=zohomail.com; s=zohoarc; b=n+t6WFVhtBedaP5+u8eRClqy+TuK3r9C4VqVrForPtgosIP2aHgV2jlpzIsiu42x6SlbMuRpfL+hUzPEyaAmL87BXHObimtGHgGDFjI9mWhMhvjH+dMakDEekUeHc7U3tWXM2xInAn/X5oie7/G5mLQNNfzR+4kU8rsIBnmObJk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1597300849; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=z2o/B0LgEfV52b24uDoH4Tkc5ElWsqXxSfm34086aoc=; b=XMGDgDmcCGX6ND1YgAIDO80Nwfe1+G3Tcp7OYSlbl5S2Ymy+2lYeMglCiaJs1qHqBtd51p64yuZyR2FSV7lqgmJxinbs5OInpqseybCwqi57nR4YM9CGjEqM43OSxu42zgdOL2uii5OqQ6L+vLd4d3iIUyLMK+iBTJeVOt6pur4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+64139+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1597300849715793.8620134661924; Wed, 12 Aug 2020 23:40:49 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id secCYY1788612xHH5r9leNSB; Wed, 12 Aug 2020 23:40:48 -0700 X-Received: from mga04.intel.com (mga04.intel.com []) by mx.groups.io with SMTP id smtpd.web12.5009.1597300847223902142 for ; Wed, 12 Aug 2020 23:40:48 -0700 IronPort-SDR: 51fXeQa/K9ZIuyxmcmGpvFPX9+lzOmeHKcdEei4+5D6cDlqgne7UWKoMmRTzlXlMSpCA8WMIk4 x3MzULC9qhGQ== X-IronPort-AV: E=McAfee;i="6000,8403,9711"; a="151590404" X-IronPort-AV: E=Sophos;i="5.76,307,1592895600"; d="scan'208";a="151590404" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Aug 2020 23:40:46 -0700 IronPort-SDR: RjUgitfzSrU2rFDC4pq9YTL7Ru3ovSE2NIVva13i8UpcJhapi4NwZjIfGcs9+oLIeWwuN6T2mB kQIf/oOrVItg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,307,1592895600"; d="scan'208";a="470109672" X-Received: from shwde7172.ccr.corp.intel.com ([10.239.154.19]) by orsmga005.jf.intel.com with ESMTP; 12 Aug 2020 23:40:46 -0700 From: "Liming Gao" To: devel@edk2.groups.io Cc: Bob Feng , Yuwei Chen Subject: [edk2-devel] [Patch 1/2] BaseTools: Move VS2019 env setting after VS2017 env setting Date: Thu, 13 Aug 2020 14:40:39 +0800 Message-Id: <20200813064040.1683-2-liming.gao@intel.com> In-Reply-To: <20200813064040.1683-1-liming.gao@intel.com> References: <20200813064040.1683-1-liming.gao@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,liming.gao@intel.com X-Gm-Message-State: NFQb1TJOHWPaSidhfbV1uAD6x1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1597300848; bh=LbeYS/mYl01X86YF/1SvxXLP5DD5RXJRkvegJiwSO8U=; h=Cc:Date:From:Reply-To:Subject:To; b=THu2lF9hVMG57YwBo6f3yOe2ZG07KmooM9sbbu9Gi8sRi57T4wA9BkRF7wA969g8D7d xVxfbOvHb6cca2A1Juj7K8Fw/5E8cjAQURvRW1RYuQ2bN33AFwWYo99HQQBKKQ6zu08EV XMQb8P44lbQjSRPR1a84TkBC0hj0f3x9Vrw= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2896 Keep the latest VS version as the last one Signed-off-by: Liming Gao Cc: Bob Feng Cc: Yuwei Chen Reviewed-by: Bob Feng --- BaseTools/set_vsprefix_envs.bat | 46 ++++++++++++++++----------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/BaseTools/set_vsprefix_envs.bat b/BaseTools/set_vsprefix_envs.= bat index 9966a5a4ed..38fb0eb260 100644 --- a/BaseTools/set_vsprefix_envs.bat +++ b/BaseTools/set_vsprefix_envs.bat @@ -3,7 +3,7 @@ @REM however it may be executed directly from the BaseTools project fold= er @REM if the file is not executed within a WORKSPACE\BaseTools folder. @REM -@REM Copyright (c) 2016-2019, Intel Corporation. All rights reserved.
+@REM Copyright (c) 2016-2020, Intel Corporation. All rights reserved.
@REM @REM SPDX-License-Identifier: BSD-2-Clause-Patent @REM @@ -108,45 +108,45 @@ if defined VS140COMNTOOLS ( ) if /I "%1"=3D=3D"VS2015" goto SetWinDDK =20 -:SetVS2019 -if not defined VS160COMNTOOLS ( +:SetVS2017 +if not defined VS150COMNTOOLS ( if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.= exe" ( - if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\BuildTools"= ( - call "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.= exe" -products Microsoft.VisualStudio.Product.BuildTools -version 16,17 > v= swhereInfo + if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\BuildTools"= ( + call "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.= exe" -products Microsoft.VisualStudio.Product.BuildTools -version 15,16 > v= swhereInfo for /f "usebackq tokens=3D1* delims=3D: " %%i in (vswhereInfo) do ( if /i "%%i"=3D=3D"installationPath" call "%%j\VC\Auxiliary\Build\v= cvars32.bat" ) del vswhereInfo ) else ( - call "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.= exe" -version 16,17 > vswhereInfo + call "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.= exe" -version 15,16 > vswhereInfo for /f "usebackq tokens=3D1* delims=3D: " %%i in (vswhereInfo) do ( if /i "%%i"=3D=3D"installationPath" call "%%j\VC\Auxiliary\Build\v= cvars32.bat" ) del vswhereInfo ) ) else if exist "%ProgramFiles%\Microsoft Visual Studio\Installer\vswher= e.exe" ( - if exist "%ProgramFiles%\Microsoft Visual Studio\2019\BuildTools" ( - call "%ProgramFiles%\Microsoft Visual Studio\Installer\vswhere.exe" = -products Microsoft.VisualStudio.Product.BuildTools -version 16,17 > vswher= eInfo + if exist "%ProgramFiles%\Microsoft Visual Studio\2017\BuildTools" ( + call "%ProgramFiles%\Microsoft Visual Studio\Installer\vswhere.exe" = -products Microsoft.VisualStudio.Product.BuildTools -version 15,16 > vswher= eInfo for /f "usebackq tokens=3D1* delims=3D: " %%i in (vswhereInfo) do ( if /i "%%i"=3D=3D"installationPath" call "%%j\VC\Auxiliary\Build\v= cvars32.bat" ) del vswhereInfo ) else ( - call "%ProgramFiles%\Microsoft Visual Studio\Installer\vswhere.exe" = -version 16,17 > vswhereInfo + call "%ProgramFiles%\Microsoft Visual Studio\Installer\vswhere.exe" = -version 15,16 > vswhereInfo for /f "usebackq tokens=3D1* delims=3D: " %%i in (vswhereInfo) do ( if /i "%%i"=3D=3D"installationPath" call "%%j\VC\Auxiliary\Build\v= cvars32.bat" ) del vswhereInfo ) ) else ( - if /I "%1"=3D=3D"VS2019" goto ToolNotInstall + if /I "%1"=3D=3D"VS2017" goto ToolNotInstall goto SetWinDDK ) ) =20 if defined VCToolsInstallDir ( - if not defined VS2019_PREFIX ( - set "VS2019_PREFIX=3D%VCToolsInstallDir%" + if not defined VS2017_PREFIX ( + set "VS2017_PREFIX=3D%VCToolsInstallDir%" ) if not defined WINSDK10_PREFIX ( if defined WindowsSdkVerBinPath ( @@ -164,45 +164,45 @@ if not defined WINSDK_PATH_FOR_RC_EXE ( ) ) =20 -:SetVS2017 -if not defined VS150COMNTOOLS ( +:SetVS2019 +if not defined VS160COMNTOOLS ( if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.= exe" ( - if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\BuildTools"= ( - call "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.= exe" -products Microsoft.VisualStudio.Product.BuildTools -version 15,16 > v= swhereInfo + if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\BuildTools"= ( + call "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.= exe" -products Microsoft.VisualStudio.Product.BuildTools -version 16,17 > v= swhereInfo for /f "usebackq tokens=3D1* delims=3D: " %%i in (vswhereInfo) do ( if /i "%%i"=3D=3D"installationPath" call "%%j\VC\Auxiliary\Build\v= cvars32.bat" ) del vswhereInfo ) else ( - call "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.= exe" -version 15,16 > vswhereInfo + call "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.= exe" -version 16,17 > vswhereInfo for /f "usebackq tokens=3D1* delims=3D: " %%i in (vswhereInfo) do ( if /i "%%i"=3D=3D"installationPath" call "%%j\VC\Auxiliary\Build\v= cvars32.bat" ) del vswhereInfo ) ) else if exist "%ProgramFiles%\Microsoft Visual Studio\Installer\vswher= e.exe" ( - if exist "%ProgramFiles%\Microsoft Visual Studio\2017\BuildTools" ( - call "%ProgramFiles%\Microsoft Visual Studio\Installer\vswhere.exe" = -products Microsoft.VisualStudio.Product.BuildTools -version 15,16 > vswher= eInfo + if exist "%ProgramFiles%\Microsoft Visual Studio\2019\BuildTools" ( + call "%ProgramFiles%\Microsoft Visual Studio\Installer\vswhere.exe" = -products Microsoft.VisualStudio.Product.BuildTools -version 16,17 > vswher= eInfo for /f "usebackq tokens=3D1* delims=3D: " %%i in (vswhereInfo) do ( if /i "%%i"=3D=3D"installationPath" call "%%j\VC\Auxiliary\Build\v= cvars32.bat" ) del vswhereInfo ) else ( - call "%ProgramFiles%\Microsoft Visual Studio\Installer\vswhere.exe" = -version 15,16 > vswhereInfo + call "%ProgramFiles%\Microsoft Visual Studio\Installer\vswhere.exe" = -version 16,17 > vswhereInfo for /f "usebackq tokens=3D1* delims=3D: " %%i in (vswhereInfo) do ( if /i "%%i"=3D=3D"installationPath" call "%%j\VC\Auxiliary\Build\v= cvars32.bat" ) del vswhereInfo ) ) else ( - if /I "%1"=3D=3D"VS2017" goto ToolNotInstall + if /I "%1"=3D=3D"VS2019" goto ToolNotInstall goto SetWinDDK ) ) =20 if defined VCToolsInstallDir ( - if not defined VS2017_PREFIX ( - set "VS2017_PREFIX=3D%VCToolsInstallDir%" + if not defined VS2019_PREFIX ( + set "VS2019_PREFIX=3D%VCToolsInstallDir%" ) if not defined WINSDK10_PREFIX ( if defined WindowsSdkVerBinPath ( --=20 2.27.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#64139): https://edk2.groups.io/g/devel/message/64139 Mute This Topic: https://groups.io/mt/76163155/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Fri May 3 05:52:48 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+64140+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+64140+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1597300851; cv=none; d=zohomail.com; s=zohoarc; b=mwdPl9gMVvp0Vh1Ff2oxGWouZVeuiYWEvHiGPXLAmu2bcnylfl1zpoJcV33I0dS7eLc+9eJLTHlHY9JbImPzCvP+0XkmkV6P6eo/BCAUvQjPh9r+89wCaeGobUT55ElF/bEz3PnhjfDoOxmTt2a/JXJtHY3WfaxyU8oNn5SR5lU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1597300851; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=96CJewdphXktk4tSNnrLfQtVRLu+C0WgrPcWrrfeABs=; b=KsyzAlFruThufEO7f/tNtE2oUbwFgfz3kJyTfgqPpxH1nkeT3U+Ig8UnVTm7ElLI7ROAZW53VINCAMjO0I97h8wy6LKlHOz2xXCod1VYYjqQasoK+u9RcCnKsIlPqQj4pFv3BLmy/Eb/NM7qX9jOL2wZVbG5P+pPo0wVfdQM3mk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+64140+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1597300851739154.31397836525832; Wed, 12 Aug 2020 23:40:51 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 74r5YY1788612xxoTlWtwMfs; Wed, 12 Aug 2020 23:40:51 -0700 X-Received: from mga04.intel.com (mga04.intel.com []) by mx.groups.io with SMTP id smtpd.web12.5009.1597300847223902142 for ; Wed, 12 Aug 2020 23:40:49 -0700 IronPort-SDR: 3kYwmGRUUC+CAbHHJeOGzU4m/FhAMhDG5DKIEm4lWTWna2tzHDYyX7Xybg76X0zU0lioksQkcd K5uzNXijOazw== X-IronPort-AV: E=McAfee;i="6000,8403,9711"; a="151590406" X-IronPort-AV: E=Sophos;i="5.76,307,1592895600"; d="scan'208";a="151590406" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Aug 2020 23:40:47 -0700 IronPort-SDR: +WYogC6r11LvSNhaLVlfNInkUyXC13ldVZsFZb/pkO+WbbvMJoSQQeSYDBwWuUbT2mrx5n2edl viulcKUJ2ICA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,307,1592895600"; d="scan'208";a="470109679" X-Received: from shwde7172.ccr.corp.intel.com ([10.239.154.19]) by orsmga005.jf.intel.com with ESMTP; 12 Aug 2020 23:40:47 -0700 From: "Liming Gao" To: devel@edk2.groups.io Cc: Bob Feng , Yuwei Chen Subject: [edk2-devel] [Patch 2/2] BaseTools: Fix the issue in VS prefix setting for VS2017/VS2019 Date: Thu, 13 Aug 2020 14:40:40 +0800 Message-Id: <20200813064040.1683-3-liming.gao@intel.com> In-Reply-To: <20200813064040.1683-1-liming.gao@intel.com> References: <20200813064040.1683-1-liming.gao@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,liming.gao@intel.com X-Gm-Message-State: EXfxwblAmchdpfJbewsKuvwCx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1597300851; bh=BrUoJGGy6XiwFHtem4zeIdcY707y/teHYtMWi5XaJgA=; h=Cc:Date:From:Reply-To:Subject:To; b=VE0tZrZGqQSHlEtQXm+FT3JMxjyVsu0A9uSh9OTSFuqqwXzj2PEgRx6YVunRta2EW5R +NFiuPSzYAlcRKntZ5pd6aNvkimsGotM7OhGIQJTE80mrRe2jKHXVHbtxX3Zh3E2YwAS7 QzOV2JgO3xS/3pdDzL1ZwcRLiRVMTtgAesY= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2896 When VS2017/VS2019 are both installed. VS prefix setting will wrongly be set. VS2017_PREFIX is set to the same value of VS2019. This patch clears VSINSTALLDIR and VCToolsVersion env, then the different vcvars32 can set the correct VS env. Signed-off-by: Liming Gao Cc: Bob Feng Cc: Yuwei Chen Reviewed-by: Bob Feng --- BaseTools/set_vsprefix_envs.bat | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/BaseTools/set_vsprefix_envs.bat b/BaseTools/set_vsprefix_envs.= bat index 38fb0eb260..2627587ba3 100644 --- a/BaseTools/set_vsprefix_envs.bat +++ b/BaseTools/set_vsprefix_envs.bat @@ -110,6 +110,9 @@ if /I "%1"=3D=3D"VS2015" goto SetWinDDK =20 :SetVS2017 if not defined VS150COMNTOOLS ( + @REM clear two envs so that vcvars32.bat can run successfully. + set VSINSTALLDIR=3D + set VCToolsVersion=3D if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.= exe" ( if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\BuildTools"= ( call "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.= exe" -products Microsoft.VisualStudio.Product.BuildTools -version 15,16 > v= swhereInfo @@ -166,6 +169,9 @@ if not defined WINSDK_PATH_FOR_RC_EXE ( =20 :SetVS2019 if not defined VS160COMNTOOLS ( + @REM clear two envs so that vcvars32.bat can run successfully. + set VSINSTALLDIR=3D + set VCToolsVersion=3D if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.= exe" ( if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\BuildTools"= ( call "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.= exe" -products Microsoft.VisualStudio.Product.BuildTools -version 16,17 > v= swhereInfo --=20 2.27.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#64140): https://edk2.groups.io/g/devel/message/64140 Mute This Topic: https://groups.io/mt/76163156/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-