From nobody Sun May 5 17:08:05 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+46185+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+46185+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1566433047; cv=none; d=zoho.com; s=zohoarc; b=U+EjXpaatk97txijyhD3ig+/lJAEw4Lz84GY0WqbzmltKVmHDqotHTS87H2nIARZr0kI8IM06SaK9WPiYQk+Dw13ffspaNMzbszCsk5icHCuqa5k4poU53r0u78Cd0ylksLEgjHWGzYpGyySmiwyy655m1T9e4O0InIhZ2AsQr8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1566433047; h=Content-Transfer-Encoding:Cc:Date:From:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To:ARC-Authentication-Results; bh=qSH5o78DlGB4msmBe9y9xi5Y1FPM8mJZlpL0TbS2IjQ=; b=AGvKtBhuQaWTViJWc+RhbXON3IyFnFRgTnvqEx4Ab5NgL0Zr/iDkpzEBR02YWuXc7ylbCCT6aIifTWmDJ7S9QEipWl2QG74eAEvlUzMSVrPeK8PEY7agegJsnhx2K1f51s0xBLS2SQ5fl9LadBrhKV3aipHcd1bilqL9wvq55pY= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+46185+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1566433047734428.58132851952166; Wed, 21 Aug 2019 17:17:27 -0700 (PDT) Return-Path: X-Received: from muon.bsdio.com (muon.bsdio.com [65.103.231.193]) by groups.io with SMTP; Wed, 21 Aug 2019 17:17:26 -0700 X-Received: from muon.bsdio.com (localhost [127.0.0.1]) by muon.bsdio.com (Postfix) with ESMTP id 327A8EDFC4; Wed, 21 Aug 2019 18:17:28 -0600 (MDT) X-Received: from muon.bsdio.com ([127.0.0.1]) by muon.bsdio.com (muon.bsdio.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id yYpZImwe9pE7; Wed, 21 Aug 2019 18:17:27 -0600 (MDT) X-Received: from photon.int.bluestop.org (unknown [10.0.10.120]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by muon.bsdio.com (Postfix) with ESMTPSA; Wed, 21 Aug 2019 18:17:27 -0600 (MDT) From: rebecca@bsdio.com To: devel@edk2.groups.io, Liming Gao , Bob Feng Cc: Rebecca Cran Subject: [edk2-devel] [PATCH] Update edksetup.bat etc. to support building BaseTools with VS2008 and VS2010 Date: Wed, 21 Aug 2019 18:17:13 -0600 Message-Id: <20190822001713.65061-1-rebecca@bsdio.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,rebecca@bsdio.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1566433047; bh=SMfew91J07oGL26vO/20V+9w79GiZV7pOEDCPnXCWwQ=; h=Cc:Date:From:Reply-To:Subject:To; b=kaYjXjDyopwy5WlfmC29q6lARlWMfWZEc62/xjkCcAW0bF62hBj6g9IT5neIKHSktyy ie1VlcL2AKwDyv6fR8sIzJHRk5VcCVkI9ujnJIaf0Vbdlh9tUN/D41VQl6z2JvUTFsaYQ XM/kt7OQoD0Lhc62Ab2581rWxpNKoJOmYGg= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" 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 =20 :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) =20 - 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 (i= f /I "%1"=3D=3D"VS2008" goto ToolNotInstall) + if defined VS80COMNTOOLS call :read_vsvars "%VS80COMNTOOLS%" if defined VS71COMNTOOLS call :read_vsvars "%VS71COMNTOOLS%" =20 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 =20 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 =20 :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 =20 :Usage @echo. - echo Usage: "%0 [-h | -help | --help | /h | /help | /?] [ Rebuild | For= ceRebuild ] [Reconfig] [base_tools_path [edk_tools_path]] [VS2017] [VS2015]= [VS2013] [VS2012]" + echo Usage: "%0 [-h | -help | --help | /h | /help | /?] [ Rebuild | For= ceRebuild ] [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 to= ols 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 =20 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 =20 :Usage @echo. - @echo Usage: "%0 [-h | -help | --help | /h | /help | /?] [Reconfig] [Re= build] [ForceRebuild] [VS2017] [VS2015] [VS2013] [VS2012]" + @echo Usage: "%0 [-h | -help | --help | /h | /help | /?] [Reconfig] [Re= build] [ForceRebuild] [VS2017] [VS2015] [VS2013] [VS2012] [VS2010] [VS2008]" @echo. @echo Reconfig Reinstall target.txt, tools_def.txt and bui= ld_rule.txt. @echo Rebuild Perform incremental rebuild of BaseTools bi= naries. @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. --=20 2.22.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 (#46185): https://edk2.groups.io/g/devel/message/46185 Mute This Topic: https://groups.io/mt/32985108/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-