]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/UPT/MkPkg.py
BaseTools: Update UPT tool to support multiple workspaces
[mirror_edk2.git] / BaseTools / Source / Python / UPT / MkPkg.py
index 2eb84588bdc495521e557f4cae6cfddead6ab669..87c84f0cc25b6fb0c8edf59ab809557153b2c11b 100644 (file)
@@ -50,6 +50,7 @@ from Library.ParserValidate import IsValidPath
 \r
 from Core.DistributionPackageClass import DistributionPackageClass\r
 from Core.PackageFile import PackageFile\r
+from Common.MultipleWorkspace import MultipleWorkspace as mws\r
 \r
 ## CheckForExistingDp\r
 #\r
@@ -136,7 +137,7 @@ def Main(Options = None):
                 # write().\r
                 #\r
                 FromFile = os.path.normpath(FileObject.GetURI()).encode('utf_8')\r
-                FileFullPath = os.path.normpath(os.path.join(WorkspaceDir, FromFile))\r
+                FileFullPath = mws.join(WorkspaceDir, FromFile)\r
                 if FileFullPath in RePkgDict:\r
                     (DpGuid, DpVersion, DpName, Repackage) = RePkgDict[FileFullPath]\r
                     if not Repackage:\r
@@ -183,7 +184,7 @@ def Main(Options = None):
                     DistPkg.Header.RePackage = True\r
           \r
         Cwd = getcwd()\r
-        chdir(WorkspaceDir)        \r
+        chdir(WorkspaceDir)\r
         ContentFile.PackFiles(FileList)\r
         chdir(Cwd)\r
         \r
@@ -264,7 +265,7 @@ def CheckFileList(QualifiedExt, FileList, ErrorStringExt, ErrorStringFullPath):
                          ErrorStringExt % Item)\r
         \r
         Item = os.path.normpath(Item)\r
-        Path = os.path.normpath(os.path.join(WorkspaceDir, Item))\r
+        Path = mws.join(WorkspaceDir, Item)\r
         if not os.path.exists(Path):\r
             Logger.Error("\nMkPkg", FILE_NOT_FOUND, ST.ERR_NOT_FOUND % Item)\r
         elif Item == Path:\r