diff --git a/make/windows/projectfiles/common/Makefile b/make/windows/projectfiles/common/Makefile index 8ae363be7d5fc18d346f4dfbad143081038093bd..0bc4fb182ec27f46dadfecbb26aca4fee2283e0c 100644 --- a/make/windows/projectfiles/common/Makefile +++ b/make/windows/projectfiles/common/Makefile @@ -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: diff --git a/src/share/tools/ProjectCreator/FileTreeCreator.java b/src/share/tools/ProjectCreator/FileTreeCreator.java index 3643c572e9995c90a5812665874baed6925a8d7e..a81132c7029539d1a031699a2d0ca7f5ed9cee9b 100644 --- a/src/share/tools/ProjectCreator/FileTreeCreator.java +++ b/src/share/tools/ProjectCreator/FileTreeCreator.java @@ -12,11 +12,15 @@ public class FileTreeCreator extends SimpleFileVisitor final int startDirLength; Stack attributes = new Stack(); Vector allConfigs; - WinGammaPlatformVC10 wg; + WinGammaPlatform wg; + WinGammaPlatformVC10 wg10; - public FileTreeCreator(Path startDir, Vector allConfigs, WinGammaPlatformVC10 wg) { + public FileTreeCreator(Path startDir, Vector 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(); diff --git a/src/share/tools/ProjectCreator/FileTreeCreatorVC10.java b/src/share/tools/ProjectCreator/FileTreeCreatorVC10.java index 8041d833e34d6cf8bc750d06093f596f717c1a0d..cb0fe33577e70dc706c70d51f0a2d17d0dc27c55 100644 --- a/src/share/tools/ProjectCreator/FileTreeCreatorVC10.java +++ b/src/share/tools/ProjectCreator/FileTreeCreatorVC10.java @@ -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); diff --git a/src/share/tools/ProjectCreator/FileTreeCreatorVC7.java b/src/share/tools/ProjectCreator/FileTreeCreatorVC7.java index b36e0121f8a7d37a81ebc76d5e9671d8c0eb18b2..9a4318457195a1e9223df664642cc440d0903205 100644 --- a/src/share/tools/ProjectCreator/FileTreeCreatorVC7.java +++ b/src/share/tools/ProjectCreator/FileTreeCreatorVC7.java @@ -12,7 +12,7 @@ import java.util.Vector; public class FileTreeCreatorVC7 extends FileTreeCreator { public FileTreeCreatorVC7(Path startDir, Vector allConfigs, WinGammaPlatform wg) { - super(startDir, allConfigs, null); + super(startDir, allConfigs, wg); } @Override diff --git a/src/share/tools/ProjectCreator/WinGammaPlatformVC7.java b/src/share/tools/ProjectCreator/WinGammaPlatformVC7.java index 09e961cbfa0211f853791a062036090b4d06b4d4..b7a99a652db2c3c1436f9de66c90749ce69dcf96 100644 --- a/src/share/tools/ProjectCreator/WinGammaPlatformVC7.java +++ b/src/share/tools/ProjectCreator/WinGammaPlatformVC7.java @@ -139,19 +139,22 @@ public class WinGammaPlatformVC7 extends WinGammaPlatform { tagV("Tool", cfg.getV("LinkerFlags")); - tag("Tool", - new String[] { - "Name", - "VCPostBuildEventTool", - "Description", - BuildConfig - .getFieldString(null, "PostbuildDescription"), - // Caution: String.replace(String,String) is available - // from JDK5 onwards only - "CommandLine", - cfg.expandFormat(BuildConfig.getFieldString(null, - "PostbuildCommand").replace("\t", - " ")) }); + String postBuildCmd = BuildConfig.getFieldString(null, + "PostbuildCommand"); + if (postBuildCmd != null) { + tag("Tool", + new String[] { + "Name", + "VCPostBuildEventTool", + "Description", + BuildConfig + .getFieldString(null, "PostbuildDescription"), + // Caution: String.replace(String,String) is available + // from JDK5 onwards only + "CommandLine", + cfg.expandFormat(postBuildCmd.replace("\t", + " ")) }); + } tag("Tool", new String[] { "Name", "VCPreBuildEventTool" });