summaryrefslogtreecommitdiffstats
path: root/BaseTools/BuildEnv
diff options
context:
space:
mode:
Diffstat (limited to 'BaseTools/BuildEnv')
-rwxr-xr-xBaseTools/BuildEnv14
1 files changed, 12 insertions, 2 deletions
diff --git a/BaseTools/BuildEnv b/BaseTools/BuildEnv
index 5943bb9ef9..8d283e10c0 100755
--- a/BaseTools/BuildEnv
+++ b/BaseTools/BuildEnv
@@ -46,7 +46,7 @@ RestorePreviousConfiguration() {
done
fi
fi
-
+
PREVIOUS_CONF_FILE=$CONF_PATH/BuildEnv.sh
if [ -e $PREVIOUS_CONF_FILE ]
then
@@ -198,7 +198,17 @@ AddEdkToolsToPath() {
EDK_TOOLS_PATH_BIN=`GetEdkToolsPathBinDirectory`
- AddDirToStartOfPath $EDK_TOOLS_PATH/BinWrappers/PosixLike
+ # check if the edk2basetools pip package is available
+ if $PYTHON_COMMAND -c "import edk2basetools" &> /dev/null; then
+ # if it is, use the pip version of the wrappers
+ echo "Using Pip Basetools"
+ AddDirToStartOfPath $EDK_TOOLS_PATH/BinPipWrappers/PosixLike
+ else
+ echo "Using EDK2 in-source Basetools"
+ AddDirToStartOfPath $EDK_TOOLS_PATH/BinWrappers/PosixLike
+ fi
+
+
AddDirToStartOfPath $EDK_TOOLS_PATH_BIN
}