| 1 |
OpenOffice::OODoc installation (2010-01-06) |
| 2 |
|
| 3 |
SYSTEM REQUIREMENTS |
| 4 |
|
| 5 |
Perl >= 5.8.0 |
| 6 |
Archive::Zip >= 1.18 |
| 7 |
XML::Twig >= 3.32 |
| 8 |
Time::Local >= 1.07 |
| 9 |
File::Temp >= 0.12 |
| 10 |
|
| 11 |
INSTALLATION FROM THE CPAN DISTRIBUTION |
| 12 |
|
| 13 |
Uncompress the distribution archive, enter the OpenOffice-OODoc-x.xxx |
| 14 |
directory and (as system administrator), type the following commands: |
| 15 |
|
| 16 |
perl Makefile.PL [options] |
| 17 |
make test |
| 18 |
make install |
| 19 |
|
| 20 |
For MSWin32, "make" can be replaced by "nmake". If the Microsoft NMAKE |
| 21 |
utility is not present in your environment, you can get it at |
| 22 |
http://download.microsoft.com/download/vc15/Patch/1.52/W95/EN-US/Nmake15.exe |
| 23 |
|
| 24 |
If Archive::Zip and XML::Twig are already installed, this CPAN |
| 25 |
installation works without a C compiler, because OpenOffice::OODoc is |
| 26 |
pure Perl. Otherwise, if these required modules are not installed and |
| 27 |
if you don't have a C development environment, you should use another |
| 28 |
distribution (such as the PPM one for ActivePerl, if available) instead, |
| 29 |
knowing that the CPAN Archive::Zip and XML::Twig distributions can |
| 30 |
indirectly bring a lot of C source code. |
| 31 |
|
| 32 |
You will be prompted for the local character set (default = utf8), an |
| 33 |
optional color map (default = none), the working directory path |
| 34 |
(default = current directory of each application), and the default |
| 35 |
file format (OOo 1.0 or ODF, default = ODF). The defaults are convenient |
| 36 |
is most situations; however the following explanations could prove |
| 37 |
useful. |
| 38 |
|
| 39 |
The default local character set is 'utf8', but it may be anyone of the |
| 40 |
character sets supported by the Encode Perl module. The standard ODF |
| 41 |
internal character set is always utf8 but the OpenOffice::OODoc module |
| 42 |
transparently allows the applications to deal with the text content as |
| 43 |
if it was natively in their local, possibly non-utf8 character set. The |
| 44 |
appropriate transcoding is automatically provided, according to the |
| 45 |
declared local character set. |
| 46 |
|
| 47 |
The role of the optional color map file is to allow the programmer to |
| 48 |
use symbolic names instead of RGB values for color attributes, knowing |
| 49 |
that OpenOffice::OODoc allows the applications to specify color |
| 50 |
parameters in some situation (characters, backgrounds, shapes, borders, |
| 51 |
and so on). Each line of this configuration file, if provided, should |
| 52 |
have the following structure: |
| 53 |
|
| 54 |
R G B name |
| 55 |
|
| 56 |
where 'R', 'G' and 'B' are integer values in the 0-255 range for red, |
| 57 |
green and blue, and 'name' is an arbitrary symbolic name for the given |
| 58 |
RGB combination. Example: |
| 59 |
|
| 60 |
135 206 235 SkyBlue |
| 61 |
|
| 62 |
The line above in the color map file allows the application programmer |
| 63 |
to use "SkyBlue" as a replacement for the [135,206,235] list with a |
| 64 |
color definition function. Such a file may be created by the user or |
| 65 |
borrowed to the environment. For example, the standard RGB file that is |
| 66 |
available in a typical X-Window or Xorg environment may be used as is or |
| 67 |
customized (this file is often located at /etc/X11/rgb.txt on Unix-like |
| 68 |
platforms, and it may be downloaded on any non-Unix platform). |
| 69 |
|
| 70 |
The choice of the working directory may be a sensitive choice in |
| 71 |
constrained environments and/or for long-running processes, while it's |
| 72 |
generally not an issue in a typical office environment. Each time a |
| 73 |
document is created or updated, OpenOffice::OODoc generates intermediate |
| 74 |
files which are automatically deleted after use (some of them can remain |
| 75 |
in case of crash only). The default path is ".", meaning that these |
| 76 |
intermediate files will be created in the current directory of each |
| 77 |
application; if needed, it may be replaced by any absolute or relative |
| 78 |
path. In distributed environments, it's recommended to specify a |
| 79 |
location in a local filesystem for performance reasons. |
| 80 |
|
| 81 |
For historical reasons, OpenOffice::OODoc supports both the primary |
| 82 |
OpenOffice.org 1.0 file format (now deprecated) and the present standard |
| 83 |
Open Document Format (ODF). By default, ODF is the preferred format, |
| 84 |
and it's strongly recommended to let this configuration parameter |
| 85 |
unchanged. The choice of a preferred format doesn't prevent the |
| 86 |
applications to process documents in the other format; the format that |
| 87 |
is declared as "preferred" will just be selected to create any new |
| 88 |
document, but OpenOffice::OODoc will not change the format of an |
| 89 |
existing document. Be careful: knowing that the legacy OpenOffice.org |
| 90 |
1.0 format is disappearing, it will not necessarily supported by future |
| 91 |
versions of OpenOffice::OODoc. OpenOffice::OODoc currently supports |
| 92 |
ODF 1.0 to 1.2; however, it doesn't include any validating feature, so |
| 93 |
the users are not prevented from using its API to insert custom, |
| 94 |
non-standard XML constructs in the documents. |
| 95 |
|
| 96 |
- the preferred file format, to be used when you create a new |
| 97 |
document from scratch (answer "1" for OpenOffice.org, "2" for OASIS |
| 98 |
OpenDocument Format, default is "2"). |
| 99 |
|
| 100 |
The interactivity can be avoided by the --noprompt option. |
| 101 |
The parameters can be provided at the command line with (respectively) |
| 102 |
the --encoding <encoding>, --colormap <file>, --workdir <path> and |
| 103 |
--format <number> options. Example: |
| 104 |
|
| 105 |
perl Makefile.PL --noprompt --workdir "C:\Temp" --encoding "cp1252" |
| 106 |
|
| 107 |
The full customization step can be avoided with the --noconfig option. |
| 108 |
If this option is used, all the default values are installed. |
| 109 |
|
| 110 |
These options define installation-level default values only; each of |
| 111 |
these values can be overridden by the applications (thanks, for |
| 112 |
example, to the odfLocalEncoding(), odfWorkingDirectory() and |
| 113 |
odfLoadColorMap() functions). The installation-level options are stored |
| 114 |
in a XML file (OODoc/config.xml) below the installation directory. |
| 115 |
This file can be manually edited at any time after the installation |
| 116 |
in order to change any parameter. |
| 117 |
|
| 118 |
A variable $OpenOffice::OODoc::INSTALLATION_DATE is available for the |
| 119 |
applications; it contains the installation date in ISO-8601 format. |
| 120 |
If the customization has been skipped (due to the --noconfig option), |
| 121 |
this variable contains the packaging date of the distribution. |
| 122 |
Caution, this value is significant if the installation has been done |
| 123 |
from the original CPAN distribution only. |
| 124 |
|
| 125 |
The date of the original CPAN package is provided by the variable |
| 126 |
$OpenOffice::OODoc::BUILD_DATE. |
| 127 |
|
| 128 |
If the installation is successful, the test procedure generates a |
| 129 |
document, writes some content in it, and checks the result. This |
| 130 |
document is named 'odftest.odt' or 'ootest.sxw' (according to your |
| 131 |
default file format) and resides in the working directory of the |
| 132 |
installation. You can later check this document with a compatible |
| 133 |
text processor or viewer. |
| 134 |
|
| 135 |
A Perl executable script, oodoc_version, is provided in the package. |
| 136 |
After a successful installation using the CPAN distribution, |
| 137 |
this script displays the version number, the package build date, |
| 138 |
and the installation path. A more sophisticated script, oodoc_test, |
| 139 |
is provided as an executable example; this script generates a document |
| 140 |
which may be checked using an ODF-compatible text processor. Be careful, |
| 141 |
while both oodoc_version and oodoc_test are provided in the original |
| 142 |
CPAN distribution, they are not necessarily available in any derived |
| 143 |
OpenOffice::OODoc package. |