[Laszlo-checkins] r8575 - openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/utils

hqm@openlaszlo.org hqm at openlaszlo.org
Sun Apr 6 21:12:55 PDT 2008


Author: hqm
Date: 2008-04-06 21:12:54 -0700 (Sun, 06 Apr 2008)
New Revision: 8575

Added:
   openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/utils/DeploySOLOSWF.java
Modified:
   openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/utils/DeployMain.java
Log:
Change 20080407-hqm-o by hqm at badtzmaru.local on 2008-04-07 00:12:04 EDT
    in /Users/hqm/openlaszlo/trunk3
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary:  add swf SOLO deploy utility class

New Features:

Bugs Fixed:

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

Documentation:

Release Notes:

Details:
    

Tests:

lzdeploy --runtime=swf8 test/deploy/hello.lzx




Modified: openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/utils/DeployMain.java
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/utils/DeployMain.java	2008-04-07 03:37:35 UTC (rev 8574)
+++ openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/utils/DeployMain.java	2008-04-07 04:12:54 UTC (rev 8575)
@@ -63,6 +63,7 @@
         String outfile = null;
         String sourcepath = null;
         String title = null;;
+        String runtime = "dhtml";
 
         Properties compilationProperties =  new Properties();
         for (int i = 0; i < args.length; i++) {
@@ -70,8 +71,9 @@
             if (arg.startsWith("-")) {
                 if (arg.startsWith("--runtime=")) {
                     String value = arg.substring("--runtime=".length());
+                    runtime = value;
                     if ((new HashSet(org.openlaszlo.compiler.Compiler.KNOWN_RUNTIMES)).contains(value)) {
-                   compilationProperties.setProperty(CompilationEnvironment.RUNTIME_PROPERTY, value);
+                        compilationProperties.setProperty(CompilationEnvironment.RUNTIME_PROPERTY, value);
                     } else {
                         System.err.println("Invalid value for --runtime");
                         System.exit(1);
@@ -145,16 +147,33 @@
         skipfiles.put(new File(outfile).getCanonicalPath(), "true");
 
         try {
-            System.exit(DeploySOLODHTML.deploy(wrapperonly,
-                                               null,
-                                               null,
-                                               null,
-                                               sourcepath,
-                                               new FileOutputStream(outfile),
-                                               tmpdir,
-                                               title,
-                                               compilationProperties,
-                                               skipfiles));
+            if ("dhtml".equals(runtime)) {
+                System.exit(DeploySOLODHTML.deploy(wrapperonly,
+                                                   null,
+                                                   null,
+                                                   null,
+                                                   sourcepath,
+                                                   new FileOutputStream(outfile),
+                                                   tmpdir,
+                                                   title,
+                                                   compilationProperties,
+                                                   skipfiles));
+            } else if ("swf8".equals(runtime) || "swf7".equals(runtime)) {
+                System.exit(DeploySOLOSWF.deploy(runtime,
+                                                 wrapperonly,
+                                                   null,
+                                                   null,
+                                                   null,
+                                                   sourcepath,
+                                                   new FileOutputStream(outfile),
+                                                   tmpdir,
+                                                   title,
+                                                   compilationProperties,
+                                                   skipfiles));
+            } else {
+                System.err.println("SOLO deployment for runtime "+runtime+" is not yet supported.");
+                System.exit(1);
+            }
         } catch (IOException e) {
             System.err.println(e);
             System.exit(1);

Added: openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/utils/DeploySOLOSWF.java


Property changes on: openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/utils/DeploySOLOSWF.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain
Name: svn:eol-style
   + native



More information about the Laszlo-checkins mailing list