Fix T105. It is caused by cpptasks which change automati cally root directory like...
authorwuyizhong <wuyizhong@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 28 Jul 2006 01:39:10 +0000 (01:39 +0000)
committerwuyizhong <wuyizhong@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 28 Jul 2006 01:39:10 +0000 (01:39 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1130 6f19259b-4bc3-4df7-8a09-765794883524

Tools/Source/GenBuild/org/tianocore/build/FileProcess.java
Tools/Source/GenBuild/org/tianocore/build/FrameworkBuildTask.java
Tools/Source/GenBuild/org/tianocore/build/ModuleBuildFileGenerator.java
Tools/Source/GenBuild/org/tianocore/build/id/PlatformIdentification.java

index 28ebfc8..32b94d8 100644 (file)
@@ -262,7 +262,7 @@ public class FileProcess {
         Element includesEle = document.createElement("EXTRA.INC");\r
         for (int i = 0; i < includePaths.length; i++) {\r
             Element includeEle = document.createElement("includepath");\r
-            includeEle.setAttribute("path", includePaths[i]);\r
+            includeEle.setAttribute("path", project.replaceProperties(includePaths[i]));\r
             includesEle.appendChild(includeEle);\r
         }\r
         ele.appendChild(includesEle);\r
index c5c51be..b2c3e15 100644 (file)
@@ -96,8 +96,10 @@ public class FrameworkBuildTask extends Task{
         //\r
         // Global Data initialization\r
         //\r
+        File workspacePath = new File(getProject().getProperty("WORKSPACE"));\r
+        getProject().setProperty("WORKSPACE_DIR", workspacePath.getPath().replaceAll("(\\\\)", "/"));\r
         GlobalData.initInfo("Tools" + File.separatorChar + "Conf" + File.separatorChar + "FrameworkDatabase.db",\r
-                            getProject().getProperty("WORKSPACE_DIR"), toolsDefFilename);\r
+                workspacePath.getPath(), toolsDefFilename);\r
         \r
 \r
         \r
index 3e775e5..e9e2770 100644 (file)
@@ -435,7 +435,7 @@ public class ModuleBuildFileGenerator {
         //\r
         // WORKSPACE\r
         //\r
-        includes.add("${WORKSPACE_DIR}");\r
+        includes.add("${WORKSPACE_DIR}" + File.separatorChar);\r
         \r
         //\r
         // Module iteself\r
index 530eced..39a13d9 100644 (file)
@@ -51,10 +51,10 @@ public class PlatformIdentification extends Identification{
     }\r
     \r
     public String getRelativeFpdFile (){\r
-        return fpdFile.getPath().substring(GlobalData.getWorkspacePath().length());\r
+        return fpdFile.getPath().substring(GlobalData.getWorkspacePath().length() + 1);\r
     }\r
     \r
     public String getPlatformRelativeDir(){\r
-        return fpdFile.getParent().substring(GlobalData.getWorkspacePath().length());\r
+        return fpdFile.getParent().substring(GlobalData.getWorkspacePath().length() + 1);\r
     }\r
 }
\ No newline at end of file