1
|
| Travis | AppVeyor | GitLab| Codecov|
|
2
|
|:-------------:|:-------------:|:-----:|:------:|
|
3
|
| [![Build Status](https://travis-ci.org/Exiv2/exiv2.svg?branch=master)](https://travis-ci.org/Exiv2/exiv2) | [![Build status](https://ci.appveyor.com/api/projects/status/d6vxf2n0cp3v88al/branch/master?svg=true)](https://ci.appveyor.com/project/piponazo/exiv2-wutfp/branch/master) | [![pipeline status](https://gitlab.com/D4N/exiv2/badges/master/pipeline.svg)](https://gitlab.com/D4N/exiv2/commits/master) | [![codecov](https://codecov.io/gh/Exiv2/exiv2/branch/master/graph/badge.svg)](https://codecov.io/gh/Exiv2/exiv2) |
|
4
|
|
5
|
<name id="TOC">
|
6
|
### T A B L E _ OF _ C O N T E N T S
|
7
|
|
8
|
1. [Welcome to Exiv2](#1)
|
9
|
2. [Building, Installing, Using and Uninstalling Exiv2](#2)
|
10
|
1. [Build, Install, Use and Uninstall Exiv2 on a UNIX-like system](#2-1)
|
11
|
2. [Build and Install Exiv2 with Visual Studio](#2-2)
|
12
|
3. [Build Options](#2-3)
|
13
|
4. [Dependencies](#2-4)
|
14
|
5. [Building and linking your code with Exiv2](#2-5)
|
15
|
6. [Consuming Exiv2 with CMake](#2-6)
|
16
|
7. [Using pkg-config to compile and link your code with Exiv2](#2-7)
|
17
|
8. [Localisation](#2-8)
|
18
|
9. [Building Exiv2 Documentation](#2-9)
|
19
|
10. [Building Exiv2 Packages](#2-10)
|
20
|
3. [License and Support](#3)
|
21
|
1. [License](#3-1)
|
22
|
2. [Support](#3-2)
|
23
|
4. [Test Suit](#4)
|
24
|
1. [Running tests on a UNIX-like system](#4-1)
|
25
|
2. [Running tests on Visual Studio builds](#4-2)
|
26
|
<name id="platforms">
|
27
|
5. [Platform Notes](#5)
|
28
|
1. [Linux](#5-1)
|
29
|
2. [MacOS-X](#5-2)
|
30
|
3. [MinGW](#5-3)
|
31
|
4. [Cygwin](#5-4)
|
32
|
5. [Microsoft Visual C++](#5-5)
|
33
|
|
34
|
<name id="1">
|
35
|
# Welcome to Exiv2
|
36
|
|
37
|
![Exiv2](exiv2.png)
|
38
|
|
39
|
Exiv2 is a C++ library and a command line utility to read,
|
40
|
write, delete and modify Exif, IPTC, XMP and ICC image metadata.
|
41
|
|
42
|
| Exiv2 Resource | Location |
|
43
|
|:------ |:---- |
|
44
|
| Project Homepage | [https://github.com/Exiv2/exiv2](https://github.com/Exiv2/exiv2) |
|
45
|
| Downloads and Documentation | [http://exiv2.dyndns.org](http://exiv2.dyndns.org:8080) |
|
46
|
| BuildServer: | [http://exiv2.dyndns.org:8080](http://exiv2.dyndns.org:8080) |
|
47
|
| License (GPLv2) | [license.txt](license.txt) |
|
48
|
| CMake Downloads | [https://cmake.org/download/](https://cmake.org/download/) |
|
49
|
|
50
|
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.
|
51
|
|
52
|
[TOC](#TOC)
|
53
|
<name id="2">
|
54
|
## 2 Building, Installing, Using and Uninstalling Exiv2
|
55
|
|
56
|
You need CMake to build Exiv2: https://cmake.org/download/
|
57
|
|
58
|
<name id="2-1">
|
59
|
### 2.1 Build, Install, Use, Uninstall Exiv2 on a UNIX-like system
|
60
|
|
61
|
```
|
62
|
$ cd <exiv2dir> ; mkdir build ; cd build
|
63
|
$ cmake .. -G "Unix Makefiles" ; cmake --build . ; make test
|
64
|
$ sudo make install
|
65
|
```
|
66
|
|
67
|
This will install the library into the "standard locations". The library will be installed in `/usr/local/lib`, executables (including the exiv2 command-line program) in `/usr/local/bin/` and header files in `/usr/local/include/exiv2`
|
68
|
|
69
|
#### Using the exiv2 command-line program
|
70
|
|
71
|
To execute the exiv2 command line program, you should update your path to search /usr/local/bin/
|
72
|
|
73
|
```
|
74
|
$ export PATH="/usr/local/bin:$PATH"
|
75
|
```
|
76
|
|
77
|
you'll also need to locate libexiv2 at run time:
|
78
|
|
79
|
```
|
80
|
$ export LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH" # Linux, Cygwin, MinGW/msys2
|
81
|
$ export DYLD_LIBRARY_PATH="/usr/local/lib:$DYLD_LIBRARY_PATH" # MacOS-X
|
82
|
```
|
83
|
|
84
|
#### Uninstall Exiv2 on a UNIX-like system
|
85
|
|
86
|
```
|
87
|
$ sudo make uninstall
|
88
|
```
|
89
|
|
90
|
[TOC](#TOC)
|
91
|
<name id="2-2">
|
92
|
### 2.2 Build and Install Exiv2 with Visual Studio
|
93
|
|
94
|
We recommend that you use conan with CMake to build Exiv2 with Visual Studio.
|
95
|
See [README-CONAN](README-CONAN.md) for more information
|
96
|
|
97
|
[TOC](#TOC)
|
98
|
<name id="2-3">
|
99
|
### 2.3 Build options
|
100
|
|
101
|
There are two groups of CMake options. There are many options defined by CMake. Here are some particularly useful options:
|
102
|
|
103
|
| Options | Purpose (_default_) |
|
104
|
|:------------- |:------------- |
|
105
|
| CMAKE\_INSTALL\_PREFIX<br/>CMAKE\_BUILD\_TYPE<br/>BUILD\_SHARED\_LIBS | Where to install on your computer _**(/usr/local)**_<br/>Type of build _**(Release)**_<br/>Build exiv2lib as shared or static _**(On)**_ |
|
106
|
|
107
|
Options defined by <exiv2>/CMakeLists.txt include:
|
108
|
|
109
|
```
|
110
|
576 rmills@rmillsmm:~/gnu/github/exiv2/exiv2 $ grep ^option CMakeLists.txt
|
111
|
option( BUILD_SHARED_LIBS "Build exiv2lib as a shared library" ON )
|
112
|
option( EXIV2_ENABLE_XMP "Build with XMP metadata support" ON )
|
113
|
option( EXIV2_ENABLE_EXTERNAL_XMP "Use external version of XMP" OFF )
|
114
|
option( EXIV2_ENABLE_PNG "Build with png support (requires libz)" ON )
|
115
|
option( EXIV2_ENABLE_NLS "Build native language support (requires gettext)" ON )
|
116
|
...
|
117
|
577 rmills@rmillsmm:~/gnu/github/exiv2/exiv2 $
|
118
|
```
|
119
|
|
120
|
Options are defined on the CMake command line:
|
121
|
```
|
122
|
$ cmake -DBUILD_SHARED_LIBS=On -DEXIV2_ENABLE_NLS=OFF
|
123
|
```
|
124
|
|
125
|
[TOC](#TOC)
|
126
|
<name id="2-4">
|
127
|
### 2.4 Dependencies
|
128
|
|
129
|
The following Exiv2 features are enabled by default and require external libraries. You can disable the dependency with CMake options:
|
130
|
|
131
|
| Feature | Package | cmake option to disable | Availability |
|
132
|
|:-------------------------- |:-------- |:---------------------------- |:----------- |
|
133
|
| PNG image support | zlib | -DEXIV2\_ENABLE\_PNG=Off | [http://zlib.net/](http://zlib.net/) |
|
134
|
| Native language support | gettext | -DEXIV2\_ENABLE\_NLS=Off | [http://www.gnu.org/software/gettext/](http://www.gnu.org/software/gettext/) |
|
135
|
| XMP support | expat | -DEXIV2\_ENABLE\_XMP=Off | [http://expat.sourceforge.net](http://expat.sourceforge.net)/<br/>Use _**Expat 2.2.6**_ and later |
|
136
|
|
137
|
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.
|
138
|
|
139
|
Notes about different platforms are included in this document: [Platform Notes](#platforms)
|
140
|
|
141
|
You may choose to install dependences with conan. This is supported on all platforms and is especially useful for users of Visual Studio.
|
142
|
See [README-CONAN](README-CONAN.md) for more information.
|
143
|
|
144
|
[TOC](#TOC)
|
145
|
<name id="2-5">
|
146
|
### 2.5 Building and linking your code with Exiv2
|
147
|
|
148
|
There are detailed platform notes about linking code in releasenotes\platform\ReadMe.txt
|
149
|
|
150
|
Platform: Linux | Darwin | MinGW | CYGWIN | MSVC
|
151
|
|
152
|
In general you need to do the following:
|
153
|
|
154
|
1) Application code should be written in C++ 98 and should include exiv2 headers:
|
155
|
|
156
|
```
|
157
|
#include <exiv2/exiv2.hpp>
|
158
|
```
|
159
|
|
160
|
2 You should compile your C++ code with the directive: `-I/usr/local/include`
|
161
|
|
162
|
3 You should link your code with libexiv2 using the linker options: `-lexiv2` and `-L/usr/local/lib`
|
163
|
|
164
|
The following is a typical command to build an link with libexiv2:
|
165
|
|
166
|
```
|
167
|
$ g++ -std=c++98 myprog.cpp -o myprog -I/usr/local/include -L/usr/local/lib -lexiv2
|
168
|
```
|
169
|
|
170
|
[TOC](#TOC)
|
171
|
<name id="2-6">
|
172
|
### 2.6 Consuming Exiv2 with CMake
|
173
|
|
174
|
When exiv2 is installed, the files required to consume Exiv2 are installed in `${CMAKE_INSTALL_PREFIX}/share/exiv2/cmake/`
|
175
|
|
176
|
A Project to demonstrate consuming Exiv2 via CMake using those files is available here: [https://github.com/piponazo/exiv2Consumer](https://github.com/piponazo/exiv2Consumer)
|
177
|
|
178
|
[TOC](#TOC)
|
179
|
<name id="2-7">
|
180
|
### 2.7 Using pkg-config to compile and link your code with Exiv2
|
181
|
|
182
|
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:
|
183
|
|
184
|
```
|
185
|
$ export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH"
|
186
|
```
|
187
|
|
188
|
To compile and link using exiv2.pc, you usually add the following to your Makefile.
|
189
|
|
190
|
```
|
191
|
PKGCONFIG=pkg-config
|
192
|
CPPFLAGS := `pkg-config exiv2 --cflags`
|
193
|
LDFLAGS := `pkg-config exiv2 --libs`
|
194
|
```
|
195
|
|
196
|
If you are not using make, you can use pkg-config as follows:
|
197
|
|
198
|
```
|
199
|
g++ -std=c++98 myprogram.cpp -o myprogram $(pkg-config exiv2 --libs --cflags)
|
200
|
```
|
201
|
|
202
|
[TOC](#TOC)
|
203
|
<name id="2-8">
|
204
|
### 2.8 Localisation
|
205
|
|
206
|
Localisation is supported on "*ix" platforms: Linux, MacOS-X, Cygwin and MinGW/msys2. Localisation is not supported for Visual Studio builds.
|
207
|
|
208
|
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.
|
209
|
|
210
|
1) Running exiv2 in a foreign language
|
211
|
|
212
|
```
|
213
|
$ env LC_ALL=fr_FR exiv2
|
214
|
exiv2: Une action doit être spécifié
|
215
|
exiv2: Au moins un fichier est nécessaire
|
216
|
Utilisation : exiv2 [ options ] [ action ] fichier ...
|
217
|
|
218
|
Manipulation des métadonnées EXIF issues des images.
|
219
|
$
|
220
|
```
|
221
|
|
222
|
2) Adding additional languages to exiv2
|
223
|
|
224
|
To support a new language which we'll designate 'xy' for this discussion:
|
225
|
|
226
|
2.1) Generate a po file from the po template:
|
227
|
|
228
|
```
|
229
|
$ cd <exiv2dir>
|
230
|
$ mkdir -p po/xy
|
231
|
$ msginit --input=po/exiv2.pot --locale=xy --output=po/xy.po
|
232
|
```
|
233
|
2.2) Edit/Translate the strings in po/xy.po
|
234
|
|
235
|
I edited the following:
|
236
|
|
237
|
```
|
238
|
#: src/exiv2.cpp:237
|
239
|
msgid "Manipulate the Exif metadata of images.\n"
|
240
|
msgstr ""
|
241
|
```
|
242
|
to:
|
243
|
|
244
|
```
|
245
|
#: src/exiv2.cpp:237
|
246
|
msgid "Manipulate the Exif metadata of images.\n"
|
247
|
msgstr "Manipulate image metadata.\n"
|
248
|
```
|
249
|
|
250
|
2.3) Generate the messages file:
|
251
|
|
252
|
```
|
253
|
$ mkdir -p po/xy/LC_MESSAGES
|
254
|
$ msgfmt --output-file=po/xy/LC_MESSAGES/exiv2.mo po/xy.po
|
255
|
```
|
256
|
|
257
|
2.4) Install and test your messages:
|
258
|
|
259
|
You have to install your messages to test them. It's not possible to test a message file from the build/bin directory.
|
260
|
|
261
|
```
|
262
|
$ sudo cp -R po/xy /usr/local/share/locale/xy
|
263
|
$ env LC_ALL=xy exiv2
|
264
|
exiv2: An action must be specified
|
265
|
exiv2: At least one file is required
|
266
|
Usage: exiv2 [ options ] [ action ] file ...
|
267
|
|
268
|
Manipulate image metadata. <--------- Edited message!
|
269
|
$
|
270
|
```
|
271
|
|
272
|
2.5) Submitting your new language file for inclusion in future versions of Exiv2:
|
273
|
|
274
|
Open a new issue on https://github.com/exiv2/exiv2 and attach the file po/xy/exiv2.po
|
275
|
|
276
|
|
277
|
[TOC](#TOC)
|
278
|
<name id="2-9">
|
279
|
### 2.9 Building Exiv2 Documentation
|
280
|
|
281
|
Building documentation requires installing special tools. You will probably prefer to
|
282
|
read the documentation on-line from the project website: http://exiv2.dyndns.org
|
283
|
|
284
|
Additionally, complete copies of the project website are archived on the buildserver
|
285
|
and can be downloaded for off-line use. http://exiv2.dyndns.org:8080/userContent/builds/Website/
|
286
|
|
287
|
To build documentation, use the CMake option `-DEXIV2_BUILD_DOC=On`.
|
288
|
Additionally, you will require an additional build step to actually build the documentation.
|
289
|
|
290
|
```
|
291
|
$ cmake ..options.. -DEXIV2_BUILD_DOC=On
|
292
|
$ make doc
|
293
|
```
|
294
|
|
295
|
To build the documentation, you must install the following products:
|
296
|
|
297
|
| Product | Availability |
|
298
|
|:------------ |:------------ |
|
299
|
| 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/) |
|
300
|
|
301
|
[TOC](#TOC)
|
302
|
<name id="2-10">
|
303
|
### 2.10 Building Exiv2 Packages
|
304
|
|
305
|
To enable building of packages, use the CMake option `-DEXIV2_TEAM_PACKAGING=On`.
|
306
|
|
307
|
You should not build Exiv2 Packages. This feature is intended for use by Team Exiv2 to create Platform and Source Packages on the buildserver.
|
308
|
|
309
|
There are two types of Exiv2 packages which are generated by cpack from the cmake command-line.
|
310
|
|
311
|
1) Platform Package (header files, binary library and samples. Some documentation and release notes)
|
312
|
|
313
|
Create and build exiv2 for your platform.
|
314
|
|
315
|
```bash
|
316
|
$ git clone https://github.com/exiv2/exiv2
|
317
|
$ mkdir -p exiv2/build
|
318
|
$ cd exiv2/build
|
319
|
$ cmake .. -G "Unix Makefiles" -DEXIV2_TEAM_PACKAGING=On
|
320
|
...
|
321
|
-- Build files have been written to: .../build
|
322
|
$ cmake --build . --config Release
|
323
|
...
|
324
|
[100%] Built target addmoddel
|
325
|
$ make package
|
326
|
...
|
327
|
CPack: - package: /path/to/exiv2/build/exiv2-0.27.0.1-Linux.tar.gz generated.
|
328
|
```
|
329
|
|
330
|
2) Source Package
|
331
|
|
332
|
```bash
|
333
|
$ make package_source
|
334
|
Run CPack packaging tool for source...
|
335
|
...
|
336
|
CPack: - package: /path/to/exiv2/build/exiv2-0.27.0.1-Source.tar.gz generated.
|
337
|
```
|
338
|
|
339
|
You may prefer to run `$ cmake --build . --config Release --target package_source`
|
340
|
|
341
|
[TOC](#TOC)
|
342
|
<name id="3">
|
343
|
## 3 License and Support
|
344
|
|
345
|
All project resources are accessible from the project website.
|
346
|
https://github.com/Exiv2/exiv2
|
347
|
|
348
|
<name id="3-1">
|
349
|
### 3.1 License
|
350
|
|
351
|
Copyright (C) 2004-2018 Exiv2 authors.
|
352
|
You should have received a copy of the file [license.txt](license.txt) which details the GPLv2 license.
|
353
|
|
354
|
Exiv2 is free software; you can redistribute it and/or modify it under
|
355
|
the terms of the GNU General Public License as published by the Free
|
356
|
Software Foundation; either version 2 of the License, or (at your
|
357
|
option) any later version.
|
358
|
|
359
|
Exiv2 is distributed in the hope that it will be useful, but WITHOUT
|
360
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
361
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
362
|
for more details.
|
363
|
|
364
|
You should have received a copy of the GNU General Public License
|
365
|
along with this program; if not, write to the Free Software
|
366
|
Foundation, Inc., 51 Franklin Street, 5th Floor, Boston,
|
367
|
MA 02110-1301 USA.
|
368
|
|
369
|
[TOC](#TOC)
|
370
|
<name id="3-2">
|
371
|
### 3.2 Support
|
372
|
For new bug reports and feature requests, please open an issue in Github.
|
373
|
|
374
|
[TOC](#TOC)
|
375
|
<name id="4">
|
376
|
## 4 Running the test suite
|
377
|
|
378
|
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.
|
379
|
|
380
|
<name id="4-1">
|
381
|
### 4.1 Running tests on a UNIX-like system
|
382
|
|
383
|
You can run the suite directly from the build:
|
384
|
|
385
|
```
|
386
|
$ make build
|
387
|
...
|
388
|
$ make tests
|
389
|
... lots of output ...
|
390
|
Summary report
|
391
|
```
|
392
|
|
393
|
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
|
394
|
|
395
|
```
|
396
|
rmills@rmillsmbp-w7 ~/gnu/github/exiv2/exiv2/build $ cd ../test
|
397
|
rmills@rmillsmbp-w7 ~/gnu/github/exiv2/exiv2/test $ env EXIV2_BINDIR=${PWD}/../build/bin ./icc-test.sh
|
398
|
ICC jpg md5 webp md5 png md5 jpg md5
|
399
|
all testcases passed.
|
400
|
|
401
|
rmills@rmillsmbp-w7 ~/gnu/github/exiv2/exiv2/test $ env EXIV2_BINDIR=${PWD}/../build/bin make newtests
|
402
|
```
|
403
|
|
404
|
[TOC](#TOC)
|
405
|
<name id="4-2">
|
406
|
### 4.2 Running tests on Visual Studio builds
|
407
|
|
408
|
Use the bash interpreter for MinGW/msys2 to run the test suite. It's essential to have a DOS Python3 interpreter on your path. The variables EXIV2\_BINDIR and EXIV2\_EXT enable the test suite to locate the MSVC build artifacts.
|
409
|
|
410
|
```
|
411
|
$ cd <exiv2dir>/build
|
412
|
$ cd ../test
|
413
|
$ PATH="/c/Python36:$PATH"
|
414
|
$ export EXIV2_EXT=.exe
|
415
|
$ export EXIV2_BINDIR=${PWD}/../build/bin
|
416
|
```
|
417
|
|
418
|
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:
|
419
|
|
420
|
```
|
421
|
$ cd <exiv2dir>/test
|
422
|
$ make test
|
423
|
$ make newtests
|
424
|
$ ./icc-test.sh
|
425
|
```
|
426
|
|
427
|
[TOC](#TOC)
|
428
|
<name id="5">
|
429
|
## 5 Platform Notes
|
430
|
|
431
|
There are many ways to set up and configure your platform. The following notes are provided as a guide.
|
432
|
|
433
|
<name id="5-1">
|
434
|
### 5.1 Linux
|
435
|
|
436
|
Update your system and install the build tools.
|
437
|
|
438
|
```
|
439
|
sudo apt --yes update
|
440
|
sudo apt install --yes build-essential git libxml2-utils cmake python3 libexpat1-dev libz-dev
|
441
|
```
|
442
|
|
443
|
Get the code from GitHub and build
|
444
|
|
445
|
```
|
446
|
$ mkdir -p ~/gnu/github/exiv2
|
447
|
$ cd ~/gnu/github/exiv2
|
448
|
$ git clone https://github.com/exiv2/exiv2
|
449
|
$ cd exiv2
|
450
|
$ mkdir build ; cd build ;
|
451
|
$ cmake .. -G "Unix Makefiles"
|
452
|
$ make
|
453
|
```
|
454
|
|
455
|
[TOC](#TOC)
|
456
|
<name id="5-2">
|
457
|
### 5.2 MacOS-X
|
458
|
|
459
|
You will need to install Xcode and the Xcode command-line tools to build anything on the Mac.
|
460
|
|
461
|
You should build and install libexpat and zlib. You may use brew, macports, build from source, or use conan.
|
462
|
|
463
|
I recommend that you build and install CMake from source.
|
464
|
|
465
|
[TOC](#TOC)
|
466
|
<name id="5-3">
|
467
|
### 5.3 MinGW
|
468
|
|
469
|
We provide support for both 64bit and 32bit builds using MinGW/msys2. [https://www.msys2.org](https://www.msys2.org)
|
470
|
|
471
|
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.
|
472
|
|
473
|
#### MinGW/msys2 64 bit
|
474
|
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)
|
475
|
|
476
|
I use the following batch file to start the MinGW/msys2 64 bit bash shell from the Dos Command Prompt (cmd.exe)
|
477
|
|
478
|
```
|
479
|
@echo off
|
480
|
setlocal
|
481
|
set "PATH=c:\msys64\usr\bin;c:\msys64\usr\local\bin;"
|
482
|
set "HOME=c:\msys64\home\rmills"
|
483
|
cd %HOME%
|
484
|
set "PS1=\! \u@\h-64:\w \$ "
|
485
|
bash.exe -norc
|
486
|
```
|
487
|
|
488
|
#### MinGW/msys2 32 bit
|
489
|
Install: [http://repo.msys2.org/distrib/i686/msys2-i686-20180531.exe](http://repo.msys2.org/distrib/i686/msys2-i686-20180531.exe)
|
490
|
|
491
|
I use the following batch file to start the MinGW/msys2 32 bit bash shell from the Dos Command Prompt (cmd.exe)
|
492
|
|
493
|
```
|
494
|
@echo off
|
495
|
setlocal
|
496
|
set "PATH=c:\msys32\usr\bin;c:\msys32\usr\local\bin;"
|
497
|
set "HOME=c:\msys32\home\rmills"
|
498
|
cd %HOME%
|
499
|
set "PS1=\! \u@\h-32:\w \$ "
|
500
|
bash.exe -norc
|
501
|
```
|
502
|
|
503
|
#### Install MinGW Dependencies
|
504
|
|
505
|
Install tools and dependencies:
|
506
|
|
507
|
```
|
508
|
$ for i in base-devel git cmake coreutils python3 man gcc gdb make dos2unix diffutils zlib-devel libexpat-devel libiconv-devel; do (echo y|pacman -S $i); done
|
509
|
```
|
510
|
|
511
|
You can upgrade all installed packages on your system with the following command. For me, this broke msys32 and I had to reinstall msys32 and all the dependencies. Your experience may be different.
|
512
|
|
513
|
```
|
514
|
$ pacman -Syu
|
515
|
```
|
516
|
|
517
|
#### Download exiv2 from github and build
|
518
|
|
519
|
```
|
520
|
$ mkdir -p ~/gnu/github/exiv2
|
521
|
$ cd ~/gnu/github/exiv2
|
522
|
$ git clone https://github.com/exiv2/exiv2
|
523
|
$ cd exiv2
|
524
|
$ mkdir build ; cd build ;
|
525
|
$ cmake .. -G "Unix Makefiles"
|
526
|
$ make
|
527
|
```
|
528
|
|
529
|
#### MinGW and Regex
|
530
|
|
531
|
The exiv2 command line program provides a `--grep` option which filters output. The implementation requires the header file `<regex.h>` and supporting library to be available during the build. When not available, the option degrades to a substring match. Because there are several versions of `<regex.h>` available on the MinGW platform, detection of Regex is always disabled on this platform and uses substring match.
|
532
|
|
533
|
[TOC](#TOC)
|
534
|
<name id="5-4">
|
535
|
### 5.4 Cygwin
|
536
|
|
537
|
Download: [https://cygwin.com/install.html](https://cygwin.com/install.html) and run setup-x86_64.exe
|
538
|
|
539
|
You need:
|
540
|
make, cmake, gcc, pkg-config, dos2unix, zlib-devel, libexpat1-devel, git, python3-interpreter, libiconv, libxml2-utils, libncurses.
|
541
|
|
542
|
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)
|
543
|
|
544
|
Download and build cmake from source because I can't get the cygwin installed cmake 3.6.2 to work.
|
545
|
To build cmake from source, you need libncurses. [https://cmake.org/download/](https://cmake.org/download/)
|
546
|
|
547
|
[TOC](#TOC)
|
548
|
<name id="5-5">
|
549
|
### 5.5 Microsoft Visual C++
|
550
|
|
551
|
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.
|
552
|
|
553
|
As well as Microsoft Visual Studio, you will need to install CMake, Python3, and Conan.
|
554
|
|
555
|
1) Binary installers for CMake on Windows are availably from [https://cmake.org/download/](https://cmake.org/download/).<br/>
|
556
|
2) Binary installers for Python3 are available from [python.org](https://python.org)<br/>
|
557
|
3) Conan can be installed using python/pip. Details in [README-CONAN.md](README-CONAN.md)
|
558
|
|
559
|
[TOC](#TOC)
|
560
|
|