Here's what I was thinking would be the steps for making 'fat binary'
lzo files.
An lzo will be a zip archive that contains three files
"lzo" ==> same as now, nthe XML for the interface declarations and the
platform-independent lzs script.
"swc" ==> the swf10 .swc library file
"js" ==> the JS1 dhtml library file
So the steps we would take are
1) Modify the code that reads and writes the .lzo file to treat it as
multi-file zip archive. Store the current runtime-independent XML
output as file named "lzo" in the archive.
2) When compiling with "lzc -c" if the runtime is swf9|10, build an
swf10 .swc file and add to lzo as a file named "swc".
If it's a DHTML compile, store the output into "js" in the lzo file.
I guess we need an option to lzc to write into an existing lzo file,
so you can do a compile for multiple runtimes by compiling first for
swf10 then for dhtml or whatever.
== LINKING ==
For SWF10: When linking against an lzo, copy out the .swc
file, if it exists, to a uniquely named .swc file in the as3 tmp
working dir. Keep a list of all the lzo .swc files that have been
found, and pass that to the script compiler swf10 backend to link
against.
For DHTML, we really just have to append the .js file from the lzo
into the output, right?
--
Henry Minsky
Software Architect
[email protected]