Blame README

rpm-build 6f7582
INSTALLATION
rpm-build 6f7582
rpm-build 6f7582
General
rpm-build 6f7582
=======
rpm-build 6f7582
rpm-build 6f7582
Since libmwaw was based on librevenge code (for convenience), you need to install
rpm-build 6f7582
librevenge in order to build libmwaw. You can get librevenge from:
rpm-build 6f7582
rpm-build 6f7582
- librevenge <http://libwpd.sourceforge.net/download.html>
rpm-build 6f7582
rpm-build 6f7582
Unix/Linux/Darwin
rpm-build 6f7582
==========
rpm-build 6f7582
rpm-build 6f7582
Installation on Unix/Linux/Darwin should be simple.
rpm-build 6f7582
Simply execute the following sequence of commands:
rpm-build 6f7582
rpm-build 6f7582
./configure [--with-sharedptr=boost|c++11|tr1]; make ; sudo make install
rpm-build 6f7582
rpm-build 6f7582
Myself, I build using following options: "./configure --with-sharedptr=tr1"
rpm-build 6f7582
rpm-build 6f7582
Extensive installation instructions can be found in the INSTALL file.
rpm-build 6f7582
rpm-build 6f7582
Windows
rpm-build 6f7582
=========================================
rpm-build 6f7582
Beta tester needed to test the compilation and report problems
rpm-build 6f7582
rpm-build 6f7582
Windows - Microsoft(tm) Visual Studio/C++
rpm-build 6f7582
=========================================
rpm-build 6f7582
rpm-build 6f7582
A workspace for MSVC6 can be found in the ./build/win32/ directory.
rpm-build 6f7582
This workspace contains a projects file to compile a release version or 
rpm-build 6f7582
a debug version of libmwaw. 
rpm-build 6f7582
rpm-build 6f7582
NOTE: Using the MSVC build system will result in a static library only. 
rpm-build 6f7582
No dll can be created yet using this build system. If you want to create 
rpm-build 6f7582
a dll, please use the MingW build system (see below for details).
rpm-build 6f7582
rpm-build 6f7582
rpm-build 6f7582
Windows - MinGW
rpm-build 6f7582
===============
rpm-build 6f7582
rpm-build 6f7582
First of all, in order to use libmwaw in your application, you do not need
rpm-build 6f7582
to build it yourself. If you have access to a binary distribution, you
rpm-build 6f7582
are encouraged to use it. If for whatever reason you still want to build
rpm-build 6f7582
libmwaw using MinGW, read following instructions.
rpm-build 6f7582
rpm-build 6f7582
rpm-build 6f7582
* Build environment and dependencies
rpm-build 6f7582
rpm-build 6f7582
In order to build libmwaw, you have to have installed MinGW distribution from
rpm-build 6f7582
http://www.mingw.org. Because the build system of libmwaw uses autotools, you
rpm-build 6f7582
must install also the MSys packages. It is advisable to install all recent
rpm-build 6f7582
packages into a path that does not contain spaces. Besides the MinGW
rpm-build 6f7582
distribution, you have to install the _runtime_ and _development_ packages of
rpm-build 6f7582
libmwaw dependency librevenge from librevenge.sourceforge.net/download.html. The packages
rpm-build 6f7582
you need are librevenge-{version}-MinGW.zip and librevenge-devel-{version}-MinGW.zip
rpm-build 6f7582
rpm-build 6f7582
rpm-build 6f7582
* Build procedure
rpm-build 6f7582
rpm-build 6f7582
1. Unpack the source code by running:
rpm-build 6f7582
rpm-build 6f7582
  gunzip -dc libmwaw-{version}.tar.gz | tar xpf
rpm-build 6f7582
rpm-build 6f7582
You can also use WinZip or any other GUI compression tool.
rpm-build 6f7582
rpm-build 6f7582
2. Next, run:
rpm-build 6f7582
rpm-build 6f7582
  export ACLOCAL_FLAGS='-I <pkg-config installation prefix>/share/aclocal'; \
rpm-build 6f7582
  ./autogen.sh
rpm-build 6f7582
rpm-build 6f7582
Some versions of libtool have bug that prevents MinGW from creating shared
rpm-build 6f7582
libraries. The autogen.sh script "libtoolizes" the package using the libtool
rpm-build 6f7582
included with MinGW distribution. Like that you are sure that your libtool is
rpm-build 6f7582
able to create DLLs.
rpm-build 6f7582
The ACLOCAL_FLAGS variable is there in order to allow the auto* scripts to find
rpm-build 6f7582
the pkg.m4 macro that is part of the pkg-config distribution. If this macro is
rpm-build 6f7582
not found, the generated configure script will be ending with an error.
rpm-build 6f7582
rpm-build 6f7582
3. Time to configure libmwaw; run:
rpm-build 6f7582
rpm-build 6f7582
  ./configure [--prefix=<target>] [--enable-static] [--disable-shared] [--with-sharedptr=boost|c++11|tr1]
