lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi] Wine and java


From: Greg Chicares
Subject: [lmi] Wine and java
Date: Tue, 18 Oct 2016 17:37:22 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.3.0

Until we can replace xsl-fo, we're stuck with java, and I need to make
it work with 'wine' in order to create PDF illustrations in my cross-
building chroot. This message shows I've done that.

First, I tried GNU/Linux native tools in my chroot:
  apt-get default-jre fop jing trang
and commands like these just work:
  jing -c xrc.rnc *.xrc
  fop -fo unnamed1.fo.xml unnamed1.pdf
The only problem is integration with lmi cross-built for msw, which
invokes fop through wxExecute(), i.e., through some msw API call such
as CreateProcess().

Not realizing that at first, I tried a wrapper script:
  #!/bin/sh
  fop "$1" "$(winepath $2)" "$3" "$(winepath $4)"
to translate the filenames in a command such as write_ledger_as_pdf()
might issue, e.g.:
  fop -fo "Z:/opt/lmi/bin/unnamed.fo.xml" -pdf "Z:/opt/lmi/bin/unnamed.pdf"
Of course, that didn't work, and neither did the variations that I
tested via "Test | Test system command..."; in particular, pasting
  Z:/usr/bin/fop -fo "/opt/lmi/bin/unnamed.fo.xml" -pdf 
"/opt/lmi/bin/unnamed.pdf"
into that dialog froze lmi and I had to kill it, but I suppose that
just means that CreateProcess("path/to/ELF_executable") has undefined
behavior.

When I finally came to that realization, I just downloaded a JRE
installer for msw and ran it thus:
  wine /cache_for_lmi/jre-1_5_0-windows-i586.exe
and then everything worked. The only reason why I chose that obsolete
version is that it's the one I had used in native msw. Its compatibility
with wine is rated as "garbage" here:
  https://appdb.winehq.org/appview.php?appId=1372
but that rating was based on testing it with wine-1.1.2, whereas I'm
using wine-1.6.2 .



reply via email to

[Prev in Thread] Current Thread [Next in Thread]