summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/Common/String.py
Commit message (Collapse)AuthorAgeFilesLines
* BaseTools: refactor and remove un-needed use of .keys() on dictionariesCarsey, Jaben2018-04-181-2/+2
| | | | | | | | | | | sometimes just delete it. sometimes the loop needed .values() instead Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools: Remove equality operator with NoneCarsey, Jaben2018-03-301-2/+2
| | | | | | | | | | replace "== None" with "is None" and "!= None" with "is not None" Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools: Fix the bug for display incorrect *M flag in reportYonghong Zhu2018-03-021-10/+10
| | | | | | | | | | | The root cause is the byte array value in the driver Pcd, some bytes have additional space character, while the value in DSC file doesn't have this space, it cause the string compare return false, so we remove the extra space. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: Fix flexible PCD single quote and double quote bugsFeng, YunhuaX2018-02-281-17/+29
| | | | | | | | | | | | | | | | | | | | | | 1.The " and ' inside the string, must use escape character format (\", \') 2.'string' and L'string' format in --pcd, it must be double quoted first. Some examples that to match --pcd format and DSC format --pcd DSC format L"ABC" L"ABC" "AB\\\"C" "AB\"C" "AB\\\'C" "AB\'C" L"\'AB\\\"C\'" L'AB\"C' "\'AB\\\'C\'" 'AB\'C' H"{0, L\"AB\\\"B\", \'ab\\\"c\'}" {0, L"AB\"B", 'ab\"c'} Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yunhua Feng <yunhuax.feng@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
* BaseTools: Fix a bug Build directory should relative to WORKSPACEYonghong Zhu2017-10-161-1/+1
| | | | | | | | | | | | | The bug is for build output files it still use mws.join function, it cause maybe we will get the build output files in the PACKAGES_PATH because mws.join will try WORKSPACE first, if the file doesn't exist then try PACKAGES_PATH. But for build output, we expected it should relative to WORKSPACE. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: Fix the bug that use '|' or '||' in DSC file's Pcd valueYunhua Feng2017-06-241-1/+6
| | | | | | | | | | Fix the bug to support use '|' or '||' in DSC file's Pcd value. Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yunhua Feng <yunhuax.feng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
* BaseTools: Update Build tool to support multiple workspacesLi YangX2015-10-081-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | WORKSPACE is still kept. New PACKAGES_PATH is introduced to specify the additional WORKSPACEs. In PACKAGES_PATH, ';' is separator in Windows, ':' is separator in Linux. Build directory is in WORKSPACE. Package, BaseTools and Conf directory will be found from WORKSPACE and PACKAGES_PATH. In implementation, BaseTools adds MultipleWorkspace class for the file path conversion from WORKSPACE and PACKAGES_PATH. Verify two tree layouts. Root\edk2\MdePkg Root\edk2\MdeMdeModulePkg Root\edk2\... 1. set WORKSPACE=Root\edk2 2. set WORKSPACE=Root, and set PACKAGES_PATH=Root\edk2 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Li YangX <yangx.li@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18579 6f19259b-4bc3-4df7-8a09-765794883524
* BaseTools/Ecc: Fix a bug in parserHess Chen2015-06-251-2/+3
| | | | | | | | | | Fix a bug to not break when parsing a macro and not find its value Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hess Chen <hesheng.chen@intel.com> Reviewed-by: YangX Li <yangx.li@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17709 6f19259b-4bc3-4df7-8a09-765794883524
* There is a limitation on WINDOWS OS for the length of entire file path ↵Hess Chen2014-08-151-2/+3
| | | | | | | | | | can’t be larger than 255. There is an OS API provided by Microsoft to add “\\?\” before the path header to support the long file path. Enable this feature on basetools. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hess Chen <hesheng.chen@intel.com> Reviewed-by: Yingke Liu <yingke.d.liu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15809 6f19259b-4bc3-4df7-8a09-765794883524
* Sync BaseTool trunk (version r2640) into EDKII BaseTools.Gao, Liming2014-01-101-13/+17
| | | | | | | | Signed-off-by: Gao, Liming <liming.gao@intel.com> Reviewed-by: Liu, Jiang A <jiang.a.liu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15089 6f19259b-4bc3-4df7-8a09-765794883524
* Sync BaseTool trunk (version r2599) into EDKII BaseTools.Liming Gao2013-08-231-11/+15
| | | | | | | | Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Heshen Chen <chen.heshen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14591 6f19259b-4bc3-4df7-8a09-765794883524
* Sync BaseTools Trunk (version r2518) to EDKII main trunk.lgao42012-04-101-2/+2
| | | | | | | Signed-off-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13178 6f19259b-4bc3-4df7-8a09-765794883524
* Sync BaseTool trunk (version r2397) into EDKII BaseTools. The change mainly ↵lgao42011-11-091-27/+27
| | | | | | | | | | | | includes 1. Fix the issue that root directory of disk can’t be used as WORKSPACE. 2. Update AutoGen code style to pass C++ compiler. Signed-off-by: lgao4 Reviewed-by: jsu1 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12676 6f19259b-4bc3-4df7-8a09-765794883524
* Sync BaseTools Trunk (version r2387) to EDKII main trunk.lgao42011-10-291-4/+52
| | | | | | | Signed-off-by: lgao4 Reviewed-by: gikidy git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12602 6f19259b-4bc3-4df7-8a09-765794883524
* Sync BaseTools Branch (version r2321) to EDKII main trunk. lgao42011-09-181-12/+31
| | | | | | | | Signed-off-by: lgao4 Reviewed-by: gikidy git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12372 6f19259b-4bc3-4df7-8a09-765794883524
* Sync EDKII BaseTools to BaseTools project r2065.lgao42010-10-111-0/+31
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10915 6f19259b-4bc3-4df7-8a09-765794883524
* Sync EDKII BaseTools to BaseTools project r2042.qhuang82010-09-061-0/+44
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10850 6f19259b-4bc3-4df7-8a09-765794883524
* Sync EDKII BaseTools to BaseTools project r1988qhuang82010-06-281-2/+9
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10607 6f19259b-4bc3-4df7-8a09-765794883524
* Sync EDKII BaseTools to BaseTools project r1971lgao42010-05-181-2/+2
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10502 6f19259b-4bc3-4df7-8a09-765794883524
* Check In tool source code based on Build tool project revision r1655.lgao42009-07-171-0/+703
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8964 6f19259b-4bc3-4df7-8a09-765794883524