public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Yonghong Zhu <yonghong.zhu@intel.com>
To: edk2-devel@lists.01.org
Cc: Liming Gao <liming.gao@intel.com>
Subject: [Patch 3/3] BaseTools:introduce PREFIX env for VS tool path
Date: Fri, 28 Oct 2016 12:43:44 +0800	[thread overview]
Message-ID: <1477629824-36252-4-git-send-email-yonghong.zhu@intel.com> (raw)
In-Reply-To: <1477629824-36252-1-git-send-email-yonghong.zhu@intel.com>

This patch introduce PREFIX env for VS tool path for tools_def.template
file.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
---
 BaseTools/Conf/tools_def.template | 90 +++++++++++++++++++--------------------
 1 file changed, 44 insertions(+), 46 deletions(-)

diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template
index bae5ab0..39fda78 100755
--- a/BaseTools/Conf/tools_def.template
+++ b/BaseTools/Conf/tools_def.template
@@ -15,100 +15,99 @@
 #
 
 IDENTIFIER = Default TOOL_CHAIN_CONF
 
 # common path macros
-DEFINE VS2003_BIN       = C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin
-DEFINE VS2003_DLL       = C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\IDE
+DEFINE VS2003_BIN       = ENV(VS2003_PREFIX)Vc7\bin
+DEFINE VS2003_DLL       = ENV(VS2003_PREFIX)Common7\IDE
 
-DEFINE VS2005_BIN       = C:\Program Files\Microsoft Visual Studio 8\Vc\bin
-DEFINE VS2005_DLL       = C:\Program Files\Microsoft Visual Studio 8\Common7\IDE;DEF(VS2005_BIN)
-DEFINE VS2005_BINX64    = C:\Program Files\Microsoft Visual Studio 8\Vc\bin\x86_amd64
-DEFINE VS2005_BIN64     = C:\Program Files\Microsoft Visual Studio 8\Vc\bin\x86_ia64
+DEFINE VS2005_BIN       = ENV(VS2005_PREFIX)Vc\bin
+DEFINE VS2005_DLL       = ENV(VS2005_PREFIX)Common7\IDE;DEF(VS2005_BIN)
+DEFINE VS2005_BINX64    = DEF(VS2005_BIN)\x86_amd64
+DEFINE VS2005_BIN64     = DEF(VS2005_BIN)\x86_ia64
 
-DEFINE VS2005x86_BIN    = C:\Program Files (x86)\Microsoft Visual Studio 8\Vc\bin
-DEFINE VS2005x86_DLL    = C:\Program Files (x86)\Microsoft Visual Studio 8\Common7\IDE;DEF(VS2005x86_BIN)
+DEFINE VS2005x86_BIN    = ENV(VS2005_PREFIX)Vc\bin
+DEFINE VS2005x86_DLL    = ENV(VS2005_PREFIX)Common7\IDE;DEF(VS2005x86_BIN)
 DEFINE VS2005x86_BINX64 = DEF(VS2005x86_BIN)\x86_amd64
 DEFINE VS2005x86_BIN64  = DEF(VS2005x86_BIN)\x86_ia64
 
-DEFINE VS2008_BIN      = C:\Program Files\Microsoft Visual Studio 9.0\Vc\bin
-DEFINE VS2008_DLL      = C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE;DEF(VS2008_BIN)
+DEFINE VS2008_BIN      = ENV(VS2008_PREFIX)Vc\bin
+DEFINE VS2008_DLL      = ENV(VS2008_PREFIX)Common7\IDE;DEF(VS2008_BIN)
 DEFINE VS2008_BINX64   = DEF(VS2008_BIN)\x86_amd64
 DEFINE VS2008_BIN64    = DEF(VS2008_BIN)\x86_ia64
 
