[Laszlo-checkins] r8135 - openlaszlo/branches/devildog/WEB-INF/lps/server/src/org/openlaszlo/sc

dda@openlaszlo.org dda at openlaszlo.org
Fri Feb 29 10:16:38 PST 2008


Author: dda
Date: 2008-02-29 10:16:32 -0800 (Fri, 29 Feb 2008)
New Revision: 8135

Modified:
   openlaszlo/branches/devildog/WEB-INF/lps/server/src/org/openlaszlo/sc/SWF9External.java
Log:
Change 20080229-dda-j by dda at lester.local on 2008-02-29 13:10:08 EST
    in /Users/dda/laszlo/src/svn/openlaszlo/branches/devildogm
    for http://svn.openlaszlo.org/openlaszlo/branches/devildog

Summary: SWF9: Fix calling the compiler for Windows

New Features:

Bugs Fixed: LPP-5425

Technical Reviewer: (pending)
QA Reviewer: (pending)
Doc Reviewer: (pending)

Documentation:

Release Notes:

Details:
    New code calls $FLEX_HOME/bin/compc.exe on Windows (rather than $FLEX_HOME/bin/compc)
    same for mxmlc.

Tests:
   Henry's hello



Modified: openlaszlo/branches/devildog/WEB-INF/lps/server/src/org/openlaszlo/sc/SWF9External.java
===================================================================
--- openlaszlo/branches/devildog/WEB-INF/lps/server/src/org/openlaszlo/sc/SWF9External.java	2008-02-29 18:15:52 UTC (rev 8134)
+++ openlaszlo/branches/devildog/WEB-INF/lps/server/src/org/openlaszlo/sc/SWF9External.java	2008-02-29 18:16:32 UTC (rev 8135)
@@ -581,6 +581,12 @@
     return LPS.getLFCDirectory() + File.separator + "LFC9.swc";
   }
 
+  public static boolean isWindows() {
+    String osname = System.getProperty("os.name");
+    assert osname != null;
+    return osname.startsWith("Windows");
+  }
+
   /**
    * Compile the given translation units, producing a binary output.
    */
@@ -589,14 +595,15 @@
   {
     List cmd = new ArrayList();
     String outfilebase;
+    String exeSuffix = isWindows() ? ".exe" : "";
     
     if (buildSharedLibrary) {
       outfilebase = "app.swc";
-      cmd.add(getFlexPathname("bin/compc"));
+      cmd.add(getFlexPathname("bin/compc" + exeSuffix));
     }
     else {
       outfilebase = "app.swf";
-      cmd.add(getFlexPathname("bin/mxmlc"));
+      cmd.add(getFlexPathname("bin/mxmlc" + exeSuffix));
     }
 
     String outfilename = tempdir.getPath() + File.separator + outfilebase;



More information about the Laszlo-checkins mailing list