done
fi
fi
-
+\r
PREVIOUS_CONF_FILE=$CONF_PATH/BuildEnv.sh
if [ -e $PREVIOUS_CONF_FILE ]
then
EDK_TOOLS_PATH_BIN=`GetEdkToolsPathBinDirectory`
- AddDirToStartOfPath $EDK_TOOLS_PATH/BinWrappers/PosixLike
+ # check if the edk2basetools pip package is available\r
+ if $PYTHON_COMMAND -c "import edk2basetools" &> /dev/null; then\r
+ # if it is, use the pip version of the wrappers\r
+ echo "Using Pip Basetools"\r
+ AddDirToStartOfPath $EDK_TOOLS_PATH/BinPipWrappers/PosixLike\r
+ else\r
+ echo "Using EDK2 in-source Basetools"\r
+ AddDirToStartOfPath $EDK_TOOLS_PATH/BinWrappers/PosixLike\r
+ fi\r
+\r
+\r
AddDirToStartOfPath $EDK_TOOLS_PATH_BIN
}