diff --git a/README.md b/README.md index d444165b73..055c072702 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,6 @@ | [![Build Status](https://travis-ci.org/Exiv2/exiv2.svg?branch=0.27-maintenance)](https://travis-ci.org/Exiv2/exiv2) | [![Build status](https://ci.appveyor.com/api/projects/status/d6vxf2n0cp3v88al/branch/0.27-maintenance?svg=true)](https://ci.appveyor.com/project/piponazo/exiv2-wutfp/branch/0.27-maintenance) | [![pipeline status](https://gitlab.com/D4N/exiv2/badges/0.27-maintenance/pipeline.svg)](https://gitlab.com/D4N/exiv2/commits/0.27-maintenance) | [![codecov](https://codecov.io/gh/Exiv2/exiv2/branch/0.27-maintenance/graph/badge.svg)](https://codecov.io/gh/Exiv2/exiv2) | [![Packaging status](https://repology.org/badge/tiny-repos/exiv2.svg)](https://repology.org/metapackage/exiv2/versions) | [![#exiv2-chat on matrix.org](matrix-standard-vector-logo-xs.png)](https://matrix.to/#/#exiv2-chat:matrix.org) |
- # Welcome to Exiv2 Exiv2 is a C++ library and a command-line utility to read, @@ -17,7 +16,6 @@ write, delete and modify Exif, IPTC, XMP and ICC image metadata. The file ReadMe.txt in a build bundle describes how to install the library on the platform. ReadMe.txt also documents how to compile and link code on the platform.
- ### TABLE OF CONTENTS ![Exiv2](exiv2.png) @@ -41,7 +39,7 @@ The file ReadMe.txt in a build bundle describes how to install the library on th 16. [Cross Platform Build and Test on Linux for MinGW](#2-16) 17. [Building with C++11 and other compilers](#2-17) 18. [Static and Shared Libraries](#2-18) - 19. [Support for bmff files (CR3, HEIF and AVIF)](#2-19) + 19. [Support for bmff files (CR3, HEIF, HEIC, and AVIF)](#2-19) 3. [License and Support](#3) 1. [License](#3-1) 2. [Support](#3-2) @@ -61,13 +59,11 @@ The file ReadMe.txt in a build bundle describes how to install the library on th [TOC](#TOC)
- ## 2 Building, Installing, Using and Uninstalling Exiv2 You need [CMake](https://cmake.org/download/) to configure the Exiv2 project and the GCC or Clang compiler and associated tool chain.
- ### 2.1 Build, Install, Use Exiv2 on a UNIX-like system ```bash @@ -98,19 +94,34 @@ $ export LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH" # Linux, Cygwin, $ export DYLD_LIBRARY_PATH="/usr/local/lib:$DYLD_LIBRARY_PATH" # macOS ``` +#### Uninstall + +I don't know why anybody would uninstall Exiv2. + +```bash +$ cd ~/gnu/github/exiv2 # location of the project code +$ cd build +$ sudo make uninstall +``` +These commands will remove the exiv2 executables, library, header files and man page from the standard locations. [TOC](#TOC)
- ### 2.2 Build and Install Exiv2 with Visual Studio We recommend that you use conan to download the Exiv2 external dependencies on Windows. On other platforms (maxOS, Ubuntu and others), you should use the platform package manger. These are discussed: [Platform Notes](#5) The options to configure and compile the project using Visual Studio are similar to UNIX like systems. See [README-CONAN](README-CONAN.md) for more information about Conan. +When you build, you may install with the following command. + +```cmd +> cmake --build . --target install +``` +This will create and copy the exiv2 build artefacts to C:\Program Files (x86)\exiv2\. You should modify your path to include C:\Program Files (x86)\exiv2\bin. + [TOC](#TOC)
- ### 2.3 Build options There are two groups of CMake options. There are many options defined by CMake. Here are some particularly useful options: @@ -128,7 +139,7 @@ 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_BMFF "Build with BMFF support" OFF ) +option( EXIV2_ENABLE_BMFF "Build with BMFF support" OFF) 577 rmills@rmillsmm:~/gnu/github/exiv2/exiv2 $ ``` @@ -138,19 +149,22 @@ Options are defined on the CMake command-line: $ cmake -DBUILD_SHARED_LIBS=On -DEXIV2_ENABLE_NLS=Off ``` +It is planned to set the default -DEXIV2\_ENABLE\_BMFF=On for Exiv2 v1.00. BMFF support is disabled by default in v0.27. + + [TOC](#TOC)
- ### 2.4 Dependencies The following Exiv2 features require external libraries: -| Feature | Package | Default | To change default | Availability | -|:-------------------------- |:-------- |:--------:| :---------------------------- |:----------- | -| PNG image support | zlib | ON | -DEXIV2\_ENABLE\_PNG=Off | [http://zlib.net/](http://zlib.net/) | -| XMP support | expat | ON | -DEXIV2\_ENABLE\_XMP=Off | [http://expat.sourceforge.net](http://expat.sourceforge.net)/
Use _**Expat 2.2.6**_ and later | -| Natural language system | gettext | OFF | -DEXIV2\_ENABLE\_NLS=On | [http://www.gnu.org/software/gettext/](http://www.gnu.org/software/gettext/) | +| Feature | Package | Default | To change default | Availability | +|:-------------------------- |:-------- |:--------:| :---------------------------- |:----------- | +| PNG image support | zlib | ON | -DEXIV2\_ENABLE\_PNG=Off | [http://zlib.net/](http://zlib.net/) | +| XMP support | expat | ON | -DEXIV2\_ENABLE\_XMP=Off | [http://expat.sourceforge.net](http://expat.sourceforge.net)/
Use _**Expat 2.2.6**_ and later | +| Natural language system | gettext | OFF | -DEXIV2\_ENABLE\_NLS=On | [http://www.gnu.org/software/gettext/](http://www.gnu.org/software/gettext/) | | Character set conversion | libiconv | | Disabled for Visual Studio.
Linked when installed on UNIX like platforms. | [https://www.gnu.org/software/libiconv/](https://www.gnu.org/software/libiconv/) | +| Unit test framework | gtest | OFF | -DEXIV2\_BUILD\_UNIT\_TESTS=On | [https://github.com/google/googletest/archive/](https://github.com/google/googletest/archive/release-1.8.0.tar.gz)
Use _**release-1.8.0.tar.gz**_ | On UNIX systems, 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 libraries required to build Exiv2. The script @@ -178,9 +192,7 @@ There are build instructions about Visual Studio in libiconv-1.16/INSTALL.window If you wish to use libiconv with Visual Studio you will have to build libiconv and remove the "guard" in cmake/FindIconv.cmake. Team Exiv2 will not provide support concerning libiconv and Visual Studio. [TOC](#TOC) -
- ### 2.5 Building and linking your code with Exiv2 There are detailed platform notes about compiling and linking in `releasenotes/{platform}/ReadMe.txt` @@ -207,7 +219,6 @@ $ g++ -std=c++98 myprog.cpp -o myprog -I/usr/local/include -L/usr/local/lib -lex [TOC](#TOC)
- ### 2.6 Consuming Exiv2 with CMake When exiv2 is installed, the files required to consume Exiv2 are installed in `${CMAKE_INSTALL_PREFIX}/lib/cmake/exiv2` @@ -238,7 +249,6 @@ $ [TOC](#TOC)
- ### 2.7 Using pkg-config to compile and link your code with Exiv2 When exiv2 is installed, the file exiv2.pc used by pkg-config is installed in `${CMAKE_INSTALL_PREFIX}/lib/pkgconfig` You will need to set the following in your environment: @@ -263,11 +273,12 @@ g++ -std=c++98 myprogram.cpp -o myprogram $(pkg-config exiv2 --libs --cflags) [TOC](#TOC)
- ### 2.8 Localisation Localisation is supported on a UNIX-like platform: Linux, macOS, Cygwin and MinGW/msys2. Localisation is not supported for Visual Studio builds. +Crowdin have provided Exiv2 with a free open-source license to use their services. The Exiv2 localisation project is located at [https://crowdin.com/project/exiv2](https://crowdin.com/project/exiv2). You will also need to register to have a free user account on Crowdin. The Crowdin setup is discussed here: [https://github.com/Exiv2/exiv2/issues/1510](https://github.com/Exiv2/exiv2/issues/1510). It is recommended that you coordinate with Leonardo before contributing localisation changes on Crowdin. You can contact Leonardo by via GitHub. + To build localisation support, use the CMake option `-DEXIV2_ENABLE_NLS=On`. You must install the `gettext` package with your package manager or from source. The `gettext` package is available from [http://www.gnu.org/software/gettext/](http://www.gnu.org/software/gettext/) and includes the library `libintl` and utilities to build localisation files. If CMake produces error messages which mention libintl or gettext, you should verify that the package `gettext` has been correctly built and installed. You must install the build to test localisation. This ensures that the localisation message files can be found at run-time. You cannot test localisation in the directory `build\bin`. @@ -349,16 +360,13 @@ ls -l xy.po.zip $ ``` - [TOC](#TOC)
- ### 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: https://exiv2.org - To build documentation, use the CMake option **`-DEXIV2_BUILD_DOC=On`**. Additionally, you will require an additional build step to actually build the documentation. @@ -375,7 +383,6 @@ To build the documentation, you must install the following products: [TOC](#TOC)
- ### 2.10 Building Exiv2 Packages To enable the building of Exiv2 packages, use the CMake option `-DEXIV2_TEAM_PACKAGING=On`. @@ -417,7 +424,6 @@ You may prefer to run `$ cmake --build . --config Release --target package_sourc [TOC](#TOC)
- ### 2.11 Debugging Exiv2 1) Generating and installing a debug library @@ -486,7 +492,11 @@ $ gdb exiv2 I have used all those IDEs to debug the Exiv2 library and applications. All of them work. You may find it takes initial effort, however I assure you that they all work well. -I personally use CLion which has excellent integration with CMake. It will automatically add **`-DCMAKE_BUILD_TYPE=Debug`** to the cmake command. It keeps build types in separate directories such as **`/cmake-build-debug`**. +I work on macOS and use Xcode to develop Exiv2. For a couple of years, Team Exiv2 had free +open-source licences from JetBrains for CLion. I really liked CLion as it is cross platform +and runs on Windows, Mac and Linux. It has excellent integration with CMake and will automatically +add **`-DCMAKE_BUILD_TYPE=Debug`** to the cmake command. It keeps build types in separate directories +such as **`/cmake-build-debug`**. [TOC](#TOC) @@ -508,12 +518,10 @@ The following are some of the valid targets for this Makefile: [TOC](#TOC)
- ### 2.12 Building Exiv2 with **clang** and other build chains 1) On Linux - ```bash $ cd $ rm -rf build ; mkdir build ; cd build @@ -542,7 +550,6 @@ I have been unable to get clang to work on any of those platforms. [TOC](#TOC)
- ### 2.13 Building Exiv2 with ccache To speed up compilation, the utility ccache can be installed to cache the output of the compiler. This greatly speeds up the build when you frequently built code that has not been modified. @@ -568,9 +575,7 @@ $ make Due to the way in which ccache is installed in Fedora (and other Linux distros), ccache effectively replaces the compiler. A default build or **-DBUILD\_WITH\_CCACHE=Off** is not effective and the environment variable CCACHE_DISABLE is required to disable ccache. [https://github.com/Exiv2/exiv2/issues/361](https://github.com/Exiv2/exiv2/issues/361) [TOC](#TOC) -
- ### 2.14 Thread Safety Exiv2 heavily relies on standard C++ containers. Static or global variables are used read-only, with the exception of the XMP namespace registration function (see below). Thus Exiv2 is thread safe in the same sense as C++ containers: @@ -588,7 +593,7 @@ int main(int argc, const char* argv[]) { Exiv2::XmpParser::initialize(); ::atexit(Exiv2::XmpParser::terminate); -#if EXIV2_TEST_VERSION(0,27,4) +#ifdef EXV_ENABLE_BMFF Exiv2::enableBMFF(true); #endif ... @@ -597,9 +602,7 @@ int main(int argc, const char* argv[]) The use of the _**thread unsafe function**_ Exiv2::enableBMFF(true) is discussed in [2.19 Support for bmff files](#2-19) [TOC](#TOC) -
- ### 2.15 Library Initialisation and Cleanup As discussed in the section on Thread Safety, Exiv2 classes for Exif and IPTC metadata are fully reentrant and require no initialisation or cleanup. @@ -611,13 +614,13 @@ The exiv2 command-line program and sample applications call the following at the ```cpp Exiv2::XmpParser::initialize(); ::atexit(Exiv2::XmpParser::terminate); +#ifdef EXV_ENABLE_BMFF Exiv2::enableBMFF(true); +#endif ``` [TOC](#TOC) -
- ### 2.16 Cross Platform Build and Test on Linux for MinGW You can cross compile Exiv2 on Linux for MinGW. We have used the following method on **Fedora** and believe this is also possible on Ubuntu and other distros. Detailed instructions are provided here for **Fedora**. @@ -725,12 +728,10 @@ $ make tests You will find that 3 tests fail at the end of the test suite. It is safe to ignore those minor exceptions. [TOC](#TOC) -
- ### 2.17 Building with C++11 and other compilers -Exiv2 uses the default compiler for your system. Exiv2 v0.27 was written to the C++ 1998 standard and uses auto\_ptr. The C++11 and C++14 compilers will issue deprecation warnings about auto\_ptr. As _auto\_ptr support has been removed from C++17, you cannot build Exiv2 v0.27 with C++17 or later compilers._ Exiv2 v0.28 and later do not use auto\_ptr and will build with all modern C++ Standard Compilers. +Exiv2 uses the default compiler for your system. Exiv2 v0.27 was written to the C++ 1998 standard and uses auto\_ptr. The C++11 and C++14 compilers will issue deprecation warnings about auto\_ptr. As _auto\_ptr support has been removed from C++17, you cannot build Exiv2 v0.27 with C++17 or later compilers._ Exiv2 v1.00 and later do not use auto\_ptr and will build with all modern C++ Standard Compilers. To build with C++11: @@ -743,14 +744,12 @@ $ make The option -DCMAKE\_CXX\_STANDARD=11 specifies the C++ Language Standard. Possible values are 98, 11 or 14. -The option -DCMAKE\_CXX\_FLAGS=-Wno-deprecated suppresses warnings from C++11 concerning auto\_ptr. The compiler will issue deprecation warnings about video, eps and ssh code in Exiv2 v0.27. This is intentional. These features of Exiv2 will not be available in Exiv2 v0.28. +The option -DCMAKE\_CXX\_FLAGS=-Wno-deprecated suppresses warnings from C++11 concerning auto\_ptr. The compiler will issue deprecation warnings about video, eps and ssh code in Exiv2 v0.27. This is intentional. These features of Exiv2 will not be available in Exiv2 v1.00. **Caution:** Visual Studio users should not use -DCMAKE\_CXX\_FLAGS=-Wno-deprecated. [TOC](#TOC) -
- ### 2.18 Static and Shared Libraries You can build either static or shared libraries. Both can be linked with either static or shared run-time libraries. You specify the shared/static with the option `-BUILD_SHARED_LIBS=On|Off` You specify the run-time with the option `-DEXIV2_ENABLE_DYNAMIC_RUNTIME=On|Off`. The default for both options default is On. So you build shared and use the shared libraries which are `.dll` on Windows (msvc, Cygwin and MinGW/msys), `.dylib` on macOS and `.so` on Linux and UNIX. @@ -780,10 +779,8 @@ endif() This is discussed: [https://github.com/Exiv2/exiv2/issues/1230](https://github.com/Exiv2/exiv2/issues/1230) [TOC](#TOC) -
- -2.19 Support for bmff files (CR3, HEIF and AVIF) +### 2.19 Support for bmff files (CR3, HEIF, HEIC, and AVIF) **Attention is drawn to the possibility that bmff support may be the subject of patent rights. _Exiv2 shall not be held responsible for identifying any or all such patent rights. Exiv2 shall not be held responsible for the legal consequences of the use of this code_.** @@ -793,23 +790,18 @@ Access to the bmff code is guarded in two ways. Firstly, you have to build the EXIV2API bool enableBMFF(bool enable); ``` -The return value of `enableBMFF()` reports the build status of bmff support. A return value of true indicates that the library has been built with bmff support. - -Applications may wish the provide a preference setting to enable bmff support and thereby place the responsibility for the use of this code with the user of the application. +The return value from `enableBMFF()` is true if the library has been build with bmff support (cmake option -DEXIV2_ANABLE_BMFF=On). -It is recommended that you enclose the call to `enableBMFF()` with the compile time macro EXIV2\_TEST\_VERSION to ensure that your code builds cleanly on earlier versions of Exiv2. It is recommended that you call enableBMFF() at process start-up as it is not threadsafe. A code snippet is provided in [2.14 Thread Safety](#2-14). +Applications may wish to provide a preference setting to enable bmff support and thereby place the responsibility for the use of this code with the user of the application. [TOC](#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-2021 Exiv2 authors. @@ -832,46 +824,47 @@ with this program; if not, write to the Free Software Foundation, Inc., [TOC](#TOC)
- ### 3.2 Support + For new bug reports, feature requests and support: Please open an issue in Github. [https://github.com/exiv2/exiv2](https://github.com/exiv2/exiv2) [TOC](#TOC)
- ## 4 Running the test suite #### Different kinds of tests: -| Description | Language | Location | Command
_(in build or test directory)_ | CMake Option to Build | -|:-- |:-- |:-- |:-- |:-- | -| Run all tests | | | $ make tests | | -| Bash scripts | bash | \/test | $ make bash_tests | -DEXIV2\_BUILD\_SAMPLES=On | -| Python scripts | python | \/tests | $ make python_tests | -DEXIV2\_BUILD\_SAMPLES=On | -| Unit tests | C++ | \/unitTests | $ make unit_test | -DEXIV2\_BUILD\_UNIT\_TESTS=On | -| Version test | C++ | \/src/version.cpp | $ make version_test | Always in library | +| Description | Language | Location | Command
_(in build directory)_ | CMake Option to Build | +|:-- |:-- |:-- |:-- |:-- | +| Run all tests | | | $ make tests | | +| Run all tests | | **Visual Studio Users** | > cmake --build . --target tests | | +| Bash tests | python | tests/bash\_tests | $ make bash_tests | -DEXIV2\_BUILD\_SAMPLES=On | +| Python tests | python | tests | $ make python_tests | -DEXIV2\_BUILD\_SAMPLES=On | +| Unit tests | C++ | unitTests | $ make unit_test | -DEXIV2\_BUILD\_UNIT\_TESTS=On | +| Version test | C++ | src/version.cpp | $ make version_test | Always in library | -_**Caution: Visual Studio Users using cmd.exe**_
_You may use MinGW/msys2 `make` to to execute tests in the test directory. To execute tests from the build directory, use `cmake`. This is discussed in detail below: [Running tests on Visual Studio builds](#4-2)_ +The term _**bash scripts**_ is historical. The implementation of the tests in this collection originally required bash. These +scripts have been rewritten in python. Visual Studio Users will appreciate the python implementation as it avoids the +installation of mingw/cygwin and special PATH settings. #### Environment Variables used by the test suite: If you build the code in the directory \build, tests will run using the default values of Environment Variables. -| Variable | Default | Platforms | Purpose | -|:-- |:-- |:-- |:-- | +| Variable | Default | Platforms | Purpose | +|:-- |:-- |:-- |:-- | | EXIV2_BINDIR | **\/build/bin** | All Platforms | Path of built binaries (exiv2.exe) | | EXIV2_PORT | **12762**
**12671**
**12760** | Cygwin
MinGW/msys2
Other Platforms | Test TCP/IP Port | -| EXIV2_HTTP | **http://localhost** | All Platforms | Test http server | -| EXIV2_ECHO | _**not set**_ | All Platforms | For debugging Bash scripts | -| VALGRIND | _**not set**_ | All Platforms | For debugging Bash scripts | -| VERBOSE | _**not set**_ | All Platforms | Causes make to report its actions | +| EXIV2_HTTP | **http://localhost** | All Platforms | Test http server | +| EXIV2_ECHO | _**not set**_ | All Platforms | For debugging bash scripts | +| VALGRIND | _**not set**_ | All Platforms | For debugging bash scripts | +| VERBOSE | _**not set**_ | All Platforms | Causes make to report its actions | | PATH
DYLD\_LIBRARY\_PATH
LD\_LIBRARY\_PATH | $EXIV2\_BINDIR/../lib | Windows
macOS
Other platforms | Path of dynamic libraries | The Variable EXIV2\_PORT or EXIV2\_HTTP can be set to None to skip http tests. The http server is started with the command `python3 -m http.server $port`. On Windows, you will need to run this manually _**once**_ to authorise the firewall to permit python to use the port. [TOC](#TOC)
- ### 4.1 Running tests on a UNIX-like system You can run tests directly from the build: @@ -887,13 +880,13 @@ $ You can run individual tests in the `test` directory. **Caution:** If you build in a directory other than \/build, you must set EXIV2\_BINDIR to run tests from the `test` directory. - ```bash $ cd /build -$ cd ../test -$ ./icc-test.sh -ICC jpg md5 webp md5 png md5 jpg md5 -all testcases passed. +$ make bash_tests +addmoddel_test (testcases.TestCases) ... ok +.... +Ran 176 tests in 9.526s +OK (skipped=6) $ make python_tests ... lots of output ... @@ -906,37 +899,24 @@ $ [TOC](#TOC)
+### 4.2 Running tests on Visual Studio builds from cmd.exe -### 4.2 Running tests on Visual Studio builds - -To run the bash scripts you will need to install MinGW/msys2 which provides you with the bash interpreter. You can run the test suite from bash, or from cmd.exe. - -##### Running tests from MinGW/msys2 bash - -Use the bash interpreter for MinGW/msys2 to run the test suite. It's essential to have a DOS Python3 interpreter on your path called `python3.exe` - -```bash -$ cd /build -$ cd ../test -$ PATH="/c/Python37:$PATH" -``` +**Caution:** _The python3 interpreter must be on the PATH, build for DOS, and called python3.exe. I copied the python.exe program: -**Caution:** _The python3 interpreter must be for DOS and called python3.exe. I copied the python.exe program:_ - -``` -$ cp /cygpath/c/Python37/python.exe /cygpath/c/Python37/python3.exe +```cmd +> copy c:\Python37\python.exe c:\Python37\python3.exe +> set "PATH=c:\Python37;%PATH% ``` -You can execute the test suite as described for UNIX-like systems: +You can execute the test suite as described for UNIX-like systems. +The main difference is that you must use cmake to initiate the test +as make is not a system utility on Windows. ```bash -$ cd /test -$ make tests -$ make python_tests -$ ./icc-test.sh +> cd /build +> cmake --build . --target tests +> cmake --build . --target python_tests ``` -**Caution:** If you build in a directory other than \/build, you must set EXIV2\_BINDIR to run tests from the `test` directory. - ##### Running tests from cmd.exe @@ -954,46 +934,16 @@ c:\...\exiv2\build>cmake --build . --config Release c:\...\exiv2\build> ``` -**Caution:** To run the python tests, _You will need a DOS python3 interpreter which must be called python3.exe. I copied the python.exe program:_ You may have to modify the PATH to ensure that the DOS python3 is used. You may have to modify the PATH to access MinGW/msys2 tools such as bash and make. Be careful to ensure the DOS python3.exe is found before the MinGW/msys2 python3. - -``` -c:\...\exiv2\build>copy c:\Python37\python.exe c:\Python37\python3.exe -c:\...\exiv2\build>set "PATH=c:\Python37;c:\Python37\Scripts;c:\msys64\usr\bin;%PATH%" -``` - -You can now run the tests from cmd.exe: - -``` -c:\...\exiv2\build>cmake --build . --config Release --target tests -``` - -You may prefer to run tests in the directory using MinGW/msys2 make. - -``` -c:\...\exiv2\build\>cd ..\test -c:\...\exiv2\test>make bash_tests -... -c:\...\exiv2\test>make python_tests # or unit_test or version_test -... -c:\...\exiv2\test>make tests # run all the tests -... -``` - -If you wish to use an environment variables, use env: - -``` -c:\...\exiv2\build>env VERBOSE=1 cmake --build . --config Release --target tests -``` - -When you are in the test directory, MinGW/msys2 make supports the following _(more convenient)_ syntax: +If you wish to use an environment variables, use set: ``` -c:\...\exiv2\test>make tests VERBOSE=1 +set VERBOSE=1 +cmake --build . --config Release --target tests +set VERBOSE= ``` [TOC](#TOC)
- ### 4.3 Unit tests The code for the unit tests is in `/unitTests`. To include unit tests in the build, use the *cmake* option `-DEXIV2_BUILD_UNIT_TESTS=On`. @@ -1013,24 +963,23 @@ $ popd [TOC](#TOC)
- ### 4.4 Python tests -You can run the python tests from the build or test directory: +You can run the python tests from the build directory: ```bash -$ cd /build (or cd /test) +$ cd /build $ make python_tests ``` If you wish to run in verbose mode: ```bash -$ cd /build (or cd /test) +$ cd /build $ make python_tests VERBOSE=1 ``` -The python tests are stored in the directory `tests` and you can run them all with the command: +The python tests are stored in the directory tests and you can run them all with the command: ```bash $ cd /tests @@ -1048,34 +997,32 @@ $ python3 runner.py --verbose bugfixes/redmine/test_issue_841.py # or $(find . You may wish to get a brief summary of failures with commands such as: ```bash -$ cd /build (or cd /test) +$ cd /build $ make python_tests 2>&1 | grep FAIL ``` [TOC](#TOC)
- ### 4.5 Test Summary -| *Tests* | Unix Style Platforms _(bash)_ | Visual Studio _(cmd.exe)_ | -|:-- |:--- |:-- | -| | $ cd \/build **or**
$ cd \/test | \> cd \/build | -| tests | $ make tests | \> cmake --build . --config Release --target tests | -| bash_tests | $ make bash_tests | \> cmake --build . --config Release --target bash_tests | -| python_tests | $ make python_tests | \> cmake --build . --config Release --target python_tests | -| unit_test | $ make unit_test | \> cmake --build . --config Release --target unit_test | -| version_test | $ make version_test | \> cmake --build . --config Release --target version_test | +| *Tests* | Unix Style Platforms _(bash)_ | Visual Studio _(cmd.exe)_ | +|:-- |:--- |:-- | +| | $ cd \/build | \> cd \/build | +| tests | $ make tests | \> cmake --build . --config Release --target tests | +| bash_tests | $ make bash_tests | \> cmake --build . --config Release --target bash_tests | +| python_tests | $ make python_tests | \> cmake --build . --config Release --target python_tests | +| unit_test | $ make unit_test | \> cmake --build . --config Release --target unit_test | +| version_test | $ make version_test | \> cmake --build . --config Release --target version_test | +The name **bash_tests** is historical. They are implemented in python. [TOC](#TOC)
- ## 5 Platform Notes There are many ways to set up and configure your platform. The following notes are provided as a guide.
- ### 5.1 Linux Update your system and install the build tools and dependencies (zlib, expat, gtest and others) @@ -1101,7 +1048,6 @@ $ make [TOC](#TOC)
- ### 5.2 macOS You will need to install Xcode and the Xcode command-line tools to build on macOS. @@ -1112,7 +1058,6 @@ I recommend that you build and install CMake from source. [TOC](#TOC)
- ### 5.3 MinGW/msys2 Please note that the platform MinGW/msys2 32 is obsolete and superceded by MinGW/msys2 64. @@ -1176,7 +1121,6 @@ $ [TOC](#TOC)
- ### 5.4 Cygwin/64 Please note that the platform Cygwin/32 is obsolete and superceded by Cygwin/64. @@ -1206,7 +1150,6 @@ endlocal [TOC](#TOC)
- ### 5.5 Visual Studio We recommend that you use Conan to build Exiv2 using Visual Studio. Exiv2 v0.27 can be built with Visual Studio versions 2008 and later. We actively support and build with Visual Studio 2015, 2017 and 2019. @@ -1217,33 +1160,12 @@ As well as Visual Studio, you will need to install CMake, Python3, and Conan. 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) -I use the following batch file `cmd64.bat` to start cmd.exe. I do this to reduce the complexity of the path which grows as various tools are installed on Windows. As well as providing a "stripped down path", it also ensures the DOS python3 and DOS bash are on the path. - -```bat -@echo off -setlocal -if NOT EXIST c:\Python39\python3.exe copy c:\Python39\python.exe c:\Python39\python3.exe -set "P=" -set "P=%P%C:\Python39\;C:\Python39\Scripts;%USERPROFILE%\AppData\Roaming\Python\Python39;" # DOS Python3 -set "P=%P%c:\Program Files\cmake\bin;" # DOS cmake -set "P=%P%c:\msys64\usr\bin;" # OPTIONAL to run test suite msys2 make, bash etc -set "P=%P%c:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin;" -set "P=%P%c:\Windows\System32;" # Windows -set "P=%P%%USERPROFILE%\com;" # OPTIONAL my home-made magic -set "PATH=%P%" -set "EXIV2_EXT=.exe" -color 1e -cmd /S /K cd "%USERPROFILE%\gnu\github\exiv2\0.27-maintenance\" -color -endlocal -``` - -**Caution:** _The python3 interpreter must be for DOS and called python3.exe. I copied the python.exe program:_ ``` ..>copy c:\Python37\python.exe c:\Python37\python3.exe ``` +The python3 interpreter must be on your PATH. [TOC](#TOC)
@@ -1336,5 +1258,5 @@ $ sudo pkg install developer/gcc-7 [TOC](#TOC) -Written by Robin Mills
robin@clanmills.com
Updated: 2021-03-05 +Written by Robin Mills
robin@clanmills.com
Updated: 2021-08-10 diff --git a/cmake/packaging.cmake b/cmake/packaging.cmake index fdc862e89a..8c07cc48da 100644 --- a/cmake/packaging.cmake +++ b/cmake/packaging.cmake @@ -131,6 +131,7 @@ set( DOCS README-SAMPLES.md COPYING exiv2.png + matrix-standard-vector-logo-xs.png ) foreach(doc ${DOCS}) install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${doc} DESTINATION .) diff --git a/releasenotes/CYGWIN/ReadMe.txt b/releasenotes/CYGWIN/ReadMe.txt index ef7bfbda2b..64f84a848e 100644 --- a/releasenotes/CYGWIN/ReadMe.txt +++ b/releasenotes/CYGWIN/ReadMe.txt @@ -8,6 +8,7 @@ README-CONAN.md Developer Manual Appendix README-SAMPLES.md Developer Sample Code Manual releasenotes.txt Late breaking news exiv2.png Exiv2 Logo +matrix-standard-vector-logo-xs.png Chat Server Logo COPYING GPLv2.0 Software License Deliverable Location diff --git a/releasenotes/Darwin/ReadMe.txt b/releasenotes/Darwin/ReadMe.txt index b91581cf93..cea6017633 100644 --- a/releasenotes/Darwin/ReadMe.txt +++ b/releasenotes/Darwin/ReadMe.txt @@ -8,6 +8,7 @@ README-CONAN.md Developer Manual Appendix README-SAMPLES.md Developer Sample Code Manual releasenotes.txt Late breaking news exiv2.png Exiv2 Logo +matrix-standard-vector-logo-xs.png Chat Server Logo COPYING GPLv2.0 Software License Deliverable Location diff --git a/releasenotes/Linux/ReadMe.txt b/releasenotes/Linux/ReadMe.txt index 76e5618fcc..a5adfc15d1 100644 --- a/releasenotes/Linux/ReadMe.txt +++ b/releasenotes/Linux/ReadMe.txt @@ -8,6 +8,7 @@ README-CONAN.md Developer Manual Appendix README-SAMPLES.md Developer Sample Code Manual releasenotes.txt Late breaking news exiv2.png Exiv2 Logo +matrix-standard-vector-logo-xs.png Chat Server Logo COPYING GPLv2.0 Software License Deliverable Location diff --git a/releasenotes/MinGW/ReadMe.txt b/releasenotes/MinGW/ReadMe.txt index 64115dfadb..f0fb62dbf3 100644 --- a/releasenotes/MinGW/ReadMe.txt +++ b/releasenotes/MinGW/ReadMe.txt @@ -8,6 +8,7 @@ README-CONAN.md Developer Manual Appendix README-SAMPLES.md Developer Sample Code Manual releasenotes.txt Late breaking news exiv2.png Exiv2 Logo +matrix-standard-vector-logo-xs.png Chat Server Logo COPYING GPLv2.0 Software License Deliverable Location diff --git a/releasenotes/Unix/ReadMe.txt b/releasenotes/Unix/ReadMe.txt index d7fcfb5145..5e21860b41 100644 --- a/releasenotes/Unix/ReadMe.txt +++ b/releasenotes/Unix/ReadMe.txt @@ -8,6 +8,7 @@ README-CONAN.md Developer Manual Appendix README-SAMPLES.md Developer Sample Code Manual releasenotes.txt Late breaking news exiv2.png Exiv2 Logo +matrix-standard-vector-logo-xs.png Chat Server Logo COPYING GPLv2.0 Software License Deliverable Location diff --git a/releasenotes/msvc/ReadMe.txt b/releasenotes/msvc/ReadMe.txt index 6e2bdfeec1..4bef9cc59f 100644 --- a/releasenotes/msvc/ReadMe.txt +++ b/releasenotes/msvc/ReadMe.txt @@ -8,6 +8,7 @@ README-CONAN.md Developer Manual Appendix README-SAMPLES.md Developer Sample Code Manual releasenotes.txt Late breaking news exiv2.png Exiv2 Logo +matrix-standard-vector-logo-xs.png Chat Server Logo COPYING GPLv2.0 Software License Deliverable Location