提交 dba82a3b 编写于 作者: I iklam

8022740: Visual 2008 IDE build is broken

Summary: Fixed project generation code, and added warning to upgrade to VS 2008 SP1.
Reviewed-by: dcubed, ccheung
上级 71946d6b
......@@ -112,6 +112,7 @@ ReleaseOptions = -define HOTSPOT_RELEASE_VERSION=$(HOTSPOT_RELEASE_VERSION) -def
ProjectCreatorIDEOptions = $(ProjectCreatorIDEOptions) $(ReleaseOptions)
$(HOTSPOTBUILDSPACE)/$(ProjectFile): $(HOTSPOTBUILDSPACE)/classes/ProjectCreator.class
@if "$(MSC_VER)"=="1500" echo Make sure you have VS2008 SP1 or later, or you may see 'expanded command line too long'
@$(RUN_JAVA) -Djava.class.path="$(HOTSPOTBUILDSPACE)/classes" ProjectCreator WinGammaPlatform$(VcVersion) $(ProjectCreatorIDEOptions)
clean:
......
......@@ -12,11 +12,15 @@ public class FileTreeCreator extends SimpleFileVisitor<Path>
final int startDirLength;
Stack<DirAttributes> attributes = new Stack<DirAttributes>();
Vector<BuildConfig> allConfigs;
WinGammaPlatformVC10 wg;
WinGammaPlatform wg;
WinGammaPlatformVC10 wg10;
public FileTreeCreator(Path startDir, Vector<BuildConfig> allConfigs, WinGammaPlatformVC10 wg) {
public FileTreeCreator(Path startDir, Vector<BuildConfig> allConfigs, WinGammaPlatform wg) {
super();
this.wg = wg;
if (wg instanceof WinGammaPlatformVC10) {
wg10 = (WinGammaPlatformVC10)wg;
}
this.allConfigs = allConfigs;
this.startDir = startDir;
startDirLength = startDir.toAbsolutePath().toString().length();
......
......@@ -103,7 +103,7 @@ public class FileTreeCreatorVC10 extends FileTreeCreator {
}
}
String tagName = wg.getFileTagFromSuffix(fileName);
String tagName = wg10.getFileTagFromSuffix(fileName);
if (!useIgnore && !disablePch && !usePch && !isReplacedByAltSrc) {
wg.tag(tagName, new String[] { "Include", fileLoc});
......@@ -133,7 +133,7 @@ public class FileTreeCreatorVC10 extends FileTreeCreator {
}
String filter = startDir.relativize(file.getParent().toAbsolutePath()).toString();
wg.addFilterDependency(fileLoc, filter);
wg10.addFilterDependency(fileLoc, filter);
return CONTINUE;
}
......@@ -162,7 +162,7 @@ public class FileTreeCreatorVC10 extends FileTreeCreator {
if (!hide) {
String name = startDir.relativize(path.toAbsolutePath()).toString();
if (!"".equals(name)) {
wg.addFilter(name);
wg10.addFilter(name);
}
attributes.push(newAttr);
......
......@@ -12,7 +12,7 @@ import java.util.Vector;
public class FileTreeCreatorVC7 extends FileTreeCreator {
public FileTreeCreatorVC7(Path startDir, Vector<BuildConfig> allConfigs, WinGammaPlatform wg) {
super(startDir, allConfigs, null);
super(startDir, allConfigs, wg);
}
@Override
......
......@@ -139,6 +139,9 @@ public class WinGammaPlatformVC7 extends WinGammaPlatform {
tagV("Tool", cfg.getV("LinkerFlags"));
String postBuildCmd = BuildConfig.getFieldString(null,
"PostbuildCommand");
if (postBuildCmd != null) {
tag("Tool",
new String[] {
"Name",
......@@ -149,9 +152,9 @@ public class WinGammaPlatformVC7 extends WinGammaPlatform {
// Caution: String.replace(String,String) is available
// from JDK5 onwards only
"CommandLine",
cfg.expandFormat(BuildConfig.getFieldString(null,
"PostbuildCommand").replace("\t",
cfg.expandFormat(postBuildCmd.replace("\t",
"&#x0D;&#x0A;")) });
}
tag("Tool", new String[] { "Name", "VCPreBuildEventTool" });
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册