-DEFINE VS2008x86_BIN    = C:\Program Files (x86)\Microsoft Visual Studio 9.0\Vc\bin
-DEFINE VS2008x86_DLL    = C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE;DEF(VS2008x86_BIN)
+DEFINE VS2008x86_BIN    = ENV(VS2008_PREFIX)Vc\bin
+DEFINE VS2008x86_DLL    = ENV(VS2008_PREFIX)Common7\IDE;DEF(VS2008x86_BIN)
 DEFINE VS2008x86_BINX64 = DEF(VS2008x86_BIN)\x86_amd64
 DEFINE VS2008x86_BIN64  = DEF(VS2008x86_BIN)\x86_ia64
 
-DEFINE VS2010_BIN      = C:\Program Files\Microsoft Visual Studio 10.0\Vc\bin
-DEFINE VS2010_DLL      = C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE;DEF(VS2010_BIN)
+DEFINE VS2010_BIN      = ENV(VS2010_PREFIX)Vc\bin
+DEFINE VS2010_DLL      = ENV(VS2010_PREFIX)Common7\IDE;DEF(VS2010_BIN)
 DEFINE VS2010_BINX64   = DEF(VS2010_BIN)\x86_amd64
 DEFINE VS2010_BIN64    = DEF(VS2010_BIN)\x86_ia64
 
-DEFINE VS2010x86_BIN    = C:\Program Files (x86)\Microsoft Visual Studio 10.0\Vc\bin
-DEFINE VS2010x86_DLL    = C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE;DEF(VS2010x86_BIN)
+DEFINE VS2010x86_BIN    = ENV(VS2010_PREFIX)Vc\bin
+DEFINE VS2010x86_DLL    = ENV(VS2010_PREFIX)Common7\IDE;DEF(VS2010x86_BIN)
 DEFINE VS2010x86_BINX64 = DEF(VS2010x86_BIN)\x86_amd64
 DEFINE VS2010x86_BIN64  = DEF(VS2010x86_BIN)\x86_ia64
 
-DEFINE VS2012_BIN      = C:\Program Files\Microsoft Visual Studio 11.0\Vc\bin
-DEFINE VS2012_DLL      = C:\Program Files\Microsoft Visual Studio 11.0\Common7\IDE;DEF(VS2012_BIN)
+DEFINE VS2012_BIN      = ENV(VS2012_PREFIX)Vc\bin
+DEFINE VS2012_DLL      = ENV(VS2012_PREFIX)Common7\IDE;DEF(VS2012_BIN)
 DEFINE VS2012_BINX64   = DEF(VS2012_BIN)\x86_amd64
 
-DEFINE VS2012x86_BIN    = C:\Program Files (x86)\Microsoft Visual Studio 11.0\Vc\bin
-DEFINE VS2012x86_DLL    = C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE;DEF(VS2012x86_BIN)
+DEFINE VS2012x86_BIN    = ENV(VS2012_PREFIX)Vc\bin
+DEFINE VS2012x86_DLL    = ENV(VS2012_PREFIX)Common7\IDE;DEF(VS2012x86_BIN)
 DEFINE VS2012x86_BINX64 = DEF(VS2012x86_BIN)\x86_amd64
 
-DEFINE VS2013_BIN      = C:\Program Files\Microsoft Visual Studio 12.0\Vc\bin
-DEFINE VS2013_DLL      = C:\Program Files\Microsoft Visual Studio 12.0\Common7\IDE;DEF(VS2012_BIN)
+DEFINE VS2013_BIN      = ENV(VS2013_PREFIX)Vc\bin
+DEFINE VS2013_DLL      = ENV(VS2013_PREFIX)Common7\IDE;DEF(VS2013_BIN)
 DEFINE VS2013_BINX64   = DEF(VS2013_BIN)\x86_amd64
 
