I have updated the patches for current versions of LPub4 and packaged it for Fedora 19.
LPub4 needs to know where to find the LDraw parts library and the ldview executable. Its configuration file is ~/.config/LPub/LDraw Building Instruction Tool.conf which (assuming you are using my package of the LDraw parts library and my package of LDView) you can edit to contain:
[General] LDrawDir=/usr/share/ldraw LDView=/usr/bin/ldview PreferredRenderer=LDView PliControl=/usr/share/lpub/pli.mpd
The .spec file shows how it was created, the *.patch files are the modifications I made, the .x86_64.rpm file (other than debuginfo) is the one to install, and the .src.rpm contains everything so it can be rebuilt for another rpm-based distribution.
LDView renders digital Lego models, both interactively and batch. I made a couple of small patches to it and packaged it for Fedora 19.
There are two executables in these packages. LDView is the interactive GUI. If you use the LDraw Parts Library I packaged, you will need to configure it to point to /usr/share/ldraw for the LDrawDir config option. You can do that by editing ~/.config/LDView/LDView.conf to include this content:
The other executable is ldview, which provides batch rendering operations for use by other programs such as LPub. It also needs to know where the LDraw model files are, so edit ~/.ldviewrc to contain this:
The .spec file shows how it was created, the *.patch files are the modifications I made, the *.x86_64.rpm files (other than debuginfo) are the ones to install, and the .src.rpm contains everything so it can be rebuilt for another rpm-based distribution.
Since that blog post, Don Heyse the author of ldglite emailed me about the ldglite bug I ran into. A bit more detail and a testcase later, and Don had a fix for ldglite 1.2.4 in CVS. Thank you, Don -- you are awesome.
LPub4 is a program by Kevin Clague for creating high-quality instructions for Lego models. It runs on OS/X and Windows. And now with a few patches, it runs on Linux (tested on Fedora 11) as well.
There still seem to be some issues with rendering. There are two rendering options: LDView and ldglite. LDView 4.0.1 segfaults under Linux and the latest from CVS does not build under Linux; I have not dug deeply into the issues there. ldglite requires a wrapper script to scale some of the values LPub passes it to get the model to render. Just configure LPub to call the wrapper script instead of ldglite directly.
Checkout LPub from CVS
cvs -d :pserver:email@example.com:/cvsroot/lpub4 co LPub4 LPub4
Then apply these patches:
Then build the lpub binary.
PATH=/usr/lib/qt4/bin:$PATH qmake make