From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (using TLSv1 with cipher CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 8CCFF1A1DEF for ; Sun, 23 Oct 2016 19:47:57 -0700 (PDT) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga101.jf.intel.com with ESMTP; 23 Oct 2016 19:47:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,392,1473145200"; d="scan'208";a="182995979" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by fmsmga004.fm.intel.com with ESMTP; 23 Oct 2016 19:47:56 -0700 Received: from FMSMSX110.amr.corp.intel.com (10.18.116.10) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.248.2; Sun, 23 Oct 2016 19:47:55 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by fmsmsx110.amr.corp.intel.com (10.18.116.10) with Microsoft SMTP Server (TLS) id 14.3.248.2; Sun, 23 Oct 2016 19:47:55 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.206]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.139]) with mapi id 14.03.0248.002; Mon, 24 Oct 2016 10:47:53 +0800 From: "Gao, Liming" To: Cinnamon Shia , "edk2-devel@lists.01.org" Thread-Topic: [edk2] [PATCH v2] Edk2Setup.bat: Support building platforms with Python source Thread-Index: AQHSK26RBGMj2Piwr0epxlSH6iAVHaC26xqQ Date: Mon, 24 Oct 2016 02:47:53 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14B49841F@shsmsx102.ccr.corp.intel.com> References: <20161021074121.6492-1-cinnamon.shia@hpe.com> In-Reply-To: <20161021074121.6492-1-cinnamon.shia@hpe.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH v2] Edk2Setup.bat: Support building platforms with Python source X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Oct 2016 02:47:57 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Liming Gao > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of > Cinnamon Shia > Sent: Friday, October 21, 2016 3:41 PM > To: edk2-devel@lists.01.org > Subject: [edk2] [PATCH v2] Edk2Setup.bat: Support building platforms with > Python source >=20 > Following the same approach as toolsetup.bat: > If build.exe, TargetTool.exe, Trim.exe or GenFds.exe is missing, run its > Python source instead. >=20 > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Cinnamon Shia > --- > Edk2Setup.bat | 36 ++++++++++++++++++++++++++++++------ > 1 file changed, 30 insertions(+), 6 deletions(-) >=20 > diff --git a/Edk2Setup.bat b/Edk2Setup.bat > index 2d13234..68f46dc 100755 > --- a/Edk2Setup.bat > +++ b/Edk2Setup.bat > @@ -27,6 +27,7 @@ > @REM build.exe Version 0.51 Developer Build based on Revision: 15668 > @REM > @REM Copyright (c) 2014, Intel Corporation. All rights reserved.
> +@REM (C) Copyright 2016 Hewlett Packard Enterprise Development LP
> @REM This program and the accompanying materials > @REM are licensed and made available under the terms and conditions of > the BSD License > @REM which accompanies this distribution. The full text of the license = may > be found at > @@ -59,6 +60,7 @@ > @set SRC_CONF=3D > @set ARGUMENT=3D > @set SCRIPT=3DEDKSETUP_BAT > +@set PYTHON_BUILD=3D >=20 > @if not defined ORIGINAL_PATH set "ORIGINAL_PATH=3D%PATH%" > @REM Always set the WORKSPACE environment variable to the current > directory > @@ -352,12 +354,7 @@ >=20 > @if defined REBUILD_TOOLS goto SetConf > @if defined SVN_PULL goto SetConf > -@if not exist "%EDK_TOOLS_PATH%\Bin\Win32\build.exe" ( > - @echo ERROR : %EDK_TOOLS_PATH%\Bin\Win32\build.exe does not exist > - @echo Re-run this script using --reset, --pull or --rebuild > - @echo. > - @goto ExitFailure > -) > + > @echo. > @echo Rebuilding of the tools is not required. Binaries of the latest, > @echo tested versions of the tools have been tested and included in the > @@ -416,6 +413,31 @@ > ) > @set "PATH=3D%EDK_TOOLS_BIN%;%PATH%" >=20 > +@if NOT EXIST "%EDK_TOOLS_BIN%\build.exe" @set > PYTHON_BUILD=3DTRUE > +@if NOT EXIST "%EDK_TOOLS_BIN%\GenFds.exe" @set > PYTHON_BUILD=3DTRUE > +@if NOT EXIST "%EDK_TOOLS_BIN%\TargetTool.exe" @set > PYTHON_BUILD=3DTRUE > +@if NOT EXIST "%EDK_TOOLS_BIN%\Trim.exe" @set PYTHON_BUILD=3DTRUE > + > +@if not defined PYTHON_BUILD goto SvnPull > + > +@echo !!! WARNING !!! Setup environment to run Python scripts directly. > + > +@if not defined PYTHON_HOME ( > + @if defined PYTHONHOME ( > + @set PYTHON_HOME=3D%PYTHONHOME% > + ) else ( > + @echo. > + @echo !!! ERROR !!! PYTHON_HOME is required to build or execute the > tools, please set it. !!! > + @echo. > + @goto ExitFailure > + ) > +) > + > +@set PATH=3D%PATH%;%BASE_TOOLS_PATH%\BinWrappers\WindowsLike > +@set > BASETOOLS_PYTHON_SOURCE=3D%BASE_TOOLS_PATH%\Source\Python > +@set PYTHONPATH=3D%BASETOOLS_PYTHON_SOURCE%;%PYTHONPATH% > + > +:SvnPull > @if "%REBUILD_TOOLS%"=3D=3D"TRUE" @goto Rebuild > @if "%SVN_PULL%"=3D=3D "TRUE" ( > if defined PYTHONHOME ( > @@ -485,6 +507,7 @@ > @set SCRIPT=3D > @set LIST_VS_VERSIONS=3D > @set PYTHON_FREEZER_PATH=3D > +@set PYTHON_BUILD=3D > @echo on > @exit /B 0 >=20 > @@ -504,5 +527,6 @@ > @set SCRIPT=3D > @set LIST_VS_VERSIONS=3D > @set PYTHON_FREEZER_PATH=3D > +@set PYTHON_BUILD=3D > @echo on > @exit /B 1 > -- > 2.10.0.windows.1 >=20 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel