lzenv is a script which attempts to set the Java classpath to contain all
the jar files in the
LPS tree. It should not itself be setting LPS_HOME, but in fact depends on
LPS_HOME being
set in order for it to run.
So the lzdeploy script is just sourcing the lzenv script, using ".", in
order to side effect the LZCP environment var (that's the classpath you see
passed to Java on the last line below)
if [ "${OS}" == Windows_NT ]; then
export LPS_HOME=`cygpath -w $LPS_HOME`
. ${LPS_HOME}\\WEB-INF\\lps\\server\\bin\\lzenv
else
export LPS_HOME
. "${LPS_HOME}/WEB-INF/lps/server/bin/lzenv"
fi
"${JAVA_HOME}/bin/java" ${JAVA_OPTS} -DLPS_HOME="${LPS_HOME}" -cp "$LZCP"
org.openlaszlo.utils.DeployMain "$@"
On Wed, Jun 23, 2010 at 5:55 PM, Raju Bitter <
[email protected]> wrote:
> Henry,
>
> I have a question on the shell script lzdeploy:
> In the shell script you set $LPS_HOME as a parameter to the java
> command to the following folder:
> "${LPS_HOME}/WEB-INF/lps/server/bin/lzenv"
>
> What is the reason for that, do you remember? If I try to do the same
> within my Ant build file, the lps.properties cannot be found by the
> compiler. Do you have any idea why that might be? Here's the Ant
> target I'm using, I'll put the full Ant build.xml into Git and post
> the link here in a bit:
>
> <!-- Compile the file to JavaScript and package the LPS resources into it
> -->
> <target name="compile-and-package" description="Compiling to
> JavaScript and packaging ZIP">
> <echo message="Compiling ${file}"/>
> <echo message="args: ${args} ${file}"/>
> <echo message="Using LPS_HOME: ${LPS_HOME}"/>
> <java classpathref="laszlo.compiler.classpath"
> classname="org.openlaszlo.utils.DeployMain" fork="yes">
> <jvmarg value="-Xmx1024M"/>
> <jvmarg value="-DLPS_HOME=${LPS_HOME}/WEB-INF/lps/server/bin/lzenv"/>
> <arg line=" ${args} ${file}"/>
> </java>
> </target>
>
> On Wed, Jun 23, 2010 at 9:22 PM, Raju Bitter
> <[email protected]> wrote:
> > Henry, I detected one difference between the browser deployment and
> > when calling DeployMain out of an Ant script: For the Ant call, the
> > LPS resources are generated - within the ZIP file - into a subfolder
> > structure
> >
> >
> ZIP_ROOT/lps/resources/webapps/openlaszlo-4.7.3/lps/components/lz/resources/
> >
> > For the ZIP files which are created through the dev console the folder
> > structure is:
> > ZIP_ROOT/lps/resources/components/lz/resources/\
> >
> > So somehow the the subfolder structure from $TOMCAT_HOME up to the lps
> > folder within the OpenLaszlo 4.7.3 webapp is somehow added to the
> > folder structure. Do you have any idea why that might be? It probably
> > has to do with the webapp context which is available on Tomcat, but
> > not when the class is called out of Ant.
> >
> > - Raju
> >
> > On Wed, Jun 23, 2010 at 5:05 PM, Raju Bitter
> > <[email protected]> wrote:
> >> That would be great, Tucker! Plus one vote for this! Maybe this will
> >> interest you as well in this context: An overview over mobile widget
> >> engines:
> >>
> http://www.pavingways.com/mobile-widget-wiki/mobile-widget-engine-overview
> >>
> >> On Wed, Jun 23, 2010 at 4:42 PM, Raju Bitter
> >> <[email protected]> wrote:
> >>> Ok, found the Java file you are calling out of the script:
> >>>
> http://www.openlaszlo.org/svn/openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/utils/DeployMain.java\<http://www.openlaszlo.org/svn/openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/utils/DeployMain.java%5C>
> >>>
> >>> pandora:deploytest rajubitter$
> >>> ~/src/svn/openlaszlo/trunk-work/WEB-INF/lps/server/bin/lzdeploy --help
> >>> Usage: lzdeploy [OPTION]... FILE...
> >>>
> >>> Options:
> >>> -D<name>=<value>
> >>> Set the name/var property to value (See Compiler.getProperties).
> >>> -D<name>
> >>> Short for -Dname=true.
> >>> --wrapperonly
> >>> Only emit html wrapper page.
> >>> --runtime=[swf8|swf9|swf10|dhtml]
> >>> Compile to swf8, swf9, swf10, dhtml
> >>> --output pathname
> >>> The name of the output file to write.
> >>> --title titlestring
> >>> The title of the application to use in the wrapper.
> >>> -v
> >>> Write progress information to standard output.
> >>> --help
> >>> Prints this message.
> >>>
> >>> And it works, excellent! Thanks, Henry!
> >>> On Wed, Jun 23, 2010 at 4:18 PM, Raju Bitter
> >>> <[email protected]> wrote:
> >>>> Thanks for you answers, I'll do a test run with the tool. Thats' good!
> >>>>
> >>>> On Wed, Jun 23, 2010 at 3:38 PM, Henry Minsky <[email protected]>
> wrote:
> >>>>> We do have a command line option to produce SOLO zip archive. It's in
> >>>>> server/bin/lzdeploy
> >>>>>
> >>>>> I haven't run it lately, may need some maintenance, I built it for
> the
> >>>>> webtop team I think.
> >>>>>
> >>>>>
> >>>>>
> >>>>> On Wed, Jun 23, 2010 at 9:28 AM, P T Withington <[email protected]>
> wrote:
> >>>>>>
> >>>>>> Sounds to me like you are looking for a command-line way to compile
> as
> >>>>>> 'SOLO'? AFAIK, the people who are doing this today are doing it by
> brute
> >>>>>> force. How about filing and improvement request? Seems to me we
> ought to
> >>>>>> support an option to `lzc` to compile as solo and an option to say
> where to
> >>>>>> put the build results.
> >>>>>>
> >>>>>> On 2010-06-23, at 08:54, Raju Bitter wrote:
> >>>>>>
> >>>>>> > With the PhoneGap deployment of OpenLaszlo apps, there's one step
> >>>>>> > where I don't know how I can automate it: How can I generate the
> "lps"
> >>>>>> > folder with all the resources for the application and the LFC
> files
> >>>>>> > for an application out of an Ant script? Currently that's done
> with
> >>>>>> > the deployment process when the downloadable ZIP file is
> generated.
> >>>>>> >
> >>>>>> > In case of PhoneGap, I need to copy the lps folder into
> >>>>>> > MOBILE_APP_ROOT/assets/www/. Is their currently to do that
> independent
> >>>>>> > of the developer console? Any input welcome.
> >>>>>>
> >>>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>> --
> >>>>> Henry Minsky
> >>>>> Software Architect
> >>>>> [email protected]
> >>>>>
> >>>>>
> >>>>>
> >>>>
> >>>
> >>
> >
>
--
Henry Minsky
Software Architect
[email protected]