| 1 |
INSTALLATION |
| 2 |
|
| 3 |
General |
| 4 |
======= |
| 5 |
|
| 6 |
Since libstaroffice was based on librevenge code (for convenience), you need to install |
| 7 |
librevenge in order to build libstaroffice. You can get librevenge from: |
| 8 |
|
| 9 |
- librevenge <http://libwpd.sourceforge.net/download.html> |
| 10 |
|
| 11 |
|
| 12 |
Unix/Linux |
| 13 |
========== |
| 14 |
|
| 15 |
Installation on Unix/Linux should be simple. Simply execute the following |
| 16 |
sequence of commands: |
| 17 |
|
| 18 |
./configure ; make ; su -c 'make install' |
| 19 |
|
| 20 |
Extensive installation instructions can be found in the INSTALL file. |
| 21 |
|
| 22 |
|
| 23 |
Windows - Microsoft(tm) Visual Studio/C++ |
| 24 |
========================================= |
| 25 |
|
| 26 |
A workspace for MSVC6 can be found in the ./build/win32/ directory. |
| 27 |
This workspace contains a projects file to compile a release version or |
| 28 |
a debug version of libstaroffice. |
| 29 |
|
| 30 |
NOTE: Using the MSVC build system will result in a static library only. |
| 31 |
No dll can be created yet using this build system. If you want to create |
| 32 |
a dll, please use the MingW build system (see below for details). |
| 33 |
|
| 34 |
|
| 35 |
Windows - MinGW |
| 36 |
=============== |
| 37 |
|
| 38 |
First of all, in order to use librevenge in your application, you do not need |
| 39 |
to build it yourself. If you have access to a binary distribution, you |
| 40 |
are encouraged to use it. If for whatever reason you still want to build |
| 41 |
librevenge using MinGW, read following instructions. |
| 42 |
|
| 43 |
|
| 44 |
* Build environment and dependencies |
| 45 |
|
| 46 |
In order to build librevenge, you have to have installed MinGW distribution from |
| 47 |
http://www.mingw.org. Because the build system of libstaroffice uses autotools, you |
| 48 |
must install also the MSys packages. It is advisable to install all recent |
| 49 |
packages into a path that does not contain spaces. Besides the MinGW |
| 50 |
distribution, you have to install the _runtime_ and _development_ packages of |
| 51 |
libstaroffice dependency librevenge from libwpd.sourceforge.net/download.html. The packages |
| 52 |
you need are librevenge-{version}-MinGW.zip and librevenge-devel-{version}-MinGW.zip |
| 53 |
|
| 54 |
|
| 55 |
* Build procedure |
| 56 |
|
| 57 |
1. Unpack the source code by running: |
| 58 |
|
| 59 |
gunzip -dc libstaroffice-{version}.tar.gz | tar xpf |
| 60 |
|
| 61 |
You can also use WinZip or any other GUI compression tool. |
| 62 |
|
| 63 |
2. Next, run: |
| 64 |
|
| 65 |
export ACLOCAL_FLAGS='-I <pkg-config installation prefix>/share/aclocal'; \ |
| 66 |
./autogen.sh |
| 67 |
|
| 68 |
Some versions of libtool have bug that prevents MinGW from creating shared |
| 69 |
libraries. The autogen.sh script "libtoolizes" the package using the libtool |
| 70 |
included with MinGW distribution. Like that you are sure that your libtool is |
| 71 |
able to create DLLs. |
| 72 |
The ACLOCAL_FLAGS variable is there in order to allow the auto* scripts to find |
| 73 |
the pkg.m4 macro that is part of the pkg-config distribution. If this macro is |
| 74 |
not found, the generated configure script will be ending with an error. |
| 75 |
|
| 76 |
3. Time to configure libstaroffice; run: |
| 77 |
|
| 78 |
./configure [--prefix=<target>] [--enable-static] [--disable-shared] |
| 79 |
|
| 80 |
By default, the configure script uses as prefix "/usr/local" and configures to |
| 81 |
create only shared libraries. Myself, I build using following options: |
| 82 |
"./configure --prefix=/target --enable-static --enable-shared" |
| 83 |
|
| 84 |
4. Nearly done. Make sure you have a clean build by running: |
| 85 |
|
| 86 |
make clean all |
| 87 |
|
| 88 |
5. And last but not least, compile and install librevenge by running: |
| 89 |
|
| 90 |
make install [-i] |
| 91 |
|
| 92 |
If you configure using "--enable-static --disable-shared" (pure static |
| 93 |
library creation), the libtool import libraries are not created. Make |
| 94 |
will try to install them and will stop with error. The "-i" option |
| 95 |
makes it to report the error, but not to stop. Like that the |
| 96 |
installation will succeed. |
| 97 |
|
| 98 |
That's all folks! While no mailing exists, for more information, ask |
| 99 |
questions directly to [email protected]. Remember that |
| 100 |
Uncle Google can also be of big help especially when the problem is |
| 101 |
not with libstaroffice, but with one of its dependencies. |