You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
Robin Mills e347b41279 Modified Exiv2::Internal::stringFormat() to use larger initial guess for 'need' to fix test/.icc-test.sh on MinGW. 7 years ago
ci Enable WARNINGS_AS_ERRORS in CI jobs. 7 years ago
cmake Release documentation and Documentation updates. 7 years ago
contrib buildserver maintenance. 7 years ago
doc Remove code related with autotools 7 years ago
include/exiv2 Fix https://github.com/Exiv2/exiv2/issues/468 7 years ago
po Move CMake variables to the file where they are used 7 years ago
releasenotes Release documentation and Documentation updates. 7 years ago
samples Fix samples/tags.cpp to call ExifTags::taglist() (https://github.com/Exiv2/exiv2/issues/465) 7 years ago
src Modified Exiv2::Internal::stringFormat() to use larger initial guess for 'need' to fix test/.icc-test.sh on MinGW. 7 years ago
test Update PROJECT_VERSION & add install() commands for CPack 7 years ago
tests Add reproducer for #460 7 years ago
unitTests [binaryToString] Reimplement using Slices 7 years ago
xmpsdk BUILD_INTERFACE for include directories use PROJECT_SOURCE_DIR to allow for being built as a CMake subproject 7 years ago
.clang-format Add .clang-format file 8 years ago
.gitignore Remove leftovers from autotools and .gitignore 7 years ago
.gitlab-ci.yml [CI] Deploy documentation to GitLab pages 7 years ago
.travis.yml Revert "[Travis CI] Add gcc 8 to the build for UBSAN" 7 years ago
ABOUT-NLS Merged revisions 907:999 from gettext branch into trunk 19 years ago
AUTHORS Refer to doc/ChangeLog for authors and other contributors. 15 years ago
CMakeLists.txt Update PROJECT_VERSION & add install() commands for CPack 7 years ago
CODING_GUIDELINES.md CONTRUBUTING.md updates (#234) 7 years ago
CONTRIBUTING.md Clarified the workflow description (after input from piponazo). 7 years ago
COPYING Updated copyright and fsf address 20 years ago
COPYING-CMAKE-SCRIPTS use dedicated licence file for CMake Script, as it done into KDE project. 13 years ago
README-CONAN.md Release documentation and Documentation updates. 7 years ago
README.md Release documentation and Documentation updates. 7 years ago
TODO-CMAKE Documentation update to withdraw support for MinGW. The code-base has not been modified and will probably build with MinGW. However Team Exiv2 will not support this platform. 8 years ago
WORK-IN-PROGRESS Doc: Add documentation about how to use the external XMP SDK with conan & cmake 7 years ago
appveyor.yml Appveyor: Fix the unit & integration tests execution 7 years ago
codecov.yml Add new codecov yml file to filter the XMKSDK folder out 7 years ago
conanfile.py conan - Disable WEBREADY libraries by default (curl + openssl). 7 years ago
license.txt Update PROJECT_VERSION & add install() commands for CPack 7 years ago

README.md

Travis AppVeyor GitLab Codecov
Build Status Build status pipeline status codecov

T A B L E     O  F     C O N T E N T S

  1. Welcome to Exiv2
  2. Building and Installing Exiv2
    1. Build/Install Exiv2 on a UNIX-like system
    2. Build/Install Exiv2 with Visual Studio
    3. Uninstall Exiv2 on a UNIX-like system
    4. Build Options
    5. Dependencies
    6. Consuming Exiv2 with CMake
    7. Building Exiv2 Documentation
    8. Building Exiv2 Packages
  3. License and Support
    1. License
    2. Support
  4. Platform Notes
    1. Linux
    2. MacOS-X
    3. Cygwin
    4. MinGW msys/2
    5. Microsoft Visual C++
  5. Test Suit
    1. Running tests on a UNIX-like system
    2. Running tests on Visual Studio builds

Welcome to Exiv2

Exiv2

Exiv2 is a C++ library and a command line utility to read and write Exif, IPTC and XMP image metadata. The homepage of Exiv2 is: https://github.com/Exiv2/exiv2

Downloads: [Source] [Linux] [MacOSX] [Cygwin] [MinGW] [MSVC] [Documentation] [CMake]

The file "ReadMe.txt" in a bundle describes how to install/link code with libraries for their respective platform. The file license.txt in a bundle describes is a copy of GPLv2 License

2 Building and Installing

You need CMake to build Exiv2: https://cmake.org/download/

2.1 Build/Install Exiv2 on a UNIX-like system:

$ cd <exiv2dir> ; mkdir build ; cd build
$ cmake .. -G "Unix Makefiles" ; cmake --build . ; make test
$ sudo make install

The default install locations are:

Location Purpose
/usr/local/lib for the library
/usr/local/bin for the exiv2 utility
/usr/local/include/exiv2 for header files

2.2 Build/Install Exiv2 with Visual Studio

We recommend that you use cocan with CMake to build Exiv2 with Visual Studio. See README-CONAN for more information

2.3 Uninstall Exiv2 on a UNIX-like system:

$ sudo make uninstall

TOC

2.4 Build options

There are two groups of CMake options. Options defined by CMake include:

Options Purpose
CMAKE_INSTALL_PREFIX where to install on your computer (/usr/local)
CMAKE_BUILD_TYPE type of build (Release)_
BUILD_SHARED_LIBS build exiv2lib as shared or static (On)

Options defined by /CMakeLists.txt:

576 rmills@rmillsmm:~/gnu/github/exiv2/exiv2 $ grep ^option CMakeLists.txt
option( BUILD_SHARED_LIBS             "Build exiv2lib as a shared library"                    ON  )
option( EXIV2_ENABLE_XMP              "Build with XMP metadata support"                       ON  )
option( EXIV2_ENABLE_EXTERNAL_XMP     "Use external version of XMP"                           OFF )
option( EXIV2_ENABLE_PNG              "Build with png support (requires libz)"                ON  )
option( EXIV2_ENABLE_NLS              "Build native language support (requires gettext)"      ON  )
option( EXIV2_ENABLE_PRINTUCS2        "Build with Printucs2"                                  ON  )
option( EXIV2_ENABLE_LENSDATA         "Build including lens data"                             ON  )
option( EXIV2_ENABLE_VIDEO            "Build video support into library"                      OFF )
option( EXIV2_ENABLE_WEBREADY         "Build webready support into library"                   OFF )
option( EXIV2_ENABLE_DYNAMIC_RUNTIME  "Use dynamic runtime (used for static libs)"            OFF )
option( EXIV2_ENABLE_WIN_UNICODE      "Use Unicode paths (wstring) on Windows"                OFF )
option( EXIV2_ENABLE_CURL             "USE Libcurl for HttpIo"                                OFF )
option( EXIV2_ENABLE_SSH              "USE Libssh for SshIo"                                  OFF )
option( EXIV2_BUILD_SAMPLES           "Build sample applications"                             ON  )
option( EXIV2_BUILD_PO                "Build translations files"                              OFF )
option( EXIV2_BUILD_EXIV2_COMMAND     "Build exiv2 command-line executable"                   ON  )
option( EXIV2_BUILD_UNIT_TESTS        "Build unit tests"                                      OFF )
option( EXIV2_BUILD_DOC               "Add 'doc' target to generate documentation"            OFF )
option( EXIV2_TEAM_EXTRA_WARNINGS     "Add more sanity checks using compiler flags"           OFF )
option( EXIV2_TEAM_WARNINGS_AS_ERRORS "Treat warnings as errors"                              OFF )
option( EXIV2_TEAM_USE_SANITIZERS     "Enable ASAN and UBSAN when available"                  OFF )
option( BUILD_WITH_CCACHE             "Use ccache to speed up compilations"                   OFF )
option( BUILD_WITH_COVERAGE           "Add compiler flags to generate coverage stats"         OFF )
577 rmills@rmillsmm:~/gnu/github/exiv2/exiv2 $

Options are defined on the CMake command line:

$ cmake -DBUILD_SHARED_LIBS=On -DEXIV2_ENABLE_NLS=OFF

TOC

2.5 Dependencies

You can choose to use dependent libraries using your platform's package installer.

We also support conan which is especially useful for users of Visual Studio. See README-CONAN for more information

The following libexiv2 features are enabled by default and may require external libraries. You can disable the dependency with CMake options

Feature Package cmake option Availability
PNG image support zlib -DEXIV2_ENABLE_PNG=Off http://www.gnu.org/software/gettext/
Native language support gettext -DEXIV2_ENABLE_NLS=Off http://zlib.net/
XMP support expat -DEXIV2_ENABLE_XMP=Off http://expat.sourceforge.net/

On Linux, it is usually best to install the dependencies through the package management system of the distribution together with the corresponding development packages (for the header files and static libraries).

TOC

2.6 Consuming Exiv2 with CMake

When installing exiv2 by running the install target we get some files under the folder ${CMAKE_INSTALL_PREFIX}/share/exiv2/cmake/.

In the example project https://github.com/piponazo/exiv2Consumer you could see how to consume exiv2 via CMake by using these files.

2.7 Building Exiv2 Documentation

$ cmake ..options.. -DEXIV2_BUILD_DOC=On
$ make doc

To build the documentation, you will need the following products:

Product Availability
doxygen http://www.doxygen.org/
graphviz http://www.graphviz.org/
python http://www.python.org/
xsltproc http://xmlsoft.org/XSLT/
md5sum http://www.microbrew.org/tools/md5sha1sum/
pkg-config http://pkg-config.freedesktop.org/wiki/

TOC

2.8 Building Exiv2 Packages

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)

Create and build exiv2 for your plantform.

$ git clone https://github.com/exiv2/exiv2
$ mkdir -p exiv2/build
$ cd       exiv2/build
$ cmake .. -G "Unix Makefiles"
...
-- Build files have been written to: .../build
$ cmake --build . --config Release
...
[100%] Built target addmoddel
$ make package
...
CPack: - package: /path/to/exiv2/build/exiv2-0.27.0.1-Linux.tar.gz generated.
  1. Source Package
$ make package_source
Run CPack packaging tool for source...
...
CPack: - package: /media/linuxDev/programming/exiv2/build/exiv2-0.27.0.1-Source.tar.bz2 generated.

You may prefer to run $ cmake --build . --config Release --target package_source

TOC

3 License and Support

All project resources are accessible from the project website. https://github.com/Exiv2/exiv2

3.1 License

Copyright (C) 2004-2018 Exiv2 authors. You should have received a copy of the file license.txt which details the GPLv2 license.

Exiv2 is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

Exiv2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, 5th Floor, Boston, MA 02110-1301 USA.

TOC

3.2 Support

For new bug reports and feature requests, please open an issue in Github.

TOC

4 Platform Notes

4.1 Linux

Update your system and install the build tools.

sudo apt --yes update
sudo apt install --yes build-essential git libxml2-utils cmake python3 libexpat1-dev

Get the code from Git and Build

$ mkdir -p ~/gnu/github/exiv2
$ git clone https://github.com/exiv2/exiv2
$ cd exiv2
$ mkdir build ; cd build ;
$ cmake .. -G "Unix Makefiles"
$ make

TOC

4.2 MacOS-X

You will need to install Xcode and the Xcode command-line tools to build anything on the Mac.

You should build and install libexpat and zlib from source.

You should build and install CMake from source.

TOC

4.3 MinGW msys/2 64

https://www.msys2.org Download: http://repo.msys2.org/distrib/x86_64/msys2-x86_64-20180531.exe

msys64.bat

I use this batch file to start the MinGW bash shell from the Dos Command Prompt (cmd.exe)

$ cat msys64.bat
setlocal
set "PATH=c:\msys64\usr\bin;c:\msys64\usr\local\bin;c:\msys64\mingw64\bin;"
set "PS1=\! \u@\h:\w \$ "
bash.exe -norc
$

Install MinGW Dependencies

$ pacman -S base-devel

$ for i in libtre git coreutils mingw-w64-x86_64-gcc mingw-w64-x86_64-gdb mingw-w64-x86_64-make mingw-w64-x86_64-pkg-config mingw-w64-x86_64-cmake; do (echo y|pacman -S $i); done

Download exiv2 from github and build.

$ mkdir -p ~/gnu/github/exiv2
$ git clone https://github.com/exiv2/exiv2
$ cd exiv2
$ mkdir build ; cd build ;
$ cmake .. -G "Unix Makefiles"
$ make

TOC

4.4 Cygwin

Download: https://cygwin.com/install.html and run setup-x86_64.exe

You need: make, cmake, gcc, pkg-config, dos2unix, zlib-devel, libexpat1-devel, git, python3-interpreter, libiconv, libxml2-utils, libncurses.

Download and build libiconv-1.15: https://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.15.tar.gz

Download and build cmake from source because I can't get the cygwin installed cmake 3.6.2 to work To build cmake from source (for 3.11+), you need libncurses.

TOC

4.5 Microsoft Visual C++

We recommend that you use Conan to build Exiv2 using Microsoft Visual C++. For v0.27, we support Visual Studio 2008, 2010, 2012, 2013, 2015 and 2017.

As well as Microsoft Visual Studio, you will need to install CMake, Python3, and Conan.

  1. Binary installers for CMake on Windows are availably from kitware.org.
  2. Binary installers for Python3 are available from python.org
  3. Conan can be installed using python/pip. Details in README-CONAN.md

TOC

5 Running the test suite

The test suite is a mix of bash and python scripts. The python scripts are new to v0.27 and the bash scripts are being replaced as time permits.

5.1 Running tests on a UNIX-like system

You can run the suite directly from the build:

$ make build ... $ make tests ... lots of output ... Summary report

You can run individual tests in the test directory using the environment string EXIV2_BINDIR to specify the location of the build artifacts:

rmills@rmillsmbp-w7 ~/gnu/github/exiv2/exiv2/build $ cd ../test

rmills@rmillsmbp-w7 ~/gnu/github/exiv2/exiv2/test env EXIV2_BINDIR={PWD}/../build/bin ./icc-test.sh ICC jpg md5 webp md5 png md5 jpg md5 all testcases passed.

rmills@rmillsmbp-w7 ~/gnu/github/exiv2/exiv2/test env EXIV2_BINDIR={PWD}/../build/bin make newtests

TOC

5.2 Running tests on Visual Studio builds

Use the bash interpreter for MinGW/msys/2 to run the test suite.

$ cd ...../build/../test $ export EXIV2_EXT=.exe export EXIV2_BINDIR={PWD}/../build/bin

It's essential to have a DOS Python3 interpreter on your path.

$ PATH="/c/Python36:$PATH"

These variables enables the test suite to locate the MSVC build artifacts and you can follow the guidelines for UNIX-like systems above.

$ make tests
$ make newtests
$ ./icc-test.sh

TOC