[Laszlo-dev] For Review: Change 20061221-papley-w Summary: Make it possible for lzc to be run from any directory. Files references will be relative

P T Withington ptw at openlaszlo.org
Tue Jan 2 04:47:13 PST 2007


Comments:

1) In DHTMLWriter: File.separator.charAt(0) is more simply written  
File.separatorChar, I believe.

2) I'm confused as to why the result of FileUtils.relativePath has to  
be checked to see if it is not a relative path.  Is this method mis- 
named, or broken?  Ad if the latter, perhaps it should be fixed,  
rather than cleaning up after calling it.

3) Am I correct that the crux of the fix is for FileResolver to  
actually resolve files to absolute paths?

Otherwise, approved.

On 2006-12-21, at 23:18 EST, Phillip George Apley wrote:

> Change 20061221-papley-w by papley at pgapbg417.home on 2006-12-21  
> 22:17:02 EST
>     in /Users/papley/src/svn/legals
>
> Summary: Make it possible for lzc to be run from any directory.  
> Files references will be relative
> 	 to the directory the .lzx application is in, rather than from  
> $LPS_HOME, even if lzc is
> 	 called in a parent directory of the one containing the .lzx file.
>
> 		~/src/svn/legals: lzc examples/image-loading/dataimage.lzx
> 		~/src/svn/legals/examples: lzc image-loading/dataimage.lzx
> 		~/src/svn/legals/examples/image-loading: lzc dataimage.lzx
>
>       all produce the same output.
>
> New Features:
>
> Bugs Fixed:
>
> Technical Reviewer: (max, tucker)
> QA Reviewer: (pending)
> Doc Reviewer: (pending)
>
> Documentation:
>
> Release Notes:
>
> Details:
>   WEB-INF/lps/server/src/org/openlaszlo/compiler/ObjectWriter.java
>     No need to recanonicalize an already canonical path.
>   WEB-INF/lps/server/src/org/openlaszlo/compiler/DHTMLWriter.java
>     In importResource canonicalize inputFile earlier, remove possible
>     leading slash from relativized path. Add a new version of  
> getResource
>     which will eventually no longer load resource content.
>   WEB-INF/lps/server/src/org/openlaszlo/compiler/FileResolver.java
>     In public File resolve(CompilationEnvironment env, String  
> pathname, String base)
>     get absolute file before checking for existence.
>   WEB-INF/lps/server/src/org/openlaszlo/compiler/ 
> CompilationEnvironment.java
>     In File resolveReference(Element element, String aname) assume  
> that if
>     no parent directory is given, then current (launch) directory  
> is intended.
>     In String adjustRelativeURL(String string, Element elt) use  
> accessor
>     getApplicationFile instead of direct variable reference.
>   WEB-INF/lps/server/src/org/openlaszlo/compiler/Parser.java
>     IN protected Document read(File file), use canonicalized File  
> (key) for
>     SystemID and for opening XMLReader.
>   WEB-INF/lps/server/bin/lzc
>     Added commented-out echo statement for figuring out calling args.
>
>   There is still a need to confirm that this works on the PC, that  
> it works as well in Flash
>     and that this isn't responsible for the problem I'm seeing with  
> the DHTML animation
>     test in Laszlo Explorer. I'll do some more testing on this.
>
> Tests:
>
> Files:
> D      WEB-INF/lps/server/jgenerator-2.2/.project
> M      WEB-INF/lps/server/src/org/openlaszlo/compiler/ 
> ObjectWriter.java
> M      WEB-INF/lps/server/src/org/openlaszlo/compiler/DHTMLWriter.java
> M      WEB-INF/lps/server/src/org/openlaszlo/compiler/ 
> FileResolver.java
> M      WEB-INF/lps/server/src/org/openlaszlo/compiler/ 
> CompilationEnvironment.java
> M      WEB-INF/lps/server/src/org/openlaszlo/compiler/Parser.java
> M      WEB-INF/lps/server/bin/lzc
>
>
> Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20061221- 
> papley-w.tar
>
>
> Phillip G. Apley
> Senior Software Engineer
> Platform Team
> Laszlo Systems, Inc.
> papley at laszlosystems.com
> pga at alienlanding.org
>
> maynard: 978-298-5210
> allston: 617-787-2831
> cell: 617-283-1717
> skype: phillipapley
>
> aim: phillipapley
> jabber: papley at gmail
> irc: papley at irc.freenode.net
> icq: 258643767
>
>



More information about the Laszlo-dev mailing list