src/share/tools/ProjectCreator/WinGammaPlatformVC7.java
Print this page
rev 2073 : imported patch vcproj-64
*** 35,45 ****
String projectVersion() {return "7.10";};
public void writeProjectFile(String projectFileName, String projectName,
Vector allConfigs) throws IOException {
System.out.println();
! System.out.println(" Writing .vcproj file...");
// If we got this far without an error, we're safe to actually
// write the .vcproj file
printWriter = new PrintWriter(new FileWriter(projectFileName));
printWriter.println("<?xml version=\"1.0\" encoding=\"windows-1251\"?>");
--- 35,45 ----
String projectVersion() {return "7.10";};
public void writeProjectFile(String projectFileName, String projectName,
Vector allConfigs) throws IOException {
System.out.println();
! System.out.println(" Writing .vcproj file: "+projectFileName);
// If we got this far without an error, we're safe to actually
// write the .vcproj file
printWriter = new PrintWriter(new FileWriter(projectFileName));
printWriter.println("<?xml version=\"1.0\" encoding=\"windows-1251\"?>");
*** 52,64 ****
"ProjectGUID", "{8822CB5C-1C41-41C2-8493-9F6E1994338B}",
"SccProjectName", "",
"SccLocalPath", ""
}
);
-
startTag("Platforms", null);
! tag("Platform", new String[] {"Name", Util.os});
endTag("Platforms");
startTag("Configurations", null);
for (Iterator i = allConfigs.iterator(); i.hasNext(); ) {
--- 52,63 ----
"ProjectGUID", "{8822CB5C-1C41-41C2-8493-9F6E1994338B}",
"SccProjectName", "",
"SccLocalPath", ""
}
);
startTag("Platforms", null);
! tag("Platform", new String[] {"Name", (String) BuildConfig.getField(null, "PlatformName")});
endTag("Platforms");
startTag("Configurations", null);
for (Iterator i = allConfigs.iterator(); i.hasNext(); ) {
*** 85,94 ****
--- 84,128 ----
abstract boolean match(FileInfo fi);
String filterString() { return ""; }
String name() { return this.fname;}
+
+ @Override
+ // eclipse auto-generated
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + getOuterType().hashCode();
+ result = prime * result + ((fname == null) ? 0 : fname.hashCode());
+ return result;
+ }
+
+ @Override
+ // eclipse auto-generated
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ NameFilter other = (NameFilter) obj;
+ if (!getOuterType().equals(other.getOuterType()))
+ return false;
+ if (fname == null) {
+ if (other.fname != null)
+ return false;
+ } else if (!fname.equals(other.fname))
+ return false;
+ return true;
+ }
+
+ // eclipse auto-generated
+ private WinGammaPlatformVC7 getOuterType() {
+ return WinGammaPlatformVC7.this;
+ }
}
class DirectoryFilter extends NameFilter {
String dir;
int baseLen, dirLen;
*** 111,120 ****
--- 145,195 ----
boolean match(FileInfo fi) {
int lastSlashIndex = fi.full.lastIndexOf('/');
String fullDir = fi.full.substring(0, lastSlashIndex);
return fullDir.endsWith(dir);
}
+
+ @Override
+ // eclipse auto-generated
+ public int hashCode() {
+ final int prime = 31;
+ int result = super.hashCode();
+ result = prime * result + getOuterType().hashCode();
+ result = prime * result + baseLen;
+ result = prime * result + ((dir == null) ? 0 : dir.hashCode());
+ result = prime * result + dirLen;
+ return result;
+ }
+
+ @Override
+ // eclipse auto-generated
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (!super.equals(obj))
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ DirectoryFilter other = (DirectoryFilter) obj;
+ if (!getOuterType().equals(other.getOuterType()))
+ return false;
+ if (baseLen != other.baseLen)
+ return false;
+ if (dir == null) {
+ if (other.dir != null)
+ return false;
+ } else if (!dir.equals(other.dir))
+ return false;
+ if (dirLen != other.dirLen)
+ return false;
+ return true;
+ }
+
+ // eclipse auto-generated
+ private WinGammaPlatformVC7 getOuterType() {
+ return WinGammaPlatformVC7.this;
+ }
}
class TypeFilter extends NameFilter {
String[] exts;
*** 242,264 ****
// skip files directly in share/vm - should only be precompiled.hpp which is handled below
continue;
}
if (!dir.equals(currentDir)) {
currentDir = dir;
! if (container != null) {
rv.add(container);
}
// remove "share/vm/" from names
String name = dir;
if (dir.startsWith("share/vm/")) {
name = dir.substring("share/vm/".length(), dir.length());
}
! container = new DirectoryFilter(name, dir, sbase);
}
}
! if (container != null) {
rv.add(container);
}
ContainerFilter generated = new ContainerFilter("Generated");
ContainerFilter c1Generated = new ContainerFilter("C1");
--- 317,346 ----
// skip files directly in share/vm - should only be precompiled.hpp which is handled below
continue;
}
if (!dir.equals(currentDir)) {
currentDir = dir;
! if (container != null && !rv.contains(container)) {
rv.add(container);
}
// remove "share/vm/" from names
String name = dir;
if (dir.startsWith("share/vm/")) {
name = dir.substring("share/vm/".length(), dir.length());
}
! DirectoryFilter newfilter = new DirectoryFilter(name, dir, sbase);
! int i = rv.indexOf(newfilter);
! if(i == -1) {
! container = newfilter;
! } else {
! // if the filter already exists, reuse it
! container = (DirectoryFilter) rv.get(i);
! }
}
}
! if (container != null && !rv.contains(container)) {
rv.add(container);
}
ContainerFilter generated = new ContainerFilter("Generated");
ContainerFilter c1Generated = new ContainerFilter("C1");
*** 581,591 ****
addAttr(rv, "ExceptionHandling", "FALSE");
return rv;
}
! Vector getBaseLinkerFlags(String outDir, String outDll) {
Vector rv = new Vector();
addAttr(rv, "Name", "VCLinkerTool");
addAttr(rv, "AdditionalOptions",
"/export:JNI_GetDefaultJavaVMInitArgs " +
--- 663,673 ----
addAttr(rv, "ExceptionHandling", "FALSE");
return rv;
}
! Vector getBaseLinkerFlags(String outDir, String outDll, String platformName) {
Vector rv = new Vector();
addAttr(rv, "Name", "VCLinkerTool");
addAttr(rv, "AdditionalOptions",
"/export:JNI_GetDefaultJavaVMInitArgs " +
*** 606,619 ****
addAttr(rv, "SuppressStartupBanner", "TRUE");
addAttr(rv, "ModuleDefinitionFile", outDir+Util.sep+"vm.def");
addAttr(rv, "ProgramDatabaseFile", outDir+Util.sep+"jvm.pdb");
// Set /SUBSYSTEM option. 2 is subSystemWindows
addAttr(rv, "SubSystem", "2");
- addAttr(rv, "BaseAddress", "0x8000000");
addAttr(rv, "ImportLibrary", outDir+Util.sep+"jvm.lib");
! // Set /MACHINE option. 1 is machineX86
addAttr(rv, "TargetMachine", "1");
return rv;
}
void getDebugCompilerFlags_common(String opt,Vector rv) {
--- 688,706 ----
addAttr(rv, "SuppressStartupBanner", "TRUE");
addAttr(rv, "ModuleDefinitionFile", outDir+Util.sep+"vm.def");
addAttr(rv, "ProgramDatabaseFile", outDir+Util.sep+"jvm.pdb");
// Set /SUBSYSTEM option. 2 is subSystemWindows
addAttr(rv, "SubSystem", "2");
addAttr(rv, "ImportLibrary", outDir+Util.sep+"jvm.lib");
! addAttr(rv, "BaseAddress", "0x8000000");
! if(platformName.equals("Win32")) {
! // Set /MACHINE option. 1 is X86
addAttr(rv, "TargetMachine", "1");
+ } else {
+ // Set /MACHINE option. 17 is X64
+ addAttr(rv, "TargetMachine", "17");
+ }
return rv;
}
void getDebugCompilerFlags_common(String opt,Vector rv) {
*** 654,677 ****
void getProductCompilerFlags_common(Vector rv) {
// Set /O2 option. 2 is optimizeMaxSpeed
addAttr(rv, "Optimization", "2");
// Set /Oy- option
addAttr(rv, "OmitFramePointers", "FALSE");
- }
-
- Vector getProductCompilerFlags() {
- Vector rv = new Vector();
-
- getProductCompilerFlags_common(rv);
// Set /Ob option. 1 is expandOnlyInline
addAttr(rv, "InlineFunctionExpansion", "1");
// Set /GF option.
addAttr(rv, "StringPooling", "TRUE");
// Set /MD option. 2 is rtMultiThreadedDLL
addAttr(rv, "RuntimeLibrary", "2");
// Set /Gy option
addAttr(rv, "EnableFunctionLevelLinking", "TRUE");
return rv;
}
Vector getProductLinkerFlags() {
--- 741,764 ----
void getProductCompilerFlags_common(Vector rv) {
// Set /O2 option. 2 is optimizeMaxSpeed
addAttr(rv, "Optimization", "2");
// Set /Oy- option
addAttr(rv, "OmitFramePointers", "FALSE");
// Set /Ob option. 1 is expandOnlyInline
addAttr(rv, "InlineFunctionExpansion", "1");
// Set /GF option.
addAttr(rv, "StringPooling", "TRUE");
// Set /MD option. 2 is rtMultiThreadedDLL
addAttr(rv, "RuntimeLibrary", "2");
// Set /Gy option
addAttr(rv, "EnableFunctionLevelLinking", "TRUE");
+ }
+
+ Vector getProductCompilerFlags() {
+ Vector rv = new Vector();
+
+ getProductCompilerFlags_common(rv);
return rv;
}
Vector getProductLinkerFlags() {
*** 691,699 ****
String getNoOptFlag() {
return "0";
}
! String makeCfgName(String flavourBuild) {
! return flavourBuild + "|" + Util.os;
}
}
--- 778,786 ----
String getNoOptFlag() {
return "0";
}
! String makeCfgName(String flavourBuild, String platform) {
! return flavourBuild + "|" + platform;
}
}