[Laszlo-dev] UPDATED For Review: Change 20070208-ptw-x Summary: Binary Library tweaks
P T Withington
ptw at pobox.com
Thu Feb 15 07:20:10 PST 2007
On 2007-02-15, at 09:31 EST, Sebastian Wagner wrote:
> Yes it is not possible to use import + fonts at the moment as you
> get a
> compiler error that Fonts must be declared in the main-lzx file.
> So i wanted to cheat the compiler by generating binary-files with
> lzc -c (by
> hand or by another service) and load them into the app (instead of
> using the
> real import mechanism).
If you are trying to load at runtime, binary libraries will not help
you. Binary libraries must be loaded at compile time.
Binary libraries are an optimization that allows you to deliver an
LZX library pre-compiled, but not linked. There are several possible
uses for this feature, but its primary purpose is to support making a
smaller distribution by not _having_ to include the sources of
component libraries for users who are not interested in the full
sources.
> Henry did some magic to the compiler sothat he could generate files
> with
> loadable Libary at runtime:
> http://www.openlaszlo.org/pipermail/laszlo-dev/2007-January/
> 008025.html
> Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20070130-
> hqm-b.tar
> But thats for legals. Do I have to port it to 3.4.x to use that or
> does your
> *binary libary changeset* include that?
That is a separate feature for dynamically loaded libraries that has
not been ported to 3.4. I don't know how hard that would be to do.
Maybe Henry can comment?
Perhaps the names could be better for these two different features.
Perhaps I should have referred to 'binary libraries' as 'static
libraries'.
> sebastian
>
> 2007/2/15, P T Withington <ptw at pobox.com>:
>>
>> On 2007-02-15, at 04:44 EST, Sebastian Wagner wrote:
>>
>> > hi,
>> >
>> > I tried to use that new functionality with 3.4 but I am not clear
>> > what it
>> > should do. If you compile a libary.lzx with lzc -c library.lzx you
>> > got an
>> > binary file that will be loaded instead of the lzx-file, you have
>> > written
>> > down. So changes to the library.lzx have no effect to the main-file
>> > as long
>> > as the lzo is not recompiled (which is up to yourself to keep that
>> > file
>> > updated) That's right?
>>
>> Yes, your build system would have to be used to update the .lzo file.
>>
>> > I tried to use it with fonts in the library file but i think it
>> > does not
>> > work with fonts? Can you confirm that?
>> > Is it possible to compile a library file to binary with lzc -c so
>> > fonts can
>> > be loaded from Library instead of the main file?
>>
>> It is entirely possible that fonts do not work in a binary library.
>> I have not tested that.
>>
>> Note that binary libraries are static, not dynamic. They are linked
>> in at compile time not run time. I.e., .lzo is to .lzx as .o is
>> to .c (not .so).
>>
>> > regards & thx
>> > sebastian
>> >
>> >
>> > 2007/2/9, P T Withington <ptw at pobox.com>:
>> >>
>> >> [With this update, I can get Pablo's library to compile without
>> >> bombing.]
>> >>
>> >> Change 20070208-ptw-x by ptw at dueling-banjos.local on 2007-02-08
>> >> 19:29:46 EST
>> >> in /Users/ptw/OpenLaszlo/trunk
>> >>
>> >> Summary: Binary Library tweaks
>> >>
>> >> Bugs Fixed:
>> >> LPP-NaN: Compiler chokes if library.lzx does not exist, even if
>> >> library.lzo does
>> >> LPP-NaN: Compiler does not recompile app if library.lzo changes
>> >>
>> >> Technical Reviewer: henry (pending)
>> >> QA Reviewer: pablo (pending)
>> >> Doc Reviewer: n/a
>> >>
>> >> Details:
>> >> CompilationManager: add flag for resolving Library files.
>> >>
>> >> LibraryCompiler: remove redundant resolveLibraryName.
>> >>
>> >> ToplevelCompiler, SWFWriter: Use new
>> >> CompilationEnvironment.resolveLibrary
>> >> method.
>> >>
>> >> FileResolver: Add an option to resolve using the 'library
>> rules'
>> >> (if a directory is passed add library.lzx, look for
>> library.lzo
>> >> first).
>> >>
>> >> CompilationEnvironment: Add new resolveLibrary method, let
>> >> resolveReference take a third argument specifying library
>> >> resolution, default to element being an include element.
>> >>
>> >> ImportCompiler, Parser: resolve as library.
>> >>
>> >> StyleSheetCompiler: use environment resolve interface.
>> >>
>> >> CompilationError: careful about null.
>> >>
>> >> Tests:
>> >> henry's simple library test
>> >> smokecheck
>> >> pablo's library compiles
>> >>
>> >> Files:
>> >> M WEB-INF/lps/server/src/org/openlaszlo/cm/
>> >> CompilationManager.java
>> >> M WEB-INF/lps/server/src/org/openlaszlo/compiler/
>> >> LibraryCompiler.java
>> >> M WEB-INF/lps/server/src/org/openlaszlo/compiler/
>> >> ToplevelCompiler.java
>> >> M WEB-INF/lps/server/src/org/openlaszlo/compiler/
>> SWFWriter.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/
>> >> ImportCompiler.java
>> >> M WEB-INF/lps/server/src/org/openlaszlo/compiler/
>> >> StyleSheetCompiler.java
>> >> M WEB-INF/lps/server/src/org/openlaszlo/compiler/
>> >> CompilationError.java
>> >> M WEB-INF/lps/server/src/org/openlaszlo/compiler/Parser.java
>> >>
>> >> Changeset: http://svn.openlaszlo.org/openlaszlo/patches/
>> 20070208-ptw-
>> >> x.tar
>> >>
>> >
>> >
>> >
>> > --
>> > Sebastian Wagner
>> > http://www.webbase-design.de
>> > http://www.laszlo-forum.de
>> > Bleichstraße 92
>> > 75173 Pforzheim
>> > Tel.: 0177-7341829
>> > Home: 07231-417456
>> > seba.wagner at gmail.com
>>
>>
>
>
> --
> Sebastian Wagner
> http://www.webbase-design.de
> http://www.laszlo-forum.de
> Bleichstraße 92
> 75173 Pforzheim
> Tel.: 0177-7341829
> Home: 07231-417456
> seba.wagner at gmail.com
More information about the Laszlo-dev
mailing list