Comments:
1) The comment on DHTMLWriter/copyJSLibToObjectFile has a lot of imaginary
parameters.
2) In FileResolver you probably don't need the getAbsolutePath() call here:
> f.getAbsolutePath().endsWith(".lzo")
it's wasted overhead, since you are just looking at the suffix, no?
3) Main.java, looks like you've also fixed LPP-9014 lzc -c -g lies about output
filename - should be '.lzo' but reports '.gz', so I assigned it to you. :)
4) SWF9External looks like there is some left over scaffolding around
"linkWithLFC"? Maybe get rid of that?
Otherwise, approved.
On 2010-05-20, at 11:41, Henry Minsky wrote:
> This implements the 'fat binaries' for dhtml and swf10 . Note that it
> currently stores the compiler options on the <script> element in
> the lzo, but does not check them when linking. That will be the next step.
>
>
> Change 20100520-hqm-Q by [email protected] on 2010-05-20 01:30:13 EDT
> in /Users/hqm/openlaszlo/trunk
> for http://svn.openlaszlo.org/openlaszlo/trunk
>
> Summary: make lzo files include platform-specific library object code
>
> New Features:
>
> Bugs Fixed:
>
> Technical Reviewer: ptw
> QA Reviewer: max
> Doc Reviewer: (pending)
>
> Documentation:
>
> Release Notes:
>
> Overview:
>
> + lzo files are now implemented as zip archives, and contain optional .swc
> (flash 10) and .js (dhtml) object code files
>
> When targeting swf10 and dhtml, the if the compiler sees the
> platform-specific entry in the lzo file, it will link
> against it directly, rather than compiling the lzs script code block from the
> lzo.
>
> Details:
>
>
> Tests:
>
> ant lztest
> smokecheck swf10/dhtml
> amazon in dhtml/swf10
>
> compile the libraries below with
>
> lzc -c -g1 --runtime=swf10,dhtml lib1.lzx
> lzc -c -g1 --runtime=swf10,dhtml lib2.lzx
>
> then compile/run main app from the server or lzc, for swf10 and for dhtml
> lzc -g1 --runtime=dhtml main.lzx
> lzc -g1 --runtime=swf10 main.lzx
>
> main.lzx:
> <canvas width="100%" height="80%" >
> <include href="lib1.lzx"/>
> <include href="lib2.lzx"/>
>
> <foo flavor="vanilla" oninit="this.bar()">
> <method name="bar">
> Debug.write("This class is from lib1", 'flavor is ', this.flavor);
> </method>
> </foo>
>
> <bar x="100" y="100" color="yellow" oninit="this.bar()">
> <method name="bar">
> Debug.write("This class is from lib2", 'color is ', this.color);
> </method>
> </bar>
> <bar x="200" y="100" color="red" oninit="this.bar()">
> <method name="bar">
> Debug.write("This class is from lib2", 'color is ', this.color);
> </method>
> </bar>
> <bar x="300" y="100" color="green" oninit="this.bar()">
> <method name="bar">
> Debug.write("This class is from lib2", 'color is ', this.color);
> </method>
> </bar>
>
> </canvas>
>
> lib1.lzx:
> <library>
> <class name="foo">
> <attribute name="flavor" type="string"/>
> <text text="${parent.flavor}"/>
> </class>
> </library>
>
>
> lib2.lzx:
> <library>
> <class name="bar">
> <attribute name="color" type="color"/>
> <view width="40" height="40" bgcolor="${parent.color}"/>
> </class>
> </library>
>
>
> Files:
> M WEB-INF/lps/server/src/org/openlaszlo/utils/FileUtils.java
> M WEB-INF/lps/server/src/org/openlaszlo/sc/JavascriptGenerator.java
> M WEB-INF/lps/server/src/org/openlaszlo/sc/SWF9External.java
> M WEB-INF/lps/server/src/org/openlaszlo/sc/SWF10Compiler.java
> M WEB-INF/lps/server/src/org/openlaszlo/sc/SWF9Generator.java
> M WEB-INF/lps/server/src/org/openlaszlo/sc/DHTMLCompiler.java
> M WEB-INF/lps/server/src/org/openlaszlo/sc/Compiler.java
> 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/LibraryWriter.java
> M
> WEB-INF/lps/server/src/org/openlaszlo/compiler/CompilationEnvironment.java
> M WEB-INF/lps/server/src/org/openlaszlo/compiler/IntermediateWriter.java
> M
> WEB-INF/lps/server/src/org/openlaszlo/compiler/ScriptElementCompiler.java
> M WEB-INF/lps/server/src/org/openlaszlo/compiler/Main.java
> M WEB-INF/lps/server/src/org/openlaszlo/compiler/SWF9Writer.java
>
>
> Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20100520-hqm-Q.tar
>