@ -14,8 +14,9 @@
5. [Building and linking your code with Exiv2 ](#2-5 )
5. [Building and linking your code with Exiv2 ](#2-5 )
6. [Consuming Exiv2 with CMake ](#2-6 )
6. [Consuming Exiv2 with CMake ](#2-6 )
7. [Using pkg-config to compile and link your code with Exiv2 ](#2-7 )
7. [Using pkg-config to compile and link your code with Exiv2 ](#2-7 )
8. [Building Exiv2 Documentation ](#2-8 )
8. [Localisation ](#2-8 )
9. [Building Exiv2 Packages ](#2-9 )
9. [Building Exiv2 Documentation ](#2-9 )
10. [Building Exiv2 Packages ](#2-10 )
3. [License and Support ](#3 )
3. [License and Support ](#3 )
1. [License ](#3-1 )
1. [License ](#3-1 )
2. [Support ](#3-2 )
2. [Support ](#3-2 )
@ -33,7 +34,7 @@
< name id = "1" >
< name id = "1" >
# Welcome to Exiv2
# Welcome to Exiv2


Exiv2 is a C++ library and a command line utility to read,
Exiv2 is a C++ library and a command line utility to read,
write, delete and modify Exif, IPTC, XMP and ICC image metadata.
write, delete and modify Exif, IPTC, XMP and ICC image metadata.
@ -200,30 +201,114 @@ g++ -std=c++98 myprogram.cpp -o myprogram $(pkg-config exiv2 --libs --cflags)
[TOC ](#TOC )
[TOC ](#TOC )
< name id = "2-8" >
< name id = "2-8" >
### 2.8 Building Exiv2 Documentation
### 2.8 Localisation
Localisation is supported on "*ix" platforms: Linux, MacOS-X, Cygwin and MinGW/msys2. Localisation is not supported for Visual Studio builds.
To build localisation support, use the CMake options `-DEXIV2_BUILD_PO=On` `-DEXIV2_ENABLE_NLS=On` . There are no additional build steps as the normal build command will compile the library, samples and localisation support.
1) Running exiv2 in a foreign language
```
$ env LC_ALL=fr_FR exiv2
exiv2: Une action doit être spécifié
exiv2: Au moins un fichier est nécessaire
Utilisation : exiv2 [ options ] [ action ] fichier ...
Manipulation des métadonnées EXIF issues des images.
$
```
2) Adding additional languages to exiv2
To support a new language which we'll designate 'xy' for this discussion:
2.1) Generate a po file from the po template:
```
$ cd < exiv2dir >
$ mkdir -p po/xy
$ msginit --input=po/exiv2.pot --locale=xy --output=po/xy.po
```
2.2) Edit/Translate the strings in po/xy.po
I edited the following:
```
#: src/exiv2.cpp:237
msgid "Manipulate the Exif metadata of images.\n"
msgstr ""
```
to:
```
#: src/exiv2.cpp:237
msgid "Manipulate the Exif metadata of images.\n"
msgstr "Manipulate image metadata.\n"
```
2.3) Generate the messages file:
```
$ mkdir -p po/xy/LC_MESSAGES
$ msgfmt --output-file=po/xy/LC_MESSAGES/exiv2.mo po/xy.po
```
2.4) Install and test your messages:
You have to install your messages to test them. It's not possible to test a message file from the build/bin directory.
```
$ sudo cp -R po/xy /usr/local/share/locale/xy
$ env LC_ALL=xy exiv2
exiv2: An action must be specified
exiv2: At least one file is required
Usage: exiv2 [ options ] [ action ] file ...
Manipulate image metadata. < --------- Edited message !
$
```
2.5) Submitting your new language file for inclusion in future versions of Exiv2:
Open a new issue on https://github.com/exiv2/exiv2 and attach the file po/xy/exiv2.po
[TOC ](#TOC )
< name id = "2-9" >
### 2.9 Building Exiv2 Documentation
Building documentation requires installing special tools. You will probably prefer to
read the documentation on-line from the project website: http://exiv2.dyndns.org
Additionally, complete copies of the project website are archived on the buildserver
and can be downloaded for off-line use. http://exiv2.dyndns.org:8080/userContent/builds/Website/
To build documentation, use the CMake option `-DEXIV2_BUILD_DOC=On` .
Additionally, you will require an additional build step to actually build the documentation.
```
```
$ cmake ..options.. -DEXIV2_BUILD_DOC=On
$ cmake ..options.. -DEXIV2_BUILD_DOC=On
$ make doc
$ make doc
```
```
To build the documentation, you will need the following products:
To build the documentation, you must install the following products:
| Product | Availability |
| Product | Availability |
|:------------ |:------------ |
|:------------ |:------------ |
| doxygen< br /> graphviz< br /> python< br /> xsltproc< br /> md5sum | [http://www.doxygen.org/ ](http://www.doxygen.org/ )< br /> [http://www.graphviz.org/](http://www.graphviz.org/)< br /> [http://www.python.org/](http://www.python.org/)< br /> [http://xmlsoft.org/XSLT/](http://xmlsoft.org/XSLT/)< br /> [http://www.microbrew.org/tools/md5sha1sum/](http://www.microbrew.org/tools/md5sha1sum/) |
| doxygen< br /> graphviz< br /> python< br /> xsltproc< br /> md5sum | [http://www.doxygen.org/ ](http://www.doxygen.org/ )< br /> [http://www.graphviz.org/](http://www.graphviz.org/)< br /> [http://www.python.org/](http://www.python.org/)< br /> [http://xmlsoft.org/XSLT/](http://xmlsoft.org/XSLT/)< br /> [http://www.microbrew.org/tools/md5sha1sum/](http://www.microbrew.org/tools/md5sha1sum/) |
[TOC ](#TOC )
[TOC ](#TOC )
< name id = "2-9" >
< name id = "2-10" >
### 2.9 Building Exiv2 Packages
### 2.10 Building Exiv2 Packages
You should not build Exiv2 Packages. This feature is intended for use by Team Exiv2 to create Platform Bundles and Source Packages on the buildserver.
To enable building of packages, use the CMake option `-DEXIV2_TEAM_PACKAGING=On` .
To enable building of packages, use the CMake option `-DEXIV2_TEAM_PACKAGING=On` .
You should not build Exiv2 Packages. This feature is intended for use by Team Exiv2 to create Platform and Source Packages on the buildserver.
There are two types of Exiv2 packages which are generated by cpack from the cmake command-line.
There are two types of Exiv2 packages which are generated by cpack from the cmake command-line.
1) Binary Package (library, headers, documentation and sample applications)
1) Platform Package (header files, binary library and samples. Some documentation and release note s)
Create and build exiv2 for your platform.
Create and build exiv2 for your platform.
@ -391,13 +476,13 @@ Install: [http://repo.msys2.org/distrib/x86_64/msys2-x86_64-20180531.exe](http:/
I use the following batch file to start the MinGW/msys2 64 bit bash shell from the Dos Command Prompt (cmd.exe)
I use the following batch file to start the MinGW/msys2 64 bit bash shell from the Dos Command Prompt (cmd.exe)
```
```
$ cat msys64.bat
@echo off
setlocal
setlocal
set "PATH=c:\msys64\usr\bin;c:\msys64\usr\local\bin;"
set "PATH=c:\msys64\usr\bin;c:\msys64\usr\local\bin;"
set "HOME=c:\msys64\home\%USER%"
set "HOME=c:\msys64\home\rmills"
cd %HOME%
set "PS1=\! \u@\h-64:\w \$ "
set "PS1=\! \u@\h-64:\w \$ "
bash.exe -norc
bash.exe -norc
$
```
```
#### MinGW/msys2 32 bit
#### MinGW/msys2 32 bit
@ -406,13 +491,13 @@ Install: [http://repo.msys2.org/distrib/i686/msys2-i686-20180531.exe](http://rep
I use the following batch file to start the MinGW/msys2 32 bit bash shell from the Dos Command Prompt (cmd.exe)
I use the following batch file to start the MinGW/msys2 32 bit bash shell from the Dos Command Prompt (cmd.exe)
```
```
$ cat msys32.bat
@echo off
setlocal
setlocal
set "PATH=c:\msys32\usr\bin;c:\msys32\usr\local\bin;"
set "PATH=c:\msys32\usr\bin;c:\msys32\usr\local\bin;"
set "HOME=c:\msys32\home\%USER%"
set "HOME=c:\msys32\home\rmills"
cd %HOME%
set "PS1=\! \u@\h-32:\w \$ "
set "PS1=\! \u@\h-32:\w \$ "
bash.exe -norc
bash.exe -norc
$
```
```
#### Install MinGW Dependencies
#### Install MinGW Dependencies