1.1 --- a/src/share/tools/ProjectCreator/WinGammaPlatform.java Tue Dec 14 15:10:52 2010 -0500 1.2 +++ b/src/share/tools/ProjectCreator/WinGammaPlatform.java Wed Dec 15 07:11:31 2010 -0800 1.3 @@ -22,8 +22,15 @@ 1.4 * 1.5 */ 1.6 1.7 -import java.io.*; 1.8 -import java.util.*; 1.9 +import java.io.File; 1.10 +import java.io.IOException; 1.11 +import java.io.PrintWriter; 1.12 +import java.util.Enumeration; 1.13 +import java.util.Hashtable; 1.14 +import java.util.Iterator; 1.15 +import java.util.List; 1.16 +import java.util.TreeSet; 1.17 +import java.util.Vector; 1.18 1.19 abstract class HsArgHandler extends ArgHandler { 1.20 static final int STRING = 1; 1.21 @@ -345,11 +352,23 @@ 1.22 new ArgsParser(args, 1.23 new ArgRule[] 1.24 { 1.25 - new HsArgRule("-sourceBase", 1.26 - "SourceBase", 1.27 - " (Did you set the HotSpotWorkSpace environment variable?)", 1.28 - HsArgHandler.STRING 1.29 - ), 1.30 + new ArgRule("-sourceBase", 1.31 + new HsArgHandler() { 1.32 + public void handle(ArgIterator it) { 1.33 + String cfg = getCfg(it.get()); 1.34 + if (nextNotKey(it)) { 1.35 + String sb = (String) it.get(); 1.36 + if (sb.endsWith(Util.sep)) { 1.37 + sb = sb.substring(0, sb.length() - 1); 1.38 + } 1.39 + BuildConfig.putField(cfg, "SourceBase", sb); 1.40 + it.next(); 1.41 + } else { 1.42 + empty("-sourceBase", null); 1.43 + } 1.44 + } 1.45 + } 1.46 + ), 1.47 1.48 new HsArgRule("-buildBase", 1.49 "BuildBase", 1.50 @@ -512,7 +531,6 @@ 1.51 new HsArgHandler() { 1.52 public void handle(ArgIterator it) { 1.53 if (nextNotKey(it)) { 1.54 - String build = it.get(); 1.55 if (nextNotKey(it)) { 1.56 String description = it.get(); 1.57 if (nextNotKey(it)) { 1.58 @@ -528,7 +546,28 @@ 1.59 empty(null, "** Error: wrong number of args to -prelink"); 1.60 } 1.61 } 1.62 - ) 1.63 + ), 1.64 + 1.65 + new ArgRule("-postbuild", 1.66 + new HsArgHandler() { 1.67 + public void handle(ArgIterator it) { 1.68 + if (nextNotKey(it)) { 1.69 + if (nextNotKey(it)) { 1.70 + String description = it.get(); 1.71 + if (nextNotKey(it)) { 1.72 + String command = it.get(); 1.73 + BuildConfig.putField(null, "PostbuildDescription", description); 1.74 + BuildConfig.putField(null, "PostbuildCommand", command); 1.75 + it.next(); 1.76 + return; 1.77 + } 1.78 + } 1.79 + } 1.80 + 1.81 + empty(null, "** Error: wrong number of args to -postbuild"); 1.82 + } 1.83 + } 1.84 + ), 1.85 }, 1.86 new ArgHandler() { 1.87 public void handle(ArgIterator it) { 1.88 @@ -618,10 +657,6 @@ 1.89 1.90 public int compareTo(Object o) { 1.91 FileInfo oo = (FileInfo)o; 1.92 - // Don't squelch identical short file names where the full 1.93 - // paths are different 1.94 - if (!attr.shortName.equals(oo.attr.shortName)) 1.95 - return attr.shortName.compareTo(oo.attr.shortName); 1.96 return full.compareTo(oo.full); 1.97 } 1.98