| 1 |
INSTALLATION |
| 2 |
|
| 3 |
General |
| 4 |
======= |
| 5 |
|
| 6 |
Since libmwaw was based on librevenge code (for convenience), you need to install |
| 7 |
librevenge in order to build libmwaw. You can get librevenge from: |
| 8 |
|
| 9 |
- librevenge <http://libwpd.sourceforge.net/download.html> |
| 10 |
|
| 11 |
Unix/Linux/Darwin |
| 12 |
========== |
| 13 |
|
| 14 |
Installation on Unix/Linux/Darwin should be simple. |
| 15 |
Simply execute the following sequence of commands: |
| 16 |
|
| 17 |
./configure ; make ; sudo make install |
| 18 |
|
| 19 |
Myself, I build using following options: "./configure --with-sharedptr=tr1" |
| 20 |
|
| 21 |
Extensive installation instructions can be found in the INSTALL file. |
| 22 |
|
| 23 |
Windows |
| 24 |
========================================= |
| 25 |
Beta tester needed to test the compilation and report problems |
| 26 |
|
| 27 |
Windows - Microsoft(tm) Visual Studio/C++ |
| 28 |
========================================= |
| 29 |
|
| 30 |
A workspace for MSVC6 can be found in the ./build/win32/ directory. |
| 31 |
This workspace contains a projects file to compile a release version or |
| 32 |
a debug version of libmwaw. |
| 33 |
|
| 34 |
NOTE: Using the MSVC build system will result in a static library only. |
| 35 |
No dll can be created yet using this build system. If you want to create |
| 36 |
a dll, please use the MingW build system (see below for details). |
| 37 |
|
| 38 |
|
| 39 |
Windows - MinGW |
| 40 |
=============== |
| 41 |
|
| 42 |
First of all, in order to use libmwaw in your application, you do not need |
| 43 |
to build it yourself. If you have access to a binary distribution, you |
| 44 |
are encouraged to use it. If for whatever reason you still want to build |
| 45 |
libmwaw using MinGW, read following instructions. |
| 46 |
|
| 47 |
|
| 48 |
* Build environment and dependencies |
| 49 |
|
| 50 |
In order to build libmwaw, you have to have installed MinGW distribution from |
| 51 |
http://www.mingw.org. Because the build system of libmwaw uses autotools, you |
| 52 |
must install also the MSys packages. It is advisable to install all recent |
| 53 |
packages into a path that does not contain spaces. Besides the MinGW |
| 54 |
distribution, you have to install the _runtime_ and _development_ packages of |
| 55 |
libmwaw dependency librevenge from librevenge.sourceforge.net/download.html. The packages |
| 56 |
you need are librevenge-{version}-MinGW.zip and librevenge-devel-{version}-MinGW.zip |
| 57 |
|
| 58 |
|
| 59 |
* Build procedure |
| 60 |
|
| 61 |
1. Unpack the source code by running: |
| 62 |
|
| 63 |
gunzip -dc libmwaw-{version}.tar.gz | tar xpf |
| 64 |
|
| 65 |
You can also use WinZip or any other GUI compression tool. |
| 66 |
|
| 67 |
2. Next, run: |
| 68 |
|
| 69 |
export ACLOCAL_FLAGS='-I <pkg-config installation prefix>/share/aclocal'; \ |
| 70 |
./autogen.sh |
| 71 |
|
| 72 |
Some versions of libtool have bug that prevents MinGW from creating shared |
| 73 |
libraries. The autogen.sh script "libtoolizes" the package using the libtool |
| 74 |
included with MinGW distribution. Like that you are sure that your libtool is |
| 75 |
able to create DLLs. |
| 76 |
The ACLOCAL_FLAGS variable is there in order to allow the auto* scripts to find |
| 77 |
the pkg.m4 macro that is part of the pkg-config distribution. If this macro is |
| 78 |
not found, the generated configure script will be ending with an error. |
| 79 |
|
| 80 |
3. Time to configure libmwaw; run: |
| 81 |
|
| 82 |
./configure [--prefix=<target>] [--enable-static] [--disable-shared] |
| 83 |
|
| 84 |
By default, the configure script uses as prefix "/usr/local" and configures to |
| 85 |
create only shared libraries. |
| 86 |
|
| 87 |
4. Nearly done. Make sure you have a clean build by running: |
| 88 |
|
| 89 |
make clean all |
| 90 |
|
| 91 |
5. And last but not least, compile and install libmwaw by running: |
| 92 |
|
| 93 |
make install [-i] |
| 94 |
|
| 95 |
If you configure using "--enable-static --disable-shared" (pure static library |
| 96 |
creation), the libtool import libraries are not created. Make will try to install |
| 97 |
them and will stop with error. The "-i" option makes it to report the error, but |
| 98 |
not to stop. Like that the installation will succeed. |
| 99 |
|
| 100 |
|
| 101 |
|
| 102 |
|
| 103 |
============================================= |
| 104 |
== INSTALLATION OF Mwaw2odf == |
| 105 |
============================================= |
| 106 |
|
| 107 |
If we want to compile mwaw2odf ( which is a part of writerperfect), |
| 108 |
you must first download libodfgen and writerperfect in |
| 109 |
<http://libwpd.sourceforge.net/download.html> and finally, in each |
| 110 |
directories, execute configure with the options corresponding to you |
| 111 |
computer and launch make to recompile. |
| 112 |
|
| 113 |
============================================= |
| 114 |
== American fuzzy loop == |
| 115 |
============================================= |
| 116 |
|
| 117 |
After installing afl from http://lcamtuf.coredump.cx/afl/, you can |
| 118 |
call: |
| 119 |
|
| 120 |
CXX=afl-g++ ./configure |
| 121 |
make clean all install |
| 122 |
|
| 123 |
or if you compile with clang: |
| 124 |
|
| 125 |
CXX=afl-clang++ ./configure |
| 126 |
make clean all install |
| 127 |
|
| 128 |
the next step consists in regrouping a list of test files in some |
| 129 |
directory (for instance input) ; finally, you can launch the afl-fuzz: |
| 130 |
|
| 131 |
afl-fuzz -i input -o output mwaw2raw @@ |
| 132 |
|
| 133 |
============================================= |
| 134 |
== Emscripten == |
| 135 |
============================================= |
| 136 |
|
| 137 |
After installing Emscripten from http://emscripten.org, you need first |
| 138 |
install of a version of librevenge compiled with Emscripten (for instance, |
| 139 |
you can configure it with --prefix=/usr/local/em/). |
| 140 |
|
| 141 |
I use the following commands to compile libmwaw in bytecode: |
| 142 |
|
| 143 |
emconfigure ./configure PKG_CONFIG_LIBDIR=/usr/local/em/lib/pkgconfig/ --prefix=/usr/local/em/ |
| 144 |
emmake make clean all install |
| 145 |
|
| 146 |
TODO: explain how to create final executables from the created bytecode files. |
| 147 |
|
| 148 |
============================================= |
| 149 |
|
| 150 |
That's all folks! While no mailing exists, for more information, ask |
| 151 |
questions directly to [email protected]. Remember that Uncle Google can |
| 152 |
also be of big help especially when the problem is not with libmwaw, but with one of its |
| 153 |
dependencies. |