Reviewers: jat,


Please review this at http://gwt-code-reviews.appspot.com/67805

Affected files:
   user/src/com/google/gwt/user/tools/WebAppCreator.java
   user/src/com/google/gwt/user/tools/project.ant.xmlsrc


Index: user/src/com/google/gwt/user/tools/project.ant.xmlsrc
===================================================================
--- user/src/com/google/gwt/user/tools/project.ant.xmlsrc       (revision 6161)
+++ user/src/com/google/gwt/user/tools/project.ant.xmlsrc       (working copy)
@@ -43,14 +43,13 @@
      </java>
    </target>

-  <!-- Note: hosted mode requires a 32-bit JVM -->@antSetUp32BitVmarg
    <target name="hosted" depends="javac" description="Run hosted mode">
      <java failonerror="true" fork="true" classname="@shellClass">
        <classpath>
          <pathelement location="src"/>
          <path refid="project.class.path"/>
        </classpath>
-      <jvmarg value="-Xmx256M"/>@antuse32bitvm...@antvmargs
+      <jvmarg value="-Xmx256M"/>@antVmargs
        <arg value="-startupUrl"/>
        <arg value="@startupUrl"/>
        <!-- Additional arguments like -style PRETTY or -logLevel DEBUG -->
Index: user/src/com/google/gwt/user/tools/WebAppCreator.java
===================================================================
--- user/src/com/google/gwt/user/tools/WebAppCreator.java       (revision 6161)
+++ user/src/com/google/gwt/user/tools/WebAppCreator.java       (working copy)
@@ -229,6 +229,7 @@
      // Figure out what platform we're on
      boolean isMacOsX = gwtDevPath.substring(gwtDevPath.lastIndexOf('/') +  
1).indexOf(
          "mac") >= 0;
+    boolean is64BitVm  
= "64".equals(System.getProperty("sun.arch.data.model"));

      // Compute module package and name.
      int pos = moduleName.lastIndexOf('.');
@@ -259,16 +260,25 @@
      replacements.put("@shellClass", HostedMode.class.getName());
      replacements.put("@compileClass", Compiler.class.getName());
      replacements.put("@startupUrl", moduleShortName + ".html");
-    replacements.put("@antSetUp32BitVmarg", isMacOsX
-        ? "\n  <condition property=\"HostedMode32BitVmarg\" value=\"-d32\""
-            + " else=\"-Dgwt.dummy.arg\">\n"
-            + "    <equals arg1=\"${sun.arch.data.model}\" arg2=\"64\"/>\n"
-            + "  </condition>\n" : "");
-    replacements.put("@antUse32BitVmarg", isMacOsX
-        ? "\n      <jvmarg value=\"${HostedMode32BitVmarg}\"/>" : "");
-    replacements.put("@antVmargs", isMacOsX
-        ? "\n      <jvmarg value=\"-XstartOnFirstThread\"/>" : "");
-    replacements.put("@vmargs",  
isMacOsX ? "&#10;-XstartOnFirstThread" : "");
+
+    String antVmargs = "";
+    if (isMacOsX) {
+       antVmargs = "\n      <jvmarg value=\"-XstartOnFirstThread\"/>";
+       if (is64BitVm) {
+           antVmargs += "\n      <jvmarg value=\"-d32\"/>";
+       }
+    }
+    replacements.put("@antVmargs", antVmargs);
+
+    String vmargs = "";
+    if (isMacOsX) {
+       vmargs = "&#10;-XstartOnFirstThread";
+       if (is64BitVm) {
+           vmargs += "&#10;-d32";
+       }
+    }
+    replacements.put("@vmargs", vmargs);
+
      replacements.put("@renameTo", moduleShortName.toLowerCase());

      String antEclipseRule = "";



--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---

Reply via email to