From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga01.intel.com (mga01.intel.com []) by mx.groups.io with SMTP id smtpd.web11.1593.1573461678580668089 for ; Mon, 11 Nov 2019 00:41:19 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=fail (domain: intel.com, ip: , mailfrom: michael.d.kinney@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Nov 2019 00:41:12 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,292,1569308400"; d="scan'208";a="234403642" Received: from mdkinney-mobl2.amr.corp.intel.com ([10.255.231.122]) by fmsmga002.fm.intel.com with ESMTP; 11 Nov 2019 00:41:12 -0800 From: "Michael D Kinney" To: devel@edk2.groups.io Cc: Sean Brogan , Bob Feng , Liming Gao Subject: [Patch v5 04/22] BaseTools: Add RC_PATH define for VS2017/2019 Date: Mon, 11 Nov 2019 00:40:49 -0800 Message-Id: <20191111084107.5368-5-michael.d.kinney@intel.com> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20191111084107.5368-1-michael.d.kinney@intel.com> References: <20191111084107.5368-1-michael.d.kinney@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Sean Brogan Add use of RC_PATH define that provides the path to the resource compiler that is typically provided in a Windows SDK. The path changes with different Windows SDK releases. This define is set to the WINSDK_PATH_FOR_RC_EXE environment variable. This environment variable must be set to the path to the currently installed resource compiler (rc.exe). Update set_vsprefix_envs.bat to set WINSDK_PATH_FOR_RC_EXE if a Windows SDK is detected. Cc: Bob Feng Cc: Liming Gao Signed-off-by: Michael D Kinney Reviewed-by: Liming Gao --- BaseTools/Conf/tools_def.template | 18 ++++++++++++++++-- BaseTools/set_vsprefix_envs.bat | 10 ++++++++++ 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template index dce6c5875a..afa13a7cae 100755 --- a/BaseTools/Conf/tools_def.template +++ b/BaseTools/Conf/tools_def.template @@ -4,9 +4,18 @@ # Portions copyright (c) 2011 - 2014, ARM Ltd. All rights reserved.
# Copyright (c) 2015, Hewlett-Packard Development Company, L.P.
# (C) Copyright 2016 Hewlett Packard Enterprise Development LP
+# Copyright (c) Microsoft Corporation # # SPDX-License-Identifier: BSD-2-Clause-Patent # +# +# Increase this version tag any time you want user to get warning about updating this +# file in the Conf dir. By default it does not do update existing conf dirs. +# +# 2.00 - Initial version with changes for CI +# - Change RC path to use plugin +# +#!VERSION=2.00 IDENTIFIER = Default TOOL_CHAIN_CONF @@ -71,6 +80,11 @@ DEFINE VS2019_BIN_X64 = DEF(VS2019_BIN)\HostDEF(VS_HOST)\x64 DEFINE VS2019_BIN_ARM = DEF(VS2019_BIN)\HostDEF(VS_HOST)\arm DEFINE VS2019_BIN_AARCH64 = DEF(VS2019_BIN)\HostDEF(VS_HOST)\arm64 +# +# Resource compiler +# +DEFINE RC_PATH = ENV(WINSDK_PATH_FOR_RC_EXE)\rc.exe + DEFINE WINSDK_BIN = ENV(WINSDK_PREFIX) DEFINE WINSDKx86_BIN = ENV(WINSDKx86_PREFIX) @@ -1566,7 +1580,7 @@ NOOPT_VS2015x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF *_VS2017_*_MAKE_PATH = DEF(VS2017_BIN_HOST)\nmake.exe *_VS2017_*_MAKE_FLAG = /nologo -*_VS2017_*_RC_PATH = DEF(WINSDK10_BIN)\rc.exe +*_VS2017_*_RC_PATH = DEF(RC_PATH) *_VS2017_*_MAKE_FLAGS = /nologo *_VS2017_*_SLINK_FLAGS = /NOLOGO /LTCG @@ -1729,7 +1743,7 @@ NOOPT_VS2017_AARCH64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF *_VS2019_*_MAKE_PATH = DEF(VS2019_BIN_HOST)\nmake.exe *_VS2019_*_MAKE_FLAG = /nologo -*_VS2019_*_RC_PATH = DEF(WINSDK10_BIN)\rc.exe +*_VS2019_*_RC_PATH = DEF(RC_PATH) *_VS2019_*_MAKE_FLAGS = /nologo *_VS2019_*_SLINK_FLAGS = /NOLOGO /LTCG diff --git a/BaseTools/set_vsprefix_envs.bat b/BaseTools/set_vsprefix_envs.bat index 6dff25d930..9966a5a4ed 100644 --- a/BaseTools/set_vsprefix_envs.bat +++ b/BaseTools/set_vsprefix_envs.bat @@ -158,6 +158,11 @@ if defined VCToolsInstallDir ( ) ) ) +if not defined WINSDK_PATH_FOR_RC_EXE ( + if defined WINSDK10_PREFIX ( + set "WINSDK_PATH_FOR_RC_EXE=%WINSDK10_PREFIX%x86" + ) +) :SetVS2017 if not defined VS150COMNTOOLS ( @@ -209,6 +214,11 @@ if defined VCToolsInstallDir ( ) ) ) +if not defined WINSDK_PATH_FOR_RC_EXE ( + if defined WINSDK10_PREFIX ( + set "WINSDK_PATH_FOR_RC_EXE=%WINSDK10_PREFIX%x86" + ) +) :SetWinDDK if not defined WINDDK3790_PREFIX ( -- 2.21.0.windows.1