[Laszlo-checkins] r11892 - in openlaszlo/trunk: WEB-INF/lps/server/src/org/openlaszlo/utils lps/admin

hqm@openlaszlo.org hqm at openlaszlo.org
Tue Nov 25 21:16:57 PST 2008


Author: hqm
Date: 2008-11-25 21:16:54 -0800 (Tue, 25 Nov 2008)
New Revision: 11892

Modified:
   openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/utils/DeployMain.java
   openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/utils/DeploySOLODHTML.java
   openlaszlo/trunk/lps/admin/solo-dhtml-deploy.jsp
Log:
Change 20081126-hqm-C by hqm at badtzmaru.home on 2008-11-26 00:13:59 EST
    in /Users/hqm/openlaszlo/trunk4
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary:  fix for solo dhtml deployment

New Features:

Bugs Fixed: LPP-7375

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

Documentation:

Release Notes:

Details:

+ fix solo dhtml deployer, fix regexp replace to insert correct
pathname arg to lz.embed.lfc to point to resource directory

Tests:

Deploy a test SOLO DHTML app 

<canvas>
  <button>Click Me</button>
</canvas>

unpack on other web  non-LPS web server , and see that it finds resources correctly. 



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-11-26 05:14:38 UTC (rev 11891)
+++ openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/utils/DeployMain.java	2008-11-26 05:16:54 UTC (rev 11892)
@@ -158,7 +158,7 @@
                                                    title,
                                                    compilationProperties,
                                                    skipfiles));
-            } else if ("swf8".equals(runtime) || "swf7".equals(runtime)) {
+            } else if ("swf10".equals(runtime) || "swf8".equals(runtime) || "swf7".equals(runtime)) {
                 System.exit(DeploySOLOSWF.deploy(runtime,
                                                  wrapperonly,
                                                    null,

Modified: openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/utils/DeploySOLODHTML.java
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/utils/DeploySOLODHTML.java	2008-11-26 05:14:38 UTC (rev 11891)
+++ openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/utils/DeploySOLODHTML.java	2008-11-26 05:16:54 UTC (rev 11892)
@@ -24,7 +24,9 @@
 import java.util.HashMap;
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipOutputStream;
+import java.util.regex.*;
 
+
 import javax.xml.parsers.DocumentBuilderFactory;
 
 import org.openlaszlo.compiler.Canvas;
@@ -194,9 +196,10 @@
         //                 bgcolor: '#eaeaea', width: '800', height: '300', id: 'lzapp'});
 
         // Replace the resourceroot with a relative path
-        // Lz.dhtmlEmbedLFC('/trunk/lps/includes/lfc/LFCdhtml.js', '/trunk');
+        // lz.embed.lfc('/trunk/lps/includes/lfc/LFCdhtml.js', '/trunk');
 
-        wrapper = wrapper.replaceFirst("'" + lpspath + "'", "'lps"+File.separator+"resources'");
+        wrapper = wrapper.replaceFirst("lz.embed.lfc(.*?);",
+                                       "lz.embed.lfc('lps/includes/lfc/LFCdhtml.js', 'lps"+File.separator+"resources/');");
         
         // replace title
         // wrapper = wrapper.replaceFirst("<title>.*</title>", "<title>"+title+"</title>\n");

Modified: openlaszlo/trunk/lps/admin/solo-dhtml-deploy.jsp
===================================================================
--- openlaszlo/trunk/lps/admin/solo-dhtml-deploy.jsp	2008-11-26 05:14:38 UTC (rev 11891)
+++ openlaszlo/trunk/lps/admin/solo-dhtml-deploy.jsp	2008-11-26 05:16:54 UTC (rev 11892)
@@ -205,9 +205,9 @@
 
         // Replace the resourceroot with a relative path
         // Lz.dhtmlEmbedLFC('/trunk/lps/includes/lfc/LFCdhtml.js', '/trunk');
+        wrapper = wrapper.replaceFirst("lz.embed.lfc(.*?);",
+                                       "lz.embed.lfc('lps/includes/lfc/LFCdhtml.js', 'lps"+File.separator+"resources/');");
 
-        wrapper = wrapper.replaceFirst("'" + request.getContextPath() + "'", "'lps"+File.separator+"resources'");
-
         // debugging print
         if (false) {
         %><verbatim><pre><%= org.openlaszlo.xml.internal.XMLUtils.escapeXml(wrapper)%></pre></verbatim><%



More information about the Laszlo-checkins mailing list