GitEdk2MinTiogaPass.bat 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. @REM @file
  2. @REM
  3. @REM Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
  4. @REM Copyright (c) 2021, American Megatrends International LLC.<BR>
  5. @REM SPDX-License-Identifier: BSD-2-Clause-Patent
  6. @REM
  7. @echo off
  8. pushd ..\..\..\..\..\
  9. @REM Set WORKSPACE environment.
  10. set WORKSPACE=%cd%
  11. echo.
  12. echo Set WORKSPACE as: %WORKSPACE%
  13. echo.
  14. @REM Check whether Git has been installed and been added to system path.
  15. git --help >nul 2>nul
  16. if %ERRORLEVEL% NEQ 0 (
  17. echo.
  18. echo The 'git' command is not recognized.
  19. echo Please make sure that Git is installed and has been added to system path.
  20. echo.
  21. goto :EOF
  22. )
  23. @REM Create the Conf directory under WORKSPACE
  24. if not exist %WORKSPACE%\Conf (
  25. mkdir Conf
  26. )
  27. @REM Set other environments.
  28. @REM Basic Rule:
  29. @REM Platform override Silicon override Core
  30. @REM Source override Binary
  31. set PACKAGES_PATH=%WORKSPACE%\edk2-platforms\Platform\Intel;%WORKSPACE%\edk2-platforms\Silicon\Intel;%WORKSPACE%\edk2-platforms\Features\Intel;%WORKSPACE%\edk2-platforms\Features\Intel\Debugging;%WORKSPACE%\edk2-platforms\Features\Intel\Network;%WORKSPACE%\edk2-platforms\Features\Intel\OutOfBandManagement;%WORKSPACE%\edk2-platforms\Features\Intel\PowerManagement;%WORKSPACE%\edk2-platforms\Features\Intel\SystemInformation;%WORKSPACE%\edk2-platforms\Features\Intel\UserInterface;%WORKSPACE%\edk2-non-osi\Silicon\Intel;%WORKSPACE%\edk2;%WORKSPACE%
  32. set EDK_TOOLS_BIN=%WORKSPACE%\edk2-BaseTools-win32
  33. @if not defined PYTHON_HOME (
  34. @if exist C:\Python27 (
  35. set PYTHON_HOME=C:\Python27
  36. )
  37. )
  38. set EDK_SETUP_OPTION=
  39. @rem if python is installed, disable the binary base tools.
  40. if defined PYTHON_HOME (
  41. set EDK_TOOLS_BIN=
  42. set EDK_SETUP_OPTION=Rebuild
  43. )
  44. pushd %WORKSPACE%\edk2
  45. call edksetup.bat %EDK_SETUP_OPTION%
  46. popd
  47. if exist "ProgramFiles(x86)%\Windows Kits\8.1\bin" (
  48. echo "ProgramFiles(x86)\Windows Kits\8.1\bin present"
  49. echo "No need to override WINSDK81_PREFIX/WINSDK81x86_PREFIX"
  50. ) else (
  51. echo "ProgramFiles(x86)\Windows Kits\8.1\bin not present"
  52. echo "Need to override WINSDK81_PREFIX/WINSDK81x86_PREFIX with WINSDK10_PREFIX "
  53. echo WINSDK81_PREFIX defined "%WINSDK81_PREFIX%"
  54. echo WINSDK81x86_PREFIX "%WINSDK81x86_PREFIX%"
  55. if defined WINSDK10_PREFIX (
  56. echo WINSDK10_PREFIX defined 1 "%WINSDK10_PREFIX%"
  57. set "WINSDK81_PREFIX=%WINSDK10_PREFIX%"
  58. set "WINSDK81x86_PREFIX=%WINSDK10_PREFIX%"
  59. ) else (
  60. echo Build may fail when trying to find RC.exe
  61. goto :EOF
  62. )
  63. )
  64. set openssl_path=%WORKSPACE%
  65. popd
  66. goto :EOF
  67. :Help
  68. echo.
  69. echo Usage:
  70. echo GitEdk2.bat [-w Workspace_Directory] (optional) [-b Branch_Name] (optional)
  71. echo.
  72. echo -w A absolute/relative path to be the workspace.
  73. echo Default value is the current directory.
  74. echo.
  75. echo -b The branch name of the repository. Currently, only master, udk2015,
  76. echo trunk (same as master) and bp13 (same as udk2015) are supported.
  77. echo Default value is master.
  78. echo.