Creative Commons License
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 2.5 Switzerland License.

How to install Perl, ExifTool and gpsPhoto in a MS Windows XP environment

last update: November, 30th. 2007

This installation summary shall help the novice user to install and enable the proper functioning of the two great pieces of software in a MS Windows XP environment.
Sequentially following the procedures outlined below will enable you to run Exiftool and gpsPhoto from any folder you are currently positioned.
(Existing Perl users might prefer a different Perl environment.)
Please also consult the authors WEB-pages for additional instructions and information.

Acknowledgements to the author of ExifTool, Phil Harvey and to the Authors of gpsPhoto, Andreas Neumann and Peter Sykora.

Perl - from Active State

(note: the Perl Syntax for the double colon '::' refers to hyphen '-' in MS Windows)

Download the latest Perl version (currently 5.6.1.638) for Windows as MSI-Package from here:
http://www.activestate.com/Products/activeperl
and run the downloaded MSI-Package.

ExifTool

ExifTool can be obtained in 2 ways (a or b, c)
and installed in 3 ways:

a: This option installs the ExifTool Package from Active State (currently Version 5.25). To do so, start the Perl Package Manager from the Windows Menu.
A Command Window opens displaying the ppm-prompt 'ppm>'. Type:install exif-tool

b: (my preferred option) get the latest ExifTool Version from the developers/project WEB-Page:
http://www.sno.phy.queensu.ca/~phil/exiftool/index.html

Once downloaded, extract the package for ExifTool. To find the latest information for the current release open the README-file (no extension) in your Internet Explorer.

Important: MS Windows users in addition need to download NMAKE15.EXE, unpack it and place the files into C:/Windows/System32.
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q132084

Before proceeding make sure that the additional path variable 'C:\Perl\bin\; has become part of your system path statement.
Either you set the additional path variable manually 'C:\Perl\bin\; or you can simply restart the Computer.
Actually the best option is to restart your machine before proceeding to the next step

To build a Perl package for ExifTool do the follwing:
Open a CMD-Window and change to the folder where you have the extracted version of ExifTools
eg: c:\...\...\Downloads\Image-ExifTool-6.98>

Makefile.pl        (this creates file 'Makefile' unsed by 'nmake')
nmake             (this prepares the ExifTool Module to beinstalled in your Perl invironment)
nmake install       (this installs the ExifTool Module into your Perl invironment)

c: This option allows to run ExifTool as a Windows Executable

Please refer to the installation instructions on the developers page.

The knowledgebase for ExifTool may provide answers to a specific problem that someone had asked before:
http://www.cpanforum.com/dist/Image-ExifTool

gpsPhoto

Up-to-date details can be found at the developers/project WEB-Page itself:

http://www.carto.net/projects/photoTools/gpsPhoto/ From there you should download the latest release of gpsPhoto.pl

Copy 'gpsPhoto.pl' into a folder that is also in the path variable of your system. Normally 'c:\windows' is sufficient and allows to run 'gpsPhoto.pl' from anywhere.

There was a Windows executable (.exe) available. Contact Andreas Neumann and suggest a donation to his work.

gpsPhoto might require additional modules like 'math-round', 'datemanip' and 'XML-TreeBuilder' for the Perl installation as discussed here.
It seems that in Active Perl Version 5.8 these steps may not be necessary. But I have not verified this.

To install these additional Pearl Packages for gpsPhoto to run properly do the following:
Start the Perl Package Manager (PPM) from the Windows Menu.
A Command Window opens displaying the PPM-Prompt' ppm>

Type: install math-round
Effect: the package will be downloaded and installed

Type: install datemanip
Effect: the package will be downloaded and installed

Type: install XML-TreeBuilder
Effect: the package and the HTML-Element package will be downloaded and installed

Type: query *
Effect: the PERL Package Manager displays all installed modules

Type: search followed by a term eg. exif
Effect: the PERL Package Manager displays available or installed modules for that term.

When you run gpsPhoto.pl now, there is a great possibility that gpsPhoto will produce the following error:

To correct this problem for your environment you need to download the Math-Complex-1.37 Module and then to install it.
The installation will inform you that there is a conflicting Math-Complex Module and the solution is provided (see below).

To build a Perl package for Math-Complex do the follwing:
Open a CMD-Window and change to the folder where you have the extracted version of Math-Complex
eg: c:\...\...\Downloads\Math-Complex-1.37>

Makefile.pl        (this creates file 'Makefile' unsed by 'nmake')
nmake             (this prepares the Math-Complex Module to beinstalled in your Perl invironment)
nmake install       (this installs the Math-Complex Module into your Perl invironment)

Perl from Active State installs a different version of the Math/Complex and Math/Trig Modules than required by gpsPhoto.
Hence nmake install will produce the following message:

Do as the message suggests and type nmake install UNINST=1
(remember 'make' has become 'nmake' for our Windows Installation).

As a result gpsPhoto.pl will no longer produce this error.

Earlier versions of gpsPhoto required some changes to 'gpsPhoto.pl' to process TIF files.
The current version does not require this change.

To make gpsPhoto process your TIF files edit the gpsPhoto.pl and insert/add the following at line 191 (as of August 2006):
$ext eq ".TIF" || $ext eq ".tif" ||
Note: The "||" implies the function 'or', so don't add another "||" after the last extension at the end of the line.

Using gpsPhoto

Before you apply certain statements to your life image data one should use a subset of images to be certain that your commmand composition acts according to your intention.

For the sample below, I have created a folder named 'try' and two subfolders named 'images' (that's where the images are) and 'gps' (that's where the corresponding GPX file is).
Also I have created a list named 'list.txt' that contains the filenames only (the command: dir /b > list.txt creates that list).

Open the Windows Command-Prompt Window, change to the folder where your images are located (according to the entries in your 'list.txt') and then type the following sample statement:

gpsphoto.pl -I c:\try\images\list.txt --gpsfile c:\try\gps\20061008.gpx --timeoffset 0 --maxtimediff 150 --copyright "by-nc-sa" --keywords "Truck, Nevada" --credit "Hans Loepfe, HALO-Photographs" --copydate

Explanation of the Options and Paramters used:

A listing of Options is displayed by typing gpsPhoto.pl without parameters.
A very useful parameter is --dry-run . It prevents gpsPhoto from executing.
The on-line listing and explanation for all gpsPhoto options can be found under this URL: <http://sourceforge.net/docman/display_doc.php?docid=37063&group_id=180378".>
Type this URL into your browsers address bar (!).

----------------------------------------

If anything goes wrong, check first that the term 'C:\Perl\bin\; has been applied to your path setting.
To check, open a CMD-Window and type set. At the statement 'Path=' you should find C:\Perl\bin\; among other statements.
If you don't find it, restart your machine and check the same again.
After a restart it should be here now, if still not, then go back to the drawing board (meaning something went wrong).
While I was writing this installation I found that it often helped to shut down the machine, take a coffe break and start it up again. A warm start normally did not help. It seems as if there is a memory management problem in the air.

----------------------------------------

This installation procedure has recently been verified for an installation on a machine without any Perl installed. It worked out just fine for me.
This document was created by Hans Loepfe, HALO-Photographs.com, August 18th. 2006 (updated September 26th, 2007 / November 30th., 2007)

In case you would like to contact me please use this Contact form: Contact & Anfragen

Page is valid XHTML 1.0 Transitional Click one of the Icons to check this or another WEB-page for its markup and CSS validation status. Page uses validated CSS