-DEFINE VS2013x86_BIN    = C:\Program Files (x86)\Microsoft Visual Studio 12.0\Vc\bin
-DEFINE VS2013x86_DLL    = C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE;DEF(VS2013x86_BIN)
+DEFINE VS2013x86_BIN    = ENV(VS2013_PREFIX)Vc\bin
+DEFINE VS2013x86_DLL    = ENV(VS2013_PREFIX)Common7\IDE;DEF(VS2013x86_BIN)
 DEFINE VS2013x86_BINX64 = DEF(VS2013x86_BIN)\x86_amd64
 
-DEFINE VS2015_BIN      = C:\Program Files\Microsoft Visual Studio 14.0\Vc\bin
-DEFINE VS2015_DLL      = C:\Program Files\Microsoft Visual Studio 14.0\Common7\IDE;DEF(VS2015_BIN)
+DEFINE VS2015_BIN      = ENV(VS2015_PREFIX)Vc\bin
+DEFINE VS2015_DLL      = ENV(VS2015_PREFIX)Common7\IDE;DEF(VS2015_BIN)
 DEFINE VS2015_BINX64   = DEF(VS2015_BIN)\x86_amd64
 
-DEFINE VS2015x86_BIN    = C:\Program Files (x86)\Microsoft Visual Studio 14.0\Vc\bin
-DEFINE VS2015x86_DLL    = C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE;DEF(VS2015x86_BIN)
+DEFINE VS2015x86_BIN    = ENV(VS2015_PREFIX)Vc\bin
+DEFINE VS2015x86_DLL    = ENV(VS2015_PREFIX)Common7\IDE;DEF(VS2015x86_BIN)
 DEFINE VS2015x86_BINX64 = DEF(VS2015x86_BIN)\x86_amd64
 
-DEFINE WINSDK_VERSION   = v6.0A
-DEFINE WINSDK_BIN       = c:\Program Files\Microsoft SDKs\Windows\DEF(WINSDK_VERSION)\bin
-DEFINE WINSDKx86_BIN    = c:\Program Files (x86)\Microsoft SDKs\Windows\DEF(WINSDK_VERSION)\bin
+DEFINE WINSDK_BIN       = ENV(WINSDK_PREFIX)
+DEFINE WINSDKx86_BIN    = ENV(WINSDKx86_PREFIX)
 
 # Microsoft Visual Studio 2010
-DEFINE WINSDK7_BIN       = c:\Program Files\Microsoft SDKs\Windows\v7.0A\Bin
-DEFINE WINSDK7x86_BIN    = c:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin
+DEFINE WINSDK7_BIN       = ENV(WINSDK7_PREFIX)
+DEFINE WINSDK7x86_BIN    = ENV(WINSDK7x86_PREFIX)
 
 # Microsoft Visual Studio 2012 Update 1 (required for rc.exe that was not included in the initial release)
-DEFINE WINSDK71_BIN       = c:\Program Files\Microsoft SDKs\Windows\v7.1A\Bin
-DEFINE WINSDK71x86_BIN    = c:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Bin
+DEFINE WINSDK71_BIN       = ENV(WINSDK71_PREFIX)
+DEFINE WINSDK71x86_BIN    = ENV(WINSDK71x86_PREFIX)
 
 # Microsoft Visual Studio 2013 Professional Edition
-DEFINE WINSDK8_BIN       = c:\Program Files\Windows Kits\8.0\bin\x86\
-DEFINE WINSDK8x86_BIN    = c:\Program Files (x86)\Windows Kits\8.0\bin\x64
+DEFINE WINSDK8_BIN       = ENV(WINSDK8_PREFIX)x86\
+DEFINE WINSDK8x86_BIN    = ENV(WINSDK8x86_PREFIX)x64
 
 # Microsoft Visual Studio 2015 Professional Edition
