[brailleblaster] Re: jar Files

  • From: Bert Frees <bert.frees@xxxxxxxxxxxxxxxx>
  • To: brailleblaster@xxxxxxxxxxxxx
  • Date: Mon, 08 Nov 2010 12:21:18 +0100

On 8/11/2010 12:06, John J. Boyer wrote:
Bert,


Thanks for the information and the links. I'm looking at odt2braille
right now and have examined the bin directory you mention. You seem to
have combined liblouis and liblouisxml into a single library.

Yes, I did this because of convenience reasons. But it is better to keep them in separate libraries, so I will probably change this later on.

The SWT jar does contain several C libraries.

I think we may be ready to make some real progress on the embosser
drivers right now. The editor is more important, of course, but it isn't
ready for detailed work yet. We work on whatever portion of a project is
ready at the moment.

I'm still wondering about proprietary information in drivers. It would
be nice to have a link to a Java code obfuscator. How does one optimize
a Java program? I thought they were more or less optimized already.

Thanks,
John

On Mon, Nov 08, 2010 at 11:24:39AM +0100, Bert Frees wrote:
Hi.

In the odt2braille extension for OpenOffice.org, liblouis is not
included in a jar file. All the necessary tools and libraries are in a
"bin" subdirectory in the odt2braille extension ("oxt" file, which is in
fact a zip file). When OpenOffice.org needs liblouisxml, a call is made
to a function in the odt2braille jar, and the location of the xml2brl
tool (bin directory) is passed as an argument. odt2braille will then
execute xml2brl, and xml2brl will load the dll's (on Windows) or dylib's
(on Mac OS).

On the subject of embosser drivers, I think it might be worth taking a
look at the "pef2text" transformer in the DAISY Pipeline, which enabled
you to convert a pef file to a text file and to emboss a pef on a select
list of embosser types. In fact, odt2braille currently uses this module
to handle embossing. I have made some modifications to the code and
added support for some more embossers myself.

Take a look at these links:

*Documentation*:
http://data.daisy.org/projects/pipeline/doc/transformers/org_pef_pef2text.html
*Source code*:
https://daisymfc.svn.sourceforge.net/svnroot/daisymfc/trunk/dmfc/transformers/org_pef_text/
*odt2braille modifications*:
https://odt2braille.svn.sourceforge.net/svnroot/odt2braille/DaisyPipeline/src/org_pef_text/
*Use in odt2braille*:
https://odt2braille.svn.sourceforge.net/svnroot/odt2braille/Odt2Braille/src/be/docarch/odt2braille/HandlePEF.java

It would be very nice if BrailleBlaster and OpenOffice.org (and DAISY
Pipeline) would all handle embossing the same way. So I would love to
collaborate on this matter.

Kind regards,
Bert


On 7/11/2010 16:57, Michael Whapples wrote:
If doing the creation by hand then you use the jar command in the JDK,
but tools like maven and ant have facilities to allow you to build a
jar file as part of the build process.

How to include libraries in a jar file? You need the compiled library
already created (either created as an earlier step of the build
process or manually produced earlier) and you just copy the library
file (DLL, shared object file, etc) into the jar like any other
resource file. Again SWT and JNA's build systems may provide useful
examples.

May be others don't include liblouis and liblouisxml in jar files
because they may not want the effort of writing the code to manage
extracting the library when required. As a question, do we need
liblouis and liblouisutdml included in jar files? I had imagined we
were going to go down the route of having a directory structure which
is packaged into a zip file, requiring the user to download the zip
file, unzip it somewhere and run it from that location, rather than
trying to bundle everything into a single jar.

Why had I gone with the zip file idea? one advantage is that users may
wish to modify things (eg. as I said may be add another driver not
included in BrailleBlaster). Thinking further that would be possible
with a single jar file, you just have an external settings/plugin
directory brailleblaster uses.

Michael Whapples
On 07/11/10 06:48, John J. Boyer wrote:
How does one go about creating a jar file? In particular, how would one
create a jar rfile that also contains C or C++ libraries? For example,
how woulod I include liblouis and liblouisutdml in a jar file with the
bindings?

The ODT2braille plugin for Open Office has liblouis and liblouisxml dlls
in a bin subdirectory. How do they load these libraries?

We also have the C library itex2MMl and the C++ library hunspell. It
would be nice if we could encapsulate them in a jar file with their
bindings.

Thanks,
John




Other related posts: