[Laszlo-dev] For Review: Change 20090206-hqm-b Summary: remodularize SOLO DHTML deploy process
Henry Minsky
henry.minsky at gmail.com
Fri Feb 6 20:57:45 PST 2009
Change 20090206-hqm-b by hqm at badtzmaru.home on 2009-02-06 23:34:06 EST
in /Users/hqm/openlaszlo/trunk4
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: remodularize SOLO DHTML deploy process
New Features:
Bugs Fixed:
Technical Reviewer: max
QA Reviewer: mdemmon
Doc Reviewer: (pending)
Documentation:
Release Notes:
Added a new compiler option , "--copy-resources" which is used when
building a DHTML app for deployment. It causes any 'external'
resources (ones which
reside above of the application's home directory in the filesystem) to
be copied to
a "lps/resources" subdirectory in the application's home directory.
This task was formerly done by the SOLO deployer wizards. It was moved
to the compiler in order to make a fix for LPP-7660, to allow a DHTML
application to be compiled whose home directory is outside of the
LPS_HOME directory tree.
Details:
A new command line compiler option was added, COPY_RESOURCES_LOCAL,
which causes the DHTMLWriter to copy any 'external' resources to a
local directory named "lps/resources", in the application's home
directory.
This is to support packaging of a self-contained DHTML
application. This resource file copying used to be done by SOLO
deployer wizard, but while fixing LPP-7660, it was cleaner to refactor
this into the compiler.
The flag is enabled via the command line compiler (lzc) using
"--copy-resources". When compiling via the LPS server, add
"lzcopyresources=true" to the URL. This is how the DHTML SOLO wizard
activates the feature.
The flag is disabled by default.
Tests:
from command line run
[1] lzc --runtime=dhtml --copy-resources demos/calendar/calendar.lzx
+ see that subdirectory is created in calendar named "lps", which
contains all
application-external resources
[2] test via LPS server:
+ delete lps subdir from demos/calendar
+ fetch http://localhost:8080/trunk/demos/calendar/calendar.lzx?lzr=dhtml&lzcopyresources=true
+ Look at the applicaton source directory, demos/calendar/ and see
that a directory "lps/resources" was created and populated with lz
component library resources.
[3] Run SOLO deploy wizard via the [SOLO] button on the dev
console. Download the zip file, install on some other non-LPS server ,
and verify that app with custom wrapper (calendar.lzx.html) runs in
SOLO mode
[4] Run command line solo deployer (lzdeploy)
lzdeploy --runtime=dhtml demos/calendar/calendar.lzx
+ verify that zip file calendar.lzx.zip is created
+ unpack this zip file on a non-LPS server, and verify that
calendar.lzx.html runs SOLO properly
[5] Run test case from LPP-7660, where app is symlinked to outside the
LPS_HOME, verify DHTML works properly. Make SOLO deployment from this.
[6] Place LPS demo app (such as weather.lzx or calendar) in a source
tree external to the LPS_HOME, and run command line compiler, lzc
--runtime=dhtml , and inspect compiled app file (calendar.js) to see
that it has no absolute paths for resources (that was the bug in
LPP-7660)
[7] Run command line SOLO deployer on app which is outside of LPS_HOME
(e.g., put your app in ~/src/testdhtml/weather/weather.lzx, and
compile with "lzdeploy --runtime=dhtml"
Files:
M WEB-INF/lps/server/src/org/openlaszlo/utils/FileUtils.java
M WEB-INF/lps/server/src/org/openlaszlo/utils/DeploySOLODHTML.java
M WEB-INF/lps/server/src/org/openlaszlo/servlets/responders/
ResponderCompile.java
M WEB-INF/lps/server/src/org/openlaszlo/compiler/DHTMLWriter.java
M WEB-INF/lps/server/src/org/openlaszlo/compiler/
CompilationEnvironment.java
M WEB-INF/lps/server/src/org/openlaszlo/compiler/Main.java
M WEB-INF/lps/server/src/org/openlaszlo/compiler/
CompilationError.java
M lps/includes/source/embednew.js
M lps/admin/solo-dhtml-deploy.jsp
Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20090206-hqm-b.tar
More information about the Laszlo-dev
mailing list