-DEFINE WINSDK81_BIN       = c:\Program Files\Windows Kits\8.1\bin\x86\
-DEFINE WINSDK81x86_BIN    = c:\Program Files (x86)\Windows Kits\8.1\bin\x64
+DEFINE WINSDK81_BIN       = ENV(WINSDK81_PREFIX)x86\
+DEFINE WINSDK81x86_BIN    = ENV(WINSDK81x86_PREFIX)x64
 
 # These defines are needed for certain Microsoft Visual Studio tools that
 # are used by other toolchains.  An example is that ICC on Windows normally
 # uses Microsoft's nmake.exe.
 
 # Some MS_VS_BIN options: DEF(VS2003_BIN), DEF(VS2005_BIN), DEF(VS2005x86_BIN), DEF(VS2008_BIN), DEF(VS2008x86_BIN)
 DEFINE MS_VS_BIN   = DEF(VS2005_BIN)
 # Some MS_VS_DLL options: DEF(VS2003_DLL), DEF(VS2005_DLL), DEF(VS2005x86_DLL), DEF(VS2008_DLL), DEF(VS2008x86_DLL)
 DEFINE MS_VS_DLL   = DEF(VS2005_DLL)
 
-DEFINE WINDDK_BIN16     = C:\WINDDK\3790.1830\bin\bin16
-DEFINE WINDDK_BIN32     = C:\WINDDK\3790.1830\bin\x86
-DEFINE WINDDK_BINX64    = C:\WINDDK\3790.1830\bin\win64\x86\amd64
-DEFINE WINDDK_BIN64     = C:\WINDDK\3790.1830\bin\win64\x86
+DEFINE WINDDK_BIN16     = ENV(WINDDK3790_PREFIX)bin16
+DEFINE WINDDK_BIN32     = ENV(WINDDK3790_PREFIX)x86
+DEFINE WINDDK_BINX64    = ENV(WINDDK3790_PREFIX)win64\x86\amd64
+DEFINE WINDDK_BIN64     = ENV(WINDDK3790_PREFIX)win64\x86
 
 # NOTE: The Intel C++ Compiler for Windows requires one of the Microsoft C compiler
 #        tool chains for the linker and nmake commands.
 #        This configuration assumes a Windows 2003 Server DDK installation.
 DEFINE ICC_VERSION      = 9.1
@@ -199,13 +198,12 @@ DEFINE GCC49_X64_PREFIX        = ENV(GCC49_BIN)
 
 DEFINE GCC5_IA32_PREFIX        = ENV(GCC5_BIN)
 DEFINE GCC5_X64_PREFIX         = ENV(GCC5_BIN)
 
 DEFINE UNIX_IASL_BIN           = ENV(IASL_PREFIX)iasl
-DEFINE WIN_ASL_BIN_DIR         = C:\ASL
-DEFINE WIN_IASL_BIN            = DEF(WIN_ASL_BIN_DIR)\iasl.exe
-DEFINE WIN_ASL_BIN             = DEF(WIN_ASL_BIN_DIR)\asl.exe
+DEFINE WIN_IASL_BIN            = ENV(IASL_PREFIX)iasl.exe
+DEFINE WIN_ASL_BIN             = ENV(IASL_PREFIX)asl.exe
 
 DEFINE IASL_FLAGS              =
 DEFINE IASL_OUTFLAGS           = -p
 DEFINE MS_ASL_OUTFLAGS         = /Fo=
 DEFINE MS_ASL_FLAGS            =
-- 
2.6.1.windows.1



  parent reply	other threads:[~2016-10-28  4:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-28  4:43 [Patch 0/3] BaseTools: Replace hardcoding VS path in tools_def.template Yonghong Zhu
2016-10-28  4:43 ` [Patch 1/3] BaseTools: Add a new bat file to set PREFIX envs Yonghong Zhu
2016-10-28  4:43 ` [Patch 2/3] BaseTools: Update toolsetup.bat to call the set_vsprefix_envs.bat Yonghong Zhu
2016-10-28  4:43 ` Yonghong Zhu [this message]
2016-11-01  2:51 ` [Patch 0/3] BaseTools: Replace hardcoding VS path in tools_def.template Gao, Liming

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1477629824-36252-4-git-send-email-yonghong.zhu@intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox