diff --git a/README.md b/README.md index 01dffca5..26567a74 100644 --- a/README.md +++ b/README.md @@ -7,22 +7,21 @@ 1. [Welcome to Exiv2](#1) 2. [Building and Installing Exiv2](#2) - 1. [Build/Install Exiv2 on a UNIX-like system](#2-1) + 1. [Build/Install/Uninstall Exiv2 on a UNIX-like system](#2-1) 2. [Build/Install Exiv2 with Visual Studio](#2-2) - 3. [Uninstall Exiv2 on a UNIX-like system](#2-3) - 4. [Build Options](#2-4) - 5. [Dependencies](#2-5) - 6. [Consuming Exiv2 with CMake](#2-6) - 7. [Building Exiv2 Documentation](#2-7) - 8. [Building Exiv2 Packages](#2-8) -3. [License and Support](#2) + 3. [Build Options](#2-3) + 4. [Dependencies](#2-4) + 5. [Consuming Exiv2 with CMake](#2-5) + 6. [Building Exiv2 Documentation](#2-6) + 7. [Building Exiv2 Packages](#2-7) +3. [License and Support](#3) 1. [License](#3-1) 2. [Support](#3-2) 4. [Platform Notes](#4) 1. [Linux](#4-1) 2. [MacOS-X](#4-2) - 3. [MinGW/msys2](#4-3) - 4. [Cygwin](#4-3) + 3. [MinGW](#4-3) + 4. [Cygwin](#4-4) 5. [Microsoft Visual C++](#4-5) 5. [Test Suit](#5) 1. [Running tests on a UNIX-like system](#5-1) @@ -33,68 +32,64 @@ ![Exiv2](http://www.exiv2.org/include/exiv2-logo-big.png) -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 +Exiv2 is a C++ library and a command line utility to read, +write, delete and modify Exif, IPTC, XMP and ICC image metadata.
+The homepage of Exiv2 is: [https://github.com/Exiv2/exiv2](https://github.com/Exiv2/exiv2) -Downloads: [[Source](http://exiv2.dyndns.org/0.27.0.1/bundles/exiv2-0.27.0.1-Source.tar.gz)] -[[Linux](http://exiv2.dyndns.org/0.27.0.1/bundles/exiv2-0.27.0.1-Linux.tar.gz)] -[[MacOSX](http://exiv2.dyndns.org/0.27.0.1/bundles/exiv2-0.27.0.1-Darwin.tar.gz)] -[[Cygwin](http://exiv2.dyndns.org/0.27.0.1/bundles/exiv2-0.27.0.1-CYGWIN.tar.gz)] -[[MinGW](http://exiv2.dyndns.org/0.27.0.1/bundles/exiv2-0.27.0.1-MinGW.tar.gz)] -[[MSVC](http://exiv2.dyndns.org/0.27.0.1/bundles/exiv2-0.27.0.1-msvc.zip)] -[[Documentation](http://exiv2.dyndns.org/0.27.0.1/doc/index.html)] +Downloads: [[Source](exiv2-0.27.0.1-Source.tar.gz)] +[[Linux](exiv2-0.27.0.1-Linux.tar.gz)] +[[MacOSX](exiv2-0.27.0.1-Darwin.tar.gz)] +[[Cygwin](exiv2-0.27.0.1-CYGWIN.tar.gz)] +[[MinGW](exiv2-0.27.0.1-MinGW.tar.gz)] +[[MSVC](exiv2-0.27.0.1-msvc.zip)] +[[Documentation](doc/index.html)] [[CMake](https://cmake.org/download/)] -The file "ReadMe.txt" in a bundle describes how to install/link code with libraries for their respective platform. The file [license.txt](license.txt) in a bundle describes is a copy of GPLv2 License +The file ReadMe.txt in a bundle describes how to install/link code with libraries for their respective platform. + [TOC](#TOC) -## 2 Building and Installing +## 2 Building and Installing Exiv2 You need CMake to build Exiv2: https://cmake.org/download/ -### 2.1 Build/Install Exiv2 on a UNIX-like system: +### 2.1 Build/Install/Uninstall Exiv2 on a UNIX-like system - $ cd ; mkdir build ; cd build - $ cmake .. -G "Unix Makefiles" ; cmake --build . ; make test - $ sudo make install +``` +$ cd ; mkdir build ; cd build +$ cmake .. -G "Unix Makefiles" ; cmake --build . ; make test +$ sudo make install +``` -### The default install locations are: +This will install the library into the "standard locations". The library will be install in `/usr/local/lib`, executables (including the exiv2 command-line program) in `/usr/local/bin/` and header files in `/usr/local/include/exiv2` -| Location | Purpose | -|:------------- |:------------- | -| /usr/local/lib | for the library | -| /usr/local/bin | for the `exiv2` utility | -| /usr/local/include/exiv2 | for header files | +#### Uninstall Exiv2 on a UNIX-like system + +``` +$ sudo make uninstall +``` [TOC](#TOC) ### 2.2 Build/Install Exiv2 with Visual Studio -We recommend that you use cocan with CMake to build Exiv2 with Visual Studio. +We recommend that you use conan with CMake to build Exiv2 with Visual Studio. See [README-CONAN](README-CONAN.md) for more information [TOC](#TOC) -### 2.3 Uninstall Exiv2 on a UNIX-like system: +### 2.3 Build options - $ sudo make uninstall - -[TOC](#TOC) - -### 2.4 Build options - -There are two groups of CMake options. Options defined by CMake include: +There are two groups of CMake options. There are many options defined by CMake. Here are some particularly useful options: | 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)**_ | +| CMAKE\_INSTALL\_PREFIX
CMAKE\_BUILD\_TYPE
BUILD\_SHARED\_LIBS | where to install on your computer _**(/usr/local)**_
type of build _**(Release)**_
build exiv2lib as shared or static _**(On)**_ | -Options defined by /CMakeLists.txt: +Options defined by /CMakeLists.txt include: ``` 576 rmills@rmillsmm:~/gnu/github/exiv2/exiv2 $ grep ^option CMakeLists.txt @@ -103,24 +98,7 @@ option( EXIV2_ENABLE_XMP "Build with XMP metadata support" 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 $ ``` @@ -130,40 +108,35 @@ $ cmake -DBUILD_SHARED_LIBS=On -DEXIV2_ENABLE_NLS=OFF ``` [TOC](#TOC) - -### 2.5 Dependencies + +### 2.4 Dependencies -You can choose to use dependent libraries using your platform's package installer. +The following Exiv2 features are enabled by default and require external libraries. You can disable the dependency with CMake options: -We also support conan which is especially useful for users of Visual Studio. -See [README-CONAN](http://exiv2.dyndns.org/0.27.0.1/README-CONAN.md) 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 | +| Feature | Package | cmake option to disable | 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/ | +|PNG image support | zlib | -DEXIV2\_ENABLE\_PNG=Off | [http://www.gnu.org/software/gettext/](http://www.gnu.org/software/gettext/) | +|Native language support | gettext | -DEXIV2\_ENABLE\_NLS=Off | [http://zlib.net/](http://zlib.net/) | +|XMP support | expat | -DEXIV2\_ENABLE\_XMP=Off | [http://expat.sourceforge.net](http://expat.sourceforge.net)/
Use _**Expat 2.2.6**_ and later | -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). +On Linux, you may install the dependencies using the distribution's package management system. Install the development package of a dependency to install the header files and static libraries required to build Exiv2. + +You may choose to install dependences with conan. This is supported on all platforms and is especially useful for users of Visual Studio. +See [README-CONAN](README-CONAN.md) for more information. + +[TOC](#TOC) + +### 2.5 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 can see how to consume +exiv2 via CMake using these files. [TOC](#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 +### 2.6 Building Exiv2 Documentation ``` $ cmake ..options.. -DEXIV2_BUILD_DOC=On @@ -174,16 +147,11 @@ 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/ | +| doxygen
graphviz
python
xsltproc
md5sum | [http://www.doxygen.org/](http://www.doxygen.org/)
[http://www.graphviz.org/](http://www.graphviz.org/)
[http://www.python.org/](http://www.python.org/)
[http://xmlsoft.org/XSLT/](http://xmlsoft.org/XSLT/)
[http://www.microbrew.org/tools/md5sha1sum/](http://www.microbrew.org/tools/md5sha1sum/) | [TOC](#TOC) - -### 2.8 Building Exiv2 Packages + +### 2.7 Building Exiv2 Packages There are two types of Exiv2 packages which are generated by cpack from the cmake command-line. @@ -212,7 +180,7 @@ CPack: - package: /path/to/exiv2/build/exiv2-0.27.0.1-Linux.tar.gz generated. $ 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. +CPack: - package: /path/to/exiv2/build/exiv2-0.27.0.1-Source.tar.bz2 generated. ``` You may prefer to run `$ cmake --build . --config Release --target package_source` @@ -254,6 +222,8 @@ For new bug reports and feature requests, please open an issue in Github. ## 4 Platform Notes +There are many ways to set up and configure your platform. The following notes are provided as a guide. + ### 4.1 Linux @@ -264,7 +234,7 @@ sudo apt --yes update sudo apt install --yes build-essential git libxml2-utils cmake python3 libexpat1-dev ``` -Get the code from Git and Build +Get the code from GitHub and build ``` $ mkdir -p ~/gnu/github/exiv2 @@ -281,40 +251,42 @@ $ make 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 libexpat and zlib. You may use brew, macports, build from source, or use conan. -You should build and install CMake from source. +I recommend that you build and install CMake from source. [TOC](#TOC) -### 4.3 MinGW/msys2 +### 4.3 MinGW -Support for MinGW/msys1.0 32 bit build was provided for Exiv2 v0.26. +We provide support for both 64bit and 32bit builds using MinGW/msys2. [https://www.msys2.org](https://www.msys2.org)
+Support for MinGW/msys1.0 32 bit build was provided for Exiv2 v0.26. MinGW/msys1.0 is not supported by Team Exiv2 for Exiv2 v0.27 and later. -#### MSYS 64 bit -https://www.msys2.org -Download: http://repo.msys2.org/distrib/x86_64/msys2-x86_64-20180531.exe +#### MinGW/msys2 64 bit +Install: [http://repo.msys2.org/distrib/x86_64/msys2-x86_64-20180531.exe](http://repo.msys2.org/distrib/x86_64/msys2-x86_64-20180531.exe) -I use this batch file to start the MinGW 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 setlocal set "PATH=c:\msys64\usr\bin;c:\msys64\usr\local\bin;c:\msys64\mingw64\bin;" +set "HOME=c:\msys64\home\%USER%" set "PS1=\! \u@\h-64:\w \$ " bash.exe -norc $ ``` -#### MSYS 32 bit -http://repo.msys2.org/distrib/i686/msys2-i686-20180531.exe +#### MinGW/msys2 32 bit +Install: [http://repo.msys2.org/distrib/i686/msys2-i686-20180531.exe](http://repo.msys2.org/distrib/i686/msys2-i686-20180531.exe) -I use this batch file to start the MinGW 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 setlocal set "PATH=c:\msys32\usr\bin;c:\msys32\usr\local\bin;c:\msys32\mingw64\bin;" +set "HOME=c:\msys32\home\%USER%" set "PS1=\! \u@\h-32:\w \$ " bash.exe -norc $ @@ -339,22 +311,21 @@ $ make #### MinGW and Regex -The exiv2 command line program provides a `--grep` option which filters output. The implementation requires the header file `` and supporting library to be available during the build. When not available, the option degenerates to a substring match. Because there are multiple versions of `` available on the MinGW platform, detection of Regex is always disabled on this platform. +The exiv2 command line program provides a `--grep` option which filters output. The implementation requires the header file `` and supporting library to be available during the build. When not available, the option degrades to a substring match. Because there are multiple versions of `` available on the MinGW platform, detection of Regex is always disabled on this platform. [TOC](#TOC) ### 4.4 Cygwin -Download: https://cygwin.com/install.html and run setup-x86_64.exe +Download: [https://cygwin.com/install.html](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 libiconv-1.15: [https://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.15.tar.gz](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. +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, you need libncurses. [https://cmake.org/download/](https://cmake.org/download/) [TOC](#TOC) @@ -363,9 +334,10 @@ To build cmake from source (for 3.11+), you need libncurses. 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 + +1) Binary installers for CMake on Windows are availably from [https://cmake.org/download/](https://cmake.org/download/).
+2) Binary installers for Python3 are available from [python.org](https://python.org)
+3) Conan can be installed using python/pip. Details in [README-CONAN.md](README-CONAN.md) [TOC](#TOC) @@ -386,7 +358,7 @@ $ make tests Summary report ``` -You can run individual tests in the test directory using EXIV2\_BINDIR to specify the location of the build artifacts. For Cygwin and MinGW/msys builds, set EXIV2_EXT=.exe +You can run individual tests in the test directory using the environment variable EXIV2\_BINDIR to specify the location of the build artifacts. For Cygwin and MinGW/msys builds, also set EXIV2_EXT=.exe ``` rmills@rmillsmbp-w7 ~/gnu/github/exiv2/exiv2/build $ cd ../test @@ -411,9 +383,10 @@ $ export EXIV2_EXT=.exe $ export EXIV2_BINDIR=${PWD}/../build/bin ``` -You can proceed to execute the components of the test suite as described for Unix type systems: +Once you have modified the PATH and and exported EXIV2\_BINDIR and EXIV2\_EXT, you can execute the test suite as described for Unix type systems: ``` +$ cd /test $ make test $ make newtests $ ./icc-test.sh diff --git a/contrib/buildserver/build.sh b/contrib/buildserver/build.sh index bcb6589a..3d596b38 100755 --- a/contrib/buildserver/build.sh +++ b/contrib/buildserver/build.sh @@ -3,7 +3,7 @@ syntax() { echo "usage: $0 { --help | -? | -h | platform | option | switch }+ " echo "platform: all | cygwin | linux | macosx | mingw | mingw32 | msvc " - echo "switch: --32 | --64 | --2015 | --2017 --publish | --verbose | --static | --status" + echo "switch: --2015 | --2017 | --publish | --verbose | --static | --status" echo "option: --branch x | --server x | --user x" } @@ -88,17 +88,15 @@ fi ## # assign defaults -msvc=0 cygwin=0 -mingw=0 -cygwin=0 -macosx=0 linux=0 +macosx=0 +mingw=0 +mingw32=0 +msvc=0 help=0 publish=0 verbose=0 -b64=0 -b32=0 static=0 edition=2017 branch=RC1 @@ -124,10 +122,8 @@ while [ "$#" != "0" ]; do linux) linux=1 ;; macosx) macosx=1 ;; mingw) mingw=1 ;; - mingw32) mingw=1;b32=1 ;; + mingw32) mingw32=1 ;; msvc) msvc=1 ;; - --64) b64=1 ;; - --32) b32=1 ;; --verbose) verbose=1 ;; --dryrun) dryrun=1 ;; --publish) publish=1 ;; @@ -138,7 +134,7 @@ while [ "$#" != "0" ]; do --server) if [ $# -gt 0 ]; then server=$1; shift; else bomb $arg ; fi ;; --branch) if [ $# -gt 0 ]; then branch=$1; shift; else bomb $arg ; fi ;; --user) if [ $# -gt 0 ]; then user=$1 ; shift; else bomb $arg ; fi ;; - *) echo "invalid option: $arg" 1>&2; help=1; ;; + *) echo "*** invalid option: $arg ***" 1>&2; help=1; ;; esac done @@ -148,16 +144,20 @@ if [ $help == 1 ]; then fi if [ "$all" == "1" ]; then - cygwin=1; linux=1; macosx=1; mingw=1; msvc=1; - b64=1; b32=1; + cygwin=1; linux=1; macosx=1; mingw=1; mingw32=1;msvc=1; fi -if [ "$b64" == "0" -a "$b32" == "0" ]; then b64=1; fi ## -# begin builds -if [ $linux == 1 ]; then - command='' +# perform builds +if [ $cygwin == 1 ]; then cd=/home/rmills/gnu/github/exiv2/ + command='c:\\cygwin64\\bin\\bash.exe' + unixBuild ${user}@${server}-w7 Cygwin +fi + +if [ $linux == 1 ]; then + cd=/home/rmills/gnu/github/exiv2/ + command='' unixBuild ${user}@${server}-ubuntu Linux fi @@ -168,22 +168,15 @@ if [ $macosx == 1 ]; then fi if [ $mingw == 1 ]; then - if [ $b64 == 1 ]; then - command='msys64' - cd=/home/rmills/gnu/github/exiv2/ - unixBuild ${user}@${server}-w7 MinGW/64 - fi - if [ $b32 == 1 ]; then - command='msys32' - cd=/home/rmills/gnu/github/exiv2/ - unixBuild ${user}@${server}-w7 MinGW/32 - fi + cd=/home/rmills/gnu/github/exiv2/ + command='msys64' + unixBuild ${user}@${server}-w7 MinGW/64 fi -if [ $cygwin == 1 ]; then +if [ $mingw32 == 1 ]; then cd=/home/rmills/gnu/github/exiv2/ - command='c:\\cygwin64\\bin\\bash.exe' - unixBuild ${user}@${server}-w7 Cygwin + command='msys32' + unixBuild ${user}@${server}-w7 MinGW/32 fi if [ $msvc == 1 ]; then