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 1/3] BaseTools: Add a new bat file to set PREFIX envs
Date: Fri, 28 Oct 2016 12:43:42 +0800	[thread overview]
Message-ID: <1477629824-36252-2-git-send-email-yonghong.zhu@intel.com> (raw)
In-Reply-To: <1477629824-36252-1-git-send-email-yonghong.zhu@intel.com>

Add set_vsprefix_envs.bat to set PREFIX envs as the default values if
they are not set.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
---
 BaseTools/set_vsprefix_envs.bat | 101 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 101 insertions(+)
 create mode 100644 BaseTools/set_vsprefix_envs.bat

diff --git a/BaseTools/set_vsprefix_envs.bat b/BaseTools/set_vsprefix_envs.bat
new file mode 100644
index 0000000..a860c28
--- /dev/null
+++ b/BaseTools/set_vsprefix_envs.bat
@@ -0,0 +1,101 @@
+@REM @file
+@REM   This stand-alone program is typically called by the toolsetup.bat file,
+@REM   however it may be executed directly from the BaseTools project folder
+@REM   if the file is not executed within a WORKSPACE\BaseTools folder.
+@REM
+@REM Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
+@REM
+@REM This program and the accompanying materials are licensed and made available
+@REM under the terms and conditions of the BSD License which accompanies this
+@REM distribution.  The full text of the license may be found at:
+@REM   http://opensource.org/licenses/bsd-license.php
+@REM
+@REM THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+@REM WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR
+@REM IMPLIED.
+@REM
+
+@echo off
+pushd .
+
+if defined VS71COMNTOOLS (
+  if not defined VS2003_PREFIX (
+    set "VS2003_PREFIX=%VS71COMNTOOLS:~0,-14%"
+  )
+)
+
+if defined VS80COMNTOOLS (
+  if not defined VS2005_PREFIX (
+    set "VS2005_PREFIX=%VS80COMNTOOLS:~0,-14%"
+  )
+)
+
+if defined VS90COMNTOOLS (
+  if not defined VS2008_PREFIX (
+    set "VS2008_PREFIX=%VS90COMNTOOLS:~0,-14%"
+  )
+  if not defined WINSDK_PREFIX (
+    set "WINSDK_PREFIX=c:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\"
+  )
+  if not defined WINSDKx86_PREFIX (
+    set "WINSDKx86_PREFIX=c:\Program Files (x86)\Microsoft SDKs\Windows\v6.0A\bin\"
+  )
+)
+
+if defined VS100COMNTOOLS (
+  if not defined VS2010_PREFIX (
+    set "VS2010_PREFIX=%VS100COMNTOOLS:~0,-14%"
+  )
+  if not defined WINSDK7_PREFIX (
+    set "WINSDK7_PREFIX=c:\Program Files\Microsoft SDKs\Windows\v7.0A\Bin\"
+  )
+  if not defined WINSDK7x86_PREFIX (
+    set "WINSDK7x86_PREFIX=c:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\"
+  )
+)
+
+if defined VS110COMNTOOLS (
+  if not defined VS2012_PREFIX (
+    set "VS2012_PREFIX=%VS110COMNTOOLS:~0,-14%"
+  )
+  if not defined WINSDK71_PREFIX (
+    set "WINSDK71_PREFIX=c:\Program Files\Microsoft SDKs\Windows\v7.1A\Bin\"
+  )
+  if not defined WINSDK71x86_PREFIX (
+    set "WINSDK71x86_PREFIX=c:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Bin\"
+  )
+)
+
+if defined VS120COMNTOOLS (
+  if not defined VS2013_PREFIX (
+    set "VS2013_PREFIX=%VS120COMNTOOLS:~0,-14%"
+  )
+  if not defined WINSDK8_PREFIX (
+    set "WINSDK8_PREFIX=c:\Program Files\Windows Kits\8.0\bin\"
+  )
+  if not defined WINSDK8x86_PREFIX (
+    set "WINSDK8x86_PREFIX=c:\Program Files (x86)\Windows Kits\8.0\bin\"
+  )
+)
+
+if defined VS140COMNTOOLS (
+  if not defined VS2015_PREFIX (
+    set "VS2015_PREFIX=%VS140COMNTOOLS:~0,-14%"
+  )
+  if not defined WINSDK81_PREFIX (
+    set "WINSDK81_PREFIX=c:\Program Files\Windows Kits\8.1\bin\"
+  )
+  if not defined WINSDK81x86_PREFIX (
+    set "WINSDK81x86_PREFIX=c:\Program Files (x86)\Windows Kits\8.1\bin\"
+  )
+)
+
+if not defined WINDDK3790_PREFIX (
+  set WINDDK3790_PREFIX=C:\WINDDK\3790.1830\bin\
+)
+
+if not defined IASL_PREFIX (
+  set IASL_PREFIX=C:\ASL\
+)
+
+popd
\ No newline at end of file
-- 
2.6.1.windows.1



  reply	other threads:[~2016-10-28  4:43 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 ` Yonghong Zhu [this message]
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 ` [Patch 3/3] BaseTools:introduce PREFIX env for VS tool path Yonghong Zhu
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-2-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