From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.43, mailfrom: liming.gao@intel.com) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by groups.io with SMTP; Wed, 21 Aug 2019 19:07:08 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Aug 2019 19:07:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,414,1559545200"; d="scan'208";a="186414081" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by FMSMGA003.fm.intel.com with ESMTP; 21 Aug 2019 19:07:07 -0700 Received: from fmsmsx608.amr.corp.intel.com (10.18.126.88) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 21 Aug 2019 19:07:07 -0700 Received: from fmsmsx608.amr.corp.intel.com (10.18.126.88) by fmsmsx608.amr.corp.intel.com (10.18.126.88) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Wed, 21 Aug 2019 19:07:07 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx608.amr.corp.intel.com (10.18.126.88) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Wed, 21 Aug 2019 19:07:04 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.112]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.80]) with mapi id 14.03.0439.000; Thu, 22 Aug 2019 10:07:00 +0800 From: "Liming Gao" To: "devel@edk2.groups.io" , "rebecca@bsdio.com" , "Feng, Bob C" Subject: Re: [edk2-devel] [PATCH] Update edksetup.bat etc. to support building BaseTools with VS2008 and VS2010 Thread-Topic: [edk2-devel] [PATCH] Update edksetup.bat etc. to support building BaseTools with VS2008 and VS2010 Thread-Index: AQHVWH78fbbPAdIygUC8woii+58EEacGauFA Date: Thu, 22 Aug 2019 02:07:00 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E4D9A84@SHSMSX104.ccr.corp.intel.com> References: <20190822001713.65061-1-rebecca@bsdio.com> In-Reply-To: <20190822001713.65061-1-rebecca@bsdio.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: liming.gao@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Rebecca: I am glad that you add this support. But, I want to confirm whether someo= ne still uses VS2008 or VS2010.=20 Thanks Liming >-----Original Message----- >From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of >rebecca@bsdio.com >Sent: Thursday, August 22, 2019 8:17 AM >To: devel@edk2.groups.io; Gao, Liming ; Feng, Bob C > >Cc: Rebecca Cran >Subject: [edk2-devel] [PATCH] Update edksetup.bat etc. to support building >BaseTools with VS2008 and VS2010 > >The parameter to select which version of Visual Studio to use when >building BaseTools only goes back to VS2012. Add support for VS2008 and >VS2010 and fix the code to avoid selecting a newer version if the user >has requested a specific version. > >Signed-off-by: Rebecca Cran >--- > BaseTools/get_vsvars.bat | 10 ++++++++-- > BaseTools/set_vsprefix_envs.bat | 2 ++ > BaseTools/toolsetup.bat | 24 +++++++++++++++++++++++- > edksetup.bat | 6 +++++- > 4 files changed, 38 insertions(+), 4 deletions(-) > >diff --git a/BaseTools/get_vsvars.bat b/BaseTools/get_vsvars.bat >index 9f3759b2a9..de8ba79c8b 100644 >--- a/BaseTools/get_vsvars.bat >+++ b/BaseTools/get_vsvars.bat >@@ -14,6 +14,8 @@ if /I "%1"=3D=3D"VS2017" goto VS2017Vars > if /I "%1"=3D=3D"VS2015" goto VS2015Vars > > if /I "%1"=3D=3D"VS2013" goto VS2013Vars > > if /I "%1"=3D=3D"VS2012" goto VS2012Vars > >+if /I "%1"=3D=3D"VS2010" goto VS2010Vars > >+if /I "%1"=3D=3D"VS2008" goto VS2008Vars > > > > :set_vsvars > > for /f "usebackq tokens=3D1* delims=3D: " %%i in (`%*`) do ( > >@@ -68,8 +70,12 @@ if defined VCINSTALLDIR goto :done > :VS2012Vars > > if defined VS110COMNTOOLS (call :read_vsvars "%VS110COMNTOOLS%") >else (if /I "%1"=3D=3D"VS2012" goto ToolNotInstall) > > > >- if defined VS100COMNTOOLS call :read_vsvars "%VS100COMNTOOLS%" > >- if defined VS90COMNTOOLS call :read_vsvars "%VS90COMNTOOLS%" > >+ :VS2010Vars > >+ if defined VS100COMNTOOLS (call :read_vsvars "%VS100COMNTOOLS%") >else (if /I "%1"=3D=3D"VS2010" goto ToolNotInstall) > >+ > >+ :VS2008Vars > >+ if defined VS90COMNTOOLS (call :read_vsvars "%VS90COMNTOOLS%") >else (if /I "%1"=3D=3D"VS2008" goto ToolNotInstall) > >+ > > if defined VS80COMNTOOLS call :read_vsvars "%VS80COMNTOOLS%" > > if defined VS71COMNTOOLS call :read_vsvars "%VS71COMNTOOLS%" > > > >diff --git a/BaseTools/set_vsprefix_envs.bat >b/BaseTools/set_vsprefix_envs.bat >index 81686f5b63..9165883d95 100644 >--- a/BaseTools/set_vsprefix_envs.bat >+++ b/BaseTools/set_vsprefix_envs.bat >@@ -46,6 +46,7 @@ if defined VS90COMNTOOLS ( > set "WINSDKx86_PREFIX=3Dc:\Program Files (x86)\Microsoft >SDKs\Windows\v6.0A\bin\" > > ) > > ) > >+if /I "%1"=3D=3D"VS2008" goto SetWinDDK > > > > if defined VS100COMNTOOLS ( > > if not defined VS2010_PREFIX ( > >@@ -58,6 +59,7 @@ if defined VS100COMNTOOLS ( > set "WINSDK7x86_PREFIX=3Dc:\Program Files (x86)\Microsoft >SDKs\Windows\v7.0A\Bin\" > > ) > > ) > >+if /I "%1"=3D=3D"VS2010" goto SetWinDDK > > > > :SetVS2012 > > if defined VS110COMNTOOLS ( > >diff --git a/BaseTools/toolsetup.bat b/BaseTools/toolsetup.bat >index 395694fa09..26060c947d 100755 >--- a/BaseTools/toolsetup.bat >+++ b/BaseTools/toolsetup.bat >@@ -66,6 +66,18 @@ if /I "%1"=3D=3D"/?" goto Usage > set VSTool=3DVS2012 > > goto loop > > ) > >+ if /I "%1"=3D=3D"VS2010" ( > >+ shift > >+ set VS2010=3DTRUE > >+ set VSTool=3DVS2010 > >+ goto loop > >+ ) > >+ if /I "%1"=3D=3D"VS2008" ( > >+ shift > >+ set VS2008=3DTRUE > >+ set VSTool=3DVS2008 > >+ goto loop > >+ ) > > if "%1"=3D=3D"" goto setup_workspace > > if exist %1 ( > > if not defined BASE_TOOLS_PATH ( > >@@ -187,6 +199,12 @@ if defined VS2017 ( > ) else if defined VS2012 ( > > call %EDK_TOOLS_PATH%\set_vsprefix_envs.bat VS2012 > > call %EDK_TOOLS_PATH%\get_vsvars.bat VS2012 > >+) else if defined VS2010 ( > >+ call %EDK_TOOLS_PATH%\set_vsprefix_envs.bat VS2010 > >+ call %EDK_TOOLS_PATH%\get_vsvars.bat VS2010 > >+) else if defined VS2008 ( > >+ call %EDK_TOOLS_PATH%\set_vsprefix_envs.bat VS2008 > >+ call %EDK_TOOLS_PATH%\get_vsvars.bat VS2008 > > ) else ( > > call %EDK_TOOLS_PATH%\set_vsprefix_envs.bat > > call %EDK_TOOLS_PATH%\get_vsvars.bat > >@@ -444,7 +462,7 @@ goto end > > > :Usage > > @echo. > >- echo Usage: "%0 [-h | -help | --help | /h | /help | /?] [ Rebuild | >ForceRebuild ] [Reconfig] [base_tools_path [edk_tools_path]] [VS2017] >[VS2015] [VS2013] [VS2012]" > >+ echo Usage: "%0 [-h | -help | --help | /h | /help | /?] [ Rebuild | >ForceRebuild ] [Reconfig] [base_tools_path [edk_tools_path]] [VS2017] >[VS2015] [VS2013] [VS2012] [VS2010] [VS2008]" > > @echo. > > @echo base_tools_path BaseTools project path, BASE_TOOLS_PATH >will be set to this path. > > @echo edk_tools_path EDK_TOOLS_PATH will be set to this path= . > >@@ -453,6 +471,8 @@ goto end > @echo ForceRebuild If sources are available, rebuild all t= ools >regardless of > > @echo whether they have been updated or not. > > @echo Reconfig Reinstall target.txt, tools_def.txt and= build_rule.txt. > >+ @echo VS2008 Set the env for VS2008 build. > >+ @echo VS2010 Set the env for VS2010 build. > > @echo VS2012 Set the env for VS2012 build. > > @echo VS2013 Set the env for VS2013 build. > > @echo VS2015 Set the env for VS2015 build. > >@@ -467,6 +487,8 @@ set VS2017=3D > set VS2015=3D > > set VS2013=3D > > set VS2012=3D > >+set VS2010=3D > >+set VS2008=3D > > set VSTool=3D > > popd > > > >diff --git a/edksetup.bat b/edksetup.bat >index 5f6028deff..fba19485bf 100755 >--- a/edksetup.bat >+++ b/edksetup.bat >@@ -137,15 +137,19 @@ if /I "%1"=3D=3D"VS2017" shift > if /I "%1"=3D=3D"VS2015" shift > > if /I "%1"=3D=3D"VS2013" shift > > if /I "%1"=3D=3D"VS2012" shift > >+if /I "%1"=3D=3D"VS2010" shift > >+if /I "%1"=3D=3D"VS2008" shift > > if "%1"=3D=3D"" goto end > > > > :Usage > > @echo. > >- @echo Usage: "%0 [-h | -help | --help | /h | /help | /?] [Reconfig] [R= ebuild] >[ForceRebuild] [VS2017] [VS2015] [VS2013] [VS2012]" > >+ @echo Usage: "%0 [-h | -help | --help | /h | /help | /?] [Reconfig] [R= ebuild] >[ForceRebuild] [VS2017] [VS2015] [VS2013] [VS2012] [VS2010] [VS2008]" > > @echo. > > @echo Reconfig Reinstall target.txt, tools_def.txt and bu= ild_rule.txt. > > @echo Rebuild Perform incremental rebuild of BaseTools b= inaries. > > @echo ForceRebuild Force a full rebuild of BaseTools binaries= . > >+ @echo VS2008 Set the env for VS2008 build. > >+ @echo VS2010 Set the env for VS2010 build. > > @echo VS2012 Set the env for VS2012 build. > > @echo VS2013 Set the env for VS2013 build. > > @echo VS2015 Set the env for VS2015 build. > >-- >2.22.1 > > >-=3D-=3D-=3D-=3D-=3D-=3D >Groups.io Links: You receive all messages sent to this group. > >View/Reply Online (#46185): https://edk2.groups.io/g/devel/message/46185 >Mute This Topic: https://groups.io/mt/32985108/1759384 >Group Owner: devel+owner@edk2.groups.io >Unsubscribe: https://edk2.groups.io/g/devel/unsub [liming.gao@intel.com] >-=3D-=3D-=3D-=3D-=3D-=3D