Menu

Developers

alonso laurent David Tardon

Developers

Getting the sources

libwps sources are stored in git. To get them, you can use:

git clone git://git.code.sf.net/p/libwps/code libwps

or you can browse the code online.

Building it

Dependencies

You will need these applications in order to compile libwps:

Once the source has been checked out, libwps can be built in usual manner:

cd libwps
./autogen.sh
./configure
make
make install

Finally, if you want also to create ODF documents, you need:

Contributing

Once you have done a change that you are happy with, and that builds with libwps, contribute it back, we'll be happy to integrate it! All you need to do is to send us a patch. The followning commands will commit the changes to your local repository and create one or more patch files. You can send these as a ticket.

git commit -a
git format-patch origin/master

Fuzzing

On OSX or on Linux, the simpler method is probably to install afl http://lcamtuf.coredump.cx/afl/ . Then you can recompile libwps using:

CXX=PATH_TO_AFL/afl-g++ ./configure [--with-sharedptr=boost|c++11|tr1]
make clean all install

or if you compile with clang:

CXX=PATH_TO_AFL/afl-clang++ ./configure [--with-sharedptr=boost|c++11|tr1]
make clean all install

the next step consists in regrouping a list of test files in some directory (for instance input) ; finally, you can launch the afl-fuzz:

afl-fuzz -i input -o output wps2raw @@

or

afl-fuzz -i input -o output wks2raw @@

Emscripten

On OSX, the creation of the libraries seems to work while the creation of the executables is still not supported,
ie. after installing Emscripten from http://emscripten.org and creating a zlib's javascript version: https://kripken.github.io/emscripten-site/docs/compiling/Building-Projects.html#using-libraries in /usr/local/em,
I am able to compile librevenge, libwps, libodfgen by

  emconfigure ./configure PKG_CONFIG_LIBDIR=/usr/local/em/lib/pkgconfig/ [OPTIONS] --prefix=/usr/local/em/
  emmake make clean all
  sudo emmake make install

which creates a byte code version of the corresponding libraries and install them in /usr/local/em/.

Then I begin to compile writerperfect by

  emconfigure ./configure PKG_CONFIG_LIBDIR=/usr/local/em/lib/pkgconfig/ [OPTIONS] --prefix=/usr/local/em/
  emmake make clean all

and I finish compiling a final executable by hand, ie. I update wps2odt.cxx (see https://sourceforge.net/projects/libwps/files/testEmscriptenCompilation/) and I compile with:

  EMDIR=/usr/local/em/
  WRITERDIR=~/sources/libwpd-rw.git/writerperfect/src
  em++ -O2 -DSHAREDPTR_STD -I $WRITERDIR/lib -I $WRITERDIR/conv/odf -I$EMDIR/include/librevenge-0.0 -s DEMANGLE_SUPPORT=1 -L$EMDIR/lib -llibwps-0.4 -llibodfgen-0.1 -llibrevenge-0.0 -llibrevenge-stream-0.0 -llibz wps2odf.cxx -L$WRITERDIR/conv/odf/.libs -llibodfhelper -llibodfwps -L$WRITERDIR/lib/.libs -llibwriterperfect_internal -s EXPORTED_FUNCTIONS='["_main","_callConversion"]' -o wps2odf.js

Finally, I copy in the final repository:

Contact

You can get in touch with us:

Project Admins: