[edk2-devel] [PATCH] BaseTools: Add FMMT BinPipWrappers

Yuwei Chen yuwei.chen at intel.com
Wed Jul 26 07:16:32 UTC 2023


Cc: Rebecca Cran <rebecca at bsdio.com>
Cc: Liming Gao <gaoliming at byosoft.com.cn>
Cc: Bob Feng <bob.c.feng at intel.com>
Signed-off-by: Yuwei Chen <yuwei.chen at intel.com>
---
 BaseTools/BinPipWrappers/PosixLike/FMMT       | 12 ++++++++++++
 BaseTools/BinPipWrappers/WindowsLike/FMMT.bat |  3 +++
 2 files changed, 15 insertions(+)
 create mode 100755 BaseTools/BinPipWrappers/PosixLike/FMMT
 create mode 100644 BaseTools/BinPipWrappers/WindowsLike/FMMT.bat

diff --git a/BaseTools/BinPipWrappers/PosixLike/FMMT b/BaseTools/BinPipWrappers/PosixLike/FMMT
new file mode 100755
index 0000000000..9d143c7fc6
--- /dev/null
+++ b/BaseTools/BinPipWrappers/PosixLike/FMMT
@@ -0,0 +1,12 @@
+#!/usr/bin/env bash
+#python `dirname $0`/RunToolFromSource.py `basename $0` $*
+
+# If a ${PYTHON_COMMAND} command is available, use it in preference to python
+if command -v ${PYTHON_COMMAND} >/dev/null 2>&1; then
+    python_exe=${PYTHON_COMMAND}
+fi
+
+full_cmd=${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is not a good choice here
+cmd=${full_cmd##*/}
+
+exec "${python_exe:-python}" -m edk2basetools.$cmd.$cmd "$@"
diff --git a/BaseTools/BinPipWrappers/WindowsLike/FMMT.bat b/BaseTools/BinPipWrappers/WindowsLike/FMMT.bat
new file mode 100644
index 0000000000..d347d64844
--- /dev/null
+++ b/BaseTools/BinPipWrappers/WindowsLike/FMMT.bat
@@ -0,0 +1,3 @@
+ at setlocal
+ at set ToolName=%~n0%
+@%PYTHON_COMMAND% -m edk2basetools.%ToolName%.%ToolName% %*
-- 
2.39.1.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#107262): https://edk2.groups.io/g/devel/message/107262
Mute This Topic: https://groups.io/mt/100366342/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-




More information about the edk2-devel-archive mailing list