rpm-build 6f7582
rpm-build 6f7582
By default, the configure script uses as prefix "/usr/local" and configures to
rpm-build 6f7582
create only shared libraries.
rpm-build 6f7582
rpm-build 6f7582
4. Nearly done. Make sure you have a clean build by running:
rpm-build 6f7582
 
rpm-build 6f7582
  make clean all
rpm-build 6f7582
rpm-build 6f7582
5. And last but not least, compile and install libmwaw by running:
rpm-build 6f7582
rpm-build 6f7582
  make install [-i]
rpm-build 6f7582
rpm-build 6f7582
If you configure using "--enable-static --disable-shared" (pure static library
rpm-build 6f7582
creation), the libtool import libraries are not created. Make will try to install
rpm-build 6f7582
them and will stop with error. The "-i" option makes it to report the error, but
rpm-build 6f7582
not to stop. Like that the installation will succeed.
rpm-build 6f7582
rpm-build 6f7582
rpm-build 6f7582
rpm-build 6f7582
rpm-build 6f7582
   =============================================
rpm-build 6f7582
   ==    INSTALLATION OF Mwaw2odf             ==
rpm-build 6f7582
   =============================================
rpm-build 6f7582
rpm-build 6f7582
If we want to compile mwaw2odf ( which is a part of writerperfect),
rpm-build 6f7582
you must first download libodfgen and writerperfect in
rpm-build 6f7582
<http://libwpd.sourceforge.net/download.html> and finally, in each
rpm-build 6f7582
directories, execute configure with the options corresponding to you
rpm-build 6f7582
computer and launch make to recompile.
rpm-build 6f7582
rpm-build 6f7582
   =============================================
rpm-build 6f7582
   ==    American fuzzy loop                  ==
rpm-build 6f7582
   =============================================
rpm-build 6f7582
rpm-build 6f7582
After installing afl from http://lcamtuf.coredump.cx/afl/, you can
rpm-build 6f7582
call:
rpm-build 6f7582
rpm-build 6f7582
  CXX=afl-g++ ./configure [--with-sharedptr=boost|c++11|tr1]
rpm-build 6f7582
  make clean all install
rpm-build 6f7582
rpm-build 6f7582
or if you compile with clang:
rpm-build 6f7582
rpm-build 6f7582
  CXX=afl-clang++ ./configure [--with-sharedptr=boost|c++11|tr1]
rpm-build 6f7582
  make clean all install
rpm-build 6f7582
  
rpm-build 6f7582
the next step consists in regrouping a list of test files in some
rpm-build 6f7582
directory (for instance input) ; finally, you can launch the afl-fuzz:
rpm-build 6f7582
rpm-build 6f7582
  afl-fuzz -i input -o output mwaw2raw @@
rpm-build 6f7582
rpm-build 6f7582
   =============================================
rpm-build 6f7582
   ==    Emscripten                           ==
rpm-build 6f7582
   =============================================
rpm-build 6f7582
rpm-build 6f7582
After installing Emscripten from http://emscripten.org, you need first
rpm-build 6f7582
install of a version of librevenge compiled with Emscripten (for instance,
rpm-build 6f7582
you can configure it with --prefix=/usr/local/em/).
rpm-build 6f7582
rpm-build 6f7582
I use the following commands to compile libmwaw in bytecode:
rpm-build 6f7582
rpm-build 6f7582
  emconfigure ./configure PKG_CONFIG_LIBDIR=/usr/local/em/lib/pkgconfig/ [--with-sharedptr=boost|c++11|tr1] --prefix=/usr/local/em/
rpm-build 6f7582
  emmake make clean all install
rpm-build 6f7582
  
rpm-build 6f7582
TODO: explain how to create final executables from the created bytecode files.
rpm-build 6f7582
rpm-build 6f7582
   =============================================
rpm-build 6f7582
rpm-build 6f7582
That's all folks! While no mailing exists, for more information, ask
rpm-build 6f7582
questions directly to osnola@users.sourceforge.net. Remember that Uncle Google can
rpm-build 6f7582
also be of big help especially when the problem is not with libmwaw, but with one of its 
rpm-build 6f7582
dependencies.